Bug 861575 - (bootstrap_yum_api) PRD32 - bootstrap: use yum API
PRD32 - bootstrap: use yum API
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: vdsm (Show other bugs)
3.2.0
Unspecified Unspecified
unspecified Severity unspecified
: ---
: 3.2.0
Assigned To: Alon Bar-Lev
Tareq Alayan
infra
: Improvement
: 849225 873675 883739 883744 (view as bug list)
Depends On:
Blocks: bootstrap-rewrite Simon-RFE-Tracker
  Show dependency treegraph
 
Reported: 2012-09-29 04:51 EDT by Alon Bar-Lev
Modified: 2016-02-10 14:43 EST (History)
13 users (show)

See Also:
Fixed In Version: vdsm-4.10.2-7.0
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Infra
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Alon Bar-Lev 2012-09-29 04:51:26 EDT
commit 168d1ebd8886f7c70bc4484a0f3783451862ac25
Author: Alon Bar-Lev <alonbl@redhat.com>
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@redhat.com>
    Reviewed-on: http://gerrit.ovirt.org/8039
    Reviewed-by: Dan Kenigsberg <danken@redhat.com>
Comment 3 Alon Bar-Lev 2012-10-04 07:10:45 EDT
*** Bug 849225 has been marked as a duplicate of this bug. ***
Comment 4 Alon Bar-Lev 2012-11-06 17:52:38 EST
*** Bug 873675 has been marked as a duplicate of this bug. ***
Comment 7 Alon Bar-Lev 2012-12-01 15:40:17 EST
rebase-upstream.
Comment 8 Alon Bar-Lev 2012-12-05 09:09:44 EST
*** Bug 883739 has been marked as a duplicate of this bug. ***
Comment 9 Alon Bar-Lev 2012-12-05 11:18:55 EST
*** Bug 883744 has been marked as a duplicate of this bug. ***
Comment 11 Stephen Gordon 2013-01-04 15:04:08 EST
Setting docs_scoped- here, appears to be a backend change with no documentation impact at this time.
Comment 13 Alon Bar-Lev 2013-03-24 09:12:42 EDT
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.
Comment 14 Tareq Alayan 2013-03-24 10:51:35 EDT
verified. 
From the logs it is obvious that yum is used. and in event tab user can see yum installing/downloading missing packages.
Comment 15 Itamar Heim 2013-06-11 05:02:01 EDT
3.2 has been released
Comment 16 Itamar Heim 2013-06-11 05:02:03 EDT
3.2 has been released
Comment 17 Itamar Heim 2013-06-11 05:02:15 EDT
3.2 has been released
Comment 18 Itamar Heim 2013-06-11 05:03:00 EDT
3.2 has been released
Comment 19 Itamar Heim 2013-06-11 05:32:14 EDT
3.2 has been released

Note You need to log in before you can comment on or make changes to this bug.