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
Losing parameter values in chirpstack.toml and chirpstack-gateway-bridge.toml during upgrade #295
Comments
Let me look into this, it might be an issue in the Debian postinst script which gets triggered on installation and upgrading. |
Thanks a lot. |
The above fixes the issue. My mistake, the |
We will test this during upgrading at weekend to confirm if the issue is resolved. |
Initially this was added to make development using Docker Compose easier. However, in my experience Docker Compose is not great for the reason that there might be environmental differences between Rust running in Compose and Rust running outside Compose (if using VSCode with Rust plugin, then rust-analyzer will perform checks in the background). This and 'cross' not working properly in Compose was the reason to migrate to nix, as it provides a reproducible environment for development that can also be used by VSCode (using the Nix environment selector extension) and GitHub Actions (for the CI pipeline). As the chirpstack-docker repository provides its own configuration files, these files are not included in the Dockerfile and because we are rewriting these env variables anyway to 'localhost' in the .deb and .rpm post-installation script, it is better to set these to localhost by default. The post-installation rewrite to 'localhost' is causing issues on upgrade (#295). If we only do the rewrite on initial installation, then we run in an other issue; the package-manager will prompt that the config file has changed (from 'localhost' to '$MQTT_BROKER_HOST' for example) and will ask if you would like to overwrite or not. If the end-user would accept the config changes without looking at the diff this would break the installation as most likely, these environment are not set (which is why we were rewriting these to 'localhost' in the first place).
Hi all,
During upgrading of ChirpStack v4.x and ChirpStack Gateway Bridge v4.x, my parameter values in the chirpstack.toml and chirpstack-gateway-bridge.toml are overwritten by default values such as localhost and port 1883 (for MQTT)...
I always try to use environment parameters (such as $MQTT_SERVER and $MQTT_PORT) in the toml files.
Could we use environment parameters and parameters separately in two files? One for configuration (chirpstack.toml) and one for custom parameter values?
So it is more convenienent and less downtime during upgrading.
Thanks a lot.
The text was updated successfully, but these errors were encountered: