Bug 861575 (bootstrap_yum_api) - PRD32 - bootstrap: use yum API
Summary: PRD32 - bootstrap: use yum API
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: bootstrap_yum_api
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: vdsm
Version: 3.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 3.2.0
Assignee: Alon Bar-Lev
QA Contact: Tareq Alayan
URL:
Whiteboard: infra
: 849225 873675 883739 883744 (view as bug list)
Depends On:
Blocks: bootstrap-rewrite Simon-RFE-Tracker
TreeView+ depends on / blocked
 
Reported: 2012-09-29 08:51 UTC by Alon Bar-Lev
Modified: 2016-02-10 19:43 UTC (History)
13 users (show)

Fixed In Version: vdsm-4.10.2-7.0
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed:
oVirt Team: Infra
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Alon Bar-Lev 2012-09-29 08:51:26 UTC
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>

Comment 3 Alon Bar-Lev 2012-10-04 11:10:45 UTC
*** Bug 849225 has been marked as a duplicate of this bug. ***

Comment 4 Alon Bar-Lev 2012-11-06 22:52:38 UTC
*** Bug 873675 has been marked as a duplicate of this bug. ***

Comment 7 Alon Bar-Lev 2012-12-01 20:40:17 UTC
rebase-upstream.

Comment 8 Alon Bar-Lev 2012-12-05 14:09:44 UTC
*** Bug 883739 has been marked as a duplicate of this bug. ***

Comment 9 Alon Bar-Lev 2012-12-05 16:18:55 UTC
*** Bug 883744 has been marked as a duplicate of this bug. ***

Comment 11 Stephen Gordon 2013-01-04 20:04:08 UTC
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 13:12:42 UTC
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 14:51:35 UTC
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 09:02:01 UTC
3.2 has been released

Comment 16 Itamar Heim 2013-06-11 09:02:03 UTC
3.2 has been released

Comment 17 Itamar Heim 2013-06-11 09:02:15 UTC
3.2 has been released

Comment 18 Itamar Heim 2013-06-11 09:03:00 UTC
3.2 has been released

Comment 19 Itamar Heim 2013-06-11 09:32:14 UTC
3.2 has been released


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