Alon Bar-Lev has posted comments on this change.
Change subject: bootstrap: use yum API
......................................................................
Patch Set 9: (8 inline comments)
....................................................
File vds_bootstrap/miniyum.py
Line 348: if (
Line 349: transactionCurrent.altered_lt_rpmdb or
Line 350: transactionCurrent.altered_gt_rpmdb
Line 351: ):
Line 352: # safe guard?
Done
Line 353: pass
Line 354: else:
Line 355: try:
Line 356: self._yb.repos.populateSack(
Line 393: ret = False
Line 394: msg = ""
Line 395: if type(e.value) is list:
Line 396: for s in e.value:
Line 397: msg += str(s) + "\n"
Done, used the raw exception.
Line 398: else:
Line 399: msg = str(e.value)
Line 400:
Line 401: self._sink.error(
Line 446: self._yb.repos.setProgressBar(
Line 447: MiniYum._downloadcallback(self._sink)
Line 448: )
Line 449:
Line 450: except YumBaseError as e:
self._sink cannot be uninitialized. And I do want proper log.
Line 451: self._sink.error(str(e.value))
Line 452: except Exception as e:
Line 453: self._sink.error(str(e))
Line 454:
Line 459: to adjust proper roles for selinux.
Line 460: it will re-execute the process with same arguments.
Line 461:
Line 462: This has similar effect of:
Line 463: # chcon -t rpm_exec_t miniyum.py
I don't understand what is misleading... can you please explain some more?
Line 464:
Line 465: We must do this dynamic as this class is to be
Line 466: used at bootstrap stage, so we cannot put any
Line 467: persistent selinux policy changes.
Line 513: self._yb.cleanMetadata()
Line 514: self._yb.cleanPackages()
Line 515: self._yb.cleanSqlite()
Line 516:
Line 517: def install(self, packages, **kwargs):
No, I missing... why do you want to repeat args over and over for bridge
functions?
Maybe you prefer:
queue(op='install', ...)
?
Line 518: """Install packages.
Line 519:
Line 520: Keyword arguments:
Line 521: packages -- packages to install.
Line 797: if miniyum.buildTransaction():
Line 798: miniyum.processTransaction()
Line 799: raise Exception("Fail please")
Line 800: except Exception as e:
Line 801: if str(e) != "Fail please":
Done
Line 802: raise
Line 803:
Line 804: if __name__ == "__main__":
....................................................
File vds_bootstrap/vds_bootstrap.py
Line 82: self._stream = os.dup(sys.stdout.fileno())
Line 83: self._touch()
Line 84:
Line 85: def __del__(self):
Line 86: if self._stream is not None:
So added back the = None.
Line 87: os.close(self._stream)
Line 88:
Line 89: def _touch(self):
Line 90: self._last = time.time()
Line 126: hexkeyid
Line 127: )
Line 128: logging.warning("MiniYum: WARN: %s", msg)
Line 129: self._status('WARN', msg)
Line 130: return True
Yes, as far as I know.
And even if missed this and not, bootstrap should succeed on virgin host.
Line 131:
Line 132:
Line 133: rhel6based = deployUtil.versionCompare(deployUtil.getOSVersion(),
"6.0") >= 0
Line 134:
--
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: 9
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Alon Bar-Lev <[email protected]>
Gerrit-Reviewer: Alon Bar-Lev <[email protected]>
Gerrit-Reviewer: Barak Azulay <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Doron Fediuck <[email protected]>
Gerrit-Reviewer: Douglas Schilling Landgraf <[email protected]>
Gerrit-Reviewer: Igor Lvovsky <[email protected]>
Gerrit-Reviewer: Juan Hernandez <[email protected]>
Gerrit-Reviewer: Pradipta Banerjee <[email protected]>
Gerrit-Reviewer: Rodrigo Trujillo <[email protected]>
Gerrit-Reviewer: Saggi Mizrahi <[email protected]>
Gerrit-Reviewer: Shireesh Anjal <[email protected]>
Gerrit-Reviewer: Yaniv Bronhaim <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches