dl_rpms.sh fails if passed a yum.conf.stx without a releasever= line

Bug #1791113 reported by Jason McKenna
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Medium
Jason McKenna

Bug Description

download_mirrors.sh (and subordinate script dl_rpms.sh) may optionally be passed a yum.conf file. If the file does not have a releasever= line, then the dl_rpms.sh script exits with an error code rather than use the default "releasever=7" value.

Jason McKenna (jmckenna)
Changed in starlingx:
assignee: nobody → Jason McKenna (jmckenna)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to stx-tools (master)

Fix proposed to branch: master
Review: https://review.openstack.org/600461

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

Reviewed: https://review.openstack.org/600461
Committed: https://git.openstack.org/cgit/openstack/stx-tools/commit/?id=d56955c5f1d2f16e14ee0d033819c498ce092afe
Submitter: Zuul
Branch: master

commit d56955c5f1d2f16e14ee0d033819c498ce092afe
Author: Jason McKenna <email address hidden>
Date: Thu Sep 6 10:52:09 2018 -0400

    Check for releasever in yum.conf before grepping

    The dl_rpms.sh script may be passed an optional yum.conf file. If
    this file is used, then the releasever variable is read from the
    rather than use the default releasever=7. If the releasever is
    not defined in the file, the grep which searches for the variable
    will fail, and the dl_rpms.sh script exits with an error.

    This change checks for the presence of releasever before attempting
    to read it from the file. Change made to dl_rpms.sh and
    mirror-check.sh

    Tested using yum.conf files both with and without releasever
    present.

    Change-Id: Ie13241e5662188d75b5d147537915c0a35ea7397
    Closes-Bug: 1791113
    Signed-off-by: Jason McKenna <email address hidden>

Changed in starlingx:
status: In Progress → Fix Released
Ghada Khalil (gkhalil)
tags: added: stx.2018.10 stx.build
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to stx-tools (f/centos75)

Fix proposed to branch: f/centos75
Review: https://review.openstack.org/602675

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to stx-tools (f/centos75)
Download full text (8.5 KiB)

Reviewed: https://review.openstack.org/602675
Committed: https://git.openstack.org/cgit/openstack/stx-tools/commit/?id=7c7d4ea2341eed55ddbbba4179ecc61665505a99
Submitter: Zuul
Branch: f/centos75

commit 0a924bc76a0d40c18825af9244dba0194f0fd47b
Author: Michel Thebeau <email address hidden>
Date: Wed Sep 5 08:59:44 2018 -0400

    deployment: libvirt: make use of rm command safer

    Add sanity around the use of 'rm' in script. Make sure the file to be
    deleted is the correct type, and that its content also meets
    expectation.

    An example of dangerous outcome in this code from using "sudo rm -rf" is
    that if the CONTROLLER or COMPUTE variables are preceded by a space
    character then the directory /var/lib/libvirt/images/ will be deleted.

    Refrain from using recursive and force options, and in this case because
    they are not needed.

    Related-Bug: #1790716

    Change-Id: I76797133589d993dca2b2aac3c97184bac0457ca
    Signed-off-by: Michel Thebeau <email address hidden>

commit ce4806ed6492046cc92dfaf17259768fa8f6fbf2
Author: Michel Thebeau <email address hidden>
Date: Wed Sep 5 11:23:47 2018 -0400

    deployment: libvirt: refer to Starlingx wiki

    In the event that someone clones the stx-tools repo without
    fore-knowledge of the wiki, this is handy. The author prepares this
    commit from the experience doing just that.

    Related-Bug: #1790716

    Change-Id: If3d1e250e1c2c246ac894117fc649d6f145f22f1
    Signed-off-by: Michel Thebeau <email address hidden>

commit 503a9417de0fd26b2b748ea2274bce147cf60db2
Author: Michel Thebeau <email address hidden>
Date: Fri Sep 7 16:21:40 2018 -0400

    deployment: libvirt: correct internal/external net

    The INTERNAL and EXTERNAL networks configured by destroy and setup
    network scripts are inverted with reference to the default
    config_controller selections as well as the wiki
    StarlingX/Installation_Guide_Virtual_Environment/Controller_Storage.

    The most pressing concern in this is that what was actually the internal
    management network was being nat'd.

    Also, under normal testing it is not recommended to address the internal
    management network from the virtualization host. There are unlikely to be
    configurations that will have external devices addressing the management
    network.

    Delete what was "EXTERNAL", actually internal, and rename "INTERNAL" to
    be EXTERNAL.

    Related-Bug: #1790716

    Change-Id: I08f9e7712fed120001c864903880e13e9478764d
    Signed-off-by: Michel Thebeau <email address hidden>

commit 7abcd94a7b0bab49568caacf8912435097657050
Author: Michel Thebeau <email address hidden>
Date: Thu Sep 6 17:23:32 2018 -0400

    deployment: libvirt: update machine type and model

    Tests should run on a comparably newer model of CPU and should be fixed
    for all tests under virtualization.

    Nehalem cpu model is recommended as one that has been used for this
    purpose for a few years.

    Specifying 'forbid' for fallback and 'exact' for mode will ensure that
    hosts the Q...

Read more...

tags: added: in-f-centos75
Ghada Khalil (gkhalil)
Changed in starlingx:
importance: Undecided → Medium
Ken Young (kenyis)
tags: added: stx.1.0
removed: stx.2018.10
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.