Change in vdsm[master]: bootstrap: use yum API

danken at redhat.com danken at redhat.com
Fri Sep 28 20:34:46 UTC 2012


Dan Kenigsberg has submitted this change and it was merged.

Change subject: bootstrap: use yum API
......................................................................


bootstrap: use yum API

PREVIOUS IMPLEMENTATION

Use of yum command-line to automate package installation.

Install package almost one by once, so valid status can be reported to
master.

PROBLEMS IN PREVIOUS IMPLEMENTATION

 - As each package was installed separately, conflicts could not be
   resolved.

 - Dependency list should have been maintained, to match dependencies'
   changes over time.

 - Alternate packages, or any alternate dependency trees should have
   been maintained separately.

 - Each execution of yum recalculate the cache, mirrors and
   dependencies, this took time.

 - If another instance is running, yum waits for ever.

NEW IMPLEMENTATION

Use the yum python API, use single transaction, only top-level
components, proper logging.

This implementation resolves all the issue of previous implementation.

Also removing the architecture specific package naming.

PROBLEMS IN NEW IMPLEMENTATION

As it turns out, the yum API is not exactly pure API, it needs a lot
more work especially at log interface, as its lazy use of logs and
direct print of messages to stdout/stderr is not something that is
expected from an API.

The new implementation applies workarounds to these issues, for now we
are good.

CLEANUP

As the vdsm-bootstrap package is to be installed on older engines,
legacy code could not have been removed. The usage of yum from
deployUtils, and the installation functions from the vds_bootstrap.py
could have been removed, ~340 lines of code.

Change-Id: I65796801bc2db7c5abf71c1e9e4ad8ca308138b9
Signed-off-by: Alon Bar-Lev <alonbl at redhat.com>
---
M Makefile.am
M vds_bootstrap/Makefile.am
A vds_bootstrap/miniyum.py
M vds_bootstrap/vds_bootstrap.py
4 files changed, 906 insertions(+), 13 deletions(-)

Approvals:
  Alon Bar-Lev: Verified
  Dan Kenigsberg: Looks good to me, approved


--
To view, visit http://gerrit.ovirt.org/8039
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I65796801bc2db7c5abf71c1e9e4ad8ca308138b9
Gerrit-PatchSet: 10
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: Igor Lvovsky <ilvovsky 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>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi at redhat.com>
Gerrit-Reviewer: Shireesh Anjal <sanjal at redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>


More information about the vdsm-patches mailing list