upper-contraints mismatch between `install_tempest` and `configure_tempest`

Bug #1980483 reported by June Yi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
devstack
Fix Released
Undecided
Unassigned

Bug Description

I set the following in the `local.conf` file to specify the upper_constraints file.

  TEMPEST_VENV_UPPER_CONSTRAINTS=/opt/stack/requirements/upper-constraints.txt

The above settings worked well for `install_tempest`, but not for `configure_tempest`.

The following is from the `stack.sh.log` for that part.

  ++ lib/tempest:install_tempest:789 : tox -r --notest -efull
  full create: /opt/stack/tempest/.tox/tempest
  full installdeps: -c/opt/stack/requirements/upper-constraints.txt, -r/opt/stack/tempest/requirements.txt
  full develop-inst: /opt/stack/tempest

  ...

  ++ lib/tempest:configure_tempest:699 : tox -revenv-tempest --notest
  venv-tempest recreate: /opt/stack/tempest/.tox/tempest
  venv-tempest installdeps: -chttps://releases.openstack.org/constraints/upper/master, -r/opt/stack/tempest/requirements.txt

Commit ID of devstack repo is 02f8c16c9b43814d2958bad9a37b1949658081f1

Revision history for this message
Martin Kopec (mkopec) wrote :

interesting, i checked the code it looks like that's intentional (judging based on the comment - "Respect constraints on tempest verify-config venv"):

https://opendev.org/openstack/devstack/src/commit/02f8c16c9b43814d2958bad9a37b1949658081f1/lib/tempest#L694-L705

Although I don't understand why we would want to recreate the venv-tempest env or why we didn't force the u-c to that recreate as well.

Revision history for this message
June Yi (gochist) wrote :

It seems that the position of the comment has been changed so that it can be understood differently from the original intention. Below is the original commit with that comment.

https://opendev.org/openstack/devstack/commit/1e31e68557205fa61929ff579e427b7ef86aa2ea

Revision history for this message
Ghanshyam Mann (ghanshyammann) wrote :

so you are running devstack with OFFLINE=True right? the line 699 in configure_tempest is using -r in tox env run which is to forcefully recreate the env in case any constraints has changed or so.
- https://opendev.org/openstack/devstack/src/commit/02f8c16c9b43814d2958bad9a37b1949658081f1/lib/tempest#L699

As it is happening before the install_tempest_plugins s none of the plugins will be flushed out on this recreation
- https://opendev.org/openstack/devstack/src/commit/02f8c16c9b43814d2958bad9a37b1949658081f1/extras.d/80-tempest.sh#L24

Yes we do recreate the env with same constraints which are set to be used but that is just to make sure things are correct if ./stack.sh is run in offline mode.

Is this causing any issue like some tempest plugin is installed and then this recreate env flush them out?

Revision history for this message
June Yi (gochist) wrote (last edit ):

I'm using a private repo for git, pypi and apt in an air-gapped environment. So I don't use the OFFLINE option.

git, default image and etcd have options to support this air-gapped environment, so I can replace the url with a private repo or local path.

However, the real problem I have is that the upper-constraints of tempest cannot completely replace the dependency on the internet resource https://releases.openstack.org/constraints/upper/master with the TEMPEST_VENV_UPPER_CONSTRAINTS option.

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

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/devstack/+/848482

Changed in devstack:
status: New → In Progress
Revision history for this message
June Yi (gochist) wrote :

Can someone give me a review comment on the patch I submitted?

Revision history for this message
Ghanshyam Mann (ghanshyammann) wrote :

Agree that we have issue here and we should consider the constraints for offline mode too.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to devstack (stable/yoga)

Fix proposed to branch: stable/yoga
Review: https://review.opendev.org/c/openstack/devstack/+/854807

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to devstack (stable/xena)

Fix proposed to branch: stable/xena
Review: https://review.opendev.org/c/openstack/devstack/+/855146

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

Reviewed: https://review.opendev.org/c/openstack/devstack/+/848482
Committed: https://opendev.org/openstack/devstack/commit/b9b6d6b862ce69a875c152ad30da8f4717c75272
Submitter: "Zuul (22348)"
Branch: master

commit b9b6d6b862ce69a875c152ad30da8f4717c75272
Author: June Yi <email address hidden>
Date: Sat Jul 2 13:07:43 2022 +0900

    Respect constraints on tempest venv consistently

    In case of online mode, there is a procedure to recreate tempest venv.
    For consistency of tempest venv during the entire stack.sh process,
    add logic to consider the TEMPEST_VENV_UPPER_CONSTRAINTS option here.

    Closes-bug: #1980483
    Signed-off-by: June Yi <email address hidden>
    Change-Id: I0cea282152fd363af8671cab1b5f733ebe2bd4df

Changed in devstack:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to devstack (stable/wallaby)

Fix proposed to branch: stable/wallaby
Review: https://review.opendev.org/c/openstack/devstack/+/855344

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to devstack (stable/victoria)

Fix proposed to branch: stable/victoria
Review: https://review.opendev.org/c/openstack/devstack/+/855349

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to devstack (stable/ussuri)

Fix proposed to branch: stable/ussuri
Review: https://review.opendev.org/c/openstack/devstack/+/855454

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to devstack (stable/train)

Fix proposed to branch: stable/train
Review: https://review.opendev.org/c/openstack/devstack/+/855455

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to devstack (stable/yoga)

Reviewed: https://review.opendev.org/c/openstack/devstack/+/854807
Committed: https://opendev.org/openstack/devstack/commit/6f5860c258008993a644576829b529f0c376af23
Submitter: "Zuul (22348)"
Branch: stable/yoga

commit 6f5860c258008993a644576829b529f0c376af23
Author: June Yi <email address hidden>
Date: Sat Jul 2 13:07:43 2022 +0900

    Respect constraints on tempest venv consistently

    In case of online mode, there is a procedure to recreate tempest venv.
    For consistency of tempest venv during the entire stack.sh process,
    add logic to consider the TEMPEST_VENV_UPPER_CONSTRAINTS option here.

    Closes-bug: #1980483
    Signed-off-by: June Yi <email address hidden>
    Change-Id: I0cea282152fd363af8671cab1b5f733ebe2bd4df
    (cherry picked from commit b9b6d6b862ce69a875c152ad30da8f4717c75272)

tags: added: in-stable-yoga
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to devstack (stable/xena)

Reviewed: https://review.opendev.org/c/openstack/devstack/+/855146
Committed: https://opendev.org/openstack/devstack/commit/4c0a5739827329b2380e6f8fde5fa07d7e371659
Submitter: "Zuul (22348)"
Branch: stable/xena

commit 4c0a5739827329b2380e6f8fde5fa07d7e371659
Author: June Yi <email address hidden>
Date: Sat Jul 2 13:07:43 2022 +0900

    Respect constraints on tempest venv consistently

    In case of online mode, there is a procedure to recreate tempest venv.
    For consistency of tempest venv during the entire stack.sh process,
    add logic to consider the TEMPEST_VENV_UPPER_CONSTRAINTS option here.

    Closes-bug: #1980483
    Signed-off-by: June Yi <email address hidden>
    Change-Id: I0cea282152fd363af8671cab1b5f733ebe2bd4df
    (cherry picked from commit 8355e8130652da0a6ed87295998200d0bcb9a58e)

tags: added: in-stable-xena
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to devstack (stable/wallaby)

Reviewed: https://review.opendev.org/c/openstack/devstack/+/855344
Committed: https://opendev.org/openstack/devstack/commit/2aa38e12591000cc050cee8c5b7a4ae781dd6a64
Submitter: "Zuul (22348)"
Branch: stable/wallaby

