Yedidyah Bar David has posted comments on this change.

Change subject: packaging: setup: partial cleanup - db only
......................................................................


Patch Set 5:

(6 comments)

....................................................
File packaging/setup/ovirt_engine_setup/constants.py
Line 995
Line 996
Line 997
Line 998
Line 999
Done


....................................................
File packaging/setup/plugins/ovirt-engine-setup/distro-rpm/packages.py
Line 80:             self._parent = parent
Line 81:             self._backup = None
Line 82:             self.environment[
Line 83:                 osetupcons.RPMDistroEnv.VERSIONLOCK_MODIFIED
Line 84:             ] = None
Indeed. "None" means "unknown". I think there are other such uses in the 
system. Do you prefer something else?
Line 85: 
Line 86:         def __str__(self):
Line 87:             return _("Version Lock Transaction")
Line 88: 


Line 294:             osetupcons.RPMDistroEnv.REQUIRE_ROLLBACK,
Line 295:             None
Line 296:         )
Line 297:         if self._distribution in ('redhat', 'fedora', 'centos'):
Line 298:             self._enabled = True
I moved it because I intended to move part of the code from prepare to setup 
instead of duplicating it as it's currently. Reverted, for now.
Line 299:             self.command.detect('rpm')
Line 300: 
Line 301:             vlocktrans = self.VersionLockTransaction(
Line 302:                 parent=self,


Line 303:             )
Line 304:             
self.environment[otopicons.CoreEnv.MAIN_TRANSACTION].append(
Line 305:                 vlocktrans
Line 306:             )
Line 307:             vlocktrans.setup()
Perhaps not, but currently, all uses of OVIRT_ENGINE_YUM_VERSIONLOCK are inside 
this class, so I thought it makes sense to keep it this way. I don't mind 
moving it elsewhere.

It's required to be run during stage init, because by the end of it we need to 
know if we are doing an upgrade from legacy. IMO, at least... and now I realize 
this is a bug and should be done during init :-(
Line 308: 
Line 309:             from otopi import miniyum
Line 310:             self._miniyum = miniyum
Line 311: 


....................................................
File packaging/setup/plugins/ovirt-engine-setup/legacy/database.py
Line 52
Line 53
Line 54
Line 55
Line 56
Again, I want to know by the end of stage init if we are doing an upgrade from 
legacy, and I decided one of the criteria is if pgpass exists and contains 
credentials to access the database. 3.2's cleanup leaves this file semi-empty, 
so we can merely rely on its existence, like I do e.g. with 
/etc/sysconfig/ovirt-engine.


Line 49:     )
Line 50:     def _init(self):
Line 51:         self.environment[
Line 52:             osetupcons.CoreEnv.LEGACY_PG_CREDS_FOUND
Line 53:         ] = None
Same
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')


-- 
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: 5
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

Reply via email to