Compare commits

...

72 Commits

Author SHA1 Message Date
Dr. Jens Harbott 3021397dc8 CI: drop nova-cells-v1 job
This job no longer exists, drop it from zuul config to avoid errors.

Since some other jobs have unrelated failures, make them non-voting in
order to unblock this patch.

Change-Id: Ie4cbe2e52adca03fb6064c064e0573ec2b234fd7
2023-05-27 12:41:40 +02:00
Dr. Jens Harbott 51a7cbd8ae Cleanup failing platform job
These jobs have no longer run successfully in a long time, drop them
from the zuul config:

- centos-7
- fedora-latest
- opensuse-15

Change-Id: I2993e20cfe7279467cf9f1b3eeb20c184ff9e053
2022-10-09 13:37:42 +02:00
Slawek Kaplonski acd107c87f Fix is_neutron_legacy_enabled function
This function will now first filter out all "neutron-" strings from
DISABLED_SERVICES list before looking for "neutron" string in it.

Change-Id: I5cab6a3be553713e1257599fb72042c6001f2672
Close-Bug: #1824884
(cherry picked from commit a9a51ca638)
2022-08-24 15:16:21 +00:00
Ian Wienand c67e7d3bbd Mark our source trees as safe for git to use as other users
git commit [1] introduced a new behaviour to work around a CVE that
disallows any git operations in directories not owned by the current
user.

This may seem unrelated to installation, but it plays havoc with PBR,
which calls out to git to get to get revision history.  So if you are
"pip install"-ing from a source tree you don't own, the PBR git calls
in that tree now fail and the install blows up.

This plays havoc with our model.  Firstly, we checkout all code as
"stack" then install it globally with "sudo" (i.e. root) -- which
breaks.  We also have cases of essentially the opposite -- checkouts
we have installed as root, but then run tox in them as a regular user;
tox wants to install the source in its venv but now we have another
user conflict.

This uses the only available configuration option to avoid that by
globally setting the source directories we clone as safe.  This is an
encroachment of the global system for sure, but is about the only
switch available at the moment.  For discussion of other approaches,
see [2].

Also, squashing the below backport which is needed for bionic
- https://review.opendev.org/q/I941ef5ea90970a0901236afe81c551aaf24ac1d8

Related-Bug: https://bugs.launchpad.net/devstack/+bug/1968798

[1] https://github.com/git/git/commit/8959555cee7ec045958f9b6dd62e541affb7e7d9
[2] https://review.opendev.org/c/openstack/devstack/+/837636

Change-Id: Ib9896a99b6d6c4d359ee412743ce30512b3c4fb7
(cherry picked from commit 676dcaf944)
(cherry picked from commit a9852abfc5)
(cherry picked from commit 16c57c51a0)
2022-04-20 12:15:55 +02:00
Rodolfo Alonso Hernandez a5366e5732 Add python3.6 pip support
Since pip v22, python3.6 is not supported (the minimum version is
python3.7). This patch adds the reference for the pip3.6 URL to be
used instead of the default one.

NOTE: stable/train had its own method to provide support for py3x.
This patch uses it instead of pushing the master patch approach.

This patch is also fixing the py35 pip URL string that should be
https://bootstrap.pypa.io/pip/3.5/get-pip.py.

Conflicts:
  tools/install_pip.sh

Closes-Bug: #1959600
Change-Id: Iab2c391d5388461fe9e9037cee81884ce8032e72
(cherry picked from commit 05a2cebeb4)
2022-02-11 09:11:50 +00:00
Ghanshyam Mann d2cc04d91e Test stable/stein with tempest 24.0.0
For every stable branch, Tempest as a range of versions
to work[1] and we can pick either first supported
or last supported version to test the specific EM stable
branch (when Tempest master is in not used).

For stable/stein, first supported version is Tempest 20.0.0
and last supported verson is 26.0.0.

Till now we used the last supported version and it was working
fine until jsonschema latest release 4.0.0 has some incompatible
changes. Now we can say our upper constraints should protect us
from this (like it protect in Tempest master case). But thing
is little tricky here on whether we use the compatible constraints
with tempest 26.0.0. or not.

Compatible constraints for Tempest 26.0.0 is stable/victoria constraints
(the time tag 26.0.0 was cut) but we used stable/stein constraints with
tempest 26.0.0 in stable/stein[2].

We should always use the compatible constraints and tag combination.

We have two option here to solve:

1. Use Tempest 24.0.0 and compatible stable/stein constraints (this commit)
2. Use Tempest 26.0.0 and compatible stable/victoria constraints

I am going with the 1st approach as it is simple and 2nd approach need
modification in run-tempest roles etc. Reason to pick the 24.0.0 was because
it has the nova novnc test fixes.

To make 24.0.0 work, we need to revert the below commit also:

Revert "Remove tempest deprecated img_dir option"

This reverts commit 9984c6ba25.

Reason for revert: bug#1946403

Co-Authored-By: melanie witt <melwittt@gmail.com>

[1] https://docs.openstack.org/tempest/latest/tempest_and_plugins_compatible_version_policy.html
[2] https://opendev.org/openstack/devstack/src/branch/stable/stein/stackrc#L319-L320

Change-Id: I98ec0029666aa9bf0d66c1f083d81cd7a20597fb
2021-10-07 17:59:30 -05:00
Ghanshyam Mann dc9d7c5f33 Pin nodeset for unit test job
devstack unit test job does not set any nodeset
and so does use default nodeset defined in base jobs
in opendev. When opendev switches the default nodeset to
the latest distro version, devstack unit test job can start
failing. Example:

- https://review.opendev.org/q/I01408f2f2959b0788fe712ac268a526502226ee9
- https://review.opendev.org/q/Ib1ea47bc7384e1f579cb08c779a32151fccd6845

To avoid such a situation in future, let's set the working nodeset
for this job also so that when we cut the stable branch we can
run it on the working distro version. 

Change-Id: I302140778fedf08bc8ba72c453837fa7b8f8f9ae
2021-05-25 18:13:48 +00:00
Ghanshyam Mann a464979916 Make stackviz tasks not to fail jobs
Due to issue on stckviz side, job start
failing with POST_FAILURE. If we fix the
issue still we need to wait for periodic job
periodic-package-stackviz-element to publish
the latest tarball on https://tarballs.openstack.org/stackviz/dist/.

Let's not fail the job for any issue occur during
stackviz processing.

Closes-Bug: 1863161

Change-Id: Ifee04f28ecee52e74803f1623aba5cfe5ee5ec90
(cherry picked from commit 580fec54c3)
(cherry picked from commit 800eb4dd44)
(cherry picked from commit 3b2feba2ef)
(cherry picked from commit 4f9c1e084c)
(cherry picked from commit 2873b5530d)
2021-04-08 20:20:52 -05:00
Zuul b684597ec7 Merge "Remove tempest deprecated img_dir option" into stable/stein 2021-03-11 06:29:22 +00:00
Zuul 7f15b7b958 Merge "Add a variable to configure the Tempest venv upper constraints" into stable/stein 2021-03-10 21:09:30 +00:00
Dan Smith 1400e6f1c3 Fix get-pip URL for py27
This has been failing to install with this message, which I think
means we need to change our URL for getting pip:

 The URL you are using to fetch this script has changed, and this one
 will no longer work. Please use get-pip.py from the following URL
 instead:
    https://bootstrap.pypa.io/pip/2.7/get-pip.py
 Sorry if this change causes any inconvenience for you!

Change-Id: Id62e91b1609db4b1d2fa425010bac1ce77e9fc51
(cherry picked from commit fc7f929597)
2021-03-08 10:38:18 +01:00
Ghanshyam Mann 8687539175 Add a variable to configure the Tempest venv upper constraints
We use Tempest master for testing the supported stable
branches so using master upper constraints works fine but
when we need to use old Tempest in the below cases then master
upper constraints do not work and devstack will not be
able to install Tempest in vnenv:

- Testing Extended Maintenance branch
- Testing py2.7 jobs until stable/train with in-tree tempest plugins

This commit adds a variable to set the compatible upper constraint
to use for Tempest's old version.

Few of the current failure which can be fixed by this new configurable var:
- networking-generic-switch-tempest-dlm-python2
  - https://zuul.opendev.org/t/openstack/build/ebcf3d68d62c4af3a43a222aa9ce5556
- devstack-platform-xenial on stable/steinand stable/train
  - https://zuul.opendev.org/t/openstack/build/37ffc1af6f3f4b44b5ca8cbfa27068ac

 Conflicts:
       lib/tempest
       stackrc
Due to https://review.opendev.org/c/openstack/devstack/+/774103 and to use
the stable constraints.

Change-Id: I5b2217d85e6871ca3f7a3f6f859fdce9a50d3946
(cherry picked from commit 3bdc8f66ad)
(cherry picked from commit 2e4b708e25)
(cherry picked from commit 74a136ac98)
(cherry picked from commit 3c92daf734)
2021-02-24 08:44:36 -06:00
Ghanshyam Mann d182ffc45e Set temepst tox constraints to stable constraints
stable/stein is now in EM state and use old Tempest
26.0.0. For zuulv3 native jobs everything is fine
as tox constraints things are taken care in run-tempest
role.

But legacy job started failing on stable/stein
example- designate-devstack-pdns4 on stable/stein
- https://zuul.opendev.org/t/openstack/build/35fd0a4c76e0482e88ed32ef0840291d

To fix legacy jobs we need to set the tox env var while
isntalling the tempest in venv which is where very first time
tempest venv is being created. This will make tox constraints
match with what d-g set and will not recreate the tempest venv.

Change-Id: I334551197381a8242d9dd613dc2ff23aba81e45e
2021-02-20 17:20:11 -06:00
Ghanshyam Mann e119cd35ab Pin Tempest to 26.0.0 for stable stein testing
Stable stein is in Extended maintenance state[1] and
As per Tempest stable branmch testing policy, it stopped
the support for stable/stein in master version. Tempest 26.0.0
tag is last supported tag for stein.

Use that tag to test stable/stein branch before any incompatible
change merge in Tempest master.

[1] https://releases.openstack.org/

Change-Id: I715638f11d622de12439cb97a4be999cfab40367
2021-02-09 17:50:35 +00:00
Ghanshyam Mann c2a004fa5a Fix get-pip for python 3.5
get-pip.py is fixed for py2.7 in
https://review.opendev.org/c/openstack/devstack/+/772462

This commit support it for py3.5 as devstack stable/train and stein
still support ubuntu xenial which has py3.5

Also using Temepst 23.0.0 for xenial platform job which is
compatible version on py3.5.

Closes-Bug: #1913283
Change-Id: Icd40e41b5f3ef9a621ca1b9739875fcdd31abd74
2021-01-27 16:02:34 +00:00
Akihiro Motoki 910f00eeeb Use a dedicated version of get-pip.py for python 2.7
get-pip.py dropped python 2.7 support, so we cannot use the default
get-pip.py for python 2.7 now. get-pip.py for python 2.7 is available
at https://bootstrap.pypa.io/2.7/get-pip.py.
This commit tries to use python 2.7 version of get-pip.py
for python 2.7 environment.

Change-Id: I88ba370de8887a05c473fe7c19a61a319e8812d2
(cherry picked from commit 1382e933c5)
(cherry picked from commit 469b26f742)
2021-01-26 14:33:42 +01:00
elajkat eae384e197 Setting available_features for stable branch
available_features for Neutron tempest tests is default to "all" and
used from Victoria to enable/disable tests that has no API extension.
It is added here to make sure that stable gating will not execute these
tests (like for IPv6 metadata in neutron-tempest-plugin or updating
min_bw QoS values for port already attached to VMs)

