Alon Bar-Lev has posted comments on this change.
Change subject: packaging: updated handling of pgpass file between versions
......................................................................
Patch Set 5: (3 inline comments)
....................................................
File packaging/fedora/setup/common_utils.py
Line 280: answer = True
Line 281: logging.debug("TCP port %s is open by process %s, PID %s"
% (port, process, pid))
Line 282: return (answer, process, pid)
Line 283:
Line 284: def getPgPassEnv():
Why don't we copy this file as first thing in upgrade, so we don't need to look
in two places?
We can remove the old one if upgrade succeeds but throughout upgrade we have
the new one in place.
Line 285: # .pgpass definition
Line 286: if os.path.exists(basedefs.DB_PASS_FILE):
Line 287: return { "PGPASSFILE" : basedefs.DB_PASS_FILE }
Line 288: elif os.path.exists(basedefs.ORIG_PASS_FILE):
Line 622: return False
Line 623:
Line 624: inDbAdminSection = False
Line 625: inDbUserSection = False
Line 626: for pfile in (basedefs.DB_PASS_FILE, basedefs.ORIG_PASS_FILE):
Again, I don't think we should look into two places... we can have the new one
copied at upgrade start, and have it throughout the upgrade. We can delete the
old one if upgrade succeeds.
Line 627: if os.path.exists(pfile):
Line 628: logging.debug("found existing pgpass file %s, fetching DB
%s value", pfile, param)
Line 629: with open(pfile, 'r') as pgPassFile:
Line 630: for line in pgPassFile:
Line 922: "-h", getDbHostName(),
Line 923: "-p", getDbPort(),
Line 924: "--list",
Line 925: ]
Line 926: env = getPgPassEnv()
I would really recommend to drop the "env" temporary variable and use
getPgPassEnv() as parameter.
BTW: I would have don the same for cmd... but there you could have argued...
Line 927: output, rc = execCmd(cmdList=cmd,
msg=output_messages.ERR_DB_TEMP_LIST, envDict=env)
Line 928: if rc:
Line 929: logging.error(output_messages.ERR_DB_TEMP_LIST)
Line 930: raise Exception ("\n" + output_messages.ERR_DB_TEMP_LIST +
"\n")
--
To view, visit http://gerrit.ovirt.org/8135
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I1d44297725d7270982e8724e4aeefda8bc7a88e2
Gerrit-PatchSet: 5
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alex Lourie <[email protected]>
Gerrit-Reviewer: Alex Lourie <[email protected]>
Gerrit-Reviewer: Alon Bar-Lev <[email protected]>
Gerrit-Reviewer: Juan Hernandez <[email protected]>
Gerrit-Reviewer: Kiril Nesenko <[email protected]>
Gerrit-Reviewer: Moran Goldboim <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches