guruprasad | cjwatson, can I pick your brain for a few minutes? I managed to get the qastaging database restore working. But while doing so, I ran into an issue with https://git.launchpad.net/launchpad/tree/charm/launchpad-db-update/templates/launchpad-db-update-lazr.conf#n14 | 13:42 |
---|---|---|
guruprasad | I do not know why this is set to `None` because that is causing code that is processing this section to error out. | 13:42 |
guruprasad | I worked around this issue by fixing the Python code to deal with the connection string construction only when it is not None. But I am not sure if that is the right fix. | 13:43 |
guruprasad | This is because, the code that I tweaked, https://git.launchpad.net/launchpad/tree/lib/lp/services/scripts/__init__.py#n173, has been there for over a decade now. | 13:44 |
guruprasad | And I also a commit of yours that tries to set a default value for rw_main_primary in the base layer because the appserver wouldn't start otherwise. | 13:44 |
guruprasad | *also saw | 13:45 |
guruprasad | Thanks! | 13:49 |
guruprasad | I searched 'rw_main_primary' on dev.launchpad.net to check if there is any historical information about it. But didn't find any. | 13:50 |
guruprasad | Fixing the Python code feels safer to me (we do have the configuration specified in all places that matter) than fixing the charm because I do not know the significance of specifying None there and it gets during DB updates. | 14:01 |
cjwatson | guruprasad: lib/lp/services/config/schema-lazr.conf also has a default of "rw_main_standby: none", so it doesn't seem novel for the charm to have such a default. I think it makes sense for db_options.update_db_config to only apply connection string overrides if there's something to override. | 14:33 |
cjwatson | guruprasad: IOW the approach that I think you're outlining sounds reasonable to me. | 14:34 |
cjwatson | guruprasad: rw_main_primary is arguably a bit different from rw_main_standby, because we really can't do much without a primary, but not having a standby is reasonable in some cases. | 14:34 |
cjwatson | guruprasad: Also for your searches, note that primary/standby used to be called master/slave and if you're doing archaeology you probably need to check for both. | 14:35 |
cjwatson | guruprasad: I vaguely remember that some DB code I was replacing with the charm had what seemed to be spurious settings of the standby to be equal to the primary, and I might well have just set None instead because it made no sense to me otherwise. I guess that's why it was there, if so ... but fixing the Python code seems better. | 14:37 |
Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!