This is an automatically generated e-mail. To reply, visit: http://reviewboard-fedoraserver.rhcloud.com/r/219/ |
On September 24th, 2015, 8:54 nachm. CEST, Stephen Gallagher wrote:
config/roles/databaseserver/role.py (Diff revision 3) 385 except Exception as e:280 # If the subprocess returned non-zero, raise an exception
386 # If the subprocess returned non-zero, raise an exception
281 raise RolekitError(COMMAND_FAILED,387 raise RolekitError(COMMAND_FAILED,282 "Changing all connections to use md5 method in '%s' failed: %d" %388 "Changing all connections to use md5 method in '{}'"
283 (values['pg_hba_conf'], result.status))389 "failed: {}".format(values['pg_hba_conf'], result.status))If the
__tweak_lines()
routine has failed here, should we also restore the earlier .rksave for postgresql.conf? Thedecomission()
should take care of it either way.It might be a separate bug, but if the first deployment fails partway through (such as with one file but not the other updated) and is not decommissioned before attempting to create another instance, it's possible that we could end up in a state where the deployment looks like it succeeded but the database won't be accessible because pg_hba.conf wasn't updated.
I think we need to account for this possibility. (This was pretty much the original reasoning for bug #21)
I've amended both exception handlers to eventually remove their own backup file and/or restore the successfully overwritten
postgresql.conf
from the backup if writingpg_hba.conf
fails.
- Nils
On September 25th, 2015, 12:32 nachm. CEST, Nils Philippsen wrote:
Review request for RoleKit Mailing List, Miloslav Trmac, Nils Philippsen, Stephen Gallagher, and Thomas Woerner.
By Nils Philippsen.
Updated Sept. 25, 2015, 12:32 nachm.
Repository:
rolekit
Description
Testing
Diffs
|