commit 2aa38e12591000cc050cee8c5b7a4ae781dd6a64
Author: June Yi <email address hidden>
Date: Sat Jul 2 13:07:43 2022 +0900

    Respect constraints on tempest venv consistently

    In case of online mode, there is a procedure to recreate tempest venv.
    For consistency of tempest venv during the entire stack.sh process,
    add logic to consider the TEMPEST_VENV_UPPER_CONSTRAINTS option here.

    Closes-bug: #1980483
    Signed-off-by: June Yi <email address hidden>
    Change-Id: I0cea282152fd363af8671cab1b5f733ebe2bd4df
    (cherry picked from commit 8355e8130652da0a6ed87295998200d0bcb9a58e)

tags: added: in-stable-wallaby
tags: added: in-stable-ussuri
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to devstack (stable/ussuri)

Reviewed: https://review.opendev.org/c/openstack/devstack/+/855454
Committed: https://opendev.org/openstack/devstack/commit/f9dcabfdb068f3ee91764c8246117067a09aad8d
Submitter: "Zuul (22348)"
Branch: stable/ussuri

commit f9dcabfdb068f3ee91764c8246117067a09aad8d
Author: June Yi <email address hidden>
Date: Sat Jul 2 13:07:43 2022 +0900

    Respect constraints on tempest venv consistently

    In case of online mode, there is a procedure to recreate tempest venv.
    For consistency of tempest venv during the entire stack.sh process,
    add logic to consider the TEMPEST_VENV_UPPER_CONSTRAINTS option here.

    Closes-bug: #1980483
    Signed-off-by: June Yi <email address hidden>
    Change-Id: I0cea282152fd363af8671cab1b5f733ebe2bd4df
    (cherry picked from commit 8355e8130652da0a6ed87295998200d0bcb9a58e)

tags: added: in-stable-victoria
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to devstack (stable/victoria)

Reviewed: https://review.opendev.org/c/openstack/devstack/+/855349
Committed: https://opendev.org/openstack/devstack/commit/84f6840eeababfc1ac3d5b737bd8ac287c7a7830
Submitter: "Zuul (22348)"
Branch: stable/victoria

commit 84f6840eeababfc1ac3d5b737bd8ac287c7a7830
Author: June Yi <email address hidden>
Date: Sat Jul 2 13:07:43 2022 +0900

    Respect constraints on tempest venv consistently

    In case of online mode, there is a procedure to recreate tempest venv.
    For consistency of tempest venv during the entire stack.sh process,
    add logic to consider the TEMPEST_VENV_UPPER_CONSTRAINTS option here.

    Closes-bug: #1980483
    Signed-off-by: June Yi <email address hidden>
    Change-Id: I0cea282152fd363af8671cab1b5f733ebe2bd4df
    (cherry picked from commit 8355e8130652da0a6ed87295998200d0bcb9a58e)

tags: added: in-stable-train
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to devstack (stable/train)

Reviewed: https://review.opendev.org/c/openstack/devstack/+/855455
Committed: https://opendev.org/openstack/devstack/commit/faf11dbdc05432a91b1b994d568b42ba3bee4946
Submitter: "Zuul (22348)"
Branch: stable/train

commit faf11dbdc05432a91b1b994d568b42ba3bee4946
Author: June Yi <email address hidden>
Date: Sat Jul 2 13:07:43 2022 +0900

    Respect constraints on tempest venv consistently

    In case of online mode, there is a procedure to recreate tempest venv.
    For consistency of tempest venv during the entire stack.sh process,
    add logic to consider the TEMPEST_VENV_UPPER_CONSTRAINTS option here.

    Closes-bug: #1980483
    Signed-off-by: June Yi <email address hidden>
    Change-Id: I0cea282152fd363af8671cab1b5f733ebe2bd4df
    (cherry picked from commit 8355e8130652da0a6ed87295998200d0bcb9a58e)

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.