Red Hat Bugzilla – Bug 861575
PRD32 - bootstrap: use yum API
Last modified: 2016-02-10 14:43:50 EST
Author: Alon Bar-Lev <email@example.com>
Date: Tue Sep 18 22:46:17 2012 +0300
bootstrap: use yum API
Use of yum command-line to automate package installation.
Install package almost one by once, so valid status can be reported to
PROBLEMS IN PREVIOUS IMPLEMENTATION
- As each package was installed separately, conflicts could not be
- 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.
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
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.
Signed-off-by: Alon Bar-Lev <firstname.lastname@example.org>
Reviewed-by: Dan Kenigsberg <email@example.com>
*** Bug 849225 has been marked as a duplicate of this bug. ***
*** Bug 873675 has been marked as a duplicate of this bug. ***
*** Bug 883739 has been marked as a duplicate of this bug. ***
*** Bug 883744 has been marked as a duplicate of this bug. ***
Setting docs_scoped- here, appears to be a backend change with no documentation impact at this time.
Previous implementation executed yum per package, including dependency packages. This was used to produce error messages for individual package, but inhibit yum from resolving conflict or download correct dependencies.
The new implementation uses the yum api, and fetches only top level packages at single yum transaction. This means that we actually use yum to fetch correct dependencies and resolve conflicts.
As a side effect we have much better logging and messages.
Test should be around packages installed, and channels, proper messages for failures, conflicts.
From the logs it is obvious that yum is used. and in event tab user can see yum installing/downloading missing packages.
3.2 has been released