Change in vdsm[master]: bootstrap: use yum API
Alon Bar-Lev
alonbl at redhat.com
Thu Sep 20 07:59:16 UTC 2012
Alon Bar-Lev has posted comments on this change.
Change subject: bootstrap: use yum API
......................................................................
Patch Set 1: (4 inline comments)
....................................................
File vds_bootstrap/MiniYum.py
Line 409: """
Line 410: We dup the stdout as during yum operation
Line 411: we redirect it.
Line 412: """
Line 413: self._stream = None
Yes.
Maybe I will put try here to ignore OSError?
Line 414: self._stream = os.dup(sys.stdout.fileno())
Line 415:
Line 416: def __del__(self):
Line 417: if self._stream is not None:
Line 434: return True
Line 435:
Line 436:
Line 437: def main():
Line 438: gluster = False
No... the main() and myminiyumsink()
Line 439:
Line 440: # BEGIN: PROCESS-INITIALIZATION
Line 441: miniyumsink = myminiyumsink()
Line 442: MiniYum.setup_log_hook(miniyumsink)
Line 447: except Exception, e:
Line 448: print "FAILED: cannot initialize selinux: " + str(e)
Line 449: # END: PROCESS-INITIALIZATION
Line 450:
Line 451: with miniyum:
You want to create embedded object that holds reference to the parent object to be able to do .transaction()
If I understand correctly it will be:
with miniyum.transaction():
bla
A new object will be created just for the sake of the transaction.
Line 452: miniyum.clean()
Line 453:
Line 454: with miniyum:
Line 455: try:
Line 451: with miniyum:
Line 452: miniyum.clean()
Line 453:
Line 454: with miniyum:
Line 455: try:
It is... just per block to ease reuse, but I don't really care... will change.
Line 456: miniyum.remove(('cman',), ignoreErrors=True)
Line 457: miniyum.install(('qemu-kvm-tools',))
Line 458: miniyum.installUpdate(('vdsm', 'vdsm-cli'))
Line 459: if gluster:
--
To view, visit http://gerrit.ovirt.org/8039
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I65796801bc2db7c5abf71c1e9e4ad8ca308138b9
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Alon Bar-Lev <alonbl at redhat.com>
Gerrit-Reviewer: Alon Bar-Lev <alonbl at redhat.com>
Gerrit-Reviewer: Barak Azulay <bazulay at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Doron Fediuck <dfediuck at redhat.com>
Gerrit-Reviewer: Douglas Schilling Landgraf <dougsland at redhat.com>
Gerrit-Reviewer: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: Pradipta Banerjee <bpradip at in.ibm.com>
Gerrit-Reviewer: Rodrigo Trujillo <trujillo.unicamp at gmail.com>
More information about the vdsm-patches
mailing list