Cherry-picked from stable/victoria patch
(https://review.opendev.org/c/openstack/devstack/+/769885), but the list
for available_features is empty on Ussuri and Train.

Change-Id: Ic6056218e51e6b0da554bcdf139214d2229ba3c1
Related-Bug: #1882804
(cherry picked from commit e34a8720bf)
(cherry picked from commit ef784e195f)
(cherry picked from commit 2f573b79be)
2021-01-19 09:23:44 +00:00
Martin Kopec 9984c6ba25 Remove tempest deprecated img_dir option
Tempest option scenario.img_dir has been deprecated more than 4 years, it's
time to remove it from devstack.
img_file option should contain the full path to the image.
This patch removes setting of img_dir option and makes img_file
one contain the full path of an image.

Change-Id: I71102095f3603915f0bc7d21f2e18c4eac4e95ec
Related-Bug: #1393881
2021-01-14 16:42:57 +00:00
Ghanshyam Mann d3016a20ac Install swift keystone extras requirements
Since the introduction of I8f24b839bf42e2fb9803dc7df3a30ae20cf264
s-proxy is no longer able to launch as keystonemiddleware (listed under
test-requirements.txt) has not been installed.

keystonemiddleware is listed as extras requirements in swift
- https://github.com/openstack/swift/blob/e0d46d77fa740768f1dd5b989a63be85ff1fec20/setup.cfg#L79

Let's install swift keystone extra requirements also.

Closes-Bug: #1909018
Change-Id: I02c692e95d70017eea03d82d75ae6c5e87bde8b1
(cherry picked from commit 04b0b61557)
(cherry picked from commit 90651cb1a9)
(cherry picked from commit 10fdf258ba)
(cherry picked from commit a7c4377c17)
2020-12-23 14:07:46 -06:00
Monty Taylor 6a500ad269 Stop installing test-requirements with projects
This is a test of installing openstack and then seeing if it works.
OpenStack components do not need test-requirements to operate,
that's why they are test-requirements.

Additionally, as we look forward to depsolver pip, this is going
to screw us because we don't apply constraints to linters, which
are expressed in - you guessed it, test-requirements.

Change-Id: I8f24b839bf42e2fb9803dc7df3a30ae20cf264eb
(cherry picked from commit 09b5b05c47)
(cherry picked from commit d3ab04bcb1)
2020-12-10 21:47:49 +00:00
Jan Zerebecki 131cd77189 Disable opensuse-15 on stein
There is almost no interested in stein on openSUSE Leap remaining that I
know of, so stop testing it. It won't work on 15.2 with python2. On 15.1
it was working with https://review.opendev.org/#/c/735640/ , but
maintaining 15.1 in the CI is probably not worth it.

In https://review.opendev.org/#/c/745252/ the image of openSUSE Leap used
by Zuul was updated to 15.2. It ships with libvirt 6.0.0 instead of
5.1.0, but the old version of libvirt-python doesn't build/install with
the newer libvirt. The newer libvirt-python 6.0.0 doesn't work with
python2, but requires python3, so updating the upper constraints is not
easy.

Change-Id: Iebaadee46fa8c3cae6cf7cd9f15565281e030bd5
2020-11-11 20:09:38 +01:00
Clark Boylan e5007d4618 Update opensuse version
Nova has newer qemu requirements which needs opensuse 15.2 to meet. The
infra opensuse 15 images are 15.2 now to accomodate that. Update
opensuse's supported version to match.

Change-Id: I6f3c5234920b185b2b0cd9c358371402f7a7b922
(cherry picked from commit 471f1625bb)
(cherry picked from commit 0ebe7b072e)
(cherry picked from commit 0f351d2a4d)
2020-09-30 16:06:50 -07:00
Ghanshyam Mann c342ec4342 Enable xenapi tests for stable branch
Tempest xenapi related tests are skipped for Victoria
onwards
- https://review.opendev.org/#/c/749527/

We need to keep runnnig those test till stable ussuri.

Depends-On: https://review.opendev.org/#/c/749527/
Change-Id: If67186e46cb3c4f4505d006ec6389057925ce44c
(cherry picked from commit eb04d5218d)
2020-09-07 10:26:03 -05:00
Ian Wienand 4b1885bef6 Use SETUPTOOLS_USE_DISTUTILS=stdlib for global pip installs
A new setuptools release has changed the way pip installs are done,
see [0]. With this change we switch back to using the distro
method for global pip installs.

[0] http://lists.openstack.org/pipermail/openstack-discuss/2020-August/016905.html

Change-Id: I5d8aa0e58e0409c54451b51de5eb70ba9a68d849
(cherry picked from commit 18b4251bf4)
(cherry picked from commit 87d1da30a8)
(cherry picked from commit 1b35581bb0)
2020-09-01 12:02:31 +00:00
Ghanshyam Mann db067935bc Move process-stackviz role from Tempest to Devstack
process-stackviz role currently defined in Tempest repo[1] and used
in tempest jobs. Issue with having it in branchless Tempest is that any
fix in that role cannot be backported to older Tempest. Also stackviz is
not Tempest things it is only used by Tempest jobs.

Stackviz can be considered as a service similar to Tempest so inatlling it in
Devstack side make sense. Also that will give us advantage to handle the
branch specific fixes or backpoting the fixes.

This can solve the current issues we are facing on rocky branch
- https://zuul.opendev.org/t/openstack/build/c1e2da80537448bfb24331fb4198a931/console#4/0/29/controller

[1] https://opendev.org/openstack/tempest/src/branch/master/roles/process-stackviz

Change-Id: I0ba1fd05c6391cd8bb978119ecfbb891def2d497
2020-06-19 20:33:25 +00:00
Luigi Toscano 0e83589488 sync-devstack-data: new argument devstack_data_base_dir
When the role is used by grenade, the data directory is shared among
different devstack executions, and the base directory is different,
for example: /opt/stack/data vs /opt/stack/{old,new}.
The new devstack_data_base_dir parameter allows user to specify
a base directory for the data/ directory which is unrelated
to the devstack directory. The default value is devstack_base_dir,
so the default behavior is unchanged.

Change-Id: Ie69b7b51947cbf1a8b31d2701783de2fb56a2d33
(cherry picked from commit 3ffc00940f)
2020-06-18 09:44:58 +02:00
Jens Harbott 5c07f3b1b5 Work around gate breakage
This is merged from three cherry-picked patches, all needed in order to
pass gate testing. Make neutron-grenade non-voting in gate because
dropping it there would be complicated.

Use packaged uwsgi on Fedora and Ubuntu

Building uwsgi from source was a workaround that was introduced a long
time ago, it doesn't seem like it is needed anymore and will actually
fail for Ubuntu 20.04.

Also it doesn't match what will happen for most real-world
installations, so let's try to get back to using distro packages. We'll
still use the source install for RHEL/Centos, it remains to be tested
whether we can get back to using distro versions there, too.

Use uwsgi binary from path

All these uwsgi invocations assume that the uwsgi binary is in the
same directory as their project binaries are installed into (probably
/usr/bin).  That may not be correct -- for example if using a packaged
uwsgi on Fedora the binary will live in /usr/sbin/uwsgi (not /usr/bin
where the project files from pip are).

Switch invocations to just find it in the path.

Related-Bug: 1883468
Change-Id: I82f539bfa533349293dd5a8ce309c9cc0ffb0393
(cherry picked from commit 2d903568ed)
(cherry picked from commit 84737ebd96)
(cherry picked from commit 312517d510)
2020-06-16 12:38:26 +02:00
Zuul ab86ced64c Merge "New TEMPEST_VOLUME_REVERT_TO_SNAPSHOT setting" into stable/stein 2020-05-27 06:43:25 +00:00
Lee Yarwood d9225369eb tempest: Increase m1.nano and m1.micro RAM by 64MB to avoid tmpfs exhaustion
tmpfs exhaustion has long been suspected as the root issue behind
failures to load ssh keys and other metadata from local config drives as
documented in bug #1808010. This can also lead to failures fetching
metadata from n-metadata-api leaving Tempest unable to SSH into
instances.

This change increases the RAM of the m1.nano and m1.micro flavors by
64MB to hopefully avoid these errors going forward. This is also ahead
of our eventual upgrade to Cirros 0.5.0 where 128MB becomes a
requirement.

Related-Bug: #1808010
Change-Id: I4b597579cf89939955d3c110c0bd58ca05de61f0
(cherry picked from commit 54edc7aeef)
(cherry picked from commit 9707dba338)
2020-05-23 13:55:20 +00:00
Luigi Toscano 37a556c182 New TEMPEST_VOLUME_REVERT_TO_SNAPSHOT setting
Follow the pattern of the other configuration keys. The new variables
allows tests to enable/disable volume revert tests provided
by cinder-tempest-plugin.

Revert-to-snapshot was introduced in pike, and so the tests.

Change-Id: If137f201c2f646703f5a1ff96e71e48caed63b67
(cherry picked from commit 8fd45dec50)
2020-05-19 20:16:33 +00:00
Zuul 2ffd6b6137 Merge "Create virtualenv with abstracted VIRTUALENV_CMD" into stable/stein 2020-05-14 00:12:48 +00:00
Ian Wienand ebedc2240a Create virtualenv with abstracted VIRTUALENV_CMD
Just calling "virtualenv" makes a Python 2 based environment;
setuptools just dropped Python 2 support (as Python 2 reached EOL in
Jan 2020) so this has now become a breakage.

Although the Python 2 path won't work, use the abstracted command.
This should stop us having to revisit this for any future cleanups (or
switing to venv, etc).

Change-Id: I531e971b78491a9276753c0d86b04c4adbd224aa
(cherry picked from commit 4143ce6fc9)
(cherry picked from commit ebf7705a98)
2020-05-13 05:10:48 +00:00
Ian Wienand fe9292bc7a Add ensure-virtualenv role
On this branch some tests are still running under Python 2 and thus
rely on virtualenv (instead of us standardising on "python3 -m venv"
on the master branch where we are all Python 3).  Use the zuul-role to
ensure the system package that provides "/usr/bin/virtualenv" is
installed.

Change-Id: I2b092bd70a9dbc6ef3a673ba45ca6925f9220bce
(cherry picked from commit 23cfb9e6eb)
2020-05-13 05:10:26 +00:00
Zuul 82a7bc2c83 Merge "Fix MySQL log collection" into stable/stein 2020-04-28 04:14:40 +00:00
Colleen Murphy 0e6774e0e7 Fix six package on opensuse for pip 10
openSUE Leap 15.0 and 15.1 both provide python3-six version 1.11.0.
Since version 1.12.0 was released, pip>=10 recognizes the version
difference and tries to uninstall the distro-provided version and fails.
This change adds another hack to remove the egg-info file for the six
library so that pip can manage it directly. We also have to wait to
install os-testr until after the fixup has happened since trying to
install it triggers the issue.

Depends-on: https://review.opendev.org/715175

Change-Id: I4649abe06b5893a5251bfcdd4234abccde6ceda2
(cherry picked from commit 6eb2c5990d)
2020-04-16 15:07:14 -07:00
Zuul 45383fce5f Merge "Fix opensuse trusted certificates" into stable/stein 2020-04-16 17:11:08 +00:00
Colleen Murphy 6b5d1186c5 Fix opensuse trusted certificates
There's a bug[1] with the combination of the p11-kit and
ca-certificates-mozilla packages available on the latest built
opensuse-15 node in nodepool (which has not been rebuilt for weeks due
to a separate issue[2]) which causes the standard CA bundle to not be
installed correctly and causes jobs that call to external HTTPS services
to fail. Upgrading both packages in sync fixes the issue.

[1] https://bugzilla.suse.com/show_bug.cgi?id=1154871
[2] http://bugzilla.suse.com/show_bug.cgi?id=1166139

Change-Id: Ia8fdfe12fd9089e178adcb2b5eec997eebada262
Needed-by: https://review.opendev.org/713566
(cherry picked from commit 497caf0157)
(cherry picked from commit 7921e4673f)
2020-04-14 11:52:34 -07:00
Ghanshyam Mann 57efe5036d Fix Tempest installtion on system wide for stable branch
INSTALL_TEMPEST flag enable to install Tempest by default on
devstack env which is meant for using on master gate only and has
to be false for stable branch. On stable branch master Tempest
on system wide can fail to install for various reason like constraint
etc. That is why we install Tempest on venv always.

This started failing tempest-full on stein gate[1] where
devstack try to install Tempest on system wide also which try to
use py2 env because jobs is py2 and fail.
- https://zuul.opendev.org/t/openstack/build/f05569c475f44327bff7b7ec58faef8c/log/controller/logs/devstacklog.txt#30654

We need to set INSTALL_TEMPEST flag to false on all stable branch to
avoid such issue which we did not do since pike.
(I will make note of this in Devstack branch cut TODO list)
- https://github.com/openstack/devstack/blob/6067e41a5cc44164e34faab2fd9741dbb788f42f/lib/tempest#L60

[1] https://zuul.opendev.org/t/openstack/build/f05569c475f44327bff7b7ec58faef8c

Change-Id: I60949fb735c82959fb2cfcb6aeef9e33fb0445b6
Closes-Bug: #1871327
2020-04-07 14:37:00 +00:00
Zuul 6067e41a5c Merge "remove duplicate entries under title guides in table of contents" into stable/stein 2020-04-07 10:27:50 +00:00
shenjiatong b210392513 remove duplicate entries under title guides in table of contents
right now, there are duplicate titles under contents --> guides
as shown in https://docs.openstack.org/devstack/latest/, although
they will forward to different pages, it is still a little confusing
for users. This change will hide toctree in guides.rst and users could
click links in page to jump to detail page to read more.

Change-Id: I2f3abeca7f56a3aedeabb48630ed2c61635b93cd
(cherry picked from commit 1639594938)
(cherry picked from commit 90b9964384)
2020-04-06 23:46:50 +00:00
ushen 4d11eef81f Bring back load balance v2 guide
Previous commit forgets to add an entry for load
balancer version 2. This ps brings them back.

Change-Id: Idac09e8259d58ed130b79b40528f733708000da7
(cherry picked from commit 90f0baf3cb)
(cherry picked from commit eb64fe1625)
2020-04-06 23:46:36 +00:00
Soniya Vyas f76db418ee Removal of deprecated command and deprecated optional argument
lib/tempest uses 'tempest-account-generator'
which is deprecated 4 years back.
In addition to above, lib/tempest also uses
'os-tenant-name' which is also deprecated.

Use of 'tempest account-generator' and
'os-project-name' should be done now.

Signed-off by: Soniya Vyas<svyas@redhat.com>
Change-Id: I624e1dc57a3d3533322fb298c01f70241d0400ed
(cherry picked from commit 7634c78002)
2020-03-06 23:33:07 +00:00
Ghanshyam 82f036bc90 Support TEMPEST_BRANCH with tag name
TEMPEST_BRANCH which is mostly set as master so
that Tempest master is run to test the env. With
stable branch going to EM state and Tempest master
might not work due to incompatibility of code or
requirements. In that case we pin the Tempest so that
older Tempest can be used for their testing.

Till now for ocata, pike and, queens we used the gerrit style
ref to pin the Tempest which is not preferred way. We should be
able to use the tag name on TEMPEST_BRANCH.

This commit explicitly checkout the tag set in TEMPEST_BRANCH
as git_clone does not checkout the tag directly until RECLONE
is true or tempest dir does not exist.

After this stable branch or job can set the tag directly with name.
For exmaple: TEMPEST_BRANCH=23.0.0.

Change-Id: Ic777e4b56c4932dde135ac909cb5c6f4a7d5cc78
2020-01-30 18:59:21 +00:00
Sean Mooney f7bd6f7c9f do not gzip legacy service logs
This change removes the .gz extension from the
service and syslog logs exported via journalctl.
This change nolonger gzip compresses the exported
logs so that they can be rendered in the browser
directly when served from swift.

Conflicts:
    roles/export-devstack-journal/tasks/main.yaml

Change-Id: I4557a737cb13b9c2406056be08ab8a32ddd45162
(cherry picked from commit d02fa6f856)
2020-01-21 19:25:56 -06:00
Matt Riedemann 8b5a4bc0df Fix MySQL log collection
The mysql logs weren't being copied to logs and published.

Change-Id: I20740b468e4b310ac07e77f3930cae92026942fb
(cherry picked from commit f92c346131)
2020-01-17 10:03:26 +01:00
Zuul 4bb993c7ea Merge "Add and switch to the newly created opensuse-15 nodeset" into stable/stein 2019-11-12 22:48:41 +00:00
Dirk Mueller 7a3ccdfec7 Add and switch to the newly created opensuse-15 nodeset
opensuse-150 nodeset is referring to openSUSE 15.0, which is still in
maintenance but openSUSE 15.1 has been released already. "opensuse-15"
is going to refer to the "latest openSUSE 15.x" build released and
working for OpenStack going forward, so add this nodeset and use
it by default going forward.

Depends-On: https://review.opendev.org/682882
Change-Id: Ic3f4d6998a66da5226bc95088d7e3c83dfe737ce
(cherry picked from commit 70fca49de7)
2019-11-01 10:11:46 +00:00
Jens Harbott 7f7c2c4251 Enable accept_ra before enabling forwarding
We need to enable accept_ra before we enable forwarding, otherwise
existing addresses and routes may get dropped until the next RA is
received, possibly causing connection errors in the meantime.

Depends-On: https://review.opendev.org/683166
Change-Id: I1fdeede59547de896ed89222ecf121fd9e6b810d
2019-09-23 14:25:35 +00:00
Zuul 98d65f87b3 Merge "Add options to configure cache in nova" into stable/stein 2019-08-22 16:36:41 +00:00
Matt Riedemann e57359fb43 Add NOVA_SHUTDOWN_TIMEOUT variable
This adds a variable to control the [DEFAULT]/shutdown_timeout
config in nova to control whether or not a guest should have
a graceful shutdown of the OS or if it should just stop
immediately (no timeout). Since devstack uses CirrOS images
by default, the default value for the NOVA_SHUTDOWN_TIMEOUT
variable is 0 which should speed up tempest runs. The default
in nova.conf [1] is 60 seconds.

[1] https://docs.openstack.org/nova/latest/configuration/config.html#DEFAULT.shutdown_timeout

Change-Id: Ida83f70a1c4e61e5248f2bd42b4c24f7ac6d2310
Related-Bug: #1829896
(cherry picked from commit d51baee40d)
2019-08-20 21:56:09 +00:00
Slawek Kaplonski e35b8ea2dc Add options to configure cache in nova
This patch adds new options:
* CACHE_BACKEND - with default "dogpile.cache.memcached"
* MEMCACHE_SERVERS - with default "localhost:1121"

to add possibility to configure various backends as cache in
Nova and Keystone.
It also adds options:
* KEYSTONE_ENABLE_CACHE - True by default
* NOVA_ENABLE_CACHE - True by default

To make possibility to enable and disable cache in those projects'
config files.

Default values configured there are the same as before were
hardcoded for Keystone config.

Nova has also enabled this cache by default.

Change-Id: I9082be077b59acd3a39910fa64e29147cb5c2dd7
Closes-Bug: #1836642
(cherry picked from commit d33cdd01f8)
2019-08-15 19:39:20 +00:00
Zuul d08c19d41d Merge "Add capability of adding additional network API extensions" into stable/stein 2019-08-05 11:54:52 +00:00
Ian Wienand 2e1393621a Fix quoting for devstack_localrc arguments
This is a combination of the following commits:
- "Quote devstack_localrc arguments"
  https://review.opendev.org/636078
  Ia63a53d745dfea7262bcdb5d46425f431c3ccfe5
- "Fix double quoting issue when writing localconf"
  https://review.opendev.org/648951
  I92146e04731efc6dcc632ae6c3a7c374e783cdba

They have been merged together because the first commit introduces
a bug, and it looks a bit pointless to deliberately introduce
a potentially breaking change on the process of backporting a fix.

Co-Authored-By: Ian Wienand <iwienand@redhat.com>
Co-Authored-By: Jens Harbott <j.harbott@x-ion.de>

Change-Id: Ia703af54a7131843fc2b0ae34efcfe0f5507acbf
2019-08-01 10:22:44 +02:00
Ghanshyam Mann 6154153699 Add capability of adding additional network API extensions
Currently, devstack has NETWORK_API_EXTENSIONS var to define
the network API extensions. NETWORK_API_EXTENSIONS is defaulted
to 'all' for master and hard coded list of extensions per release.
Zuul jobs of network extensions (for example neutron-fwaas) need
add the some extra extensions in the default list. To do so, they
need to duplicate all the defaults extensions and then add the extra
extensions. Much difficult situation is when defaults extensions list
vary from release to release so they have to keep updating the
NETWORK_API_EXTENSIONS per release.

This commit defines a new var ADDITIONAL_NETWORK_API_EXTENSIONS which
will take extra extensions and append into the default list. This way
Zuul jobs do not need to duplicate the default extensions.

Change-Id: I7270c9b9e047a851970439522c0356c9089a5b74
(cherry picked from commit 52c2886f7e)
2019-07-04 12:03:30 +00:00
Carlos Goncalves fb3b6e4baa Fix rdo-release install
The URL for rdo-release package is version-less and redirects to latest
stable version. This becomes problematic when stacking older stable
versions as dependencies might not be met or newer and incompatibile
ones might get installed.

Closes-Bug: #1833696

Change-Id: Icb07dcb4c9a3950a3c31a3a8dcb8d0b4c713fdb1
(cherry picked from commit 8b31dce38b)
2019-07-02 17:42:21 +00:00
Zuul 402e2fb96b Merge "Remove the devstack-single-node-fedora-latest definition" into stable/stein 2019-07-02 07:57:12 +00:00
Zuul 1444ac25d3 Merge "Add NOVA_NOTIFICATION_FORMAT variable" into stable/stein 2019-07-01 21:19:54 +00:00
Matt Riedemann a6d3f0f58d Add NOVA_NOTIFICATION_FORMAT variable
Nova change https://review.opendev.org/603079/ changed the
default configuration to send only unversioned notfications rather
than both versioned and unversioned notifications. This could break
unsuspecting downstream projects (like Watcher) whose CI jobs are
not explicitly configuring nova for the types of notifications
they need but are just relying on getting both per the previous
default of the config option.

This adds a variable which defaults to "both" to match the
nova default (in Stein) but allows downstream CI jobs to easily
configure another value.

Needed by https://review.opendev.org/667161/

NOTE(mriedem): The nova default changed from "both" to
"unversioned" in Train. This stable/stein backport changes the
default in devstack to "both" to match the nova default in Stein.
The goal of the patch is to provide a way to override the config
which this still does and is necessary for the linked Watcher
patch.

Change-Id: Ied9d50b07c368d5c2be658c744f340a8d1ee41e0
(cherry picked from commit b57757ae14)
2019-06-28 14:32:26 -04:00
Slawek Kaplonski 7a6b3c8a97 Use neutron-legacy on subnodes in devstack zuul job
There are still some issues with lib/neutron thus neutron-legacy is used
on controller node in multinode jobs and in single node jobs.
But in "group-vars" in devstack job it was configured to use
lib/neutron which can cause some problems in multinode jobs.

So lets switch to neutron-legacy on subnodes also until lib/neutron
will be ready to use everywhere.

Closes-Bug: #1834079

Change-Id: I0d7f9f2baaee2836a719f199939156bd4f53f778
(cherry picked from commit 1b15176b05)
2019-06-24 20:30:42 +00:00
Zuul 63281d430f Merge "Cap stein network, swift, volume api_extensions for tempest" into stable/stein 2019-06-22 11:21:14 +00:00
Zuul f55d4d13ff Merge "Cap compute and volume API microversion on Tempest" into stable/stein 2019-06-21 17:49:45 +00:00
Ghanshyam Mann 8f77b04fc1 Cap stein network, swift, volume api_extensions for tempest
This commit cap the network, volume and swift extensions on
Tempest's config option api_extensions.

Change-Id: I87929fd4e27f6a76fe5c976de8f2ceb7e355f169
2019-06-21 16:55:16 +00:00
Brian Haley f7678c90d4 Remove the devstack-single-node-fedora-latest definition
This should have been removed when stable/stein was branched,
and is preventing changing the definition in master to use f29.

Change-Id: Idcf7cefa8be5d7990e9c597ff7d371d5fc3103d9
2019-05-31 14:28:04 -04:00
Zuul d5a01ef351 Merge "Fixed support python 2 on Fedora 27" into stable/stein 2019-05-31 00:56:20 +00:00
Ghanshyam Mann 07435d1d3f Cap compute and volume API microversion on Tempest
This commit cap the compute and volume API microversions
on Tempest config.

- https://docs.openstack.org/nova/latest/reference/api-microversion-history.html#maximum-in-stein
- https://docs.openstack.org/cinder/latest/contributor/api_microversion_history.html#maximum-in-stein

Change-Id: I94370d51da4a2113e25a9c5502a0ff9df001a97e
2019-05-30 16:53:17 +00:00
Zuul 669b0c5e4e Merge "Remove crusty old python 3 package version logic" into stable/stein 2019-04-26 09:32:45 +00:00
Dean Troyer 362f20b05a Update repo namespace search list
With the new namespaces we have to look around a bit more to find
repos top copy into the DevStack working directory. Add:

* opendev/
* starlingx/
* x/
* zuul/

Change-Id: I8a55522a5fee46f415f0c0ce580ded3476133460
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
2019-04-24 13:51:27 +00:00
OpenDev Sysadmins 9f17adbb89 OpenDev Migration Patch
This commit was bulk generated and pushed by the OpenDev sysadmins
as a part of the Git hosting and code review systems migration
detailed in these mailing list posts:

http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003603.html
http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004920.html

Attempts have been made to correct repository namespaces and
hostnames based on simple pattern matching, but it's possible some
were updated incorrectly or missed entirely. Please reach out to us
via the contact information listed at https://opendev.org/ with any
questions you may have.
2019-04-19 19:43:21 +00:00
Matt Riedemann 779072886c Remove crusty old python 3 package version logic
If we are running with python3, just assume that any
package that is not blacklisted is available for py3
and just attempt to install it and let pip sort it out
whether it gets installed from a local or remote package.

Change-Id: Ic05d183e489320f6dfc721575d47e7e4d661f87c
Closes-Bug: #1820892
(cherry picked from commit e03bcb2c8b)
2019-04-06 19:21:41 +00:00
Lenny Verkhovsky 3cbd51c116 Fixed support python 2 on Fedora 27
I7d16194d6ba1391ca31251d5b50cbb8de033fc38 added wrong behavour
on Fedora > 26 and Centos 7 when python3 disabled
pip should install packages in /usr/bin

Closes-Bug: #1820070
Change-Id: I3a8efbc8eb6e311db9c7347577c5d2047ba523a9
(cherry picked from commit a30dd1cc96)
2019-03-30 02:20:12 +00:00
ghanshyam 3bcb9621b8 Update branches for stable/stein
Change-Id: I6a8fe6743bd9c1d1d6433c842ab5245f1f89a313
2019-03-26 18:41:36 +00:00
OpenStack Release Bot 2a5f2889a1 Update .gitreview for stable/stein
Change-Id: I90dcabdd7196dc0cb53d19ddb5b42865081dbbff
2019-03-26 18:21:10 +00:00
36 changed files with 498 additions and 278 deletions
+3 -2
View File
@@ -1,4 +1,5 @@
[gerrit]
host=review.openstack.org
host=review.opendev.org
port=29418
project=openstack-dev/devstack.git
project=openstack/devstack.git
defaultbranch=stable/stein
+50 -84
View File
@@ -28,36 +28,6 @@
nodes:
- controller
- nodeset:
name: devstack-single-node-centos-7
nodes:
- name: controller
label: centos-7
groups:
- name: tempest
nodes:
- controller
- nodeset:
name: devstack-single-node-opensuse-150
nodes:
- name: controller
label: opensuse-150
groups:
- name: tempest
nodes:
- controller
- nodeset:
name: devstack-single-node-fedora-latest
nodes:
- name: controller
label: fedora-28
groups:
- name: tempest
nodes:
- controller
- nodeset:
name: openstack-two-node
nodes:
@@ -198,10 +168,10 @@
job.group-vars.peers, which is what is used by multi node jobs for subnode
nodes (everything but the controller).
required-projects:
- git.openstack.org/openstack-dev/devstack
- opendev.org/openstack/devstack
roles:
- zuul: git.openstack.org/openstack-infra/devstack-gate
- zuul: git.openstack.org/openstack-infra/openstack-zuul-jobs
- zuul: opendev.org/openstack/devstack-gate
- zuul: opendev.org/openstack/openstack-zuul-jobs
vars:
devstack_localrc:
DATABASE_PASSWORD: secretdatabase
@@ -239,8 +209,7 @@
'{{ stage_dir }}/etc': logs
/var/log/rabbitmq: logs
/var/log/postgresql: logs
/var/log/mysql.err: logs
/var/log/mysql.log: logs
/var/log/mysql: logs
/var/log/libvirt: logs
/etc/sudoers: logs
/etc/sudoers.d: logs
@@ -307,7 +276,7 @@
less than the normal minimum set of required-projects.
nodeset: openstack-single-node-bionic
required-projects:
- git.openstack.org/openstack/requirements
- opendev.org/openstack/requirements
vars:
devstack_localrc:
# Multinode specific settings
@@ -365,13 +334,13 @@
The run playbook consists of a single role, so it can be easily rewritten
and extended.
required-projects:
- git.openstack.org/openstack/cinder
- git.openstack.org/openstack/glance
- git.openstack.org/openstack/keystone
- git.openstack.org/openstack/neutron
- git.openstack.org/openstack/nova
- git.openstack.org/openstack/placement
- git.openstack.org/openstack/swift
- opendev.org/openstack/cinder
- opendev.org/openstack/glance
- opendev.org/openstack/keystone
- opendev.org/openstack/neutron
- opendev.org/openstack/nova
- opendev.org/openstack/placement
- opendev.org/openstack/swift
timeout: 7200
vars:
devstack_localrc:
@@ -460,7 +429,10 @@
n-cpu: true
placement-client: true
# Neutron services
neutron-agent: true
# We need to keep using the neutron-legacy based services for
# now until all issues with the new lib/neutron code are solved
q-agt: true
# neutron-agent: true
# Cinder services
c-bak: true
c-vol: true
@@ -523,32 +495,15 @@
# we often have to rush things through devstack to stabilise the gate,
# and these platforms don't have the round-the-clock support to avoid
# becoming blockers in that situation.
- job:
name: devstack-platform-centos-7
parent: tempest-full
description: Centos 7 platform test
nodeset: devstack-single-node-centos-7
voting: false
- job:
name: devstack-platform-opensuse-150
parent: tempest-full
description: openSUSE 15.0 platform test
nodeset: devstack-single-node-opensuse-150
voting: false
- job:
name: devstack-platform-fedora-latest
parent: tempest-full
description: Fedora latest platform test
nodeset: devstack-single-node-fedora-latest
voting: false
- job:
name: devstack-platform-xenial
parent: tempest-full
description: Ubuntu Xenial platform test
nodeset: openstack-single-node-xenial
vars:
devstack_localrc:
# use py3.5 compatible Tempest here.
TEMPEST_BRANCH: "23.0.0"
voting: false
- job:
@@ -607,6 +562,7 @@
- job:
name: devstack-unit-tests
nodeset: ubuntu-bionic
description: |
Runs unit tests on devstack project.
@@ -621,16 +577,21 @@
- publish-openstack-docs-pti
check:
jobs:
- devstack
- devstack-xenial
- tempest-full:
voting: false
- tempest-full-py3:
voting: false
- devstack:
voting: false
- devstack-xenial:
voting: false
- devstack-ipv6:
voting: false
- devstack-platform-centos-7
- devstack-platform-opensuse-150
- devstack-platform-fedora-latest
- devstack-platform-xenial
- devstack-multinode
- devstack-multinode-xenial
- devstack-multinode:
voting: false
- devstack-multinode-xenial:
voting: false
- devstack-unit-tests
- openstack-tox-bashate
- ironic-tempest-ipa-wholedisk-bios-agent_ipmitool-tinyipa:
@@ -641,10 +602,12 @@
- ^.*\.rst$
- ^doc/.*$
- neutron-grenade:
voting: false
irrelevant-files:
- ^.*\.rst$
- ^doc/.*$
- neutron-grenade-multinode:
voting: false
irrelevant-files:
- ^.*\.rst$
- ^doc/.*$
@@ -659,21 +622,28 @@
- ^doc/.*$
gate:
jobs:
- devstack
- devstack-xenial
- devstack-multinode
- devstack-multinode-xenial
# Since these two come from a global template, we need to
# live with these running n-v in gate until fixed
- tempest-full:
voting: false
- tempest-full-py3:
voting: false
# - devstack
# - devstack-xenial
# - devstack-multinode
# - devstack-multinode-xenial
- devstack-unit-tests
- openstack-tox-bashate
- neutron-grenade-multinode:
irrelevant-files:
- ^.*\.rst$
- ^doc/.*$
# - neutron-grenade-multinode:
# irrelevant-files:
# - ^.*\.rst$
# - ^doc/.*$
- neutron-tempest-linuxbridge:
irrelevant-files:
- ^.*\.rst$
- ^doc/.*$
- neutron-grenade:
voting: false
irrelevant-files:
- ^.*\.rst$
- ^doc/.*$
@@ -698,10 +668,6 @@
experimental:
jobs:
- nova-cells-v1:
irrelevant-files:
- ^.*\.rst$
- ^doc/.*$
- nova-next
- neutron-fullstack-with-uwsgi
- neutron-functional-with-uwsgi
+6
View File
@@ -10,6 +10,7 @@ Walk through various setups used by stackers
.. toctree::
:glob:
:hidden:
:maxdepth: 1
guides/single-vm
@@ -68,6 +69,11 @@ Nova and devstack
Guide to working with nova features :doc:`Nova and devstack <guides/nova>`.
Configure Load-Balancer Version 2
-----------------------------------
Guide on :doc:`Configure Load-Balancer Version 2 <guides/devstack-with-lbaas-v2>`.
Deploying DevStack with LDAP
----------------------------
+12
View File
@@ -589,6 +589,18 @@ function git_clone {
fi
fi
# NOTE(ianw) 2022-04-13 : commit [1] has broken many assumptions
# about how we clone and work with repos. Mark them safe globally
# as a work-around.
#
# NOTE(danms): On bionic (and likely others) git-config may write
# ~stackuser/.gitconfig if not run with sudo -H. Using --system
# writes these changes to /etc/gitconfig which is more
# discoverable anyway.
#
# [1] https://github.com/git/git/commit/8959555cee7ec045958f9b6dd62e541affb7e7d9
sudo git config --system --add safe.directory ${git_dest}
# print out the results so we know what change was used in the logs
cd $git_dest
git show --oneline | head -1
+17 -85
View File
@@ -49,16 +49,9 @@ function get_python_exec_prefix {
fi
$xtrace
if python3_enabled && [[ "$os_VENDOR" == "CentOS" ]] || \
[[ "$os_VENDOR" == "Fedora" && $os_RELEASE -gt 26 ]]; then
# Default Python 3 install prefix changed to /usr/local in Fedora 27:
# https://fedoraproject.org/wiki/Changes/Making_sudo_pip_safe
echo "/usr/local/bin"
elif is_fedora || is_suse; then
echo "/usr/bin"
else
echo "/usr/local/bin"
fi
local PYTHON_PATH=/usr/local/bin
( is_fedora && ! python3_enabled ) || is_suse && PYTHON_PATH=/usr/bin
echo $PYTHON_PATH
}
# Wrapper for ``pip install`` that only installs versions of libraries
@@ -88,34 +81,6 @@ function pip_install_gr_extras {
pip_install $clean_name[$extras]
}
# Determine the python versions supported by a package
function get_python_versions_for_package {
local name=$1
cd $name && python setup.py --classifiers \
| grep 'Language' | cut -f5 -d: | grep '\.' | tr '\n' ' '
}
# Check for python3 classifier in local directory
function check_python3_support_for_package_local {
local name=$1
cd $name
set +e
classifier=$(python setup.py --classifiers \
| grep 'Programming Language :: Python :: 3')
set -e
echo $classifier
}
# Check for python3 classifier on pypi
function check_python3_support_for_package_remote {
local name=$1
set +e
classifier=$(curl -s -L "https://pypi.python.org/pypi/$name/json" \
| grep '"Programming Language :: Python :: 3"')
set -e
echo $classifier
}
# python3_enabled_for() assumes the service(s) specified as arguments are
# enabled for python 3 unless explicitly disabled. See python3_disabled_for().
#
@@ -266,52 +231,26 @@ function pip_install {
cmd_pip=$(get_pip_command $PYTHON2_VERSION)
local sudo_pip="sudo -H"
if python3_enabled; then
# Look at the package classifiers to find the python
# versions supported, and if we find the version of
# python3 we've been told to use, use that instead of the
# default pip
local python_versions
# Special case some services that have experimental
# support for python3 in progress, but don't claim support
# in their classifier
echo "Check python version for : $package_dir"
if python3_disabled_for ${package_dir##*/}; then
echo "Explicitly using $PYTHON2_VERSION version to install $package_dir based on DISABLED_PYTHON3_PACKAGES"
elif python3_enabled_for ${package_dir##*/}; then
echo "Using $PYTHON3_VERSION version to install $package_dir based on default behavior"
sudo_pip="$sudo_pip LC_ALL=en_US.UTF-8"
cmd_pip=$(get_pip_command $PYTHON3_VERSION)
elif [[ -d "$package_dir" ]]; then
python_versions=$(get_python_versions_for_package $package_dir)
if [[ $python_versions =~ $PYTHON3_VERSION ]]; then
echo "Automatically using $PYTHON3_VERSION version to install $package_dir based on classifiers"
sudo_pip="$sudo_pip LC_ALL=en_US.UTF-8"
cmd_pip=$(get_pip_command $PYTHON3_VERSION)
else
# The package may not have yet advertised python3.5
# support so check for just python3 classifier and log
# a warning.
python3_classifier=$(check_python3_support_for_package_local $package_dir)
if [[ ! -z "$python3_classifier" ]]; then
echo "Automatically using $PYTHON3_VERSION version to install $package_dir based on local package settings"
sudo_pip="$sudo_pip LC_ALL=en_US.UTF-8"
cmd_pip=$(get_pip_command $PYTHON3_VERSION)
else
echo "WARNING: Did not find python 3 classifier for local package $package_dir"
fi
fi
else
# Check pypi as we don't have the package on disk
package=$(echo $package_dir | grep -o '^[.a-zA-Z0-9_-]*')
python3_classifier=$(check_python3_support_for_package_remote $package)
if [[ ! -z "$python3_classifier" ]]; then
echo "Automatically using $PYTHON3_VERSION version to install $package based on remote package settings"
sudo_pip="$sudo_pip LC_ALL=en_US.UTF-8"
cmd_pip=$(get_pip_command $PYTHON3_VERSION)
else
echo "WARNING: Did not find python 3 classifier for remote package $package_dir"
fi
# For everything that is not explicitly blacklisted with
# DISABLED_PYTHON3_PACKAGES, assume it supports python3
# and we will let pip sort out the install, regardless of
# the package being local or remote.
echo "Using $PYTHON3_VERSION version to install $package_dir based on default behavior"
# See
# https://github.com/pypa/setuptools/issues/2232
# http://lists.openstack.org/pipermail/openstack-discuss/2020-August/016905.html
# this makes setuptools >=50 use the platform distutils.
# We only want to do this on global pip installs, not if
# installing in a virtualenv
sudo_pip="$sudo_pip LC_ALL=en_US.UTF-8 SETUPTOOLS_USE_DISTUTILS=stdlib "
cmd_pip=$(get_pip_command $PYTHON3_VERSION)
fi
fi
fi
@@ -333,13 +272,6 @@ function pip_install {
$xtrace
# Also install test requirements
local install_test_reqs=""
local test_req="${package_dir}/test-requirements.txt"
if [[ -e "$test_req" ]]; then
install_test_reqs="-r $test_req"
fi
# adding SETUPTOOLS_SYS_PATH_TECHNIQUE is a workaround to keep
# the same behaviour of setuptools before version 25.0.0.
# related issue: https://github.com/pypa/pip/issues/3874
@@ -349,7 +281,7 @@ function pip_install {
no_proxy="${no_proxy:-}" \
PIP_FIND_LINKS=$PIP_FIND_LINKS \
SETUPTOOLS_SYS_PATH_TECHNIQUE=rewrite \
$cmd_pip $upgrade $install_test_reqs \
$cmd_pip $upgrade \
$@
result=$?
+46 -20
View File
@@ -82,26 +82,52 @@ function install_apache_uwsgi {
apxs="apxs"
fi
# Ubuntu xenial is back level on uwsgi so the proxy doesn't
# actually work. Hence we have to build from source for now.
# This varies based on packaged/installed. If we've
# pip_installed, then the pip setup will only build a "python"
# module that will be either python2 or python3 depending on what
# it was built with.
#
# Centos 7 actually has the module in epel, but there was a big
# push to disable epel by default. As such, compile from source
# there as well.
# For package installs, the distro ships both plugins and you need
# to select the right one ... it will not be autodetected.
if python3_enabled; then
UWSGI_PYTHON_PLUGIN=python3
else
UWSGI_PYTHON_PLUGIN=python
fi
local dir
dir=$(mktemp -d)
pushd $dir
pip_install uwsgi
pip download uwsgi -c $REQUIREMENTS_DIR/upper-constraints.txt
local uwsgi
uwsgi=$(ls uwsgi*)
tar xvf $uwsgi
cd uwsgi*/apache2
sudo $apxs -i -c mod_proxy_uwsgi.c
popd
# delete the temp directory
sudo rm -rf $dir
if is_ubuntu; then
install_package uwsgi \
uwsgi-plugin-python \
uwsgi-plugin-python3 \
libapache2-mod-proxy-uwsgi
elif [[ $os_VENDOR == "Fedora" ]]; then
# Note httpd comes with mod_proxy_uwsgi and it is loaded by
# default; the mod_proxy_uwsgi package actually conflicts now.
# See:
# https://bugzilla.redhat.com/show_bug.cgi?id=1574335
#
# Thus there is nothing else to do after this install
install_package uwsgi \
uwsgi-plugin-python3
else
# Centos actually has the module in epel, but there was a big
# push to disable epel by default. As such, compile from source
# there.
local dir
dir=$(mktemp -d)
pushd $dir
pip_install uwsgi
pip download uwsgi -c $REQUIREMENTS_DIR/upper-constraints.txt
local uwsgi
uwsgi=$(ls uwsgi*)
tar xvf $uwsgi
cd uwsgi*/apache2
sudo $apxs -i -c mod_proxy_uwsgi.c
popd
# delete the temp directory
sudo rm -rf $dir
UWSGI_PYTHON_PLUGIN=python
fi
if is_ubuntu || is_suse ; then
# we've got to enable proxy and proxy_uwsgi for this to work
@@ -265,7 +291,7 @@ function write_uwsgi_config {
# configured after graceful shutdown
iniset "$file" uwsgi worker-reload-mercy $WORKER_TIMEOUT
iniset "$file" uwsgi enable-threads true
iniset "$file" uwsgi plugins python
iniset "$file" uwsgi plugins http,${UWSGI_PYTHON_PLUGIN}
# uwsgi recommends this to prevent thundering herd on accept.
iniset "$file" uwsgi thunder-lock true
# Set hook to trigger graceful shutdown on SIGTERM
@@ -318,7 +344,7 @@ function write_local_uwsgi_http_config {
iniset "$file" uwsgi die-on-term true
iniset "$file" uwsgi exit-on-reload false
iniset "$file" uwsgi enable-threads true
iniset "$file" uwsgi plugins python
iniset "$file" uwsgi plugins http,${UWSGI_PYTHON_PLUGIN}
# uwsgi recommends this to prevent thundering herd on accept.
iniset "$file" uwsgi thunder-lock true
# Set hook to trigger graceful shutdown on SIGTERM
+1 -1
View File
@@ -507,7 +507,7 @@ function start_cinder {
start_tls_proxy cinder '*' $CINDER_SERVICE_PORT $CINDER_SERVICE_HOST $CINDER_SERVICE_PORT_INT
fi
else
run_process "c-api" "$CINDER_BIN_DIR/uwsgi --procname-prefix cinder-api --ini $CINDER_UWSGI_CONF"
run_process "c-api" "$(which uwsgi) --procname-prefix cinder-api --ini $CINDER_UWSGI_CONF"
cinder_url=$service_protocol://$SERVICE_HOST/volume/v3
fi
fi
+1 -1
View File
@@ -343,7 +343,7 @@ function start_glance {
run_process g-reg "$GLANCE_BIN_DIR/glance-registry --config-file=$GLANCE_CONF_DIR/glance-registry.conf"
if [[ "$WSGI_MODE" == "uwsgi" ]]; then
run_process g-api "$GLANCE_BIN_DIR/uwsgi --procname-prefix glance-api --ini $GLANCE_UWSGI_CONF"
run_process g-api "$(which uwsgi) --procname-prefix glance-api --ini $GLANCE_UWSGI_CONF"
else
run_process g-api "$GLANCE_BIN_DIR/glance-api --config-dir=$GLANCE_CONF_DIR"
fi
+1 -1
View File
@@ -29,7 +29,7 @@ GITDIR["pbr"]=$DEST/pbr
# install_infra() - Collect source and prepare
function install_infra {
local PIP_VIRTUAL_ENV="$REQUIREMENTS_DIR/.venv"
[ ! -d $PIP_VIRTUAL_ENV ] && virtualenv $PIP_VIRTUAL_ENV
[ ! -d $PIP_VIRTUAL_ENV ] && ${VIRTUALENV_CMD} $PIP_VIRTUAL_ENV
# We don't care about testing git pbr in the requirements venv.
PIP_VIRTUAL_ENV=$PIP_VIRTUAL_ENV pip_install -U pbr
PIP_VIRTUAL_ENV=$PIP_VIRTUAL_ENV pip_install $REQUIREMENTS_DIR
+7 -4
View File
@@ -131,6 +131,9 @@ KEYSTONE_UNIQUE_LAST_PASSWORD_COUNT=${KEYSTONE_UNIQUE_LAST_PASSWORD_COUNT:-2}
# however may not be suitable for real production.
KEYSTONE_PASSWORD_HASH_ROUNDS=${KEYSTONE_PASSWORD_HASH_ROUNDS:-4}
# Cache settings
KEYSTONE_ENABLE_CACHE=${KEYSTONE_ENABLE_CACHE:-True}
# Functions
# ---------
@@ -213,9 +216,9 @@ function configure_keystone {
iniset $KEYSTONE_CONF resource driver "$KEYSTONE_RESOURCE_BACKEND"
# Enable caching
iniset $KEYSTONE_CONF cache enabled "True"
iniset $KEYSTONE_CONF cache backend "dogpile.cache.memcached"
iniset $KEYSTONE_CONF cache memcache_servers localhost:11211
iniset $KEYSTONE_CONF cache enabled $KEYSTONE_ENABLE_CACHE
iniset $KEYSTONE_CONF cache backend $CACHE_BACKEND
iniset $KEYSTONE_CONF cache memcache_servers $MEMCACHE_SERVERS
iniset_rpc_backend keystone $KEYSTONE_CONF oslo_messaging_notifications
@@ -515,7 +518,7 @@ function start_keystone {
enable_apache_site keystone
restart_apache_server
else # uwsgi
run_process keystone "$KEYSTONE_BIN_DIR/uwsgi --procname-prefix keystone --ini $KEYSTONE_PUBLIC_UWSGI_CONF" ""
run_process keystone "$(which uwsgi) --procname-prefix keystone --ini $KEYSTONE_PUBLIC_UWSGI_CONF" ""
fi
echo "Waiting for keystone to start..."
+8 -6
View File
@@ -124,13 +124,15 @@ function init_lvm_volume_group {
local vg=$1
local size=$2
# Start the lvmetad and tgtd services
if is_fedora || is_suse; then
# services is not started by default
# Start the lvmetad service
if is_fedora ; then
# service is not started by default
start_service lvm2-lvmetad
if [ "$CINDER_ISCSI_HELPER" = "tgtadm" ]; then
start_service tgtd
fi
fi
# Start the tgtd service on Fedora and SUSE if tgtadm is used
if is_fedora || is_suse && [[ "$CINDER_ISCSI_HELPER" = "tgtadm" ]]; then
start_service tgtd
fi
# Start with a clean volume group
+4 -2
View File
@@ -117,7 +117,9 @@ function is_neutron_enabled {
# Test if any Neutron services are enabled
# is_neutron_enabled
function is_neutron_legacy_enabled {
[[ ,${DISABLED_SERVICES} =~ ,"neutron" ]] && return 1
# first we need to remove all "neutron-" from DISABLED_SERVICES list
disabled_services_copy=$(echo $DISABLED_SERVICES | sed 's/neutron-//g')
[[ ,${disabled_services_copy} =~ ,"neutron" ]] && return 1
[[ ,${ENABLED_SERVICES} =~ ,"q-" ]] && return 0
return 1
}
@@ -460,7 +462,7 @@ function start_neutron_api {
done
if [ "$NEUTRON_DEPLOY_MOD_WSGI" == "True" ]; then
run_process neutron-api "$NEUTRON_BIN_DIR/uwsgi --procname-prefix neutron-api --ini $NEUTRON_UWSGI_CONF"
run_process neutron-api "$(which uwsgi) --procname-prefix neutron-api --ini $NEUTRON_UWSGI_CONF"
neutron_url=$service_protocol://$NEUTRON_SERVICE_HOST/networking/
enable_service neutron-rpc-server
run_process neutron-rpc-server "$NEUTRON_BIN_DIR/neutron-rpc-server $opts"
+1 -1
View File
@@ -486,7 +486,7 @@ function start_neutron_service_and_check {
# Start the Neutron service
if [ "$NEUTRON_DEPLOY_MOD_WSGI" == "True" ]; then
enable_service neutron-api
run_process neutron-api "$NEUTRON_BIN_DIR/uwsgi --procname-prefix neutron-api --ini $NEUTRON_UWSGI_CONF"
run_process neutron-api "$(which uwsgi) --procname-prefix neutron-api --ini $NEUTRON_UWSGI_CONF"
neutron_url=$Q_PROTOCOL://$Q_HOST/networking/
enable_service neutron-rpc-server
run_process neutron-rpc-server "$NEUTRON_BIN_DIR/neutron-rpc-server $cfg_file_options"
+2 -2
View File
@@ -395,8 +395,6 @@ function _neutron_configure_router_v6 {
# This logic is specific to using the l3-agent for layer 3
if is_service_enabled q-l3 || is_service_enabled neutron-l3; then
# Ensure IPv6 forwarding is enabled on the host
sudo sysctl -w net.ipv6.conf.all.forwarding=1
# if the Linux host considers itself to be a router then it will
# ignore all router advertisements
# Ensure IPv6 RAs are accepted on interfaces with a default route.
@@ -409,6 +407,8 @@ function _neutron_configure_router_v6 {
# device name would be reinterpreted as a slash, causing an error.
sudo sysctl -w net/ipv6/conf/$d/accept_ra=2
done
# Ensure IPv6 forwarding is enabled on the host
sudo sysctl -w net.ipv6.conf.all.forwarding=1
# Configure and enable public bridge
# Override global IPV6_ROUTER_GW_IP with the true value from neutron
IPV6_ROUTER_GW_IP=$(openstack --os-cloud devstack-admin --os-region "$REGION_NAME" port list -c 'Fixed IP Addresses' | grep $ipv6_pub_subnet_id | awk -F'ip_address' '{ print $2 }' | cut -f2 -d\' | tr '\n' ' ')
+23 -4
View File
@@ -94,6 +94,7 @@ NOVA_SERVICE_PROTOCOL=${NOVA_SERVICE_PROTOCOL:-$SERVICE_PROTOCOL}
NOVA_SERVICE_LOCAL_HOST=${NOVA_SERVICE_LOCAL_HOST:-$SERVICE_LOCAL_HOST}
NOVA_SERVICE_LISTEN_ADDRESS=${NOVA_SERVICE_LISTEN_ADDRESS:-$(ipv6_unquote $SERVICE_LISTEN_ADDRESS)}
METADATA_SERVICE_PORT=${METADATA_SERVICE_PORT:-8775}
NOVA_ENABLE_CACHE=${NOVA_ENABLE_CACHE:-True}
# Option to enable/disable config drive
# NOTE: Set ``FORCE_CONFIG_DRIVE="False"`` to turn OFF config drive
@@ -183,6 +184,15 @@ TEST_FLOATING_RANGE=${TEST_FLOATING_RANGE:-192.168.253.0/29}
# and Glance.
NOVA_USE_SERVICE_TOKEN=$(trueorfalse False NOVA_USE_SERVICE_TOKEN)
# Format for notifications. Nova defaults to "both".
# Other options include "versioned" and "unversioned".
NOVA_NOTIFICATION_FORMAT=${NOVA_NOTIFICATION_FORMAT:-both}
# Timeout for servers to gracefully shutdown the OS during operations
# like shelve, rescue, stop, rebuild. Defaults to 0 since the default
# image in devstack is CirrOS.
NOVA_SHUTDOWN_TIMEOUT=${NOVA_SHUTDOWN_TIMEOUT:-0}
# Functions
# ---------
@@ -424,6 +434,7 @@ function create_nova_conf {
iniset $NOVA_CONF DEFAULT instance_name_template "${INSTANCE_NAME_PREFIX}%08x"
iniset $NOVA_CONF DEFAULT osapi_compute_listen "$NOVA_SERVICE_LISTEN_ADDRESS"
iniset $NOVA_CONF DEFAULT metadata_listen "$NOVA_SERVICE_LISTEN_ADDRESS"
iniset $NOVA_CONF DEFAULT shutdown_timeout $NOVA_SHUTDOWN_TIMEOUT
iniset $NOVA_CONF key_manager backend nova.keymgr.conf_key_mgr.ConfKeyManager
@@ -433,8 +444,8 @@ function create_nova_conf {
iniset $NOVA_CONF DEFAULT bindir "/usr/bin"
fi
# only setup database connections if there are services that
# require them running on the host. The ensures that n-cpu doesn't
# only setup database connections and cache backend if there are services
# that require them running on the host. The ensures that n-cpu doesn't
# leak a need to use the db in a multinode scenario.
if is_service_enabled n-api n-cond n-sched; then
# If we're in multi-tier cells mode, we want our control services pointing
@@ -451,6 +462,13 @@ function create_nova_conf {
iniset $NOVA_CONF database connection `database_connection_url $db`
iniset $NOVA_CONF api_database connection `database_connection_url nova_api`
# Cache related settings
# Those settings aren't really needed in n-cpu thus it is configured
# only on nodes which runs controller services
iniset $NOVA_CONF cache enabled $NOVA_ENABLE_CACHE
iniset $NOVA_CONF cache backend $CACHE_BACKEND
iniset $NOVA_CONF cache memcache_servers $MEMCACHE_SERVERS
fi
if is_service_enabled n-api; then
@@ -517,6 +535,7 @@ function create_nova_conf {
# enable notifications, but it will allow them to function when enabled.
iniset $NOVA_CONF oslo_messaging_notifications driver "messagingv2"
iniset $NOVA_CONF oslo_messaging_notifications transport_url $(get_notification_url)
iniset $NOVA_CONF notifications notification_format "$NOVA_NOTIFICATION_FORMAT"
iniset_rpc_backend nova $NOVA_CONF
iniset $NOVA_CONF DEFAULT osapi_compute_workers "$API_WORKERS"
@@ -885,7 +904,7 @@ function start_nova_api {
start_tls_proxy nova '*' $NOVA_SERVICE_PORT $NOVA_SERVICE_HOST $NOVA_SERVICE_PORT_INT
fi
else
run_process "n-api" "$NOVA_BIN_DIR/uwsgi --procname-prefix nova-api --ini $NOVA_UWSGI_CONF"
run_process "n-api" "$(which uwsgi) --procname-prefix nova-api --ini $NOVA_UWSGI_CONF"
nova_url=$service_protocol://$SERVICE_HOST/compute/v2.1/
fi
@@ -1001,7 +1020,7 @@ function start_nova_rest {
if [ "$NOVA_USE_MOD_WSGI" == "False" ]; then
run_process n-api-meta "$NOVA_BIN_DIR/nova-api-metadata --config-file $compute_cell_conf"
else
run_process n-api-meta "$NOVA_BIN_DIR/uwsgi --procname-prefix nova-api-meta --ini $NOVA_METADATA_UWSGI_CONF"
run_process n-api-meta "$(which uwsgi) --procname-prefix nova-api-meta --ini $NOVA_METADATA_UWSGI_CONF"
fi
# nova-consoleauth always runs globally
+1 -1
View File
@@ -154,7 +154,7 @@ function install_placement {
# start_placement_api() - Start the API processes ahead of other things
function start_placement_api {
if [[ "$WSGI_MODE" == "uwsgi" ]]; then
run_process "placement-api" "$PLACEMENT_BIN_DIR/uwsgi --procname-prefix placement --ini $PLACEMENT_UWSGI_CONF"
run_process "placement-api" "$(which uwsgi) --procname-prefix placement --ini $PLACEMENT_UWSGI_CONF"
else
enable_apache_site placement-api
restart_apache_server
+3 -1
View File
@@ -757,7 +757,9 @@ function init_swift {
function install_swift {
git_clone $SWIFT_REPO $SWIFT_DIR $SWIFT_BRANCH
setup_develop $SWIFT_DIR
# keystonemiddleware needs to be installed via keystone extras as defined
# in setup.cfg, see bug #1909018 for more details.
setup_develop $SWIFT_DIR keystone
if [ "$SWIFT_USE_MOD_WSGI" == "True" ]; then
install_apache_wsgi
fi
+93 -17
View File
@@ -57,7 +57,7 @@ BUILD_TIMEOUT=${BUILD_TIMEOUT:-196}
# This must be False on stable branches, as master tempest
# deps do not match stable branch deps. Set this to True to
# have tempest installed in DevStack by default.
INSTALL_TEMPEST=${INSTALL_TEMPEST:-"True"}
INSTALL_TEMPEST=${INSTALL_TEMPEST:-"False"}
# This variable is passed directly to pip install inside the common tox venv
# that is created
@@ -110,6 +110,21 @@ function image_size_in_gib {
echo $size | python -c "import math; print int(math.ceil(float(int(raw_input()) / 1024.0 ** 3)))"
}
function set_tempest_venv_constraints {
local tmp_c
tmp_c=$1
if [[ $TEMPEST_VENV_UPPER_CONSTRAINTS == "master" ]]; then
(cd $REQUIREMENTS_DIR && git show origin/master:upper-constraints.txt) > $tmp_c
else
echo "Using $TEMPEST_VENV_UPPER_CONSTRAINTS constraints in Tempest virtual env."
cat $TEMPEST_VENV_UPPER_CONSTRAINTS > $tmp_c
# NOTE: setting both tox env var and once Tempest start using new var
# TOX_CONSTRAINTS_FILE then we can remove the old one.
export UPPER_CONSTRAINTS_FILE=$TEMPEST_VENV_UPPER_CONSTRAINTS
export TOX_CONSTRAINTS_FILE=$TEMPEST_VENV_UPPER_CONSTRAINTS
fi
}
# configure_tempest() - Set config files, create data dirs, etc
function configure_tempest {
if [[ "$INSTALL_TEMPEST" == "True" ]]; then
@@ -201,13 +216,13 @@ function configure_tempest {
if [[ ! ( $available_flavors =~ 'm1.nano' ) ]]; then
# Determine the flavor disk size based on the image size.
disk=$(image_size_in_gib $image_uuid)
openstack flavor create --id 42 --ram 64 --disk $disk --vcpus 1 m1.nano
openstack flavor create --id 42 --ram 128 --disk $disk --vcpus 1 m1.nano
fi
flavor_ref=42
if [[ ! ( $available_flavors =~ 'm1.micro' ) ]]; then
# Determine the alt flavor disk size based on the alt image size.
disk=$(image_size_in_gib $image_uuid_alt)
openstack flavor create --id 84 --ram 128 --disk $disk --vcpus 1 m1.micro
openstack flavor create --id 84 --ram 192 --disk $disk --vcpus 1 m1.micro
fi
flavor_ref_alt=84
else
@@ -358,7 +373,7 @@ function configure_tempest {
# NOTE- To avoid microversion tests failure on stable branch, we need to change "tempest_compute_max_microversion"
# for stable branch on each release which should be changed from "latest" to max supported version of that release.
local tempest_compute_min_microversion=${TEMPEST_COMPUTE_MIN_MICROVERSION:-None}
local tempest_compute_max_microversion=${TEMPEST_COMPUTE_MAX_MICROVERSION:-"latest"}
local tempest_compute_max_microversion=${TEMPEST_COMPUTE_MAX_MICROVERSION:-"2.72"}
# Reset microversions to None where v2.0 is running which does not support microversion.
# Both "None" means no microversion testing.
if [[ "$TEMPEST_COMPUTE_TYPE" == "compute_legacy" ]]; then
@@ -383,6 +398,7 @@ function configure_tempest {
iniset $TEMPEST_CONFIG compute-feature-enabled block_migration_for_live_migration ${USE_BLOCK_MIGRATION_FOR_LIVE_MIGRATION:-False}
iniset $TEMPEST_CONFIG compute-feature-enabled live_migrate_back_and_forth ${LIVE_MIGRATE_BACK_AND_FORTH:-False}
iniset $TEMPEST_CONFIG compute-feature-enabled attach_encrypted_volume ${ATTACH_ENCRYPTED_VOLUME_AVAILABLE:-True}
iniset $TEMPEST_CONFIG compute-feature-enabled xenapi_apis True
if is_service_enabled n-cell; then
# Cells doesn't support shelving/unshelving
iniset $TEMPEST_CONFIG compute-feature-enabled shelve False
@@ -467,8 +483,13 @@ function configure_tempest {
TEMPEST_EXTEND_ATTACHED_VOLUME=${TEMPEST_EXTEND_ATTACHED_VOLUME:-True}
fi
iniset $TEMPEST_CONFIG volume-feature-enabled extend_attached_volume $(trueorfalse False TEMPEST_EXTEND_ATTACHED_VOLUME)
# Only turn on TEMPEST_VOLUME_REVERT_TO_SNAPSHOT by default for "lvm" backends
if [[ "$CINDER_ENABLED_BACKENDS" == *"lvm"* ]]; then
TEMPEST_VOLUME_REVERT_TO_SNAPSHOT=${TEMPEST_VOLUME_REVERT_TO_SNAPSHOT:-True}
fi
iniset $TEMPEST_CONFIG volume-feature-enabled volume_revert $(trueorfalse False TEMPEST_VOLUME_REVERT_TO_SNAPSHOT)
local tempest_volume_min_microversion=${TEMPEST_VOLUME_MIN_MICROVERSION:-None}
local tempest_volume_max_microversion=${TEMPEST_VOLUME_MAX_MICROVERSION:-"latest"}
local tempest_volume_max_microversion=${TEMPEST_VOLUME_MAX_MICROVERSION:-"3.59"}
# Reset microversions to None where v2 is running which does not support microversion.
# Both "None" means no microversion testing.
if [[ "$TEMPEST_VOLUME_TYPE" == "volumev2" ]]; then
@@ -584,17 +605,19 @@ function configure_tempest {
tox -revenv-tempest --notest
fi
# The requirements might be on a different branch, while tempest needs master requirements.
(cd $REQUIREMENTS_DIR && git show origin/master:upper-constraints.txt) > u-c-m.txt
tox -evenv-tempest -- pip install -c u-c-m.txt -r requirements.txt
local tmp_u_c_m
tmp_u_c_m=$(mktemp -t tempest_u_c_m.XXXXXXXXXX)
set_tempest_venv_constraints $tmp_u_c_m
tox -evenv-tempest -- pip install -c $tmp_u_c_m -r requirements.txt
rm -f $tmp_u_c_m
# Auth:
iniset $TEMPEST_CONFIG auth tempest_roles "member"
if [[ $TEMPEST_USE_TEST_ACCOUNTS == "True" ]]; then
if [[ $TEMPEST_HAS_ADMIN == "True" ]]; then
tox -evenv-tempest -- tempest-account-generator -c $TEMPEST_CONFIG --os-username $admin_username --os-password "$password" --os-tenant-name $admin_project_name -r $TEMPEST_CONCURRENCY --with-admin etc/accounts.yaml
tox -evenv-tempest -- tempest account-generator -c $TEMPEST_CONFIG --os-username $admin_username --os-password "$password" --os-project-name $admin_project_name -r $TEMPEST_CONCURRENCY --with-admin etc/accounts.yaml
else
tox -evenv-tempest -- tempest-account-generator -c $TEMPEST_CONFIG --os-username $admin_username --os-password "$password" --os-tenant-name $admin_project_name -r $TEMPEST_CONCURRENCY etc/accounts.yaml
tox -evenv-tempest -- tempest account-generator -c $TEMPEST_CONFIG --os-username $admin_username --os-password "$password" --os-project-name $admin_project_name -r $TEMPEST_CONCURRENCY etc/accounts.yaml
fi
iniset $TEMPEST_CONFIG auth use_dynamic_credentials False
iniset $TEMPEST_CONFIG auth test_accounts_file "etc/accounts.yaml"
@@ -622,16 +645,35 @@ function configure_tempest {
DISABLE_NETWORK_API_EXTENSIONS+=", l3_agent_scheduler"
fi
local network_api_extensions=${NETWORK_API_EXTENSIONS:-"all"}
DEFAULT_NET_EXT="address-scope,agent,allowed-address-pairs,auto-allocated-topology"
DEFAULT_NET_EXT+=",availability_zone,binding,default-subnetpools,dhcp_agent_scheduler"
DEFAULT_NET_EXT+=",dvr,ext-gw-mode,external-net,extra_dhcp_opt,extraroute,flavors"
DEFAULT_NET_EXT+=",l3-flavors,l3-ha,l3_agent_scheduler,multi-provider,net-mtu"
DEFAULT_NET_EXT+=",network-ip-availability,network_availability_zone,pagination"
DEFAULT_NET_EXT+=",port-security,project-id,provider,quotas,quota_details,rbac-policies"
DEFAULT_NET_EXT+=",revision-if-match,router,router_availability_zone,security-group,service-type,sorting"
DEFAULT_NET_EXT+=",standard-attr-description,standard-attr-revisions,standard-attr-tag,standard-attr-timestamp"
DEFAULT_NET_EXT+=",subnet-service-types,subnet_allocation,net-mtu-writable,ip-substring-filtering"
DEFAULT_NET_EXT+=",availability_zone_filter,filter-validation,empty-string-filtering,port-mac-address-regenerate"
DEFAULT_NET_EXT+=",port-security-groups-filtering,fip-port-details,binding-extended"
DEFAULT_NET_EXT+=",subnet_onboard,l3-port-ip-change-not-allowed,agent-resources-synced"
DEFAULT_NET_EXT+=",floatingip-pools,rbac-security-groups"
local network_api_extensions=${NETWORK_API_EXTENSIONS:-$DEFAULT_NET_EXT}
if [[ ! -z "$DISABLE_NETWORK_API_EXTENSIONS" ]]; then
# Enabled extensions are either the ones explicitly specified or those available on the API endpoint
network_api_extensions=${NETWORK_API_EXTENSIONS:-$(iniget $tmp_cfg_file network-feature-enabled api_extensions | tr -d " ")}
# Remove disabled extensions
network_api_extensions=$(remove_disabled_extensions $network_api_extensions $DISABLE_NETWORK_API_EXTENSIONS)
fi
if [[ -n "$ADDITIONAL_NETWORK_API_EXTENSIONS" ]] && [[ "$network_api_extensions" != "all" ]]; then
network_api_extensions+=",$ADDITIONAL_NETWORK_API_EXTENSIONS"
fi
iniset $TEMPEST_CONFIG network-feature-enabled api_extensions $network_api_extensions
# Swift API Extensions
local object_storage_api_extensions=${OBJECT_STORAGE_API_EXTENSIONS:-"all"}
DEFAULT_SWIFT_OPT="account_quotas,bulk_delete,bulk_upload,container_quotas"
DEFAULT_SWIFT_OPT+=",container_sync,crossdomain,formpost,ratelimit,slo"
DEFAULT_SWIFT_OPT+=",staticweb,tempauth,tempurl,versioned_writes"
local object_storage_api_extensions=${OBJECT_STORAGE_API_EXTENSIONS:-$DEFAULT_SWIFT_OPT}
if [[ ! -z "$DISABLE_OBJECT_STORAGE_API_EXTENSIONS" ]]; then
# Enabled extensions are either the ones explicitly specified or those available on the API endpoint
object_storage_api_extensions=${OBJECT_STORAGE_API_EXTENSIONS:-$(iniget $tmp_cfg_file object-storage-feature-enabled discoverable_apis | tr -d " ")}
@@ -639,8 +681,30 @@ function configure_tempest {
object_storage_api_extensions=$(remove_disabled_extensions $object_storage_api_extensions $DISABLE_STORAGE_API_EXTENSIONS)
fi
iniset $TEMPEST_CONFIG object-storage-feature-enabled discoverable_apis $object_storage_api_extensions
# This feature list for Neutron used from Victoria, the aim is to skip tests
# for features in Neutron that has no API extension, or can't be detected
# otherwise from the API.
# It is added here to avoid stable gating to run these tests (like for IPv6 metadata
# in neutron-tempest-plugin or updating min_bw QoS values for ports already attached
# to VMs).
# To check new features grep neutron-tempest-plugin and tempest for
# is_network_feature_enabled, and please check with Neutron team.
local network_available_features=""
iniset $TEMPEST_CONFIG network-feature-enabled available_features $network_available_features
# Cinder API Extensions
local volume_api_extensions=${VOLUME_API_EXTENSIONS:-"all"}
DEFAULT_VOL_EXT="OS-SCH-HNT,backups,capabilities,cgsnapshots,consistencygroups"
DEFAULT_VOL_EXT+=",encryption,os-admin-actions,os-availability-zone"
DEFAULT_VOL_EXT+=",os-extended-services,os-extended-snapshot-attributes"
DEFAULT_VOL_EXT+=",os-hosts,os-image-create,os-quota-class-sets,os-quota-sets"
DEFAULT_VOL_EXT+=",os-services,os-snapshot-actions,os-snapshot-manage"
DEFAULT_VOL_EXT+=",os-snapshot-unmanage,os-types-extra-specs,os-types-manage"
DEFAULT_VOL_EXT+=",os-used-limits,os-vol-host-attr,os-vol-image-meta"
DEFAULT_VOL_EXT+=",os-vol-mig-status-attr,os-vol-tenant-attr,os-volume-actions"
DEFAULT_VOL_EXT+=",os-volume-encryption-metadata,os-volume-manage"
DEFAULT_VOL_EXT+=",os-volume-transfer,os-volume-type-access"
DEFAULT_VOL_EXT+=",os-volume-unmanage,qos-specs,scheduler-stats"
local volume_api_extensions=${VOLUME_API_EXTENSIONS:-$DEFAULT_VOL_EXT}
if [[ ! -z "$DISABLE_VOLUME_API_EXTENSIONS" ]]; then
# Enabled extensions are either the ones explicitly specified or those available on the API endpoint
volume_api_extensions=${VOLUME_API_EXTENSIONS:-$(iniget $tmp_cfg_file volume-feature-enabled api_extensions | tr -d " ")}
@@ -658,12 +722,22 @@ function install_tempest {
git_clone $TEMPEST_REPO $TEMPEST_DIR $TEMPEST_BRANCH
pip_install 'tox!=2.8.0'
pushd $TEMPEST_DIR
# NOTE(gmann): checkout the TEMPEST_BRANCH in case TEMPEST_BRANCH
# is tag name not master. git_clone would not checkout tag because
# TEMPEST_DIR already exist until RECLONE is true.
git checkout $TEMPEST_BRANCH
local tmp_u_c_m
tmp_u_c_m=$(mktemp -t tempest_u_c_m.XXXXXXXXXX)
set_tempest_venv_constraints $tmp_u_c_m
tox -r --notest -efull
# NOTE(mtreinish) Respect constraints in the tempest full venv, things that
# are using a tox job other than full will not be respecting constraints but
# running pip install -U on tempest requirements
$TEMPEST_DIR/.tox/tempest/bin/pip install -c $REQUIREMENTS_DIR/upper-constraints.txt -r requirements.txt
$TEMPEST_DIR/.tox/tempest/bin/pip install -c $tmp_u_c_m -r requirements.txt
PROJECT_VENV["tempest"]=${TEMPEST_DIR}/.tox/tempest
rm -f $tmp_u_c_m
popd
}
@@ -671,9 +745,11 @@ function install_tempest {
function install_tempest_plugins {
pushd $TEMPEST_DIR
if [[ $TEMPEST_PLUGINS != 0 ]] ; then
# The requirements might be on a different branch, while tempest & tempest plugins needs master requirements.
(cd $REQUIREMENTS_DIR && git show origin/master:upper-constraints.txt) > u-c-m.txt
tox -evenv-tempest -- pip install -c u-c-m.txt $TEMPEST_PLUGINS
local tmp_u_c_m
tmp_u_c_m=$(mktemp -t tempest_u_c_m.XXXXXXXXXX)
set_tempest_venv_constraints $tmp_u_c_m
tox -evenv-tempest -- pip install -c $tmp_u_c_m $TEMPEST_PLUGINS
rm -f $tmp_u_c_m
echo "Checking installed Tempest plugins:"
tox -evenv-tempest -- tempest list-plugins
fi
+1
View File
@@ -19,6 +19,7 @@
set_fact:
external_bridge_mtu: "{{ local_mtu | int - 50 }}"
roles:
- ensure-virtualenv
- test-matrix
- configure-swap
- setup-stack-user
@@ -15,7 +15,7 @@
name=""
for u in `systemctl list-unit-files | grep devstack | awk '{print $1}'`; do
name=$(echo $u | sed 's/devstack@/screen-/' | sed 's/\.service//')
journalctl -o short-precise --unit $u | gzip - > {{ stage_dir }}/logs/$name.txt.gz
journalctl -o short-precise --unit $u > {{ stage_dir }}/logs/$name.txt
done
# Export the journal in export format to make it downloadable
@@ -34,4 +34,4 @@
-t sudo \
--no-pager \
--since="$(cat {{ devstack_base_dir }}/log-start-timestamp.txt)" \
| gzip - > {{ stage_dir }}/logs/syslog.txt.gz
> {{ stage_dir }}/logs/syslog.txt
+22
View File
@@ -0,0 +1,22 @@
Generate stackviz report.
Generate stackviz report using subunit and dstat data, using
the stackviz archive embedded in test images.
**Role Variables**
.. zuul:rolevar:: devstack_base_dir
:default: /opt/stack
The devstack base directory.
.. zuul:rolevar:: stage_dir
:default: "{{ ansible_user_dir }}"
The stage directory where the input data can be found and
the output will be produced.
.. zuul:rolevar:: zuul_work_dir
:default: {{ devstack_base_dir }}/tempest
Directory to work in. It has to be a fully qualified path.
@@ -0,0 +1,3 @@
devstack_base_dir: /opt/stack
stage_dir: "{{ ansible_user_dir }}"
zuul_work_dir: "{{ devstack_base_dir }}/tempest"
+73
View File
@@ -0,0 +1,73 @@
- name: Process Stackviz
block:
- name: Devstack checks if stackviz archive exists
stat:
path: "/opt/cache/files/stackviz-latest.tar.gz"
register: stackviz_archive
- debug:
msg: "Stackviz archive could not be found in /opt/cache/files/stackviz-latest.tar.gz"
when: not stackviz_archive.stat.exists
- name: Check if subunit data exists
stat:
path: "{{ zuul_work_dir }}/testrepository.subunit"
register: subunit_input
- debug:
msg: "Subunit file could not be found at {{ zuul_work_dir }}/testrepository.subunit"
when: not subunit_input.stat.exists
- name: Install stackviz
when:
- stackviz_archive.stat.exists
- subunit_input.stat.exists
block:
- include_role:
name: ensure-pip
- pip:
name: "file://{{ stackviz_archive.stat.path }}"
virtualenv: /tmp/stackviz
virtualenv_command: '{{ ensure_pip_virtualenv_command }}'
extra_args: -U
- name: Deploy stackviz static html+js
command: cp -pR /tmp/stackviz/share/stackviz-html {{ stage_dir }}/stackviz
when:
- stackviz_archive.stat.exists
- subunit_input.stat.exists
- name: Check if dstat data exists
stat:
path: "{{ devstack_base_dir }}/logs/dstat-csv.log"
register: dstat_input
when:
- stackviz_archive.stat.exists
- subunit_input.stat.exists
- name: Run stackviz with dstat
shell: |
cat {{ subunit_input.stat.path }} | \
/tmp/stackviz/bin/stackviz-export \
--dstat "{{ devstack_base_dir }}/logs/dstat-csv.log" \
--env --stdin \
{{ stage_dir }}/stackviz/data
when:
- stackviz_archive.stat.exists
- subunit_input.stat.exists
- dstat_input.stat.exists
- name: Run stackviz without dstat
shell: |
cat {{ subunit_input.stat.path }} | \
/tmp/stackviz/bin/stackviz-export \
--env --stdin \
{{ stage_dir }}/stackviz/data
when:
- stackviz_archive.stat.exists
- subunit_input.stat.exists
- not dstat_input.stat.exists
ignore_errors: yes
@@ -1,9 +1,13 @@
- name: Find all OpenStack source repos used by this job
find:
paths:
- src/git.openstack.org/openstack
- src/git.openstack.org/openstack-dev
- src/git.openstack.org/openstack-infra
- src/opendev.org/opendev
- src/opendev.org/openstack
- src/opendev.org/openstack-dev
- src/opendev.org/openstack-infra
- src/opendev.org/starlingx
- src/opendev.org/x
- src/opendev.org/zuul
file_type: directory
register: found_repos
+7
View File
@@ -10,3 +10,10 @@ subnodes.
:default: /opt/stack
The devstack base directory.
.. zuul:rolevar:: devstack_data_base_dir
:default: {{ devstack_base_dir }}
The devstack base directory for data/.
Useful for example when multiple executions of devstack (i.e. grenade)
share the same data directory.
@@ -1 +1,2 @@
devstack_base_dir: /opt/stack
devstack_data_base_dir: "{{ devstack_base_dir }}"
+6 -6
View File
@@ -1,7 +1,7 @@
- name: Ensure the data folder exists
become: true
file:
path: "{{ devstack_base_dir }}/data"
path: "{{ devstack_data_base_dir }}/data"
state: directory
owner: stack
group: stack
@@ -11,7 +11,7 @@
- name: Ensure the CA folder exists
become: true
file:
path: "{{ devstack_base_dir }}/data/CA"
path: "{{ devstack_data_base_dir }}/data/CA"
state: directory
owner: stack
group: stack
@@ -25,8 +25,8 @@
dest: "{{ zuul.executor.work_root }}/{{ item | basename }}"
mode: pull
with_items:
- "{{ devstack_base_dir }}/data/ca-bundle.pem"
- "{{ devstack_base_dir }}/data/CA"
- "{{ devstack_data_base_dir }}/data/ca-bundle.pem"
- "{{ devstack_data_base_dir }}/data/CA"
when: inventory_hostname == 'controller'
- name: Push the CA certificate
@@ -34,7 +34,7 @@
become_user: stack
synchronize:
src: "{{ zuul.executor.work_root }}/ca-bundle.pem"
dest: "{{ devstack_base_dir }}/data/ca-bundle.pem"
dest: "{{ devstack_data_base_dir }}/data/ca-bundle.pem"
mode: push
when: 'inventory_hostname in groups["subnode"]|default([])'
@@ -43,6 +43,6 @@
become_user: stack
synchronize:
src: "{{ zuul.executor.work_root }}/CA/"
dest: "{{ devstack_base_dir }}/data/"
dest: "{{ devstack_data_base_dir }}/data/"
mode: push
when: 'inventory_hostname in groups["subnode"]|default([])'
@@ -252,7 +252,11 @@ class LocalConf(object):
if localrc:
vg = VarGraph(localrc)
for k, v in vg.getVars():
self.localrc.append('{}={}'.format(k, v))
# Avoid double quoting
if len(v) and v[0]=='"':
self.localrc.append('{}={}'.format(k, v))
else:
self.localrc.append('{}="{}"'.format(k, v))
if k == 'LIBS_FROM_GIT':
lfg = True
elif k == 'TEMPEST_PLUGINS':
@@ -185,7 +185,25 @@ class TestDevstackLocalConf(unittest.TestCase):
for line in f:
if line.startswith('LIBS_FROM_GIT'):
lfg = line.strip().split('=')[1]
self.assertEqual('oslo.db', lfg)
self.assertEqual('"oslo.db"', lfg)
def test_avoid_double_quote(self):
"Test that there a no duplicated quotes"
localrc = {'TESTVAR': '"quoted value"'}
p = dict(localrc=localrc,
base_services=[],
base_dir='./test',
path=os.path.join(self.tmpdir, 'test.local.conf'),
projects={})
lc = self._init_localconf(p)
lc.write(p['path'])
testvar = None
with open(p['path']) as f:
for line in f:
if line.startswith('TESTVAR'):
testvar = line.strip().split('=')[1]
self.assertEqual('"quoted value"', testvar)
def test_plugin_circular_deps(self):
"Test that plugins with circular dependencies fail"
@@ -265,7 +283,7 @@ class TestDevstackLocalConf(unittest.TestCase):
lc.write(p['path'])
tp = self._find_tempest_plugins_value(p['path'])
self.assertEqual('someplugin', tp)
self.assertEqual('"someplugin"', tp)
self.assertEqual(len(lc.warnings), 1)
+11 -5
View File
@@ -221,7 +221,7 @@ write_devstack_version
# Warn users who aren't on an explicitly supported distro, but allow them to
# override check and attempt installation with ``FORCE=yes ./stack``
if [[ ! ${DISTRO} =~ (xenial|artful|bionic|stretch|jessie|f28|f29|opensuse-42.3|opensuse-15.0|opensuse-tumbleweed|rhel7) ]]; then
if [[ ! ${DISTRO} =~ (xenial|artful|bionic|stretch|jessie|f28|f29|opensuse-15.2|opensuse-tumbleweed|rhel7) ]]; then
echo "WARNING: this script has not been tested on $DISTRO"
if [[ "$FORCE" != "yes" ]]; then
die $LINENO "If you wish to run this script anyway run with FORCE=yes"
@@ -328,7 +328,13 @@ function _install_rdo {
# Per the point above, it's a bunch of repos so starts getting a
# little messy...
if ! is_package_installed rdo-release ; then
yum_install https://rdoproject.org/repos/rdo-release.rpm
if [[ "$TARGET_BRANCH" == "master" ]]; then
yum_install https://rdoproject.org/repos/rdo-release.rpm
else
# Get latest rdo-release-$rdo_release RPM package version
rdo_release=$(echo $TARGET_BRANCH | sed "s|stable/||g")
yum_install https://rdoproject.org/repos/openstack-$rdo_release/rdo-release-$rdo_release.rpm
fi
fi
# Also enable optional for RHEL7 proper. Note this is a silent
@@ -767,9 +773,6 @@ if [[ "$OFFLINE" != "True" ]]; then
PYPI_ALTERNATIVE_URL=${PYPI_ALTERNATIVE_URL:-""} $TOP_DIR/tools/install_pip.sh
fi
# Install subunit for the subunit output stream
pip_install -U os-testr
TRACK_DEPENDS=${TRACK_DEPENDS:-False}
# Install Python packages into a virtualenv so that we can track them
@@ -787,6 +790,9 @@ fi
source $TOP_DIR/tools/fixup_stuff.sh
fixup_all
# Install subunit for the subunit output stream
pip_install -U os-testr
if [[ "$USE_SYSTEMD" == "True" ]]; then
pip_install_gr systemd-python
# the default rate limit of 1000 messages / 30 seconds is not
+10 -2
View File
@@ -15,7 +15,7 @@ source $RC_DIR/functions
# Set the target branch. This is used so that stable branching
# does not need to update each repo below.
TARGET_BRANCH=master
TARGET_BRANCH=stable/stein
# Cycle trailing projects need to branch later than the others.
TRAILING_TARGET_BRANCH=master
@@ -314,7 +314,11 @@ REQUIREMENTS_BRANCH=${REQUIREMENTS_BRANCH:-$TARGET_BRANCH}
# Tempest test suite
TEMPEST_REPO=${TEMPEST_REPO:-${GIT_BASE}/openstack/tempest.git}
TEMPEST_BRANCH=${TEMPEST_BRANCH:-$BRANCHLESS_TARGET_BRANCH}
# Use Tempest tag 24.0.0 which is Stein supported version
# Tempest 20.0.0 to 26.0.0 are supported version for stable/stein
# https://docs.openstack.org/releasenotes/tempest/v24.0.0.html
TEMPEST_BRANCH=${TEMPEST_BRANCH:-24.0.0}
TEMPEST_VENV_UPPER_CONSTRAINTS=${TEMPEST_VENV_UPPER_CONSTRAINTS:-$REQUIREMENTS_DIR/upper-constraints.txt}
##############
@@ -774,6 +778,10 @@ ETCD_DOWNLOAD_LOCATION=$ETCD_DOWNLOAD_URL/$ETCD_VERSION/$ETCD_DOWNLOAD_FILE
# etcd is always required, so place it into list of pre-cached downloads
EXTRA_CACHE_URLS+=",$ETCD_DOWNLOAD_LOCATION"
# Cache settings
CACHE_BACKEND=${CACHE_BACKEND:-"dogpile.cache.memcached"}
MEMCACHE_SERVERS=${MEMCACHE_SERVERS:-"localhost:11211"}
# Detect duplicate values in IMAGE_URLS
for image_url in ${IMAGE_URLS//,/ }; do
if [ $(echo "$IMAGE_URLS" | grep -o -F "$image_url" | wc -l) -gt 1 ]; then
-12
View File
@@ -95,19 +95,7 @@ function test_libs_exist {
echo "test_libs_exist PASSED"
}
function test_branch_master {
for lib in $ALL_LIBS; do
if [[ ${GITBRANCH[$lib]} != "master" ]]; then
echo "GITBRANCH for $lib not master (${GITBRANCH[$lib]})"
exit 1
fi
done
echo "test_branch_master PASSED"
}
set -o errexit
test_libs_exist
test_branch_master
test_all_libs_upto_date
+1 -1
View File
@@ -15,7 +15,7 @@
echo "Ensuring we don't have crazy refs"
REFS=`grep BRANCH stackrc | grep -v 'TARGET_BRANCH' | grep -v 'NOVNC_BRANCH'`
REFS=`grep BRANCH stackrc | grep -v 'TARGET_BRANCH' | grep -v 'NOVNC_BRANCH' | grep -v 'TEMPEST_BRANCH'`
rc=$?
if [[ $rc -eq 0 ]]; then
echo "Branch defaults must be one of the *TARGET_BRANCH values. Found:"
+14
View File
@@ -216,6 +216,20 @@ function fixup_suse {
sudo systemctl disable apparmor
sudo /usr/sbin/aa-teardown
fi
# Ensure trusted CA certificates are up to date
# See https://bugzilla.suse.com/show_bug.cgi?id=1154871
# May be removed once a new opensuse-15 image is available in nodepool
sudo zypper up -y p11-kit ca-certificates-mozilla
# Since pip10, pip will refuse to uninstall files from packages
# that were created with distutils (rather than more modern
# setuptools). This is because it technically doesn't have a
# manifest of what to remove. However, in most cases, simply
# overwriting works. So this hacks around those packages that
# have been dragged in by some other system dependency
sudo rm -rf /usr/lib/python3.6/site-packages/ply-*.egg-info
sudo rm -rf /usr/lib/python3.6/site-packages/six-*.egg-info
}
# The version of pip(1.5.4) supported by python-virtualenv(1.11.4) has
+30 -12
View File
@@ -38,7 +38,9 @@ FILES=$TOP_DIR/files
# [1] http://git.openstack.org/cgit/openstack-infra/project-config/tree/nodepool/elements/cache-devstack/source-repository-pip
PIP_GET_PIP_URL=${PIP_GET_PIP_URL:-"https://bootstrap.pypa.io/get-pip.py"}
PIP_GET_PIP_PY27_URL=${PIP_GET_PIP_PY27_URL:-"https://bootstrap.pypa.io/pip/2.7/get-pip.py"}
LOCAL_PIP="$FILES/$(basename $PIP_GET_PIP_URL)"
LOCAL_PIP_PY27="${LOCAL_PIP}-py27"
GetDistro
echo "Distro: $DISTRO"
@@ -56,13 +58,17 @@ function get_versions {
}
function install_get_pip {
function _install_get_pip {
local interpreter=$1
local pip_get_pip_url=$2
local local_pip=$3
# If get-pip.py isn't python, delete it. This was probably an
# outage on the server.
if [[ -r $LOCAL_PIP ]]; then
if ! head -1 $LOCAL_PIP | grep -q '#!/usr/bin/env python'; then
echo "WARNING: Corrupt $LOCAL_PIP found removing"
rm $LOCAL_PIP
if [[ -r $local_pip ]]; then
if ! head -1 $local_pip | grep -q '#!/usr/bin/env python'; then
echo "WARNING: Corrupt $local_pip found removing"
rm $local_pip
fi
fi
@@ -76,22 +82,34 @@ function install_get_pip {
# Thus we use curl's "-z" feature to always check the modified
# since and only download if a new version is out -- but only if
# it seems we downloaded the file originally.
if [[ ! -r $LOCAL_PIP || -r $LOCAL_PIP.downloaded ]]; then
if [[ ! -r $local_pip || -r $local_pip.downloaded ]]; then
# only test freshness if LOCAL_PIP is actually there,
# otherwise we generate a scary warning.
local timecond=""
if [[ -r $LOCAL_PIP ]]; then
timecond="-z $LOCAL_PIP"
if [[ -r $local_pip ]]; then
timecond="-z $local_pip"
fi
curl -f --retry 6 --retry-delay 5 \
$timecond -o $LOCAL_PIP $PIP_GET_PIP_URL || \
$timecond -o $local_pip $pip_get_pip_url || \
die $LINENO "Download of get-pip.py failed"
touch $LOCAL_PIP.downloaded
touch $local_pip.downloaded
fi
sudo -H -E python $LOCAL_PIP -c $TOOLS_DIR/cap-pip.txt
sudo -H -E $interpreter $local_pip -c $TOOLS_DIR/cap-pip.txt
}
function install_get_pip {
_install_get_pip python $PIP_GET_PIP_PY27_URL $LOCAL_PIP_PY27
if python3_enabled; then
sudo -H -E python${PYTHON3_VERSION} $LOCAL_PIP -c $TOOLS_DIR/cap-pip.txt
if [[ "$PYTHON3_VERSION" == "3.5" ]]; then
PIP_GET_PIP_URL=$(dirname $PIP_GET_PIP_URL)/pip/3.5/$(basename $PIP_GET_PIP_URL)
LOCAL_PIP=${LOCAL_PIP}-py35
elif [[ "$PYTHON3_VERSION" == "3.6" ]]; then
PIP_GET_PIP_URL=$(dirname $PIP_GET_PIP_URL)/pip/3.6/$(basename $PIP_GET_PIP_URL)
LOCAL_PIP=${LOCAL_PIP}-py36
fi
_install_get_pip python${PYTHON3_VERSION} $PIP_GET_PIP_URL $LOCAL_PIP
fi
}
+6
View File
@@ -181,3 +181,9 @@ if is_service_enabled cinder && is_package_installed lvm2; then
clean_lvm_volume_group $DEFAULT_VOLUME_GROUP_NAME || /bin/true
clean_lvm_filter
fi
# Clean any safe.directory items we wrote into the global
# gitconfig. We can identify the relevant ones by checking that they
# point to somewhere in our $DEST directory.
sudo sed -i "/directory=${DEST}/ d" /etc/gitconfig