some test jobs broken by tox 2.0 not passing env variables

Bug #1455102 reported by Sean Dague
28
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Glance Client
High
Stuart McLaren
Magnum
Fix Released
Undecided
Kai Qiang Wu(Kennan)
OpenStack Object Storage (swift)
Undecided
Christian Schwede
OpenStack-Gate
Undecided
Unassigned
neutron
Undecided
Adrien Vergé
Kilo
Undecided
Unassigned
python-cinderclient
Undecided
Adrien Vergé
python-manilaclient
High
Valeriy Ponomaryov
python-neutronclient
Undecided
Adrien Vergé
python-swiftclient
Undecided
Alistair Coles

Bug Description

Tox 2.0 brings environment isolation, which is good. Except a lot of test jobs assume passing critical variables via environment (like credentials).

There are multiple ways to fix this:

1. stop using environment to pass things, instead use a config file of some sort

2. allow explicit pass through via - http://tox.readthedocs.org/en/latest/config.html#confval-passenv=SPACE-SEPARATED-GLOBNAMES

This bug mostly exists for tracking patches, and ensuring that people realize there is a larger change here.

Sean Dague (sdague)
Changed in openstack-gate:
status: New → Confirmed
Revision history for this message
Matt Riedemann (mriedem) wrote :
Changed in python-novaclient:
assignee: nobody → Sean Dague (sdague)
status: New → In Progress
importance: Undecided → High
Revision history for this message
Matt Riedemann (mriedem) wrote :
Revision history for this message
Matt Riedemann (mriedem) wrote :
Revision history for this message
Matt Riedemann (mriedem) wrote :
no longer affects: heat
Revision history for this message
Matt Riedemann (mriedem) wrote :

Heat is being tracked with bug 1455065.

Revision history for this message
Valeriy Ponomaryov (vponomaryov) wrote :

Manilaclient was fixed by commit [1] addressing bug report [2].

[1] https://review.openstack.org/182759

[2] https://bugs.launchpad.net/python-manilaclient/+bug/1455066

Changed in python-manilaclient:
milestone: none → liberty-1
status: New → Fix Committed
assignee: nobody → Valeriy Ponomaryov (vponomaryov)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to python-novaclient (master)

Reviewed: https://review.openstack.org/183007
Committed: https://git.openstack.org/cgit/openstack/python-novaclient/commit/?id=6379287480bf6bc0a8f80bc93f01005a31882aec
Submitter: Jenkins
Branch: master

commit 6379287480bf6bc0a8f80bc93f01005a31882aec
Author: Sean Dague <email address hidden>
Date: Thu May 14 07:06:05 2015 -0400

    pass credentials via config file instead of magic

    Passing credentials via an assumed environment inheritance is bad
    form, and breaks under new tox. Honestly, we only really need 2 vars
    passed in, so we might as well make it a config file that we'll parse.

    Add a functional_creds.conf.sample for people to know what one should
    look like. Update README to explain it.

    Related-Bug: #1455102

    Change-Id: Ifdab38a03c94f51d30449149c0dbd9c6265460a5

Changed in python-glanceclient:
assignee: nobody → Stuart McLaren (stuart-mclaren)
Changed in python-glanceclient:
status: New → In Progress
Revision history for this message
Stuart McLaren (stuart-mclaren) wrote :
Louis Taylor (kragniz)
Changed in python-glanceclient:
importance: Undecided → High
Changed in python-glanceclient:
milestone: none → v0.15.0
milestone: v0.15.0 → none
milestone: none → 0.18.1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to neutron (stable/kilo)

Related fix proposed to branch: stable/kilo
Review: https://review.openstack.org/183795

