-
Notifications
You must be signed in to change notification settings - Fork 428
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mount addon_config into container #642
Conversation
zigbee2mqtt/config.json
Outdated
@@ -35,7 +47,7 @@ | |||
"8099/tcp": "Frontend tcp-listen port" | |||
}, | |||
"options": { | |||
"data_path": "/config/zigbee2mqtt", | |||
"data_path": "/addon_config/zigbee2mqtt", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems to be breaking for existing installations, I've tried updating from an older version and the data_path
changes to /addon_config/zigbee2mqtt
which will result in a clean instance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm I gave this a few more tests and it seems like the path does indeed get overridden if no option is ever changed, since I'm not using the default mqtt setup I've always changed that and never noticed...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added an automatic migration to the entrypoint script
zigbee2mqtt/CHANGELOG.md
Outdated
@@ -1,3 +1,14 @@ | |||
## [Unreleased] | |||
- ⚠️ **Breaking changes** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this can be removed now since it's not breaking anymore
common/rootfs/docker-entrypoint.sh
Outdated
|
||
bashio::log.info "Configuration migrated successfully." | ||
bashio::log.info "Deleting old configuration from /config/zigbee2mqtt" | ||
rm -rf /config/zigbee2mqtt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we keep the directory for some version to allow downgrades? Or does this directory get restored when you restore a backup?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A full Home Assistant backup would restore the folder, just restoring the addon would not. I wasn't sure whether to keep it or delete the folder, but I fear keeping it will result in users just upgrading without reading the release notes and then wondering why their settings don't get applied/the folder doesn't reflect changes/logs not getting stored etc...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, so we should be a bit cautious with this since you cannot downgrade anymore. Maybe release this together with z2m 2.0.0? (Koenkk/zigbee2mqtt#24198)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there an estimated timeframe for 2.0?
Maybe it would make sense to get just the additional mount point merged now so it's possible to manually configure the addon to use the addon_config dir and then update the default/add the automatic migration for 2.0?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there an estimated timeframe for 2.0?
In a few months (you can track progress here: Koenkk/zigbee2mqtt#24198)
Maybe it would make sense to get just the additional mount point merged now so it's possible to manually configure the addon to use the addon_config dir and then update the default/add the automatic migration for 2.0?
Sounds good!
a1f5b57
to
cf149f9
Compare
Thanks! |
Fixes #627