commit 168d1ebd8886f7c70bc4484a0f3783451862ac25 Author: Alon Bar-Lev <alonbl> Date: Tue Sep 18 22:46:17 2012 +0300 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> Reviewed-on: http://gerrit.ovirt.org/8039 Reviewed-by: Dan Kenigsberg <danken>
*** Bug 849225 has been marked as a duplicate of this bug. ***
*** Bug 873675 has been marked as a duplicate of this bug. ***
rebase-upstream.
*** 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.
Test notes: 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.
verified. 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