Changed in magnum:
assignee: nobody → Kai Qiang Wu(Kennan) (wkqwu)
Changed in magnum:
status: New → In Progress
Changed in neutron:
assignee: nobody → Adrien Vergé (adrien-verge)
status: New → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to python-cinderclient (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/184048

Changed in python-neutronclient:
assignee: nobody → Adrien Vergé (adrien-verge)
Changed in python-cinderclient:
assignee: nobody → Adrien Vergé (adrien-verge)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to neutron (stable/kilo)

Reviewed: https://review.openstack.org/183795
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=8b324438a3ee4b92812daba21a90c9690b937563
Submitter: Jenkins
Branch: stable/kilo

commit 8b324438a3ee4b92812daba21a90c9690b937563
Author: Assaf Muller <email address hidden>
Date: Wed May 13 13:39:20 2015 -0400

    Fix neutron tests

    Tox updated to a new major version and changed some substitute
    variables.

    Change-Id: Ifd00abed7bf0a68d4d46d12230118022fa2292ef
    Related-Bug: #1455102
    (cherry picked from commit 0933f26b2c9772c457bb259cff7c8f648d29f620)

tags: added: in-stable-kilo
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to magnum (master)

Reviewed: https://review.openstack.org/183983
Committed: https://git.openstack.org/cgit/openstack/magnum/commit/?id=986aac0b3e670b127422334fa2f640792e8093ea
Submitter: Jenkins
Branch: master

commit 986aac0b3e670b127422334fa2f640792e8093ea
Author: Kai Qiang Wu(Kennan) <email address hidden>
Date: Mon May 18 14:15:55 2015 +0800

    Make functional test work with new tox env

    The check-functional-dsvm-magnum gate job was failing due to the
    functional tests not picking up valid OpenStack credentials.

    Update how we aquire credentials -- fixes side effect of how tox 2.0
    handles environment variables

    Closes-Bug: #1455102
    Change-Id: I56ecd8003594fd436874681670bb9ead19b95dea

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

Reviewed: https://review.openstack.org/183528
Committed: https://git.openstack.org/cgit/openstack/python-glanceclient/commit/?id=9f5c58193bde7e55eebd102be9e2b8de0f7f4f6b
Submitter: Jenkins
Branch: master

commit 9f5c58193bde7e55eebd102be9e2b8de0f7f4f6b
Author: Stuart McLaren <email address hidden>
Date: Fri May 15 13:51:07 2015 +0000

    Fix functional tests in gate

    The check-glanceclient-dsvm-functional gate job was failing due to the
    functional tests not picking up valid OpenStack credentials.

    Update how we aquire credentials -- fixes side effect of how tox 2.0
    handles environment variables.

    Change-Id: Ia665dc9673d09421508476d05039d2da8a5e1a29
    Closes-bug: 1455102

Changed in python-glanceclient:
status: In Progress → Fix Committed
Changed in python-neutronclient:
status: New → In Progress
Changed in neutron:
status: Confirmed → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to python-cinderclient (master)

Reviewed: https://review.openstack.org/184048
Committed: https://git.openstack.org/cgit/openstack/python-cinderclient/commit/?id=dec3d0837105637a9a9312f42dc9b7bcbbe8cc39
Submitter: Jenkins
Branch: master

commit dec3d0837105637a9a9312f42dc9b7bcbbe8cc39
Author: Adrien Vergé <email address hidden>
Date: Mon May 18 15:09:58 2015 +0200

    Fix functional tests and tox 2.0 errors

    With the recent update to tox 2.0.x, environment variables such as
    OS_AUTH_URL are not passed by default, resulting in tests errors
    mentionning Keystone authentication failures.

    This patch reads credentials from the 'functional_creds.conf' config
    file, like it is done in novaclient (and soon in glanceclient and
    neutronclient).

    Reading credentials the old way (the environment) is still possible.

    Change-Id: I2ec1df481aba7a3866fc8dbc912311de02c22d11
    Related-Bug: #1455102

Changed in python-cinderclient:
status: New → Fix Committed
Revision history for this message
Alistair Coles (alistair-coles) wrote :

Fix proposed for swift here https://review.openstack.org/187754

Changed in swift:
status: New → In Progress
assignee: nobody → Christian Schwede (cschwede)
Revision history for this message
Alistair Coles (alistair-coles) wrote :

Anyone working behind a proxy will find that *_PROXY env vars are no longer passed to the venv meaning that pip installs fail from index urls outside the proxy.

Changed in python-swiftclient:
assignee: nobody → Alistair Coles (alistair-coles)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to python-swiftclient (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/188080

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to swift (master)

Reviewed: https://review.openstack.org/187754
Committed: https://git.openstack.org/cgit/openstack/swift/commit/?id=f1f4bb30cd8ad930ddb7a232b2744b48e35a0480
Submitter: Jenkins
Branch: master

commit f1f4bb30cd8ad930ddb7a232b2744b48e35a0480
Author: Christian Schwede <email address hidden>
Date: Tue Jun 2 19:51:39 2015 +0000

    Fix testing issues

    When functional tests are run in tox and an exception is raised when connecting
    to Swift (for example: Swift not running, missing python-keystoneclient package
    used by python-swiftclient) 0 tests are executed, but tox returns a success.

    An exception is raised during tests, caused by a missing python-keystoneclient
    in python-swiftclient. Instead of adding python-keystoneclient as a dependency
    in python-swiftclient the package is added to the test-requirements.txt in Swift
    itself. Note that adding python-keystoneclient to the test-requirements in
    python-swiftclient is not sufficient (it's already in there).

    The exception in setup_package() is catched by the openstack.nose_plugin, thus
    disabling this plugin for now as well.

    Also fixing two test errors seen on the gate regarding the tempurl middleware.

    There was also an update to tox, environment variables were no longer passed
    with versions >= 2.0 (http://tox.readthedocs.org/en/latest/changelog.html).
    Swift test environment variables have been added to the passenv to re-enable the
    former behavior, as well as environment variables required to pass proxy
    settings.

    This also led to skipped tempauth tests, and together with the missing
    python-keystoneclient no tests were executed.

    Related-Bug: 1461440
    Related-Bug: 1455102

    Co-Authored-By: Alistair Coles <email address hidden>

    Change-Id: Ideea071017d04912c60ed0bc76532adbb446c31d

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-neutronclient (master)

Reviewed: https://review.openstack.org/183811
Committed: https://git.openstack.org/cgit/openstack/python-neutronclient/commit/?id=7eb3241650ad87d2f6ca5aa45b3a2415eafe7207
Submitter: Jenkins
Branch: master

commit 7eb3241650ad87d2f6ca5aa45b3a2415eafe7207
Author: Adrien Vergé <email address hidden>
Date: Sat May 16 17:58:27 2015 +0200

    Fix functional tests and tox 2.0 errors

    With the recent update to tox 2.0.x, environment variables such as
    OS_AUTH_URL are not passed by default, resulting in tests errors
    mentionning Keystone authentication failures.

    This patch reads credentials from the 'functional_creds.conf' config
    file, like it is done in novaclient, glanceclient, manilaclient and
    soon in cinderclient.

    Reading credentials the old way (the environment) is still possible.

    Change-Id: Ief0f050044ecd90a14bbaf044e2b93ade0a6173f
    Closes-Bug: #1455102

Changed in python-neutronclient:
status: In Progress → Fix Committed
Ian Cordasco (icordasc)
Changed in python-glanceclient:
milestone: 0.19.0 → none
Changed in python-glanceclient:
milestone: none → 0.19.1
Thierry Carrez (ttx)
Changed in python-glanceclient:
status: Fix Committed → Fix Released
Changed in swift:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-neutronclient (stable/kilo)

Fix proposed to branch: stable/kilo
Review: https://review.openstack.org/190970

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-neutronclient (stable/kilo)

Reviewed: https://review.openstack.org/190970
Committed: https://git.openstack.org/cgit/openstack/python-neutronclient/commit/?id=c054d2583b96383f6ac47edfd2e06ead4b5723b1
Submitter: Jenkins
Branch: stable/kilo

commit c054d2583b96383f6ac47edfd2e06ead4b5723b1
Author: Adrien Vergé <email address hidden>
Date: Sat May 16 17:58:27 2015 +0200

    Fix functional tests and tox 2.0 errors

    With the recent update to tox 2.0.x, environment variables such as
    OS_AUTH_URL are not passed by default, resulting in tests errors
    mentionning Keystone authentication failures.

    This patch reads credentials from the 'functional_creds.conf' config
    file, like it is done in novaclient, glanceclient, manilaclient and
    soon in cinderclient.

    Reading credentials the old way (the environment) is still possible.

    Conflicts:
     neutronclient/tests/functional/test_clientlib.py

    Change-Id: Ief0f050044ecd90a14bbaf044e2b93ade0a6173f
    Closes-Bug: #1455102
    (cherry picked from commit 7eb3241650ad87d2f6ca5aa45b3a2415eafe7207)

Thierry Carrez (ttx)
Changed in neutron:
milestone: none → liberty-1
status: Fix Committed → Fix Released
Changed in python-cinderclient:
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to swift (feature/hummingbird)

Related fix proposed to branch: feature/hummingbird
Review: https://review.openstack.org/202227

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on swift (feature/hummingbird)

Change abandoned by Michael Barton (<email address hidden>) on branch: feature/hummingbird
Review: https://review.openstack.org/202227
Reason: Apparently I did this wrong.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to swift (feature/hummingbird)

Related fix proposed to branch: feature/hummingbird
Review: https://review.openstack.org/202230

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to swift (feature/hummingbird)
Download full text (72.8 KiB)

Reviewed: https://review.openstack.org/202230
Committed: https://git.openstack.org/cgit/openstack/swift/commit/?id=f7cb1777e1b514b3345b9e516ed8f89ad1a4ae87
Submitter: Jenkins
Branch: feature/hummingbird

commit 51f806d3e3d3a1fcbc80d2f7d7ddbe5cc4c024c9
Author: John Dickinson <email address hidden>
Date: Tue Jul 14 20:49:08 2015 -0700

    remove Python 2.6 from the classifier

    Change-Id: I67233e9c7b69826242546bd6bd98c24b81070579

commit 278adf5c20101a191979ce1e4d6277e5f209149e
Author: Hisashi Osanai <email address hidden>
Date: Tue Jul 14 15:33:45 2015 +0900

    Make logic of unit tests responsive to the method names

    The two methods, test_authorize_succeeds_for_tenant_name_in_roles and
    test_authorize_succeeds_for_tenant_id_in_roles, have names that don't
    match what they are testing. tenant_name and tenant_id need to be
    switched.

    Change-Id: I7cb0a7d2b2111127fd5d6b55f2da6a3eadf2235d

commit 1cc3eff958fdd4fb07c2b74c52df7829d3125466
Author: Victor Stinner <email address hidden>
Date: Fri Jul 10 13:04:44 2015 +0200

    Fixes for mock 1.1

    The new release of mock 1.1 is more strict. It helped to find bugs in
    tests.

    Closes-Bug: #1473369
    Change-Id: Id179513c6010d827cbcbdda7692a920e29213bcb

commit ff192cfe5705324497a389aa2f22227d75dc0f8e
Author: janonymous <email address hidden>
Date: Wed Jul 8 18:38:22 2015 +0530

    Replace reduce and unichr , these are no longer available in py3

    * Replace reduce() with six.moves.reduce()
    * Replace unichr with six.unichr

    Change-Id: I2038e47e0a6522dd992fd2a4aeff981cf7750fe0

commit 4beceab4f4be99f14025815cf7ed4510ea77f460
Author: OpenStack Proposal Bot <email address hidden>
Date: Thu Jul 9 06:14:56 2015 +0000

    Imported Translations from Transifex

    For more information about this automatic import see:
    https://wiki.openstack.org/wiki/Translations/Infrastructure

    Change-Id: I9ff1dde06be45fc7d6c441a1e1c07221f839a9a1

commit 56ee39a7e13417203c5e1816d7a3184a07f85826
Author: Matthew Oliver <email address hidden>
Date: Thu Jul 9 15:19:32 2015 +1000

    Ring builder code clean up follow up patch

    This is a simple change that cleans up a NIT from Sam's 'stop moving
    partitions unnecessarily when overload is on' patch.

    Change-Id: I9d9f1cc23e2bb625d8e158f4d3f64e10973176a1

commit 6cafd0a4c0bb8f311fc59df580b42e801214effd
Author: Oshrit Feder <email address hidden>
Date: Wed Jul 8 15:18:22 2015 +0300

    Fix Container Sync example

    Container-sync realm uses cluster_ as a prefix to specify clusters'
    names. At use, the prefix should not be included. Fixing the examples
    and sample conf to make it clearer that only the name of the cluster
    should be passed.

    Change-Id: I2e521d86faffb59e1b45d3f039987ee023c5e939

commit 125238612f58481316db68d7087252bb7729f447
Author: Janie Richling <email address hidden>
Date: Sat Jul 4 17:08:32 2015 -0500

    Add CORS unit tests to base

    In earlier versions of swift when a request was made with an
    existing origin, but without any CORS settings in the container,
    it was possible to get an u...

tags: added: in-feature-hummingbird
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to swift (feature/crypto)

Related fix proposed to branch: feature/crypto
Review: https://review.openstack.org/205579

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to swift (feature/crypto)
Download full text (80.5 KiB)

Reviewed: https://review.openstack.org/205579
Committed: https://git.openstack.org/cgit/openstack/swift/commit/?id=8ab46b64365b8eab80680f2562f81e8adb3032a3
Submitter: Jenkins
Branch: feature/crypto

commit 89f705e8aab144092d40a13fc4ef19ffef5f3eba
Author: OpenStack Proposal Bot <email address hidden>
Date: Thu Jul 23 06:11:27 2015 +0000

    Imported Translations from Transifex

    For more information about this automatic import see:
    https://wiki.openstack.org/wiki/Translations/Infrastructure

    Change-Id: I94cf347564cb33977f33b1e64259bcb39a8cf809

commit a65e9db8752793ec37b594dc9eca5066171825db
Author: Christian Schwede <email address hidden>
Date: Wed Jul 22 10:43:17 2015 +0000

    Removing commented out code in test/unit/account/test_backend.py

    Noticed this while reviewing another change. Looks like the test itself already
    ensures correct functionality of the reclaim() method in AccountBroker without
    the commented code, thus removing this stale code.

    Change-Id: I6a26a7591adef9fd794ca68a4e9c493d1127f93c

commit 99d052772a9585e0befdfd292fd03aefde77180a
Author: Kota Tsuyuzaki <email address hidden>
Date: Mon Jul 13 01:12:43 2015 -0700

    Fix 499 client disconnected on COPY EC object

    Currently, a COPY request for an EC object might go to fail as 499 Client
    disconnected because of the difference between destination request content
    length and actual transferred bytes.

    That is because the conditional response status and content length for
    an EC object range GET is handled at calling the response instance on
    proxy server. Therefore the calling response instance (resp()) will change
    the conditional status from 200 (HTTP_OK) to 206 (PartialContent) and will
    change the content length for the range GET.

    In EC case, sometimes Swift needs whole stored contents to decode a segment.
    It will make 200 HTTP OK response from object-server and proxy-server
    will unfortunately set whole content length to the destination content
    length and it makes the bug 1467677.

    This patch introduces a new method "fix_conditional_response" for
    swift.common.swob.Response that calling _response_iter() and cached the
    iter in the Response instance. By calling it, Swift can set correct condtional
    response any time after setting whole content_length to the response
    instance like EC case.

    Change-Id: If85826243f955d2f03c6ad395215c73daab509b1
    Closes-Bug: #1467677

commit 62ed4f81ef80440550633eaaaa962a4f9383c2d3
Author: Timur Alperovich <email address hidden>
Date: Tue Jul 14 16:56:44 2015 -0700

    Add two functional tests for delimiter.

    The first test verifies that a delimiter will trim entries beyond the
    first matching instance of delimiter (after the given matching prefix,
    if any) and squash duplicates. So, when setting the delimiter
    to "-", given blobs "test", "test-foo" and "test-bar-baz", we expect
    only "test" (no matching delim) and "test-" (trim all characters after
    the first "-", and squash duplicates).

    The second test verifies that when a prefix is provid...

tags: added: in-feature-crypto
Changed in python-manilaclient:
importance: Undecided → High
Thierry Carrez (ttx)
Changed in swift:
milestone: none → 2.4.0
status: Fix Committed → Fix Released
Changed in python-neutronclient:
milestone: none → 3.0.0
status: Fix Committed → Fix Released
Changed in python-glanceclient:
milestone: 0.19.1 → 1.1.1
milestone: 1.1.1 → 1.0.0
Thierry Carrez (ttx)
Changed in neutron:
milestone: liberty-1 → 7.0.0
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to swift (stable/kilo)

Related fix proposed to branch: stable/kilo
Review: https://review.openstack.org/235933

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to swift (stable/kilo)

Reviewed: https://review.openstack.org/235933
Committed: https://git.openstack.org/cgit/openstack/swift/commit/?id=2914514e2464c4a9227bbbf67f5a08eda7b7ad06
Submitter: Jenkins
Branch: stable/kilo

commit 2914514e2464c4a9227bbbf67f5a08eda7b7ad06
Author: Christian Schwede <email address hidden>
Date: Tue Jun 2 19:51:39 2015 +0000

    Fix testing issues

    When functional tests are run in tox and an exception is raised when connecting
    to Swift (for example: Swift not running, missing python-keystoneclient package
    used by python-swiftclient) 0 tests are executed, but tox returns a success.

    An exception is raised during tests, caused by a missing python-keystoneclient
    in python-swiftclient. Instead of adding python-keystoneclient as a dependency
    in python-swiftclient the package is added to the test-requirements.txt in Swift
    itself. Note that adding python-keystoneclient to the test-requirements in
    python-swiftclient is not sufficient (it's already in there).

    The exception in setup_package() is catched by the openstack.nose_plugin, thus
    disabling this plugin for now as well.

    Also fixing two test errors seen on the gate regarding the tempurl middleware.

    There was also an update to tox, environment variables were no longer passed
    with versions >= 2.0 (http://tox.readthedocs.org/en/latest/changelog.html).
    Swift test environment variables have been added to the passenv to re-enable the
    former behavior, as well as environment variables required to pass proxy
    settings.

    This also led to skipped tempauth tests, and together with the missing
    python-keystoneclient no tests were executed.

    Related-Bug: 1461440
    Related-Bug: 1455102

    Co-Authored-By: Alistair Coles <email address hidden>

    Change-Id: Ideea071017d04912c60ed0bc76532adbb446c31d
    (cherry picked from commit f1f4bb30cd8ad930ddb7a232b2744b48e35a0480
    with modified python-keystoneclient version specifiers in test-requirements.txt)

Adrian Otto (aotto)
Changed in magnum:
milestone: none → mitaka-1
status: Fix Committed → Fix Released
bhaskar (bhaskardops)
information type: Public → Private
information type: Private → Public
Sean Dague (sdague)
no longer affects: python-novaclient
Changed in python-manilaclient:
milestone: liberty-1 → none
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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