mockchain-parallel failes, missing python2-requests

Bug #1831768 reported by Scott Little
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Critical
Scott Little

Bug Description

Brief Description
-----------------
Build failure seen on CENGN Starting June 5

Mockchain-parallel requires python2-requests, but it is not found.
Mockchain-parallel runs inside docker. the Dockerfile does not explicitly
list python2-requests as a requires package. The Dockerfile does list
mock, which used to resolve to mock-1.4.15-1.el7.noarch, which pulled in
python2-requests. Centos/EPEL upgraded to mock-1.4.16-1.el7.noarch last
night, and it now pulls in python36-requests, rather than python2-requests.

Corrective options
1) Convert mockchain-parallel to python3 (better long term solution)
2) Add python2-requests to our Dockerfile. (the quick solution)

Severity
--------
Provide the severity of the defect.
Critical

Steps to Reproduce
------------------
1) create a new build container
2) run build-pkgs inside the new container

Expected Behavior
------------------
build-pkgs successfully invokes mockchain-parallel

Actual Behavior
----------------
build fails in a new container

Reproducibility
---------------
<Reproducible/Intermittent>
100%

System Configuration
--------------------
N/A

Branch/Pull Time/Commit
-----------------------
20190605T013000Z

Last Pass
---------
20190604T144018Z

Timestamp/Logs
--------------
02:23:45 Traceback (most recent call last):
02:23:45 File "/localdisk/designer/jenkins/master/cgcs-root/build-tools/mockchain-parallel", line 43, in <module>
02:23:45 import requests
02:23:45 ImportError: No module named requests
02:23:45 dirname: missing operand
02:23:45 Try 'dirname --help' for more information.
02:23:45
02:23:45 Auditing for obsolete srpms
02:23:45 waiting for srpm audit to complete
02:23:45 Auditing for obsolete rpms
02:23:45 waiting for rpm audit to complete
02:23:45 Audit complete
02:23:45
02:23:45 ERROR: Failed to build rpms using 'nice -n 20 ionice -c Idle /bin/ionice mockchain-parallel ...

Test Activity
-------------
Build

Scott Little (slittle1)
Changed in starlingx:
assignee: nobody → Scott Little (slittle1)
Revision history for this message
Ghada Khalil (gkhalil) wrote :

Marking as release gating; critical as builds are failing on cengn

Changed in starlingx:
importance: Undecided → Critical
status: New → Triaged
tags: added: stx.2.0 stx.build
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to root (master)

Fix proposed to branch: master
Review: https://review.opendev.org/663492

Changed in starlingx:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to root (master)

Reviewed: https://review.opendev.org/663492
Committed: https://git.openstack.org/cgit/starlingx/root/commit/?id=7f7154ef5694b65ef1723ce287bcd8a0ec79c48d
Submitter: Zuul
Branch: master

commit 7f7154ef5694b65ef1723ce287bcd8a0ec79c48d
Author: Scott Little <email address hidden>
Date: Wed Jun 5 19:57:03 2019 -0400

    Correct build failure after mock updrade

    Problem:
       Mockchain-parallel requires python2-requests, but it is not found.
    Mockchain-parallel runs inside docker. the Dockerfile does not
    explicitly list python2-requests as a requires package. The Dockerfile
    does list mock, which used to resolve to mock-1.4.15-1.el7.noarch,
    which pulled in python2-requests. Centos/EPEL upgraded to
    mock-1.4.16-1.el7.noarch 2019-06-04, and it now pulls in
    python36-requests, rather than python2-requests.

       Mockchain-parallel also uses functions from yum and mock.
    Yum remains at python2, mock is now at python3.

       There is also one api change in the new mock.

       Whatever solution should allow mockchain-parallel function
    in both a new or an old container. The difference being the
    mock version, and the verion of python required to run
    mock/mockchain. Supporting the old mock will also allow more
    time for conversion of old build systems that pre-date
    the conversion to docker.

    Solution:
       1) For now, ship two versions of mock-parallel. One
    compatible with the new mock (python 3, new api). The
    second compatible with the older mock (python 2, old api).
    The old version can eventually be retired, so not worth
    trying to break out common functions.
       2) Remove the dependency on yum. We only needed
    one function to split an rpm file name into components
    (package-name, version, release, architecture, epoch).
    We'll write our own.
       3) mockchain-parallel becomes a wrapper that detects
    which mock is present, and from that determine which
    version of mock-parallel-* to use, and which python to use.

    Change-Id: Ia56dfd39e349096b09351e89ad3d4f024e60e4e4
    Depends-On: I7c5d9b52eed49cdce02224603b9bfd17e4426558
    Closes-Bug: 1831768
    Signed-off-by: Scott Little <email address hidden>

Changed in starlingx:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.