Yedidyah Bar David has posted comments on this change. Change subject: packaging: setup: partial cleanup - db only ......................................................................
Patch Set 6: (3 comments) .................................................... File packaging/setup/plugins/ovirt-engine-setup/legacy/database.py Line 49: ) Line 50: def _init(self): Line 51: self.environment[ Line 52: osetupcons.CoreEnv.LEGACY_PG_CREDS_FOUND Line 53: ] = None Done Line 54: if os.path.exists( Line 55: osetupcons.FileLocations.LEGACY_PSQL_PASS_FILE Line 56: ): Line 57: self.logger.debug('Existing database pgpass found') Line 56: ): Line 57: self.logger.debug('Existing database pgpass found') Line 58: self.environment[ Line 59: osetupcons.CoreEnv.LEGACY_PG_CREDS_FOUND Line 60: ] = False Done Line 61: with open( Line 62: osetupcons.FileLocations.LEGACY_PSQL_PASS_FILE, Line 63: 'r', Line 64: ) as f: Line 93: osetupcons.CoreEnv.UPGRADE_FROM_LEGACY Line 94: ], Line 95: ) Line 96: def _setup(self): Line 97: dbovirtutils = database.OvirtUtils(plugin=self) And if not? tryDatabaseConnect will fail, that's fine with me. I'll now add a nicer error message if that's what you want. Line 98: dbovirtutils.tryDatabaseConnect() Line 99: if dbovirtutils.isNewDatabase(): Line 100: raise RuntimeError( Line 101: _('Unexpected empty database during upgrade') -- To view, visit http://gerrit.ovirt.org/19689 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Id9aa1791eb7ccdbc8c679e72ed6eaa4f72ac29c6 Gerrit-PatchSet: 6 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Yedidyah Bar David <d...@redhat.com> Gerrit-Reviewer: Alex Lourie <alou...@redhat.com> Gerrit-Reviewer: Alon Bar-Lev <alo...@redhat.com> Gerrit-Reviewer: Ofer Schreiber <oschr...@redhat.com> Gerrit-Reviewer: Sandro Bonazzola <sbona...@redhat.com> Gerrit-Reviewer: Yedidyah Bar David <d...@redhat.com> Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches