Hi all,
when reviewing osmo-hlr db schema upgrades, I came up with the idea that we shouldn't upgrade automatically. That's why, for schema updates, osmo-hlr now refuses to start and requires one start with the --db-upgrade option.
Our systemd service file does not include that option.
The result is that after an upgraded osmo-hlr binary, admins may have to take extra action to upgrade the DB.
The rationale is that if someone by accident launches a newer osmo-hlr only once, with automatic upgrade the user is then stuck with the newer version DB, since we don't make a backup and we don't provide a downgrade path.
I'm now wondering whether that is really necessary. In the daily churn, it creates noise. How to make this less noisy?
- Users could add the --db-upgrade option to the service file to always upgrade. (But it is cumbersome to have a .service file that differs from the installed version)
- We could also add a cfg file option to allow-db-upgrades.
- We could drop the behavior and always upgrade.
In the lack of strong opinions, this will probably stay as it is. I'd just like to hear what you guys think about it. Is it annoying or a good idea?
Thanks! ~N
On 14/01/2019 17:12, Neels Hofmeyr wrote:
Hi all,
The rationale is that if someone by accident launches a newer osmo-hlr only once, with automatic upgrade the user is then stuck with the newer version DB, since we don't make a backup and we don't provide a downgrade path.
We possibly could provide a downgrade path in the form of an external script that would recreate the previous version and export what is possible. Of course, you lose what you lose, but presumably an admin doing this knows that. Is it worth it though? Who ever downgrades?
What would it take to copy the database to a backup before upgrading, (from within osmo-hlr)? Not much, right?
just copy it to hlr.db.version.timestamp or some such.
I'm now wondering whether that is really necessary. In the daily churn, it creates noise. How to make this less noisy?
Could it be that when the package is upgraded, the installer stops and asks for intervention like some debian packages, you know especially when they go "oops, you edited a file..."
k/
On Mon, Jan 14, 2019 at 05:36:25PM +0100, Keith wrote:
What would it take to copy the database to a backup before upgrading, (from within osmo-hlr)? Not much, right?
just copy it to hlr.db.version.timestamp or some such.
And then two years later admin goes: what, where are all these huge backup files coming from, cluttering my operations file system? I was supposed to delete all contact information after six months according to terms of service!
:P
Could it be that when the package is upgraded, the installer stops and asks for intervention like some debian packages, you know especially when they go "oops, you edited a file..."
Yes, that would probably be a good idea. People building from source are anyway assumed to know what they're doing...
~N
Hi Neels,
On Mon, Jan 14, 2019 at 05:12:58PM +0100, Neels Hofmeyr wrote:
when reviewing osmo-hlr db schema upgrades, I came up with the idea that we shouldn't upgrade automatically. That's why, for schema updates, osmo-hlr now refuses to start and requires one start with the --db-upgrade option.
Our systemd service file does not include that option.
The result is that after an upgraded osmo-hlr binary, admins may have to take extra action to upgrade the DB.
The rationale is that if someone by accident launches a newer osmo-hlr only once, with automatic upgrade the user is then stuck with the newer version DB, since we don't make a backup and we don't provide a downgrade path.
I think this is in-line with how other applications handle database schema upgrades.
I frequently have the same steps whenever I am updating software we run on osmocom.org, such as e.g. our redmne instances.
In the lack of strong opinions, this will probably stay as it is. I'd just like to hear what you guys think about it. Is it annoying or a good idea?
I think the current beavior is fine. I just don't recall having seen any related information in the manual, please verify.
On 1/15/19 5:10 PM, Harald Welte wrote:
I think the current beavior is fine. I just don't recall having seen any related information in the manual, please verify.
It was not documented yet. Here's a patch that adds it:
https://gerrit.osmocom.org/#/q/topic:hlr-docs-db-upgrade+(status:open+OR+sta...)