generate_sample.sh uses MODULEPATH environment variable, conflicts with environment-modules

Bug #1437904 reported by Lars Kellogg-Stedman
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Low
Walt Boring
Ironic
Fix Released
Low
Lucas Alvares Gomes
OpenStack Compute (nova)
Fix Released
Low
Davanum Srinivas (DIMS)

Bug Description

The generate_sample.sh script refers to a MODULEPATH variable without clearing it first. On a system using the environment-modules package, MODULEPATH is a PATH-like environment variable, which leads generate_sample.sh to fail like this:

    No module named /etc/scl/modulefiles:/etc/scl/modulefiles:/usr/share/Modules/modulefiles:/etc/modulefiles:/usr/share/modulefiles

The solution is to either explicitly clear this variable at the start of the script, or use a different name if this is something that is expected to be set externally.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

Changed in nova:
assignee: nobody → Davanum Srinivas (DIMS) (dims-v)
status: New → In Progress
Changed in nova:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/168745
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=e7b51eb27f4eec4d7ae4b89640550dff64641e6a
Submitter: Jenkins
Branch: master

commit e7b51eb27f4eec4d7ae4b89640550dff64641e6a
Author: Davanum Srinivas <email address hidden>
Date: Sun Mar 29 19:49:01 2015 -0400

    Avoid MODULEPATH environment var in config generator

    MODULEPATH is apparently a well known variable from
    environment-modules package. So let's just use another
    one as we don't care about the specific var name itself.

    Closes-Bug: #1437904
    Change-Id: Id79bbdaad498c771dc4c032256bd8160b5663ef9

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → kilo-rc1
status: Fix Committed → Fix Released
Mike Perez (thingee)
Changed in cinder:
status: New → In Progress
importance: Undecided → Low
assignee: nobody → Mike Perez (thingee)
milestone: none → liberty-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

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

Thierry Carrez (ttx)
Changed in nova:
milestone: kilo-rc1 → 2015.1.0
Mike Perez (thingee)
Changed in cinder:
milestone: liberty-1 → liberty-2
Mike Perez (thingee)
Changed in cinder:
milestone: liberty-2 → liberty-3
Changed in ironic:
assignee: nobody → Lucas Alvares Gomes (lucasagomes)
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ironic (master)

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

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

Reviewed: https://review.openstack.org/215045
Committed: https://git.openstack.org/cgit/openstack/ironic/commit/?id=2e16a3cd7e7804d435cd5088dc2d84deaddf2560
Submitter: Jenkins
Branch: master

commit 2e16a3cd7e7804d435cd5088dc2d84deaddf2560
Author: Lucas Alvares Gomes <email address hidden>
Date: Thu Aug 20 10:50:00 2015 +0100

    Fix "tox -egenconfig" by avoiding the MODULEPATH env variable

    MODULEPATH is apparently a well known variable from environment-modules
    package and was causing the sample configuration generation to fail.

    Change-Id: Ie9f1896c9480aa371c99a316511b172e92f52824
    Closes-Bug: #1437904

Changed in ironic:
status: In Progress → Fix Committed
Changed in ironic:
milestone: none → 4.0.0
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

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

Changed in cinder:
assignee: Mike Perez (thingee) → Kendall Nelson (kjnelson)
Thierry Carrez (ttx)
Changed in cinder:
milestone: liberty-3 → liberty-rc1
Mike Perez (thingee)
Changed in cinder:
milestone: liberty-rc1 → next
Changed in cinder:
assignee: Kendall Nelson (kjnelson) → Jay Bryant (jsbryant)
Changed in cinder:
assignee: Jay Bryant (jsbryant) → Kendall Nelson (kjnelson)
Changed in cinder:
assignee: Kendall Nelson (kjnelson) → Walt Boring (walter-boring)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/219700
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=111a056c0f212ed38ff6127f6c9b9dc13fd536f0
Submitter: Jenkins
Branch: master

commit 111a056c0f212ed38ff6127f6c9b9dc13fd536f0
Author: Kendall Nelson <email address hidden>
Date: Thu Aug 13 10:17:36 2015 -0500

    Dynamically create cinder.conf.sample

    As it stands, the opts.py file that is passed into
    oslo-config-generator isn't being generated dynamically
    and the old way of generating the cinder.conf.sample is
    dependent on oslo-incubator which Cinder is trying to
    move away from. oslo-config-generator works differently
    than oslo-incubator so a number of changes had to be made
    in order to make this switch.

    This patch adds the config directory to Cinder and in it
    are two files:

        -generate_cinder_opts.py that will take the
         results of a grep command to create the opts.py
         file to be passed into oslo-config-generator.

        -cinder.conf which is the new configuration for
         oslo-config-generator. The file is inside the config
         directory to be consistent with other projects.

    Some changes were made to the generate_sample.sh file in
    order to give the base directories and target directories
    to the generate_cinder_opts.py program.

    tox.ini was edited to remove the checkonly option because
    all that needs to happen in check_uptodate.sh is a check to
    ensure that the cinder.conf.sample is actually being
    generated with no issues.

    All options were removed from the check_uptodate.sh
    because they were unnecessary given the new, more simple
    way of generating the cinder.conf.sample.

    setup.cfg was also edited in order to add information
    oslo-config-generator needs to run.

    Co-Authored By: Jay Bryant <email address hidden>
    Co-Authored By: Jacob Gregor <email address hidden>

    Change-Id: I643dbe5675ae9280e204f691781e617266f570d5
    Closes-Bug: 1473768
    Closes-Bug: 1437904
    Closes-Bug: 1381563

Changed in cinder:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on cinder (master)

Change abandoned by Mike Perez (<email address hidden>) on branch: master
Review: https://review.openstack.org/178860

Thierry Carrez (ttx)
Changed in cinder:
status: Fix Committed → 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.