Compare commits

...

1031 Commits

Author SHA1 Message Date
Rodolfo Alonso Hernandez 6127ced12e [stable-only] Update system locale before PostgreSQL initialization
In Fedora/CentOS9, the PostgreSQL initialization fails with the
following message:
  initdb: invalid locale settings; check LANG and LC_* environment
  variables

This patch installs the required packages and configure the system
locale before calling the initialization process.

Closes-Bug: #2083482
Change-Id: I2c83e896819b20cd7a1ee8d8ee33354fb047a6d9
(cherry picked from commit e42e6f31a6)
2024-10-03 14:54:34 +00:00
elajkat c755ca9219 Handle_tags and branches for unmaintained also
Related-Bug: #2056276
Change-Id: Iaa34624d1d85cadf1b45bec780ef8d97dd054041
(cherry picked from commit 92b65a84cc)
(cherry picked from commit 0c1e594e45)
(cherry picked from commit d59e528c74)
(cherry picked from commit c52f50ee8c)
2024-09-12 12:05:05 +00:00
karolinku 0f18f54cef Replacing usage of rdo-release rpm
with centos-release-openstack rpms follwing [1].

[1] https://issues.redhat.com/browse/RDO-311

Change-Id: I50951e077e73297d10b075677a440992d1e2fa91
(cherry picked from commit 8784a3027f)
(cherry picked from commit a75091d4f3)
Conflicts:
	stack.sh
(cherry picked from commit d0e89946b3)
2024-08-06 16:05:47 +05:30
Rodolfo Alonso Hernandez f77a4c199f [stable only] Unset the default value of MYSQL_GATHER_PERFORMANCE
This patch unsets the default value of MYSQL_GATHER_PERFORMANCE.
That will avoid the installation of ``dbcounter``. In older releases,
this installation is triggering an issue with the version of
"setuptools", that requires a newer version of "packaging" that is
being installed.

Depends-On: https://review.opendev.org/c/zuul/zuul-jobs/+/924815
Change-Id: I765d87c9c6899b19c2df84796bf92c0656a72d7a
Closes-Bug: #2073585
(cherry picked from commit 123ac1b8e8)
2024-07-24 15:49:22 +00:00
yatinkarel 38ce28b420 Fix rdo_release for unmaintained branches
Only branches with stable/ as prefix were considered
but now we have branches even with different
prefix like unmaintained/, fix it to consider
such cases by using a generic filter instead of
assuming branch name starts with stable.

Change-Id: I967de13094ff6df46737a22d4e1758f9900dfbc9
(cherry picked from commit 4d69238383)
Conflicts:
	stack.sh
2024-06-21 18:35:12 +05:30
Zuul 94b54879c2 Merge "Update .gitreview for unmaintained/zed" into unmaintained/zed 2024-06-12 13:39:58 +00:00
Pham Le Gia Dai b00eb4a3d0 Update TARGET_BRANCH to unmaintained/zed
Change-Id: I6ccdc01b39ff40be6e2e271fb620bc8bfb0d1ba5
2024-05-31 09:19:49 +07:00
Clark Boylan d487302e60 Drop devstack-gate roles from devstack zuul jobs
Devstack-gate has been retired and relying on a retired repo for roles
in zuul produces errors (because the roles are no longer in the HEAD of
the repo). It doesn't look like devstack actually relies on these roles
in d-g (if it does they can be ported into devstack instead) so we just
drop the roles specifier for d-g in the devstack job.

NOTE(elod.illes): nova-ceph-multistore job is broken in this branch, so
it is set as non-voting in check queue and removed from gate queue
until it gets fixed.

Change-Id: I28a39b31f71153a602d41cefe621a216d09a290f
2024-05-15 21:46:54 +02:00
OpenStack Release Bot de086027da Update .gitreview for unmaintained/zed
Change-Id: Ice38102cd0b53294d240d93c885036845c0f59ef
2024-04-26 16:18:49 +00:00
Jeremy Stanley 1183167f19 Drop the devstack-single-node-centos-7 nodeset
OpenDev is preparing to remove centos-7 nodes on March 15[*]. This
change drops one nodeset definition which is the last remaining
reference on DevStack's master branch.

[*] https://lists.openstack.org/archives/list/openstack-discuss@lists.openstack.org/message/A2YIY5L7MVYSQMTVZU3L3OM7GLVVZPLK/

Change-Id: Icd487e1012263a9b0bc13b529d31ff2025108adf
(cherry picked from commit 73da7dfb93)
2024-03-04 18:53:45 +00:00
Sean Mooney 2bb18a4caa The AZ filter is deprecated and planned for removal this cycle
To facilitate that this change removes it form the default filter
list. By default nova has used placement for AZs so this filter
has not been requried since xena.

Change-Id: Ie5e216dd8c2a7ecf43cc6954ec4f73d4d67b5b3b
(cherry picked from commit ad029c0e8b)
(cherry picked from commit 0726a4f919)
2023-08-25 20:11:58 +00:00
Zuul 461089b238 Merge "git: git checkout for a commit hash combinated with depth argument" into stable/zed 2023-08-13 21:52:17 +00:00
jskunda 722465ec97 git: git checkout for a commit hash combinated with depth argument
This patch: https://review.opendev.org/c/openstack/devstack/+/882299
provides functionality, that commit hash can be passed as last arugment,
however when GIT_DEPTH is set, it fails, as in:

timeout -s SIGINT 0 git clone https://github.com/ovn-org/ovn.git ./ovn
--depth 1 --branch 03b95a4566a15f7544f4cdf35629dacede4dcf55
fatal: Remote branch 03b95a4566a15f7544f4cdf35629dacede4dcf55
not found in upstream origin

Closes-Bug: #2023020
Change-Id: I748354964a133e028e12458cc9014d6d014cbdb9
2023-08-02 15:42:57 +02:00
Alfredo Moralejo e62f4f25f3 Use RDO official CloudSIG mirrors for C9S deployments
Instead of using RDO Trunk repo server, CentOS official mirrors provide
a most reliable infrastructure and supports EMS which is required when
enabling FIPS in C9S.

In order to install the rdo-release rpm from repo.fedoraproject.org,
which does not support EMS, I'm using a workaround to wget, which works
with non-EMS servers because it uses gnutls instead of openssl, and
install it locally with rpm.

This is also consistent to CentOS 8 implementatioin.

Closes-Bug: #2020661
Closes-Bug: #2020434
Change-Id: Icd99f467d47aaafaaf3ee8f2a3c4da08842cb672
(cherry picked from commit b2ad00cb66)
2023-08-01 15:35:41 +00:00
Dan Smith b31d70a576 nova: Bump timeout-per-gb for BFV rebuild ops
This increases the timeout we use to wait for cinder to perform a
volume reimage. Since devstack is often running on a single machine
with non-production IO performance, we should bump this limit to avoid
hitting it before the rebuild completes.

Change-Id: Ie2663b951acb0c1a65597a39e032948764e6ae6a
(cherry picked from commit 58c80b2424)
(cherry picked from commit 6767465bc5)
2023-07-18 10:19:27 +02:00
Ihar Hrachyshka 94b49698a8 git: support git checkout for a commit hash
git_clone assumes a branch or a tag is passed as the last argument, and
it fails when a commit hash is passed, as in:

timeout -s SIGINT 0 git clone https://github.com/ovn-org/ovn.git
/opt/stack/ovn --branch 36e3ab9b47e93af0599a818e9d6b2930e49473f0
Cloning into '/opt/stack/ovn'...
fatal: Remote branch 36e3ab9b47e93af0599a818e9d6b2930e49473f0 not found
in upstream origin

Change-Id: Id1328d7cba418fa7c227ae9db4fe83c09fd06035
(cherry picked from commit e8915786e1)
2023-05-04 20:07:55 +00:00
yatinkarel 4181791e06 [ovs] Reload ovs kernel module always
Irrespective of build_modules is True
or False reload ovs modules always.

If ovs is installed from package before(like
with multi-node-bridge role), then installing
ovs from source requires openvswitch kernel
module to be reloaded.

The issue was not seen before jammy as there
module was reloaded when build_modules was set
to True.

Closes-Bug: #2015364
Change-Id: I1785b49b2ef72ca1f817f504d5ea56021410c052
(cherry picked from commit 42517968ff)
(cherry picked from commit f1d555d1e7)
2023-04-14 14:39:04 +00:00
Dan Smith b12cc4181c Try to reduce mysql memory usage
These are a few tweaks I applied to my own memory-constrained cloud
instances that seemed to help. I have lower performance requirements
so this may make things worse and not better, but it's worth seeing
what the impact is. I'll admit to not knowing the full impact of these
as they're mostly collected from various tutorials on lowering memory
usage.

Enable this for now on devstack-multinode

Change-Id: I7b223391d3de01e3e81b02076debd01d9d2f097c
(cherry picked from commit 7567359755)
2023-03-21 17:39:26 +01:00
Rajat Dhasmana 977b591ee1 Create multiattach volume type for tempest
Creating multiattach volume is a non-admin operation but creating
multiattach volume type is an admin operation.
Previously cinder allowed creating multiattach volumes without a
volume type but that support is being removed with[1].
The change requires updating tempest tests[2] but some tempest
tests are non-admin, which require admin priviledges to create the
multiattach volume type.
Based on the last discussion with tempest team[3], the proposed
solution is to create a multiattach volume type in devstack,
if ENABLE_VOLUME_MULTIATTACH is True, and use it in tempest
tests. Similar to how admins create multiattach volume types
for non-admin users.

This patch creates a multiattach volume type if
ENABLE_VOLUME_MULTIATTACH is True. Also we set the multiattach
type name as a tempest config option 'volume_type_multiattach'.

[1] https://review.opendev.org/c/openstack/cinder/+/874865
[2] https://review.opendev.org/c/openstack/tempest/+/875372
[3] https://meetings.opendev.org/irclogs/%23openstack-cinder/%23openstack-cinder.2023-03-13.log.html#t2023-03-13T18:47:56

Change-Id: Icd3690565bf7b27898cd206641e612da3993703d
(cherry picked from commit 1898a683be)
(cherry picked from commit 16594b7b2a)
Conflicts: lib/cinder
    conflicts due to nvme support being added in 2023.1
    https://review.opendev.org/c/openstack/devstack/+/814193
2023-03-15 19:30:33 +00:00
Ghanshyam Mann 30a7d790b6 Fix setting the tempest virtual env constraints env var
Devstack set the env var TOX_CONSTRAINTS_FILE/UPPER_CONSTRAINTS_FILE
which are used to use the constraints during Tempest virtual env installation.
Those env var are set to non-master constraint when we need to use non-master
constraints but when we need to use the master constraints we do not set/reset
them point to master constraints. This create the issue when running the grenade
job where we run Tempest on the old devstack as well as in the new devstack.
When tempest is installed on old devstack then old tempest is used and it sets
these env var to stable/<branch> constraints (this is the case when old devstack
(the stable branch is in EM phase) uses the old tempest not the master tempest),
all good till now. But the problem comes when in the same grenade script run
upgrade-tempest install the master tempest (when new devstack branches are in
the 'supported' phase and use the master tempest means) and are supposed to use
the master constraints. But the TOX_CONSTRAINTS_FILE/UPPER_CONSTRAINTS_FILE env
var set by old tempest is used by the tempest and due to a mismatch in constraints
it fails.

This happened when we tried to pin the stable/wallaby with Tempest 29.0.0
- https://review.opendev.org/c/openstack/devstack/+/871782

and table/xena grenade job failed (stable/xena use master tempest and supposed
to use master constraints)
- https://zuul.opendev.org/t/openstack/build/fb7b2a8b562c42bab4c741819f5e9732/log/controller/logs/grenade.sh_log.txt#16641

We should set/reset those constraint env var to master constraints if configuration
tell devstack to use the master constraints.

[1] https://github.com/openstack/devstack/blob/71c3c40c269a50303247855319d1d3a5d30f6773/lib/tempest#L124

Closes-Bug: #2003993
Change-Id: I5e938139b47f443a4c358415d0d4dcf6549cd085
(cherry picked from commit 7fe998109b)
2023-01-26 22:38:37 -06:00
yatinkarel 74dbd6ee8d [OVN] Ensure socket files are absent in init_ovn
Just like we remove db files let's also remove
socket files when initializing ovn. Those will
reappear once service fully restarts along with
db files. Without it we see random issue as
described in the below bug.

Closes-Bug: #2002629
Change-Id: I726a9cac9c805d017273aa79e844724f0d00cdf0
(cherry picked from commit 7fecba2f13)
2023-01-17 05:47:46 +00:00
Ghanshyam Mann 44c3ea4f1b [stable-only] Pin tox<4 in run-both.yaml playbook also
We pinned tox<4 in ensure-tox pre.yaml playbook
- https://review.opendev.org/q/I9a138af94dedc0d8ce5a0d519d75779415d3c30b

but did not realize that it is used in run-both.yaml playbook
also where we should pin too.

Depends-On: https://review.opendev.org/c/openstack/swift/+/869519

Change-Id: I4407f7036e3fd51ac79f68791151c3f9cd03bd01
2023-01-07 02:56:35 +00:00
Ghanshyam Mann 211cc4c036 Pin tox<4.0.0 for <=stable/zed branch testing
Tox 4.0.0 has some incompatible changes, epecially more
strict on allowlist_externals. Tempest recently changed
allowlist_externals not to be *[1] causing the failure
on jobs where lib/tempest failing to run the tempest
as command in virtual env.

----------
venv: commands[0]> tempest verify-config -uro /tmp/tmp.qH5KgJHTF4
venv: failed with tempest is not allowed, use allowlist_externals to allow it
------

We do not need to test/fix the <=stable/zed branches with tox 4.0.0
and pinning them with the compatible tox version of the time stable
brnaches were releaased is better way.

This commit proposes:
1. Pinning the tox<4.0.0 for <=stable/ze branches testing
2. Workaround to unblock the master gate by pinning it <4.0.0 but
we should make our testing compatible with tox 4.0.0 soon.

Depends-On: https://review.opendev.org/c/openstack/devstack/+/867067

Related-Bug: #1999183

[1] https://review.opendev.org/c/openstack/tempest/+/865314 devstack based job started failing to run tempest command on venv.

Change-Id: I9a138af94dedc0d8ce5a0d519d75779415d3c30b
(cherry picked from commit ba54baa425)
2022-12-09 02:54:44 +00:00
Martin Kopec e6bb5c9959 Stop running devstack-no-tls-proxy on stable branch
Let's run devstack-no-tls-proxy job only on master periodic.

Change-Id: I4c0a5144da2549fe988bbabe8536e9a9873e1cf7
2022-11-29 17:06:39 +01:00
Dr. Jens Harbott 49c1a34e7a Remove Fedora platform jobs from Zed branch
These jobs are not intended to run on stable branches; remove them
to avoid issues with updating the nodeset on the master branch:

- devstack-platform-fedora-latest
- devstack-platform-fedora-latest-virt-preview

Change-Id: I4044c20765ad96fb5304d145b2c18be9736de7f3
2022-10-07 08:12:45 +02:00
Martin Kopec aeae198c17 Stop installing Tempest at system wide for stable branch
As added in notes for INSTALL_TEMPEST variable, we need to set
this to False for a stable branch so that devstack does not
install Tempest system wide.

Change-Id: I8a79feedb676514dfe9c3125c9d8e66417547d52
2022-09-30 14:05:04 +02:00
Martin Kopec 88b9edf921 Cap stable/zed network, swift, volume api_extensions for tempest
This commit caps the network, volume and swift extensions on
Tempest's config option api_extensions.

Change-Id: I33d17c81a40861284087de337bc33b3d9e60f076
2022-09-29 17:42:58 +02:00
Martin Kopec 12752ea219 Cap max microversions for stable/zed
This commit cap the max microversions for compute, volume
and placement API for stable/zed.

Compute - https://opendev.org/openstack/nova/src/branch/stable/zed/nova/api/openstack/compute/rest_api_version_history.rst#microversion%202.93

Volume - https://opendev.org/openstack/cinder/src/branch/stable/zed/cinder/api/openstack/rest_api_version_history.rst#section-58

Placement - https://opendev.org/openstack/placement/src/branch/master/placement/rest_api_version_history.rst#support-for-the-any-traits-syntax-in-the-required-parameter

Change-Id: I43361fdf1a7e1da8dade305470c1c17fe0ce6454
2022-09-28 02:22:43 +02:00
Martin Kopec 100946429a Update branches for stable/zed
Step 4 of the Devstack release:
https://wiki.openstack.org/wiki/QA/releases

Change-Id: I8af6e1ca1bdfb0718b0bda83142fb2a91e61f9d5
2022-09-28 02:11:28 +02:00
OpenStack Release Bot 0e95a7221a Update TOX_CONSTRAINTS_FILE for stable/zed
Update the URL to the upper-constraints file to point to the redirect
rule on releases.openstack.org so that anyone working on this branch
will switch to the correct upper-constraints list automatically when
the requirements repository branches.

Until the requirements repository has as stable/zed branch, tests will
continue to use the upper-constraints list on master.

Change-Id: I7089a04cff68145388f12dab18c6cdd1a5a96336
2022-09-27 08:30:36 +00:00
OpenStack Release Bot ce2962ab48 Update .gitreview for stable/zed
Change-Id: I4fd09e5412f4e3b51a20f6d83271b3870d6f572e
2022-09-27 08:30:34 +00:00
Zuul 0b0e6a6474 Merge "[ci] Remove the implied-branches pragma" 2022-09-20 16:22:26 +00:00
Zuul b5c2e7b3fa Merge "Respect constraints on tempest venv consistently" 2022-08-30 22:53:05 +00:00
Slawek Kaplonski 3de92db663 Fix installation of OVS/OVN from sources
This patch changes user who runs ovsdb-server and ovn-nortd services
to root.
It also adds installation of the libssl dev package before compilation
of the openvswitch if TLS service is enabled.

Co-Authored-By: Fernando Royo <froyo@redhat.com>

Closes-Bug: #1987832
Change-Id: I83fc9250ae5b7c1686938a0dd25d66b40fc6c6aa
2022-08-26 13:00:03 +02:00
June Yi b9b6d6b862 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 <june.yi@samsung.com>
Change-Id: I0cea282152fd363af8671cab1b5f733ebe2bd4df
2022-08-25 19:59:34 +09:00
Zuul 995c906950 Merge "Clean up n-net remnants" 2022-08-24 17:50:52 +00:00
Zuul 8fa03a37ad Merge "Clean up neutron cleanup code" 2022-08-23 20:05:48 +00:00
Zuul c61380a136 Merge "Clean up use of get_field" 2022-08-23 18:08:05 +00:00
Zuul 3154eab0d7 Merge "Cinder: add creator role when barbican is enabled" 2022-08-23 16:57:32 +00:00
Dr. Jens Harbott e7d2623dca Clean up neutron cleanup code
neutron-ns-metadata-proxy was dropped from Neutron 5 years ago, no need
to keep trying to kill it.

Change-Id: I20b6d68dd8dde36057a2418bca0841bdea377b07
2022-08-23 18:08:19 +02:00
Alan Bishop ccd116d364 Cinder: add creator role when barbican is enabled
When barbican is enabled, add the "creator" role to cinder's service
user so that cinder can create secrets. Cinder needs to create
barbican secrets when migrating encryption keys from the legacy
ConfKeyManager to barbican. Cinder also needs to create barbican
secrets in order to support transferring encrypted volumes.

Implements: bp/transfer-encrypted-volume
Depends-On: I216f78e8a300ab3f79bbcbb38110adf2bbec2196
Change-Id: Ia3f414c4b9b0829f60841a6dd63c97a893fdde4d
2022-08-22 19:52:00 -07:00
Dr. Jens Harbott ca5f919561 Clean up n-net remnants
In I90316208d1af42c1659d3bee386f95e38aaf2c56 support for nova-network
was removed, but some bits remained, fix this up.

Change-Id: Iba7e1785fd0bdf0a6e94e5e03438fc7634621e49
2022-08-21 10:52:41 +02:00
Eliad Cohen fdfc14451a Clean up use of get_field
Openstack client can return the id field for create/show commands using
`-f value -c id`. Cleaned up the use of grep 'id' with get_field

Change-Id: I2f4338f30c11e5139cda51c92524782b86f0aacc
2022-08-16 15:27:45 -04:00
Martin Kopec 90e5479f38 Remove forgotten LinuxMint occurrence
Right now we don't officialy support LinuxMint as our
documentation says [1], it seems LinuxMint is a relict
and got forgotten over time.

This patch removes LinuxMint from the code in order not to
confuse users.

[1] https://docs.openstack.org/devstack/latest/
Closes-Bug: #1983427

Change-Id: Ie1ced25f89389494b28a7b2e9bb1c4273e002dd5
2022-08-16 17:29:16 +02:00
Zuul 28ee346393 Merge "iniset: fix handling of values containg ampersand" 2022-08-10 14:21:00 +00:00
Zuul ea82effa19 Merge "Fix doc for adding sudo privileges to stack user" 2022-08-10 10:52:19 +00:00
Nobuhiro MIKI d266c87b1d iniset: fix handling of values containg ampersand
Attempting to set a value containing the ampersand
character (&) by iniset would corrupt the value.
So, add an escaping process.

Signed-off-by: Nobuhiro MIKI <nmiki@yahoo-corp.jp>
Closes-Bug: #1983816
Change-Id: Ie2633bacd2d761d110e6cb12f95382325c329415
2022-08-08 18:59:53 +09:00
Zuul 51a3f2ef1e Merge "delete __pycache__ directory with sudo privileges" 2022-08-06 17:28:46 +00:00
Zuul d9e2d10d28 Merge "Neutron: Do not set removed allow_overlapping_ips" 2022-08-03 12:13:54 +00:00
Hoai-Thu Vuong 79bef068b6 remove duplicate line of REGION_NAME
Change-Id: I42b270749f057c5751e809aba282112b990b9f38
2022-08-02 14:41:59 +07:00
Zuul 8506b5bd7c Merge "Add NEUTRON_ENDPOINT_SERVICE_NAME variable to set service name" 2022-08-02 00:06:56 +00:00
Zuul 0af962d60a Merge "Neutron: Set experimental option to use linuxbridge agent" 2022-08-01 23:36:22 +00:00
Martin Kopec b70d98fe75 Fix doc for adding sudo privileges to stack user
Writing NOPASSWD directive into /etc/sudoers was throwing
permission denied errors. This commit writes the directive
to the /etc/sudoers.d/stack file instead.

Closes-Bug: #1981541
Change-Id: If30f01aa5f3a33dda79ff4a6892116511c8e1542
2022-07-20 14:06:42 +00:00
Takashi Kajinami facf15626e Neutron: Do not set removed allow_overlapping_ips
The parameter has been removed from neutron by [1].

[1] fde91e8059a9a23fb7ece6e3463984329c7ea581

Change-Id: I3b838ea741d19729d6fcf03c0478b1b4d8ec1213
2022-07-19 13:24:38 +00:00
Slawek Kaplonski 1a21ccbdf8 Add NEUTRON_ENDPOINT_SERVICE_NAME variable to set service name
This option can be used to set name of the service used in the
networking service endpoint URL.

Depends-On: https://review.opendev.org/c/openstack/grenade/+/850306

Change-Id: I9e9a06eadc1604214c627bd3bda010cc00aaf83d
2022-07-19 14:51:24 +02:00
Takashi Kajinami cf0bf746e9 Neutron: Set experimental option to use linuxbridge agent
Recently the experimental mechanism has been added to Neutron and now
it requires the [experimental] linuxbridge option when the linuxbridge
mechanism driver is used.

Depends-on: https://review.opendev.org/c/openstack/neutron/+/845181
Change-Id: Ice82a391cda9eb0193f23e6794be7ab3df12c40b
2022-07-19 12:46:04 +02:00
Yadnesh Kulkarni 85340e77f3 delete __pycache__ directory with sudo privileges
Signed-off-by: Yadnesh Kulkarni <ykulkarn@redhat.com>
Change-Id: I9cf3cd8921347eacc1effb2b197b97bc6ff3e0df
2022-07-11 17:14:40 +05:30
Dr. Jens Harbott bd6e5205b1 Increase timeout waiting for OVN startup
We see some cases where OVN startup takes much longer than 5 seconds, up
to 28 seconds have been observed, so increase the limit to 40 to be on
the safe side.

Signed-off-by: Dr. Jens Harbott <harbott@osism.tech>
Closes-Bug: 1980421
Change-Id: I6da4a537e6a8d527ff71a821f07164fc7d342882
2022-07-03 22:30:41 +02:00
Zuul 02f8c16c9b Merge "Make devstack-platform-debian-bullseye voting" 2022-06-30 07:37:03 +00:00
Zuul 8d347090d3 Merge "Do not create cinder backup pool and key when cephadm is used" 2022-06-29 19:02:12 +00:00
Martin Kopec e1fb94f82a Make devstack-platform-debian-bullseye voting
The job has been successfully passing lately, let's make it voting.

Change-Id: Ib3b803a26c8647fd49c89371516c0ac7baba2703
2022-06-29 10:43:33 +02:00
Slawek Kaplonski ce1ae9ddef Fix missing "$" in the ENFORCE_SCOPE's variable name
Because of the missing "$" before ENFORCE_SCOPE in the lib/neutron
module, it was treated as an ENFORCE_SCOPE string instead of variable
and Neutron was deployed always with old defaults and disabled scope
enforcement.

Change-Id: Ibe67fea634c5f7abb521c0369ff30dd5db84db8c
2022-06-29 09:57:50 +02:00
Zuul 9ddae9b388 Merge "Avoid including bad service names in perf.json" 2022-06-24 11:11:19 +00:00
Dan Smith fe7cfa6b8c Avoid including bad service names in perf.json
Some of the API services are not properly mounted under /$service/
in the apache proxy. This patch tries to avoid recording data
for "services" like "v2.0" (in the case of neutron) by only adding
names if they're all letters. A single warning is emitted for any
services excluded by this check.

For the moment this will mean we don't collect data for those services,
but when their devstack API config is fixed, they'll start to show
up.

Change-Id: I41cc300e89a4f97a008a8ba97c91f0980f9b9c3f
2022-06-23 09:25:22 -07:00
Vladislav Belogrudov 8a38a73ddf Correct hostname for OVN agent
Currently Devstack uses short hostname for configuration of OVN.
This leads to inability to start instances (failing port binding)
on hosts with full hostnames (including dots). Open vSwitch expects
hostname in external_ids that corresponds to one returned by
``hostname`` command.

Closes-Bug: #1943631
Change-Id: I15b71a49c482be0c8f15ad834e29ea1b33307c86
2022-06-23 07:42:19 +02:00
Zuul eacaa99853 Merge "Reduce memory consumption in Cinder services" 2022-06-22 08:53:39 +00:00
Martin Kopec 8ff52ea12b Mark devstack-platform-centos-9-stream as n-v
Due to the below bug the job has been constantly failing.
Let's make it n-v until the bug is resolved:
  - https://bugs.launchpad.net/neutron/+bug/1979047

Change-Id: Ifc8cc96843a8eac5c98cd1e1f9e4b6287a7f2e7c
2022-06-21 17:31:50 +02:00
Gorka Eguileor d5af514ac9 Reduce memory consumption in Cinder services
This patch reduces memory usage on the Cinder Volume and Backup services
by tuning glibc.

The specific tuning consist on disabling the per thread arenas and
disabling dynamic thresholds.

The Cinder Backup service suffers from high water mark memory usage and
uses excessive memory.  As an example just after 10 restore operations
the service uses almost 1GB of RAM and does not ever free it afterwards.
With this patch the memory consumption of the service is reduced down to
almost 130MB.  If we add a revert from Cinder (Change-Id
I43a20c8687f12bc52b014611cc6977c4c3ca212c) it goes down to 100MB during
my tests.

This glibc tuning is not applied to all Python services because I
haven't done proper testings on them and at first glance they don't seem
to have such great improvements.

Related-bug: #1908805
Change-Id: Ic9030d01468b3189350f83b04a8d1d346c489d3c
2022-06-21 12:16:32 +02:00
Zuul 44d07f3001 Merge "Run debian platform job with OVN" 2022-06-15 15:14:52 +00:00
Zuul 8eede1fc39 Merge "Add support for IPv6 tunnel endpoints" 2022-06-08 21:39:03 +00:00
Zuul 7391297bc3 Merge "Capture QEMU core dumps when possible" 2022-06-08 20:35:06 +00:00
Dr. Jens Harbott e6e7100e85 Don't install pinned setuptools with distro pip
We are seeing failures when using an updated setuptools version
installed together with distro pip on Ubuntu 22.04. Install the version
from u-c only when we are also installing pip from upstream.

Change-Id: Ibb6e9424e5794ccbf9a937d2eecfa3bf60ed312e
2022-06-07 13:42:54 +02:00
Brian Haley c869d59857 Add support for IPv6 tunnel endpoints
Currently, neutron tunnel endpoints must be IPv4 addresses,
i.e. $HOST_IP, although IPv6 endpoints are supported by most
drivers.

Create a TUNNEL_IP_VERSION variable to choose which host IP
to use, either HOST_IP or HOST_IPV6, and configure it in the
OVS and Linuxbridge agent driver files. The default is still
IPv4, but it can be over-ridden by specifying TUNNEL_ENDPOINT_IP
accordingly.

This behaves similar to the SERVICE_IP_VERSION option, which
can either be set to 4 or 6, but not 4+6 - the tunnel overhead
should be consistent on all systems in order not to have MTU
issues.

Must set the ML2 overlay_ip_version config option to match
else agent tunnel sync RPC will not work.

Must set the OVN external_ids:ovn-encap-ip config option to
the correct address.

Updated 'devstack-ipv6-only' job definition and verification role
that will set all services and tunnels to use IPv6 addresses.

Closes-bug: #1619476

Change-Id: I6034278dfc17b55d7863bc4db541bbdaa983a686
2022-06-07 02:28:51 +00:00
Francesco Pantano 96dbf55016 Do not create cinder backup pool and key when cephadm is used
When cephadm is used, if ENABLE_CEPH_C_BAK is True both pool and
key are created by devstack-plugin-ceph. This piece of code can
still stay here to make sure the cinder config is properly built.

Change-Id: I799521f008123b8e42b2021c1c11d374b834bec3
2022-06-06 14:19:32 +02:00
Zuul e661cae7e8 Merge "Allow to skip stop of ovn services" 2022-06-03 20:40:15 +00:00
Zuul 906cf81528 Merge "Add apache2 to the services we collect for memory" 2022-06-03 18:44:10 +00:00
Dan Smith f7d87aa433 Capture QEMU core dumps when possible
Some of the hardest-to-debug issues are qemu crashes deep in a nova
workflow that can't be reproduced locally. This adds a post task to
the playbook so that we capture the most recent qemu core dump, if
there is one.

Change-Id: I48a2ea883325ca920b7e7909edad53a9832fb319
2022-06-03 07:54:35 -07:00
yatinkarel 35fb53423a [ironic][swift]Temporary add sha1 to allowed_digests
Swift removed sha1 from supported digests with [1] and
that broked ironic tinyipa job. Temorary add sha1 to
allowed_digests until it's fixed in ironic.

[1] https://review.opendev.org/c/openstack/swift/+/525771

Story: 2010068
Task: 45539
Change-Id: I68dfc472ce901058b6a7d691c98ed1641d431e54
2022-06-03 11:52:50 +05:30
Zuul 0ae279b54a Merge "Fix doc and user create script to set homedir permissions" 2022-05-31 21:15:54 +00:00
Zuul d0657a02e5 Merge "Do not barf stack trace if stats DB is missing" 2022-05-31 19:04:26 +00:00
yatinkarel 6dd896fefa Allow to skip stop of ovn services
Grenade jobs stop services, check fip connectivity
for a nova server and then upgrade to next release.

But since ovn data plane and db services are stopped along
with other services, fip connectivity fails as a result.

We shouldn't stop these services along with other
neutron services. This patch adds a new variable
"SKIP_STOP_OVN" which can be used by grenade jobs
to skip stop of ovn services.

This will also fix the ovn grenade jobs.

Also source fixup_stuff.sh so function fixup_ovn_centos
is available. It's already sourced in stack.sh but
that's not used in grenade run.

Change-Id: I94818a19f19973779cb2e11753d2881d54dfa3bc
2022-05-31 12:57:39 +05:30
Dan Smith e85c68e60f Add apache2 to the services we collect for memory
Change-Id: Ic6daef5b4df50ce43c6782542cb54c1958e54655
2022-05-26 09:31:36 -07:00
Zuul 0e08e9b48c Merge "Cleanup comment that should've been removed" 2022-05-25 09:12:18 +00:00
Dr. Jens Harbott 599b241d32 Run debian platform job with OVN
Packages for OVN are now available in bullseye, so we can drop the
special handling.

Signed-off-by: Dr. Jens Harbott <harbott@osism.tech>
Change-Id: I5e5c78aa19c5208c207ddcf14e208bae8fbc3c55
2022-05-25 08:57:56 +00:00
yatinkarel c64ea4f213 Fix doc and user create script to set homedir permissions
RHEL based distros set homedir permissions to 700,
and Ubuntu 21.04+ to 750[1], i.e missing executable
permission for group or others, this results into failures
as defined in the below bug.

Since in doc we add useradd command, it's good to
add instructions to fix the permissions there itself
instead of getting failures during installation and then
fixing it.

Also update user create script to fix permissions
by adding executable bit to DEST directory if missing.

[1] https://discourse.ubuntu.com/t/private-home-directories-for-ubuntu-21-04-onwards/19533

Closes-Bug: #1966858
Change-Id: Id2787886433281238eb95ee11a75eddeef514293
2022-05-25 06:34:30 +00:00
Zuul 8e1d5aa22e Merge "Drop openEuler support" 2022-05-24 11:34:09 +00:00
Dan Smith 1cdf413ac6 Do not barf stack trace if stats DB is missing
This can happen if devstack fails to run, but we still run the post
tasks. Also could happen if some sort of hybrid job configuration
does not run all of devstack but we still end up running post jobs.

Just warn to stderr and assume no DB info.

Change-Id: I211a331ab668dbb0ad7882908cca4363f865d924
2022-05-23 13:56:13 -07:00
Clark Boylan 1d5be95196 Cleanup comment that should've been removed
The previous change, I237f5663b0f8b060f6df130de04e17e2b1695f8a, removed
a SETUPTOOLS flag, but not the comment explaining why that flag was
previously set. Clean up that comment.

Change-Id: I32b0240fd56310d7f10596aaa8ef432679bfd66a
2022-05-23 08:46:50 -07:00
Clark Boylan 50e3c06ec2 Fix dbcounter installation on Jammy
There are two problems with dbcounter installation on Jammy. The first
is straightforward. We have to use `py_modules` instead of `modules` to
specify the source file. I don't know how this works on other distros
but the docs [0] seem to clearly indicate py_modules does this.

The second issue is quite an issue and requires story time. When
pip/setuptools insteall editable installs (as is done for many of the
openstack projects) it creates an easy-install.pth file that tells the
python interpreter to add the source dirs of those repos to the python
path. Normally these paths are appended to your sys.path. Pip's isolated
build env relies on the assumption that these paths are appeneded to the
path when it santizes sys.path to create the isolated environemnt.

However, when SETUPTOOLS_SYS_PATH_TECHNIQUE is set to rewrite the paths
are not appended and are inserted in the middle. This breaks pip's
isolated build env which broke dbcounter installations. We fix this by
not setting SETUPTOOLS_SYS_PATH_TECHNIQUE to rewrite. Upstream indicates
the reason we set this half a decade ago has since been fixed properly.

The reason Jammy and nothing else breaks is that python3.10 is the first
python version to use pip's isolated build envs by default.

I've locally fiddled with a patch to pip [1] to try and fix this
behavior even when rewrite is set. I don't plan to push this upstream
but it helps to illustrate where the problem lies. If someone else would
like to upstream this feel free.

Finally this change makes the jammy platform job voting again and adds
it to the gate to ensure we don't regress again.

[0] https://docs.python.org/3/distutils/sourcedist.html#specifying-the-files-to-distribute
[1] https://paste.opendev.org/show/bqVAuhgMtVtfYupZK5J6/

Change-Id: I237f5663b0f8b060f6df130de04e17e2b1695f8a
2022-05-20 10:35:18 -07:00
Zuul 34c2842676 Merge "Configure placement section in neutron conf" 2022-05-19 17:23:50 +00:00
Dr. Jens Harbott 560ee16a85 Drop openEuler support
The job is broken since it is running with python3.7 and most services
now require at least python3.8.

Signed-off-by: Dr. Jens Harbott <harbott@osism.tech>
Change-Id: Ie21f71acffabd78c79e2b141951ccf30a5c06445
2022-05-19 14:06:11 +02:00
Dr. Jens Harbott 083eeee5af Make jammy platform jobs non-voting
We missed to add the jobs to the gate queue and so they have already
regressed before they were actually in place. Make them non-voting for
now until the issues are fixed.

Signed-off-by: Dr. Jens Harbott <harbott@osism.tech>
Change-Id: I5d1f83dfe23747096163076dcf80750585c0260e
2022-05-19 13:55:35 +02:00
Zuul 08254ca312 Merge "Add Ubuntu 22.04 LTS (jammy) platform job" 2022-05-19 08:16:18 +00:00
Zuul 2f889954ce Merge "lib/tempest: add wait for Glance image import" 2022-05-18 15:38:49 +00:00
Brian Rosmaita 111a38b4d6 lib/tempest: add wait for Glance image import
Glance image import is asynchronous and may be configured to do image
conversion.  If image import is being used, it's possible that the
tempest configuration code is executed before the import has
completed and there may be no active images yet.  In that case,
we will poll glance every TEMPEST_GLANCE_IMPORT_POLL_INTERVAL seconds
(default: 1) to see if there are TEMPEST_GLANCE_IMAGE_COUNT active
images (default: 1) up to TEMPEST_GLANCE_IMPORT_POLL_LIMIT times
(default: 12).

You can see an example of the issue this patch addresses in real
life:
https://review.opendev.org/c/openstack/glance/+/841278/1#message-456096e48b28e5b866deb8bf53e9258ee08219a0

Change-Id: Ie99f12691d9062611a8930accfa14d9540970cc5
2022-05-18 08:22:49 -04:00
Zuul 9eb64896dd Merge "Use proper sed separator for paths" 2022-05-18 11:30:49 +00:00
yatinkarel 92a34dbe95 Configure placement section in neutron conf
Without it segment plugin fails to connect with
placement api. Configure the placement section
if service is deployed.

Closes-Bug: #1973783
Change-Id: Ie7f37770a04f622735cf2263c601257669ab5064
2022-05-18 15:27:40 +05:30
Zuul 47b7b84422 Merge "Improve API log parsing" 2022-05-18 00:19:23 +00:00
Zuul 4fd2831753 Merge "Change DB counting mechanism" 2022-05-18 00:19:20 +00:00
Zuul 071374fa05 Merge "Collect status of all services" 2022-05-17 18:40:28 +00:00
Zuul 83a81755ac Merge "Wait for OVN dbs also along with sockets" 2022-05-12 19:03:49 +00:00
Dan Smith 64d68679d9 Improve API log parsing
Two runs of the same job on the same patch can yield quite different
numbers for API calls if we just count the raw calls. Many of these
are tempest polling for resources, which on a slow worker can require
many more calls than a fast one.

Tempest seems to not change its User-Agent string, but the client
libraries do. So, if we ignore the regular "python-urllib" agent
calls, we get a much more stable count of service-to-service API
calls in the performance report.

Note that we were also logging in a different (less-rich) format for
the tls-proxy.log file, which hampers our ability to parse that
data in the same format. This switches it to "combined" which is used
by the access.log and contains more useful information, like the
user-agent, among other things.

Change-Id: I8889c2e53f85c41150e1245dcbe2a79bac702aad
2022-05-12 07:55:30 -07:00
Dan Smith fe52d7f0a8 Change DB counting mechanism
The mysql performance_schema method for counting per-database queries
is very heavyweight in that it requires full logging (in a table) of
every query. We do hundreds of thousands in the course of a tempest
run, which ends up creating its own performance problem.

This changes the approach we take, which is to bundle a very tiny
sqlalchemy plugin module which counts just what we care about in
a special database.

It is more complex than just enabling the features in mysql, but it
is a massively smaller runtime overhead. It also provides us the
opportunity to easily zero the counters just before a tempest run.

Change-Id: I361bc30bb970cdaf18b966951f217862d302f0b9
2022-05-12 07:55:02 -07:00
Dr. Jens Harbott 5c765cb8a1 Add Ubuntu 22.04 LTS (jammy) platform job
The new Ubuntu LTS release has been made last week, start running
devstack on it as a platform job.

Horizon has issues with py310, so gets disabled for now.

Run variants with OVS and OVN(default).

Co-Authored-By: yatinkarel <ykarel@redhat.com>
Signed-off-by: Dr. Jens Harbott <harbott@osism.tech>
Change-Id: I47696273d6b009f754335b44ef3356b4f5115cd8
2022-05-12 13:54:02 +02:00
Zuul d450e146cc Merge "Global option for enforcing scope (ENFORCE_SCOPE)" 2022-05-07 10:51:35 +00:00
yatinkarel 1baa8905d5 Wait for OVN dbs also along with sockets
When OVN is setup from distro packages, the
main service is ovn-central which when restarted,
restarts ovn-northd, ovn nb and db services.

And during the restart ovn dbs(ovnnb_db.db and ovnsb_db.db)
are created, which may sometime takes time as seen with
ubuntu jammy tests[1].

We already checking for socket's file to be available,
let's also check for db files as without it ovn-*ctl
operations succeed but changes are not persisted until
db files are available and changes are lost with the restart.

[1] https://review.opendev.org/c/openstack/devstack/+/839389

Change-Id: I178da7af8cba8bcc8a67174e439df7c0f2c7d4d5
2022-05-06 18:06:18 +05:30
yatinkarel 42be2425d8 Collect status of all services
Would be helpful in troubleshooting services
which either fails to start or takes time to
start.

Related-Bug: #1970679
Change-Id: Iba2fce5f8b1cd00708f092e6eb5a1fbd96e97da0
2022-04-29 16:40:32 +00:00
Zuul 85c2999e27 Merge "Tolerate missing deps in get-stats.py" 2022-04-27 22:49:07 +00:00
Zuul bfae1bee79 Merge "Set public bridge up for v6 only configurations" 2022-04-27 10:21:07 +00:00
Zuul 48417ca241 Merge "Drop centos 8 stream testing" 2022-04-26 19:57:12 +00:00
Dan Smith 1b601c7b1e Tolerate missing deps in get-stats.py
In order to run on systems where not all requirements are present,
we should be tolerant of missing external dependencies, such as
psutil and pymysql. Print a warning (to stderr) and just leave out
those stats in that case.

Also make running the stats collector use ignore_errors:yes to avoid
failures in the future. I think the stats is not critical enough to
fail a job for bugs like this.

Related-Bug: #1970195
Change-Id: I132b0e1f5033c4f109a8b8cc776c0877574c4a49
2022-04-26 08:02:39 -07:00
Harald Jensås bab0c92103 Use tryint() for stats value
In some cases the value is [not set], in this case
the conversion to integer does not work.

Closes-Bug: #1970431
Change-Id: I74df7d8bc9f5cbe0709a6471cf7639caea0b58e8
2022-04-26 15:51:35 +02:00
Julia Kreger 6964ba4a98 Set public bridge up for v6 only configurations
A long time ago, Ironic's IPv6 only job started to fail working with
errors indicated the host was unreacable. Turns out, this was because
the $ext_gw_interface was not being set to up, and thus could
be found in a Down state, and thus the kernel would not accept routes
for it.

Adds an explicit step to turn up the public bridge, much as done in
the IPv4 router plugin code which would also be executed in 4+6.

That being said, Ironic's CI jobs are very intentionally IPv6 only
to ensure that we have no chances of v4 addressing getting used
at any point in time.

This should allow Ironic to return it's IPv6 only CI job back
to the normal check queue, once a ironic plugin issue has been
resolved which was introduced while it was removed.

Change-Id: I121ec8a2e9640b21a7126f2eeb23da36b4aa95bf
2022-04-26 06:37:31 -07:00
Grzegorz Grasza 8615563df4 Global option for enforcing scope (ENFORCE_SCOPE)
This updates each devstack service library, to use it as the
default value for service-specific RBAC configuration.

Change-Id: I41061d042206c411ee3dd94ce91098e612af7ae7
2022-04-26 14:17:20 +02:00
Ghanshyam Mann c6dfd169ae Drop centos 8 stream testing
In Zed cycle testing runtime, we are targetting the centos 9 stream
- https://governance.openstack.org/tc/reference/runtimes/zed.html

With dropping the python 3.6 support, project started adding python 3.8
as minimum, example nova:
- https://github.com/openstack/nova/blob/56b5aed08c6a3ed81b78dc216f0165ebfe3c3350/setup.cfg#L13

with that, centos 8 stream job is failing 100%
- https://zuul.openstack.org/build/970d029dc96742c3aa0f6932a35e97cf
- https://zuul.openstack.org/builds?job_name=devstack-platform-centos-8-stream&skip=0

This commit drops centos-8-stream testing so that we focus on centos-9-stream.

Change-Id: I045e67b1ca79aba1b2a7be9f88d7804c69c6d781
2022-04-25 15:24:39 -05:00
Zuul 3b0c035b90 Merge "install mod_ssl on centos 9 stream by default" 2022-04-25 20:04:16 +00:00
Balazs Gibizer 7191c5e7e7 Use proper sed separator for paths
I941ef5ea90970a0901236afe81c551aaf24ac1d8 added a sed command that
should match and delete path values but used '/' as sed separator. This
leads to error in unstack.sh runs when the path also contains '/':

+./unstack.sh:main:188 sudo sed -i '/directory=/opt/stack/ d' /etc/gitconfig
sed: -e expression #1, char 13: unknown command: `o'

So this patch replace '/' separator with '+'.

Change-Id: I06811c0d9ee7ecddf84ef1c6dd6cff5129dbf4b1
2022-04-25 15:26:28 +02:00
Zuul 76c519bde6 Merge "modify the sample value of LOGDAYS" 2022-04-22 11:09:36 +00:00
Zuul 45f71b10ef Merge "Gather performance data after tempest" 2022-04-21 23:06:35 +00:00
Sean Mooney af75f689fa install mod_ssl on centos 9 stream by default
This change adds mod_ssl to the default set of rpms installed
on rpm based distros.

this is required if the tls-proxy service is enabled
for multi node centos based jobs.

Change-Id: I52652de88352094c824da68e5baf7db4c17cb027
2022-04-21 20:40:44 +01:00
Zhou Yanbing 4423450eb3 modify the sample value of LOGDAYS
the value of LOGDAYS in samples/local.conf is 2, so change the
value in the comment and the sample value in the document to
be consistent with it.

Change-Id: I5822bbf1d6ad347c67c886be1e3325113d079114
2022-04-21 15:00:41 +08:00
Dan Smith c2772c2984 Gather performance data after tempest
This makes us gather a bunch of consistent statistics after we run
tempest that can be use to measure the impact of a given change. These
are stable metrics such as "number of DB queries made" and "how much
memory is each service using after a tempest run."

Note that this will always run after devstack to generate the JSON
file, but there are two things that control its completeness:

 - MYSQL_GATHER_PERFORMANCE must be enabled to get per-db stats
 - Unless tls-proxy is enabled, we will only get API stats for keystone

Change-Id: Ie3b1504256dc1c9c6b59634e86fa98494bcb07b1
2022-04-20 13:07:22 -07:00
Zuul d380858b2d Merge "Add OpenStack two nodes nodeset for Centos 9" 2022-04-19 05:48:02 +00:00
Dan Smith 4baeb3b51f Write safe.directory items to system git config
This is necessary for more consistent behavior across multiple
distro versions. Apparently somewhere along the way, git started
looking at the current user's home directory instead of $HOME.

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

Change-Id: I941ef5ea90970a0901236afe81c551aaf24ac1d8
2022-04-18 08:05:44 -07:00
Ian Wienand 676dcaf944 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].

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
2022-04-13 16:49:07 +10:00
Zuul ce0ff1fd9d Merge "ensure /usr/local/bin in in path" 2022-04-11 14:57:13 +00:00
Sean Mooney eca9783a0a ensure /usr/local/bin in in path
osc is typicaly installed in /usr/local/bin
to avoid command not found errors when invoking osc
in devstack ensure that /usr/local/bin is included
in the PATH.

Change-Id: I605fbc4b131149bf5d1b6307b360fe365c680b1a
2022-04-07 13:31:50 +01:00
afariasa f4a703661e Add OpenStack two nodes nodeset for Centos 9
Change-Id: I01c8e5e0e88d0dcfe778f19548a2e268406ef6bf
2022-04-06 15:24:09 +00:00
Zuul aac6b6c791 Merge "Drop setup.py and setup.cfg" 2022-03-29 17:50:05 +00:00
Zuul 729b196445 Merge "Move openEuler job to experimental pipeline" 2022-03-29 14:03:58 +00:00
Ghanshyam Mann 45b029064f Move openEuler job to experimental pipeline
OpenEuler job fails 100% of the time. As discussed in QA meeting,
we agreed to move OpenEuler job to experimental pipeline.
- https://meetings.opendev.org/meetings/qa/2022/qa.2022-03-22-15.00.log.html#l-76

Once it is fixed, we can think of adding back to regular pipeline.

Change-Id: I831889a09fabe5bed5522d17e352ec8009eac321
2022-03-29 07:18:40 +00:00
Zuul 0ed70e3f76 Merge "Update DEVSTACK_SERIES to zed" 2022-03-28 13:02:03 +00:00
Dr. Jens Harbott 5c51a95d10 Drop setup.py and setup.cfg
devstack isn't a python project, these were introduced only for docs
building and made redundant with [0]. We can remove them now.

[0] Iedcc008b170821aa74acefc02ec6a243a0dc307c

Signed-off-by: Dr. Jens Harbott <harbott@osism.tech>
Change-Id: I90ca1c6918c016d10c579fbae49d13fff1ed59af
2022-03-28 14:00:54 +02:00
Zuul e79913c65f Merge "ignore failures to copy the devstack cache" 2022-03-27 09:57:23 +00:00
zhouyanbing 8dc342d400 remove unuseful local variable define
the local varibale: api_cell_conf in start_nova_rest function
is unuseful, so remove it now.

Change-Id: I0019ce807cf3905ee246b684fce2abcb46336306
2022-03-26 14:22:23 +08:00
Martin Kopec 189c7ff142 Update DEVSTACK_SERIES to zed
stable/yoga branch has been created now and
current master is for zed.

Change-Id: I8743a3440a0ce96acb24b34971548b43ae7c8d4c
2022-03-25 14:06:52 +01:00
Zuul 14779fc992 Merge "Clean usage of project_id in the Neutron's L3 service module" 2022-03-24 03:21:17 +00:00
Slawek Kaplonski cebd00aa04 Clean usage of project_id in the Neutron's L3 service module
After patch [1] project_id in that module is no longer needed as to make
it working with new secure RBAC policies we had to hardcode "demo"
project to be used always.
This is small follow-up patch with cleaning after [1].

[1] https://review.opendev.org/c/openstack/devstack/+/826851/

Change-Id: Iddf9692817c91807fc3269547910e4f83585f07f
2022-03-23 15:30:38 +01:00
Zuul a9d392cdbb Merge "Do not use hardcoded IPv4 localhost value" 2022-03-23 10:51:30 +00:00
Ghanshyam Mann 369042b74f Make centos-9-stream job voting
bug#1960346 is fixed by the below series
- https://review.opendev.org/q/(topic:bug/1960346+OR+topic:wait_until_sshable_pingable)+status:merged
and now centos-9-stream job is passing and made voting
on tempest gate.

This commit makes devstack centos9 steam platform job
as voting and add it gate pipeline too.

Change-Id: Ic35420c5d58926ae90a136045a1558112accc533
2022-03-22 10:59:07 -05:00
Zuul 194790df85 Merge "Clean up unified limits configuration for nova and glance" 2022-03-18 19:26:28 +00:00
Brian Haley 7943a92bdb Do not use hardcoded IPv4 localhost value
There are a couple of places that still use a hardcoded
127.0.0.1 value, even if devstack is run with
SERVICE_IP_VERSION=6 in local.conf. While things still
work, SERVICE_LOCAL_HOST should be used instead since
everything else could be using IPv6.

Change-Id: I2dd9247a4ac19f565d4d5ecb2e1490501fda8bca
2022-03-14 16:04:08 -04:00
Michael Johnson 35bc600da1 Fix tls-proxy on newer versions of openssl
Newer versions of openssl (CentOS9Stream for example) do not like using sha1.
Devstack will fail on these systems[1] with the following error:
801B93DCE77F0000:error:03000098:digital envelope routines:do_sigver_init:invalid digest:crypto/evp/m_sigver.c:333:
This patch updates the tls-proxy code in devstack to use sha256 instead of sha1 which allows devstack to complete when tls-proxy is enabled.

[1] https://zuul.opendev.org/t/openstack/build/1d90b22a39c74e24a8390861b3c5f957/log/job-output.txt#5535

Closes-Bug: #1962600

Change-Id: I71e1371affe32f070167037b0109a489d196bd31
2022-03-11 20:28:39 +00:00
Sean Mooney 13e8db5a6f ignore failures to copy the devstack cache
If the ci images do not have any cached data
we should ignore any error when trying to copying it.
This is requried when using unmodified cloud images.

Change-Id: Ia6e94fc01343d0c292b1477905f8a96a6b43bcf8
2022-03-09 20:17:31 +00:00
melanie witt 2c96180ac8 Clean up unified limits configuration for nova and glance
This is a followup for change Ifdef3510bc7da3098a71739814e35dbaf612ae34
which added configuration of unified limits for nova. This removes an
unnecessary wrapper unsetting of OS_ env variables, unnecessary quoting
on an iniset config value, and a hardcoding of user domain. The glance
code from which the nova code was originally copied is also cleaned up.

Change-Id: I4921af5cc0f624dd5aa848533f7049ee816be593
2022-03-03 23:56:48 +00:00
Zuul a435078fcb Merge "Configure nova unified limits quotas" 2022-03-03 19:12:13 +00:00
Zuul 9bf989eb1a Merge "Made LVM backing disk persistent" 2022-03-02 15:04:47 +00:00
OpenStack Proposal Bot a2ff754536 Updated from generate-devstack-plugins-list
Change-Id: Iff2bf021edee9be3bae21b67e66fe07c552f3a05
2022-03-02 02:13:44 +00:00
Zuul bbe302da85 Merge "Fix installation with OVN backend and compilation" 2022-02-28 10:47:14 +00:00
Zuul 2462893787 Merge "Default CIRROS_ARCH to host arch" 2022-02-22 16:45:51 +00:00
Zuul 8339df0399 Merge "Made Swift backing disk persistent" 2022-02-22 01:54:52 +00:00
Jakob Meng e30620e9a6 Made Swift backing disk persistent
Previously, Swift's backing disk were not be mounted after reboots,
causing swift-proxy-server service to fail with cryptic error
messages such as 'proxy-server: ERROR Insufficient Storage'. Now,
we use 	Dan Smith' create_disk function from functions to create
the backing disk for us and add it to /etc/fstab.

Change-Id: I9cbccc87bc94a55b58e9badf3fdb127d6f1cf599
2022-02-21 20:04:23 +01:00
Zuul d343a70003 Merge "Revert "Revert "Add enforce_scope setting support for keystone""" 2022-02-21 15:33:18 +00:00
Zuul 5e7dad1146 Merge "Use devstack-system-admin for keystone objects creation" 2022-02-21 15:22:08 +00:00
Victor Morales c0882aeaae Add rsync deb package for swift
The rsync debian package is required for swift service. This
requirement has been covered by rpms but not for deb packages.

Change-Id: Iefd1302be9c7fd80e037bbae3638602d6d823580
2022-02-16 18:15:12 -08:00
OpenStack Proposal Bot ef6fac7959 Updated from generate-devstack-plugins-list
Change-Id: If1b667cd4af88511cb1672645a980c9c4fc557ae
2022-02-16 02:16:15 +00:00
Sean Mooney 17b1999eab Default CIRROS_ARCH to host arch
This change use uname -m to get the portable host arch and uses that
as a new default. on x86_64 hosts this should result in no visable change
in behavior however on a non x86 host it will cause devstack to attempt
to download a cirros image that matches the host.

Change-Id: I6d1495a23400ef4cf496302028324fa5794dd45f
2022-02-09 22:14:24 +00:00
Rodolfo Alonso Hernandez 8c6710326e Fix installation with OVN backend and compilation
This patch fixes several issues related to the installation with
OVN backend with the OVS/OVN compilation enabled.

The OVS/OVN local directories prefix, when both services are compiled,
is now "/usr/local".

The "ovn_agent._run_process" function is calling "ovs-appctl" to
configure the logging settings of several services. Instead of
using the service name, the ctl socket file is used instead. That
is more robust and does not fail in systems with previous
installations.

Closes-Bug: #1960514

Change-Id: I69de5333393957593db6e05495f0c3c758efefdf
2022-02-09 21:22:46 +00:00
Zuul 62d6ffa6b3 Merge "Revert "Disable enforcing scopes in Neutron temporary"" 2022-02-08 22:41:18 +00:00
Zuul 1a8b8573ea Merge "Fix deployment of Neutron with enforced scopes" 2022-02-08 22:39:25 +00:00
Zuul 7799e74a05 Merge "Bump fedora-latest to F35" 2022-02-08 22:34:32 +00:00
Jakob Meng accd99e7cd Made LVM backing disk persistent
Previously, loop devices for LVM volume groups backing files were not
created after reboots, causing e.g. Cinder to fail with messages such
as

  ERROR cinder.service [-] Manager for service cinder-volume
  devstack@lvmdriver-1 is reporting problems, not sending
  heartbeat. Service will appear "down".

Now, we use systemd services to manage loop devices for backing files.

Change-Id: I27ec027834966e44aa9a99999358f5b4debc43e0
2022-02-08 11:05:14 +01:00
Zuul f9f6208960 Merge "Add openstack-two-node-centos-8-stream" 2022-02-07 22:42:44 +00:00
Ian Wienand 343e351627 Bump fedora-latest to F35
Generally this is straight forward, but Horizon has a dependency issue
with pyScss (described in [1]) so it is disabled, for now.

[1] https://bugs.launchpad.net/horizon/+bug/1960204

Co-Authored-By: Dr. Jens Harbott <harbott@osism.tech>
Depends-On: https://review.opendev.org/c/openstack/devstack/+/827578
Change-Id: I7c4bf0945f9ac5bd563fe0a698c09b8571c97c5e
2022-02-08 08:08:19 +11:00
Zuul c6ecac744f Merge "revert stackrc execute permissions" 2022-02-05 00:32:06 +00:00
Zuul 091e20b28a Merge "Adapt compute node local.conf to OVN" 2022-02-05 00:26:11 +00:00
Sean Mooney 85c7d8db4e revert stackrc execute permissions
This change reverts the execute permissions from
stackrc which is not meant to be run as a script but sourced
as part of stack.sh

Change-Id: I9a05051e5a297cfaf78d097fa5f90a7c5fd254a6
2022-02-04 12:59:56 +01:00
Rodolfo Alonso Hernandez a756f4b968 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.

Closes-Bug: #1959600
Change-Id: Iab2c391d5388461fe9e9037cee81884ce8032e72
2022-02-01 11:27:05 +00:00
melanie witt 099a048fb9 Configure nova unified limits quotas
This enables the configuration of nova to use unified limits in
keystone and enforcement in oslo.limit.

Related to blueprint unified-limits-nova

Depends-On: https://review.opendev.org/c/openstack/nova/+/715271

Change-Id: Ifdef3510bc7da3098a71739814e35dbaf612ae34
2022-01-28 20:00:00 +00:00
Zuul 099411815b Merge "Use distro pip on Ubuntu" 2022-01-28 18:49:06 +00:00
Slawek Kaplonski 081c9b716f Revert "Disable enforcing scopes in Neutron temporary"
This reverts commit be7b5bf671.

As related bug is fixed, lets enabled scope enforcement in Neutron
again.

Related-bug: #1959196
Change-Id: I72db7ef533e78a10734d105e6a0debef288e41a1
2022-01-28 09:52:53 +01:00
Slawek Kaplonski 14a0c09001 Fix deployment of Neutron with enforced scopes
After patch [1] new RBAC policies changed in the way that SYSTEM_ADMIN
user isn't anymore allowed to e.g. create resources in behalf of some
projects. Now PROJECT_ADMIN needs to create such resources instead.
So this patch basically reverts most of the changes which were done
in [2] some time ago.
It also introduces new entry in the clouds.yaml file -
"devstack-admin-demo" which is "admin" user in the "demo" project as
it's needed to create some resouces in the demo project now.

Additionally, because of bug [3] this patch changes way how IPv6
external gateway IP is found using Neutron API. This change may be
reverted in the future when bug [3] will be fixed.

[1] https://review.opendev.org/c/openstack/neutron/+/821208
[2] https://review.opendev.org/c/openstack/devstack/+/797450
[3] https://bugs.launchpad.net/neutron/+bug/1959332

Depends-On: https://review.opendev.org/c/openstack/neutron/+/826828

Closes-Bug: #1959196
Change-Id: I32a6e8b9b59269a8699644b563657363425f7174
2022-01-28 09:52:20 +01:00
Ade Lee 1fd45940f3 Add openstack-two-node-centos-8-stream
This will allow multinode FIPS testing

Change-Id: I82b3b8fe56275aed72e13f6d1bd9170c50e5da0d
2022-01-27 15:57:13 +00:00
Slawek Kaplonski be7b5bf671 Disable enforcing scopes in Neutron temporary
After patch [1] was merged in Neutron, enforcing scopes there
is broken.
So lets disable it temporary to unblock Devstack's gate for now.

[1] https://review.opendev.org/c/openstack/neutron/+/821208

Related-Bug: #1959196
Change-Id: I24da6f3897a638749d16f738329a873a5f9a291d
2022-01-27 16:04:32 +01:00
Zuul 6bec828d8e Merge "Fix typo in multinode-lab document" 2022-01-27 08:34:35 +00:00
Grzegorz Grasza 5f5002a378 Revert "Revert "Add enforce_scope setting support for keystone""
This reverts commit 26bd94b45e.

Reason for revert: Devstack keystone creation/setup are moved to
scope tokens, so we can reintroduce the scope check enable.

Change-Id: I6e1c261196dbcaf632748fb6f04e0867648b76c7
2022-01-26 15:41:18 +01:00
Grzegorz Grasza ae40825df6 Use devstack-system-admin for keystone objects creation
This is needed so we can set keystone into enforcing secure RBAC.
This also adjusts lib/glance, which already partially used
devstack-system-admin.

Change-Id: I6df8ad23a3077a8420340167a748ae23ad094962
2022-01-26 15:40:42 +01:00
Dr. Jens Harbott d6909e41af Use distro pip on Ubuntu
Running get-pip.py fails on Ubuntu when running twice, e.g. after a
unstack/stack cycle. Just use distro pip instead.

Closes-Bug: #1957048
Signed-off-by: Dr. Jens Harbott <harbott@osism.tech>
Change-Id: I87a8d53ed8860dd017a6c826dee6b6f4baef3c96
2022-01-22 17:02:29 +01:00
Pierre Riteau 0a31630323 Adapt compute node local.conf to OVN
The default Neutron configuration is now using OVN, but the multinode
lab was using an incompatible configuration:

    The q-agt/neutron-agt service must be disabled with OVN.

Change-Id: I518a739a3daac941880463cde6b47951331d0911
2022-01-21 10:07:07 +01:00
yatinkarel d5d0bed479 Workaround CentOS 8-stream bug until fixed
Recent iputils release in CentOS 8-stream causing
ping failures with non root user. This needs a fix
in systemd package as mentioned in the Related Bugs,
until it's fixed and is in 8-stream mirrors let's
workaround it by setting net.ipv4.ping_group_range
setting manually.

Related-Bug: #1957941
Related-Bug: rhbz#2037807
Change-Id: I0d8dac910647968b625020c2a94e626ba5255058
2022-01-17 08:43:52 +00:00
Zuul b6656b7b38 Merge "Clean up compile_ovn function's parameters" 2022-01-13 17:43:52 +00:00
Zuul 6d55b2a439 Merge "Allow skip the database server installation" 2022-01-12 15:40:57 +00:00
Zuul df551da6f5 Merge "Fix cloning requirements when GIT_DEPTH is set" 2022-01-11 18:51:34 +00:00
Zuul 3a373536f1 Merge "Deprecate lib/neutron" 2022-01-11 17:29:14 +00:00
elajkat c994dc4de2 Deprecate lib/neutron
lib/neutron-legacy was recently undeprecated (see [0]), Openstack CI
uses neutron-legacy and latest work was done in it also.
To avoid double maintenance lib/neutron can be deprecated.

For latest discussion see [1] and [2].

[0]: https://review.opendev.org/c/openstack/devstack/+/704829
[1]: https://meetings.opendev.org/meetings/networking/2022/networking.2022-01-04-14.04.log.html#l-52
[2]: https://meetings.opendev.org/irclogs/%23openstack-qa/%23openstack-qa.2022-01-05.log.html#t2022-01-05T15:57:37

Related-Bug: #1955765
Change-Id: I3fc328b7f47ccd7c1a97cceeea98fb2fbd609017
2022-01-11 14:14:20 +01:00
Zuul 35aa64e5f7 Merge "Added AlmaLinux to CentOS 8 family" 2022-01-11 01:53:55 +00:00
Carlos Camacho cc6e20b24d Allow skip the database server installation
This patch allows to skip the installation
of the database backend packages (MySQL or Postgres)
with the introduction of the INSTALL_DATABASE_SERVER_PACKAGES
variable (defaulted to True).
This is useful in such environments that do not require
to install the MySQL/Postgres server packages directly but using
a container serving that purpose, for those cases all the
remaining steps should be executed just skipping the
packages install.

Change-Id: I26628a31fdda3ce95ed04a2b7ae7b132c288581f
2022-01-10 09:26:56 +01:00
Zuul 6133c1c959 Merge "Only set chap algorithms if not openeuler" 2022-01-07 19:21:40 +00:00
Dr. Jens Harbott 807330ac37 Fix cloning requirements when GIT_DEPTH is set
We always need the master branch of requirements in order to be able to
install tempest with it, so override GIT_DEPTH when cloning that repo.

Closes-Bug: 1956616
Change-Id: Id0b409bfadd73f2c30314724178d6e199121050b
Signed-off-by: Dr. Jens Harbott <harbott@osism.tech>
2022-01-07 11:42:26 +01:00
Ade Lee ac958698d0 Only set chap algorithms if not openeuler
For some reason, setting the CHAPAlgorithms as in c3b705138
breaks OpenEuler.  Making this conditional so that tests continue
to pass.

Change-Id: Iaa740ecfbb9173dd97e90485bad88225caedb523
2022-01-06 15:20:07 -05:00
Eduardo Santos 4448f243f3 Fix public subnet creation command
There was no space after the --project option in the command that
creates the public subnet, thus if any option follows, the option itself
will be parsed as part of the value passed to the --project option. This
change just adds the missing space.

Change-Id: I1e7375578342a82717222e902fcd65a4a62e33a7
2022-01-06 14:03:16 -03:00
Zuul 9154bf543d Merge "Install OVS from source when it was configured like that" 2022-01-06 00:39:16 +00:00
Zuul e091481341 Merge "Fix tempest upper-constraints" 2022-01-05 10:57:21 +00:00
Zuul 3c98c21fec Merge "Fix mysqladmin failure for Fedora 34 and mariadb" 2022-01-04 19:23:59 +00:00
Zuul 0486d4ccf3 Merge "init_cinder() shouldn't always create DEFAULT_VOLUME_GROUP_NAME" 2022-01-04 18:50:10 +00:00
Zuul 7b0251cf37 Merge "Fix stacking without preconfigured DATABASE_PASSWORD" 2022-01-04 18:33:26 +00:00
Dr. Jens Harbott 2ef4a4c851 Fix tempest upper-constraints
When deploying devstack in a stable branch, the master branch is
available locally only in a CI environment where Zuul prepares all
available branches. For a non-CI deployment we need to stick to using
the remote branch as was the case before [0].

While the situation on the master branch isn't really broken, we apply
the fix here anyway so that future stable branches are created in a
working state.

[0] I5d42ac6b54bf20804d7e5faa39d1289102318b64

Closes-Bug: #1956219
Signed-off-by: Dr. Jens Harbott <harbott@osism.tech>
Change-Id: Ib7719cb2d48b34db70f885e0afe77d904abba3b5
2022-01-03 19:27:22 +01:00
Zuul 858aca019c Merge "Don't enable the dstat service in CI jobs" 2022-01-03 18:00:28 +00:00
Miguel Lavalle c1a75c6a50 Fix mysqladmin failure for Fedora 34 and mariadb
mysqladmin is incorrectly installed in Fedora 34 with mariadb. This
causes the failure of Zuul Fedora based jobs. The issue is a conflict
between mariadb and community mysql that is described in [1] and [2].

The workaround is to explicitly install package "mariadb"

Also configure an increased swap size like for the other platform jobs
in order to avoid OOM issues.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=2026933
[2] https://lists.launchpad.net/maria-discuss/msg06179.html

Closes-Bug: #1956116
Change-Id: Icf6d7e1af5130689ea10b29d37cc9b188b2c9754
2022-01-03 15:33:35 +01:00
Zuul 3155217fb6 Merge "openEuler 20.03 LTS SP2 support" 2021-12-30 12:04:44 +00:00
Zuul 1d7d8e6a17 Merge "Enable oslo.limit to be installed from git repo" 2021-12-30 10:54:09 +00:00
Zuul 71c215ac29 Merge "Revert "Generate deprecation warning for postgresql"" 2021-12-30 10:29:00 +00:00
Zuul 98df253eae Merge "Add option to set chap algorithms for iscsid for FIPS" 2021-12-30 10:28:57 +00:00
Zuul 559f8cc150 Merge "Use MDB backend in Ubuntu" 2021-12-30 10:28:54 +00:00
Zuul 13526abe84 Merge "cinder-backup: Ensure ca cert is defined when tls-proxy is enabled" 2021-12-30 09:32:21 +00:00
yatinkarel 05e622ead2 Use upper-constraints from in review changes
Currently upper-constraints.txt is not getting used
from in-review changes of requirements project and
leading to merge of broken requirements[1].

Use master branch to fetch constraints instead of
the remote branch.

[1] https://review.opendev.org/c/openstack/requirements/+/822575

Depends-On: https://review.opendev.org/c/openstack/requirements/+/823128
Change-Id: I5d42ac6b54bf20804d7e5faa39d1289102318b64
2021-12-29 09:48:39 +00:00
Dr. Jens Harbott 134205c138 Don't enable the dstat service in CI jobs
We still are seeing regular job failures because the pcp package fails
to install. Assume that we can still enable it on demand when someone
needs to debug specific job issues, let us just disable it by default.

Related-Bug: 1943184
Signed-off-by: Dr. Jens Harbott <harbott@osism.tech>
Change-Id: I32ef8038e21c818623db9389588b3c6d3f98dcad
2021-12-23 12:29:14 +01:00
Dr. Jens Harbott 353c3f9cb1 Fix stacking without preconfigured DATABASE_PASSWORD
When we need to read a DATABASE_PASSWORD from the user, make sure we
actually use it in our database URLs.

Signed-off-by: Dr. Jens Harbott <harbott@osism.tech>
Change-Id: I5ebf6b0280e82f2c87a63cbee7a9957c6bd26898
2021-12-23 12:07:29 +01:00
Slawek Kaplonski 5888947539 Clean up compile_ovn function's parameters
That function was accepting 3 positional arguments and first
of them was boolean value "build_modules" which isn't used anywhere in
that function.
So this patch cleans it a bit by removing that not used parameter.

Change-Id: I5c57b9116338a63b7bfb170c02e33bb4eae725da
2021-12-22 16:00:29 +01:00
Kevin Zhao 7880ba665e openEuler 20.03 LTS SP2 support
openEuler is an open-source Linux based operating system. The current
openEuler kernel is based on Linux and supports multi arch, such as X86_64
and aarch64. It fully unleashes the potential of computing chips. As an
efficient, stable, and secure open-source OS built by global open-source
contributors, openEuler applies to database, big data, cloud computing,
and AI scenarios. openEuler is using RPM for package management.

Note:
Currently there is no available package for uwsgi-plugin-python3 and ovn, so that
openEuler needs manually install them from source.

Website: https://www.openeuler.org/en/

Change-Id: I169a0017998054604a63ac6c177d0f43f8a32ba6
Co-Authored-By: wangxiyuan <wangxiyuan1007@gmail.com>
Signed-off-by: Kevin Zhao <kevin.zhao@linaro.org>
2021-12-22 14:47:27 +08:00
Slawek Kaplonski 24b65adc9c Deploy Neutron with enforced new RBAC rules
This patch adds new config option NEUTRON_ENFORCE_NEW_DEFAULTS which
if set to True will deploy Neutron with enforce new rbac defaults and
scopes.
It will also use SYSTEM_ADMIN user to interact with Neutron where it is
needed.

Depends-On: https://review.opendev.org/c/openstack/neutron/+/798821

Change-Id: I14d934f0deced34d74003b92824cad3c44ec4f5e
2021-12-20 14:42:35 +01:00
Ade Lee c3b7051387 Add option to set chap algorithms for iscsid for FIPS
The default CHAP algorithm for iscsid is md5, which is disallowed
under fips.  We will set the chap algorithm to "SHA3-256,SHA256",
which should work under all configurations.

Change-Id: Ide186fb53b3f9826ff602cb7fb797f245a15033a
2021-12-08 19:20:40 -05:00
Slawek Kaplonski 4185358837 Install OVS from source when it was configured like that
Function _neutron_ovs_base_install_agent_packages always tried to
install openvswitch from packages and start it using systemd units.
That was failing when ovs was expected to be installed from source.
This patch fixes that.

Change-Id: Iae8625dd800d30061ea3dbed9eb0dfbe16f21572
2021-12-08 14:09:49 +00:00
Zuul 6c849e3713 Merge "Support CentOS Stream 9" 2021-12-04 18:18:06 +00:00
Zuul a77943f8aa Merge "Remove unnecessary member role assignments from alt_demo" 2021-12-04 18:18:03 +00:00
Zuul 39acde91f9 Merge "Only write out uwsgi configs when deploying API services" 2021-12-04 17:33:24 +00:00
Lee Yarwood fc8ef86fbe Only write out uwsgi configs when deploying API services
Previously this would always happen for Nova and Cinder even if n-api
and c-api were not enabled on the host respectively.

This change stops this by placing both calls write_uwsgi_config behind
is_service_enabled checks.

Change-Id: I997685da771736dbad79bcfe4b00dbc63bd6d6b6
2021-12-03 12:09:08 +00:00
Lee Yarwood 31334f9a9b nova: Use noVNC 1.3.0 when installing from source
Additionally make the repo name lowercase to match the project name in
our zuul config so that jobs can check the repo out.

Change-Id: Ic2d9c4fa837461bbc29e067a81912b5f72efd3ca
2021-12-03 12:09:01 +00:00
Alfredo Moralejo 5ea4c3c18c Support CentOS Stream 9
This patch includes changes required to run devstack on CentOS Stream 9
which has been already published in official repos by CentOS team [1]:

- Add RDO deps repository for CS9.
- remove xinetd package from installation for swift. Note that
  rsync-daemon is installed which should work fine.
- Replace genisoimage by xorriso in CS9.
- Use /etc/os-release to identify the distro in CS9 as it doesn't
  provide lsb_release command.
- Use pip from rpm package instead of from get-pip.py as done in Fedora.
- Add non-voting job devstack-platform-centos-9-stream to the check
  pipeline.

Change-Id: Ic67cddabd5069211dc0611994b8b8360bcd61bef
2021-12-02 09:10:48 +01:00
Zuul 1414bcfa22 Merge "Remove unnecessary unset for project-scoped token in glance" 2021-12-01 11:27:33 +00:00
Zuul 7020daf7fc Merge "Cleanup keystone library" 2021-11-30 17:59:03 +00:00
Roman Dobosz bd68251463 Change a way for creating data dir in case of OVN.
Calculate the sudo usage with local variable.

Change-Id: I39dff770ff296dc06395acdb430a9cfe1722a30f
2021-11-27 08:12:04 +01:00
yatinkarel b575af0cfe Do not use sudo with OVN_DATADIR when building from source
Jobs with OVN_BUILD_FROMS_SOURCE=True are broken
since [1] as ovn nortd not starting due to permission
issues. Fix it by not using sudo for creating OVN_DATADIR
when building from source.

[1] https://review.opendev.org/c/openstack/devstack/+/806858

Closes-Bug: #1952393
Change-Id: I00f0c8c8173b4d8270fbb3e6079d0d8b332e9de5
2021-11-26 13:44:10 +05:30
Lance Bragstad afd0f84eae Remove unnecessary unset for project-scoped token in glance
Before, we needed to unset a couple of parameters that would make the
client return a project-scoped token instead of a system-scoped token,
which we need when interacting with registered limits in keystone.

This commit removes those unsets since we no longer source those
variables by default. This commit also cleans up some of the redundant
parameters in the registered limit calls, like region.

Change-Id: I1af8a168a29e895d57504d41e30efea271ea232d
2021-11-26 07:26:56 +00:00
Zuul acc9bd6ab9 Merge "Fix OVN DBs cleanup on startup" 2021-11-25 10:38:27 +00:00
Takashi Kajinami c20cd8ed9d cinder-backup: Ensure ca cert is defined when tls-proxy is enabled
Change-Id: Id679eb7061d8e609ce76fbb5b720a041990e8e86
2021-11-24 01:35:46 +09:00
Gregory Thiemonge 6822ff3944 Fix OVN DBs cleanup on startup
When initializing OVN, clean up the correct database directory when
using OVN from packages (/var/lib/ovn/ instead of /opt/stack/data/ovn/).
The /opt/stack/data/ovn location is used only when building OVN from
sources, so a fresh devstack deployment with OVN packages may already
have hundreds of existing routers and ports, creating ARP collisions.

Closes-Bug: #1942201
Change-Id: Ic90d4f2f9d8aaef825ea3325c0ad8fef2a1c5e39
2021-11-23 16:17:24 +01:00
Takashi Kajinami 65a5db8e33 keystone: Dot not set the removed admin_endpoint parameter
The admin_endpoint parameter has been removed from keystone[1], and
setting the parameter is no longer effective.

[1] 192cde56e57a06750641b319da8a72cdcaa554d0

Change-Id: I6ae6a3122668551acc018972624e914fcbb79a22
2021-11-23 12:03:20 +01:00
Lance Bragstad 1d8888dc24 Remove unnecessary member role assignments from alt_demo
This user already has the admin role assignment on a project, which
implies the member role, making explicit calls to add the member role
redundant.

Change-Id: I398c5e2f098aeeb896de83872085cbce529a778a
2021-11-22 21:28:20 +00:00
Zuul 94facb0759 Merge "Add missing ml2, L2 and L3 agent functions to devstack" 2021-11-19 01:10:09 +00:00
Julia Kreger c96993d138 Make OS_CLOUD be able to be configured
OS_CLOUD is used to communiate to CLI tools what cloud
credentials to utilize.
The change I86ffa9cd52454f1c1c72d29b3a0e0caa3e44b829
unfortunately set an explicit OS_CLOUD account which breaks
any jobs which are expecting a previosuly set OS_CLOUD which
may be different to work. For example, OS_CLOUD being set
as devstack-system-admin to facilitate Secure RBAC testing.

Change-Id: Iee900e552584dda622f57eea3508df48dff2e071
2021-11-18 10:39:36 -08:00
Slawek Kaplonski faed11d2a1 Add missing ml2, L2 and L3 agent functions to devstack
Previously those functions were defined in the neutron's devstack plugin
but with [1] we moved qos related code into devstack and we missed about
moving them too.
This is follow up patch to fix that issue.

[1] https://review.opendev.org/c/openstack/devstack/+/815686

Change-Id: Icf459a2f8c6ae3c3cb29b16ba0b92766af41af30
2021-11-18 16:42:40 +01:00
Zuul 487057de80 Merge "Add additional project personas for secure RBAC" 2021-11-18 00:22:24 +00:00
Zuul 8d7ac90f00 Merge "Stop creating userrc_early" 2021-11-17 19:49:59 +00:00
Dr. Jens Harbott f56f7a557a Stop creating userrc_early
We can use the devstack-admin cloud configuration everywhere now
and don't need to set environment variables with cloud credentials
any longer.

Fix the swift setup, where some more options need to be explicitly
specified now and the default OS_CLOUD setting overridden.

Signed-off-by: Dr. Jens Harbott <harbott@osism.tech>
Change-Id: I86ffa9cd52454f1c1c72d29b3a0e0caa3e44b829
2021-11-16 19:35:32 +01:00
Slawek Kaplonski f9a896c6e6 Rehome functions to enable Neutron's QoS service
Those functions were part of the neutron devstack plugin but we
discussed it during last PTG [1] and decided to move to the Devstack
repo plugins which are used by e.g. CI jobs which are defined outside
of the neutron repository.
QoS service is used e.g. in the tempest-slow job which is
defined in tempest and used by many different OpenStack projects.

[1] https://etherpad.opendev.org/p/neutron-yoga-ptg#L142

Change-Id: I48f65d530db53fe2c94cad57a8072e1158d738b0
2021-11-13 19:52:06 +00:00
Lance Bragstad 9c81321bfc Add additional project personas for secure RBAC
This commit formalizes some additional users to act as different project
users and updates clouds.yaml file so they're easy to use.

It creates:

  - a reader on the demo project
  - a reader on the alt_demo project
  - a member on the alt_demo project

With the adoption of secure RBAC personas, these are useful for using
OpenStack APIs as that work continues.

Change-Id: I3237a771275311377313b7d7d80ac059ac69d031
2021-11-13 20:41:43 +01:00
Zuul 483e7e243a Merge "Rehome functions to enable Neutron's placement integration" 2021-11-13 19:02:48 +00:00
Zuul 05e9cb1e19 Merge "Clarify error message for ERROR_ON_CLONE=True" 2021-11-12 22:18:44 +00:00
Dr. Jens Harbott 95555ba398 Cleanup keystone library
IDENTITY_API_VERSION is hardcoded to 3 in most locations already, drop
the remaining occurrences, but keep the variable definition since some
plugins still depend on it. Drop ENABLE_IDENTITY_V2 which no longer
has any effect.

Amend variable list for bootstrap_keystone().

Signed-off-by: Dr. Jens Harbott <harbott@osism.tech>
Change-Id: I06f476d2105bc6ec2b511fc5effcfcc3973eaf97
2021-11-10 06:24:15 +01:00
Zuul 55c7830b4b Merge "Update lib/keystone to add more system users" 2021-11-09 16:11:47 +00:00
Zuul 2000d0ccf3 Merge "neutron-legacy: Remove no longer necessary vpnaas conditional" 2021-11-09 13:59:10 +00:00
Lance Bragstad 021ae0bcc8 Update lib/keystone to add more system users
Keystone has supported system-scope since Queens and we already make
sure we create a cloud profile for system-admin in
/etc/openstack/clouds.yaml.

This commit ensures keystone creates a couple of new users to model
system-member and system-reader personas. Doing this by default in
devstack makes it easier for people to use.

We've already taken a similar approach in tempest by setting up the
various system personas for tempest clients to use.

Change-Id: Iceb7c5f517db20072e121dc7538abaa888423c67
2021-11-05 10:44:58 +01:00
Zuul d28865ba3d Merge "Run Bullseye with more swap" 2021-11-04 23:55:11 +00:00
Zuul a2d4d08b00 Merge "Allow cinder default quotas configuration" 2021-11-04 22:08:00 +00:00
Dr. Jens Harbott f8e00b86ae Run Bullseye with more swap
Since Bullseye like Centos 8 Stream needs more memory due to changed
default settings in newer qemu versions, set the swap size to 4G, which
is the same setting already being used for the CS8 jobs successfully.

Change-Id: I83ea34d6aa647d2ab9d4d78ed354904fce836e68
Signed-off-by: Dr. Jens Harbott <harbott@osism.tech>
2021-11-04 15:28:50 +01:00
Zuul 9101fbf5c4 Merge "Switch off creating a keystone admin endpoint by default" 2021-11-04 14:20:50 +00:00
Ghanshyam Mann 325792d9b9 Clarify error message for ERROR_ON_CLONE=True
If ERROR_ON_CLONE is set to True which is case for
all the devstack based job, devstack does not clone the
repo instead raise error. From current error message, it
is difficult to know that ERROR_ON_CLONE is True until we
traceback the code or check devstack-base job set ERROR_ON_CLONE
to True.

Current error message is like:
-------
+ functions-common:git_clone:560           :   echo
'The /opt/stack/oslo.limit project was not found; if this is a gate job, add'
  The /opt/stack/oslo.limit project was not found; if this is a gate job, add
+ functions-common:git_clone:561           :   echo 'the project to the
 $PROJECTS variable in the job definition.'
the project to the $PROJECTS variable in the job definition.
+ functions-common:git_clone:562           :   die 562 'Cloning not
  allowed in this configuration'
--------

Adding ERROR_ON_CLONE info in error message will help to
know the reason of devstack not cloning the repo.

Change-Id: I9e9852f046fefb299b4ef4446323e9c86437212f
2021-11-03 19:34:19 +00:00
Zuul c053269fc3 Merge "Make creation of keystone admin endpoint optional" 2021-11-03 12:30:10 +00:00
Zuul fb2e741008 Merge "Stop creating a keystone admin site" 2021-11-03 12:30:07 +00:00
Zuul bca0448438 Merge "Create clouds.yaml early enough" 2021-11-02 17:54:37 +00:00
Slawek Kaplonski 7f6d9283b8 Rehome functions to enable Neutron's placement integration
Those functions were part of the neutron devstack plugin but we
discussed it during last PTG [1] and decided to move to the Devstack
repo as plugins which are used by e.g. CI jobs which are defined outside
of the neutron repository.
Placement integration is used e.g. in the tempest-slow job which is
defined in tempest and used by many different OpenStack projects.

[1] https://etherpad.opendev.org/p/neutron-yoga-ptg#L142

Change-Id: Ib86071881f16de1b69c0f9b1b19b6df8b7e66a07
2021-10-27 16:40:30 +02:00
Zuul c8134987c9 Merge "Use Nehalem CPU model by default" 2021-10-22 13:27:53 +00:00
Zuul af23507c34 Merge "Fix use of yaml.load()" 2021-10-22 12:00:35 +00:00
Clark Boylan e06d954229 Use Nehalem CPU model by default
CentOS/RHEL 9 are being compiled for the x86_64-v2 architecture which is
newer than the qemu default of qemu64. This means that for devstack to
boot these instances we need a newer CPU model. Nehalem is apparently
the oldest model that works for x86_64-v2 and is expected to work on
Intel and AMD cpus with kvm or qemu. Switch devstack to this model by
default.

Note that we cannot use host-passthrough or host-model because we want
to support live migration between devstack deployed nova-compute
instances and even within the CI instances that we get the host CPUs can
differ.

Also, we should run this change against as many clouds as possible to
ensure that the newer model works across all of our clouds. There is
some fear that the virtual CPUs presented to us in some clouds may not
be able to run these newer CPU models.

Change-Id: Ibd6e11b59f3c8655bc60ace7383a08458b2177f2
2021-10-21 08:15:12 -07:00
Zuul 6923f7b5e6 Merge "Enable running on Debian Bullseye" 2021-10-20 14:56:29 +00:00
Tristan Cacqueray 4aa27976eb [ci] Remove the implied-branches pragma
This change enables using devstack job with custom branche names.

Change-Id: I95c368f05042a6f8f208988af9a6d89a522a5526
2021-10-19 21:48:17 +00:00
Jens Harbott b538b3267c Switch off creating a keystone admin endpoint by default
With the depending patch, the endpoint will still be created for
heat tests, so we can turn it off for everyone else.

Depends-On: https://review.opendev.org/c/openstack/openstacksdk/+/777343
Change-Id: I0dc7d6cedd07e942b9f23b26a785b386aff41fbc
2021-10-17 17:44:13 +00:00
Jens Harbott eb37657d8e Make creation of keystone admin endpoint optional
The keystone admin endpoint technically isn't different any longer from
the other keystone endpoints in v3 of the API. However, some
applications like heat are still relying on it to exist.

So we make the creation of the admin endpoint during bootstrap optional
here, with the intention to change the default to False once all jobs
that still need this are modified to explicitly require it.

Change-Id: I7ab12141c558186e397c174c248a613d1810011b
2021-10-17 19:36:46 +02:00
Zuul 79356c41cd Merge "Don't fail if there is no nf_conntrack_proto_gre module available" 2021-10-17 16:33:33 +00:00
Jens Harbott c2491bac9d Stop creating a keystone admin site
Keystone no longer has any special functionality hidden behind the admin
site. KEYSTONE_AUTH_URI which used to point to the admin site has long
ago been changed to be a copy of KEYSTONE_SERVICE_URI, which points to
the public site.

Drop all KEYSTONE_AUTH_* variables except KEYSTONE_AUTH_URI which may
still be in use in some plugins.

This also allows to finally drop the fixup_keystone() function.

Change-Id: I549f3cadc27d137e014241cdd47e90267859c848
2021-10-17 17:11:03 +02:00
Jens Harbott ee1c614eda Fix use of yaml.load()
The use of this function has been deprecated for a long time[0]. With
PyYAML==6.0 the call is now failing, so replace it with the safe
version.

[0] https://msg.pyyaml.org/load

Signed-off-by: Jens Harbott <frickler@offenerstapel.de>
Change-Id: I7a170262b50a5c80a516095b872d52e1bea5479d
2021-10-16 17:33:12 +02:00
OpenStack Proposal Bot c027ddd3f8 Updated from generate-devstack-plugins-list
Change-Id: I1abc356970a7f2427bc9683a7e64e54ab52a7651
2021-10-16 06:26:49 +00:00
Dr. Jens Harbott 84901f563e Create clouds.yaml early enough
When using glance limits, the create_glance_accounts call needs access
to the devstack-system-admin cloud definition, so we need to create
the clouds.yaml file before that step.

Change-Id: Ie6d807c46b88b16b316aa166870a6a13f2bb346d
Signed-off-by: Dr. Jens Harbott <harbott@osism.tech>
2021-10-15 15:07:15 +02:00
Slawek Kaplonski b4e683e6b9 Don't fail if there is no nf_conntrack_proto_gre module available
It may be that it is already compiled in the kernel so there is no
need to load kernel module in such case.

Change-Id: Ie1d32e3fd529e13958857cb3ced6710eebde1e4d
2021-10-14 13:50:30 +02:00
Zuul 82facd6edf Merge "Fix updating setuptools in Centos" 2021-10-12 20:43:00 +00:00
Zuul 10d20b14e7 Merge "Further fixup for Ubuntu cloud images" 2021-10-11 09:26:28 +00:00
Zuul d603c2a459 Merge "Remove cinder from service names" 2021-10-11 08:27:27 +00:00
Zuul 23cbf138b4 Merge "tools: Fix use of continue" 2021-10-11 08:10:36 +00:00
Zuul e2e88dc19a Merge "Fix displaying usage for make_cert.sh" 2021-10-11 00:53:22 +00:00
Zuul 2e336ee79f Merge "Rehome functions to enable Neutron's Trunk service plugin" 2021-10-11 00:51:51 +00:00
Dr. Jens Harbott 61a37bff9a Further fixup for Ubuntu cloud images
The official Ubuntu cloud images have some further python pkgs
preinstalled that conflict with our requirements. Allow to
overwrite them.

Signed-off-by: Dr. Jens Harbott <harbott@osism.tech>
Closes-Bug: 1871485
Change-Id: I793c250cae5e7b9bc835b7016d790d1f9ae8a7f3
2021-10-08 11:04:03 +02:00
Slawek Kaplonski f758b60a4b Rehome functions to enable Neutron's Trunk service plugin
Those functions were part of the neutron devstack plugin but we
discussed on the neutron team meeting [1] to move it to the Devstack
repo as it's mature enough now.

[1] https://meetings.opendev.org/meetings/networking/2021/networking.2021-10-05-14.00.log.html#l-156

Change-Id: I35446adad1d8a7fed142d834de20c48b611015a5
2021-10-06 12:04:26 +02:00
Michal Berger bfc79dc98b tools: Fix use of continue
continue is not used in a proper context here (outside of loop). Use
null cmd instead to simply fall through the pip installation.

Signed-off-by: Michal Berger <michallinuxstuff@gmail.com>
Change-Id: Iaea2e5c0177b475edf19d08d71933a74debbb5d9
2021-10-05 15:44:45 +02:00
Lee Yarwood 714826d1a2 nova: Ensure each compute uses a unique iSCSI initiator
The current initiator name embedded in our CI images is not unique at
present and can often cause failures during live migrations with
attached volumes. This change ensures the name is unique by running
iscsi-iname again and overwriting the existing name.

We could potentially do this during the image build process itself but
given that devstack systems are not supposed to be multi-purpose this
should be safe to do during the devstack run.

Closes-Bug: #1945983
Change-Id: I9ed26a17858df96c04be9ae52bf2e33e023869a5
2021-10-05 11:36:24 +01:00
Jens Harbott 959a7c262a Enable running on Debian Bullseye
Some adaption in database handling is all that is missing. Also add a
platform job that tests this.

Co-Authored-By: Radosław Piliszek <radoslaw.piliszek@gmail.com>
Change-Id: I6dd3e48444dd415d84df5e7f5c74540847cdd6db
2021-10-04 17:27:33 +02:00
melanie witt c7791301be Enable oslo.limit to be installed from git repo
oslo.limit isn't currently in the list of libraries that can be
installed from a git repo via LIBS_FROM_GIT.

This adds oslo.limit to enable integrated testing against unmerged
oslo.limit changes.

Change-Id: I26cc567fdf4c84014040ae586bbb029b8de7a236
2021-10-01 17:30:52 +00:00
Lee Yarwood 982b03c605 zuul: Remove dedicated devstack-async job
I83d56c9363d481bb6d5921f5e1f9b024f136044b switched the default of
DEVSTACK_PARALLEL over to True so this dedicated job is no longer
required as *all* jobs should now be using it.

Change-Id: I0f475ab177c2cd49eeb6be861cdd11581e8e0b97
2021-09-30 13:08:35 +01:00
Jens Harbott 56e75e4aef Fix uwsgi config for trailing slashes
The apache mod_proxy documentation[0] says that trailing slashes need to
match for the ProxyPass statement. Since adding a slash to the redirected
url would break things that need to access endpoints like /identity
without anything added, we need to drop the trailing slash for the
target URL. See [1] for the discussion of the CVE fix that changed the
previous behavior.

[0] https://httpd.apache.org/docs/trunk/mod/mod_proxy.html#proxypass
[1] https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/1945274

Depends-On: https://review.opendev.org/c/openstack/devstack/+/811389
Change-Id: Ia6b1a41957833fba87a2e6f048d2483267632385
2021-09-28 20:05:08 +02:00
Rajat Dhasmana 65b46a503a Remove cinder from service names
In devstack job, cinder is not a valid service name and logs error
in gate[1] so remove it.

2021-09-28 05:44:47.791807 | controller | + functions-common:service_check:1603      :   for service in ${ENABLED_SERVICES//,/ }
2021-09-28 05:44:47.795506 | controller | + functions-common:service_check:1605      :   sudo systemctl is-enabled devstack@cinder.service
2021-09-28 05:44:47.809647 | controller | Failed to get unit file state for devstack@cinder.service: No such file or directory

[1] https://e978bdcfc0235dcd9417-6560bc3b6382c1d289b358872777ca09.ssl.cf1.rackcdn.com/801989/7/check/tempest-integrated-storage/779d1e7/job-output.txt

Change-Id: I7ca105201d82b72c7e56778425d3bce7c76047db
2021-09-28 03:13:28 -04:00
Ghanshyam Mann 8d1bfcacf8 Update DEVSTACK_SERIES to yoga
stable/xena branch has been created now and
current master is for yoga.

Change-Id: I0c7809bdac6482bb947f394b0c2535fabb4cf067
2021-09-24 18:01:09 -05:00
Brian Haley c9f3e5bdd7 Fix stackrc os-resource-classes typo
Attempting to use LIBS_FROM_GIT="ALL" results in a failure
due to a typo in stackrc for os-resource-classes repo.

  Cloning into '/opt/stack/os-resource-classes'...
  fatal: protocol ':-https' is not supported
  <snip>
  [ERROR] /opt/stack/devstack/functions-common:629 git call failed: [git clone :-https://opendev.org/openstack/os-resource-classes.git /opt/stack/os-resource-classes --branch master]

Remove the extraneous '='.

Change-Id: I21f86324dc15fe808b38e366f7af18c96fd3890c
2021-09-16 11:43:03 -04:00
Zuul 069b0bf4a9 Merge "Glance remote worker should use own cache directory" 2021-09-14 09:08:59 +00:00
OpenStack Proposal Bot 6c8bd96f72 Updated from generate-devstack-plugins-list
Change-Id: If2ea45a2cc7993a9a80187092f2750496e7c8ab7
2021-09-09 06:10:23 +00:00
Radosław Piliszek a38d41ed92 Drop dep on libmysqlclient-dev
It was required to build MySQL-python bindings but, for some time,
we test and rely solely on PyMySQL which is pure Python and hence
does not require this dep.

This package is going away as distros move towards MariaDB.

Change-Id: I6004ccf28a23009a0fc07bfc9458b59a927b969a
2021-09-08 07:51:47 +00:00
Zuul 591e15a3dc Merge "Configure access to physical network also with ML2/OVN backend" 2021-08-31 20:47:21 +00:00
Slawek Kaplonski b1a89eb80b Configure access to physical network also with ML2/OVN backend
Neutron L3 module in Devstack has way to conigure access to physical
network on the node. It can put physical interface to the physical
bridge or, in case when such physical device isn't set, it creates
NAT rule in iptables.

There was missing the same operation for ML2/OVN backend as L3 agent is
not used there at all.

This patch adds the same to be done in both L3 agent and ovn_agent
modules.

Closes-Bug: #1939627
Change-Id: I9e558d1d5d3edbce9e7a025ba3c11267f1579820
2021-08-31 12:41:47 +00:00
Zuul e102559f87 Merge "Set swap size to 4G for c8 jobs" 2021-08-25 16:28:43 +00:00
Zuul ab2a529714 Merge "swift: Fix the empty gid option in rsyncd.conf" 2021-08-24 20:38:27 +00:00
Zuul 48945c5968 Merge "Make Ironic job as voting" 2021-08-24 15:29:13 +00:00
Zuul e3682892a3 Merge "make swift-dsvm-functional job as voting" 2021-08-24 15:23:40 +00:00
Takashi Kajinami 25f84277ea swift: Fix the empty gid option in rsyncd.conf
This change fixes the empty value set to the gid option in rsyncd.conf,
which was caused by reference to the invalid USER_GROUP variable, and
ensures the option is set to the group which STACK_USER belongs to.

This also fixes duplicate declaration of the local user_group variable.

Closes-Bug: #1940742
Change-Id: Ifd0a5ef0bc5f3647f43b169df1f7176393971853
2021-08-21 21:58:11 +09:00
Zuul c807a8bbff Merge "nova: Enable apic removal workaround for bug #1939108 when using QEMU" 2021-08-21 02:51:24 +00:00
OpenStack Proposal Bot 14b7fc5003 Updated from generate-devstack-plugins-list
Change-Id: I924cdf727818b33d71fe71ac110f224164c6b453
2021-08-20 06:13:36 +00:00
Lee Yarwood 1e86a25cc2 nova: Enable apic removal workaround for bug #1939108 when using QEMU
This change enables [workarounds]libvirt_disable_apic when devstack is
deployed using the libvirt virt driver and qemu virt type in an effort
to avoid issues outlined in bug #1939108 caused by the older kernel
currently used in Cirros 0.5.2.

Depends-On: https://review.opendev.org/c/openstack/nova/+/766043
Closes-Bug: #1939108
Change-Id: Ibb6c34133bb1c95ef11cc59d9b12a0f65502c61b
2021-08-19 14:25:53 +01:00
Radosław Piliszek 8b8a4c75b7 Remove libvirt-python from upper-constraints
... when installed from distribution.

This is mostly to fix Ironic's gate as their ecosystem is too
broad and complex to quickly remove libvirt-python from all
possible requirements.txt

More details inline.

See also: https://review.opendev.org/c/openstack/devstack/+/798514
aka f0bf2bdff1

Change-Id: Ic44daf15e952bbe3c424984ffb2474261e68008f
2021-08-18 15:01:27 +00:00
Ghanshyam Mann 31f0418bad Make Ironic job as voting
ironic-tempest-ipa-wholedisk-bios-agent_ipmitool-tinyipa
job is voting on Ironic and neutron gate which mean it is
stable enough and make sense to make it voting on devstack gate too.

ironic-tempest-ipa-wholedisk-bios-agent_ipmitool-tinyipa is alias
job of ironic-tempest-bios-ipmi-direct-tinyipa so using the original
job instead of alias
- https://opendev.org/openstack/ironic/src/branch/master/zuul.d/ironic-jobs.yaml#L784

Change-Id: I95c67ad69e6eae6a72d25a851a71b7de85e56fd2
2021-08-17 08:49:28 -05:00
Ghanshyam Mann ed323805f2 make swift-dsvm-functional job as voting
swift-dsvm-functional job test swift under python3 and
voting on swift gate whihc means this is a stable job now,
let's make this voting to devstack gate too.

Removing swift-dsvm-functional-py3 job as it does not exist anymore
after- https://review.opendev.org/c/openstack/swift/+/731318

swift-dsvm-functional itself is py3 job now.

Change-Id: I58847f74306194eaad132680815101a134fb4022
2021-08-17 08:45:02 -05:00
Grzegorz Grasza 26f8149218 Use MDB backend in Ubuntu
The MDB backend is the default in Ubuntu and specifying
HDB in debconf doesn't change it to HDB.

Closes-Bug: #1939700
Change-Id: If98f7fc8395678365fb73f0c5cd926cef083e470
2021-08-17 09:41:33 +02:00
Zuul ebc7b0ed25 Merge "Simplify pip install" 2021-08-12 19:54:55 +00:00
Zuul 5585d84c92 Merge "Support optimized cinder backend for glance" 2021-08-12 18:54:55 +00:00
yatinkarel 60b5538c33 Set swap size to 4G for c8 jobs
Tempest is failing randomly with different reasons
as mentioned in the bug, updating swap size those
issues are not seen.

Before [1] default swap size used to be 8GB but was dropped
to 1G so need to configure it in required job itself.

Did couple of tests in [2] and with 4GB+ swap jobs are
running green. On investigation found that with qemu-5
both Ubuntu and CentOS jobs have memory crunch, currently
Ubuntu jobs are not impacted as they are running with
qemu-4.

[1] https://review.opendev.org/c/openstack/openstack-zuul-jobs/+/750941
[2] https://review.opendev.org/c/openstack/devstack/+/803144

Closes-Bug: #1938914
Change-Id: I57910b5fde5ddf2bd37d93e06c1aff77c6e231e9
2021-08-12 21:27:13 +05:30
Zuul bdf454f411 Merge "Add devstack-enforce-scope job to enable the rbac scope checks" 2021-08-12 14:52:21 +00:00
Zuul 78a07d709c Merge "Add Fedora 34 support" 2021-08-12 14:29:59 +00:00
Zuul e7bb05d3f0 Merge "install_pip: Use packaged pip on Fedora" 2021-08-12 14:29:57 +00:00
Zuul ca3407cd88 Merge "install_pip: don't fail when not installed" 2021-08-12 14:29:54 +00:00
Zuul 57a868dd87 Merge "Revert "Workaround for new pip 20.3 behavior"" 2021-08-12 14:27:46 +00:00
Ghanshyam Mann 6fecfd4fff Add devstack-enforce-scope job to enable the rbac scope checks
keystone has system scope feature implemented since
queens release. Now Devstack also started moving towards the new RBAC.

This commit adds a new job 'devstack-enforce-scope' which enable the
scope checks on service side and see if devstack setting are fine or not.

This job will be expanded to enable the scope checks for the other service
also once they start supporting the system scope.

This will help us to test the scope check setting.

Change-Id: Ie9cd9c7e7cd8fdf8c8930e59ae9d297f86eb9a95
2021-08-11 10:32:42 -05:00
Ian Wienand 8dac135cb8 Simplify pip install
The uninstall here has been around since
Ibb4b42119dc2e51577c77bbbbffb110863e5324d.  At the time, there might
have been conflicts between packaged and installed pip.  We don't need
it today; get-pip.py keeps itself separate enough in /usr/local on all
platforms.  Thus we can also remove the suse/centos special-casing.

python3-pip is in the RPM list so we don't need to
re-install for Fedora.

Add a note on why we are over-installing pip.

Remove some old setuptools workarounds that are commented out.

Change-Id: Ie3cb81a8ff71cf4b81e23831c380f83b0381de71
2021-08-11 15:00:18 +10:00
Ian Wienand 156ccbad85 Add Fedora 34 support
* update the support distro filter

* don't install xinetd which doesn't exist in F34 any more.  I think
  there is probably a bit more to do with swift ring-server but that
  can be a problem for another time.

* remove old F31 workaround

Change-Id:If2f74f146a166b9721540aaf3f1f9fce3030525c
2021-08-11 14:07:21 +10:00
Ian Wienand a20971850a install_pip: Use packaged pip on Fedora
This uses the python3-pip package for Fedora but maintains the status
quo for existing distributions (i.e. for Suse we run get-pip.py but
don't uninstall, and for everything else we uninstall python3-pip and
run get-pip.py to be running the latest pip).

As noted inline, installing get-pip.py over Fedora 34's package no
longer works, and likely won't ever work again.  Unlike the LTS
distributions, the Fedora pip should be more up-to-date, so I think
it's best we just avoid any package overwrites.

Change-Id: I84129aadfcf585bb150a3daa39616246d3d84bbd
2021-08-11 14:07:17 +10:00
Abhishek Kekane 00ac547aca Glance remote worker should use own cache directory
Earlier glance remote worker was using same cache directory used by
glance worker. Ideally both should use their own cache directory.

This patch makes provision for the same by setting different path
for image_cache_dir config option.

Change-Id: If2627e9c212fd765b96d925046c04e9cb1001c3d
2021-08-10 16:26:35 +00:00
Ghanshyam 26bd94b45e Revert "Add enforce_scope setting support for keystone"
This reverts commit 9dc2b88eb4.

Reason for revert: Devstack creation/setup the things are not yet moved to scope tokens so we need to wait for that first and then do the scope check enable globally. 

Change-Id: If0368aca39c1325bf90abd23831118b89e746222
2021-08-10 09:54:01 -05:00
Zuul 971dfbf8a0 Merge "Allow to install os-resource-classes from git repo" 2021-08-10 06:57:20 +00:00
Ian Wienand 2df2aa0158 install_pip: don't fail when not installed
On some platforms, "python -m pip" isn't available.  Currently this is
run undconditionally from the "get_versions" function; remove the call.

Change-Id: I91d6c66d055f02fa7b4368593b629933f82d8117
2021-08-10 14:36:30 +10:00
Ian Wienand 6b9a564622 Revert "Workaround for new pip 20.3 behavior"
This reverts commit 7a3a7ce876 and
bcd0acf6c0 and part of
f1ed7c77c5 which all cap our pip
installs.

Given the pip ecosystem can often incorporate major changes, tracking
upstream at least generally gives us one problem at a time to solve
rather than trying to handle version jumps when LTS distros update.

The new dependency resolver included some changes that disallow
setting URL's like "file:///path/to/project#egg=project" in
constraints.  Apparently the fact it used to work was an accident of
the requires/constraints mechanism; it does make some sense as the URL
doesn't really have a version-number that the resolver can put in an
ordering graph.

The _setup_package_with_constraints_edit function comment highlights
what this is trying to do

 # Updates the constraints from REQUIREMENTS_DIR to reflect the
 # future installed state of this package. This ensures when we
 # install this package we get the from source version.

In other words; if constraints has "foo==1.2.3" and Zuul has checked
out "foo" for testing, we have to make sure pip doesn't choose version
1.2.3 from pypi.

It seems like removing the entry from upper-requirements.txt is the
important part; adding the URL path to the on-disk version was just
something that seemed to work at the time, but isn't really necessary.
We will install the package in question which will be the latest
version (from Zuul checkout) and without the package in
upper-requirements.txt nothing will try and downgrade it.

Therefore the solution proposed here is to remove the adding of the
URL parts.

This allows us to uncap pip and restore testing with the new
dependency resolver.

Closes-Bug: #1906322
Change-Id: Ib9ba52147199a9d6d0293182d5db50c4a567d677
2021-08-10 14:22:35 +10:00
Roman Dobosz ac1b723c20 Fix displaying usage for make_cert.sh
Now, if no arguments are passed to make_cert.sh script, it will fail on:

  tools/make_cert.sh: line 30: [: missing `]'

and might go on with generating certs depending on the bash settings.
It is fixed within this patch.

Change-Id: I62bf9c972ebd1644da622439e05114f245f20809
2021-08-06 12:55:39 +02:00
Zuul e937dcb743 Merge "Fix Usage of rdo-release rpm" 2021-08-05 01:36:47 +00:00
Brian Rosmaita f44aa0c55a Allow cinder default quotas configuration
The default cinder quotas for volumes, backups, or snapshots may
be too low for highly concurrent testing, so make these configurable
in devstack.

Change-Id: Ie3cf3239b48f9905f5760ad0166eea954ecf5eed
2021-08-04 18:27:48 -04:00
OpenStack Proposal Bot ba68a49598 Updated from generate-devstack-plugins-list
Change-Id: I062b9a121c79650973c8d8d975e1c723d5798777
2021-07-31 06:13:46 +00:00
yatinkarel 0456baaee5 Fix Usage of rdo-release rpm
rdo-release.el8.rpm rpm points to latest RDO release,
so use it for master, for stable releases use corresponding
release rpm.

Change-Id: I508eceb00d7501ffcfac73d7bc2272badb241494
2021-07-30 19:32:51 +05:30
Zuul 3e58254d38 Merge "Switch fedora-latest to use fedora-34" 2021-07-29 23:49:31 +00:00
Marek Tamaskovic 524487728e Fix opening shell as user 'stack'
The usage of sudo with su is not recommended. It results in incosnistent
environment variables. Instead use just sudo with appropriate arguments.
The argument '-u stack' specifies that the sudo will execute as user 'stack'.
The last argument '-i' will launch an interactive shell.

Closes-Bug: #1938148

Change-Id: I42387660480377cdf9a0b04f190e7e1f21fb354f
2021-07-28 17:03:52 +02:00
Zuul 13f02e8b76 Merge "Enable tempest tests for hostname sanitization" 2021-07-27 10:33:00 +00:00
Zuul 5d380b6f7f Merge "zuul: Add /etc/libvirt to log collection" 2021-07-26 20:34:10 +00:00
Pavan Kesava Rao 71bd10e451 Enable tempest tests for hostname sanitization
Starting Wallaby release, nova sanitizes instance hostnames having
freeform characters with dashes. It should be tested in Devstack.

Depends-On: https://review.opendev.org/c/openstack/tempest/+/795699
Change-Id: I54794e58b67620c36e8f2966ec3b62dd24da745b
2021-07-22 12:15:16 -04:00
Zuul a5ed116814 Merge "Add enforce_scope setting support for Glance" 2021-07-20 16:42:45 +00:00
Zuul 015622115e Merge "Add enforce_scope setting support for Cinder" 2021-07-20 16:42:43 +00:00
Zuul 5162d0fd07 Merge "Add configuration notes about glance limits" 2021-07-19 20:29:18 +00:00
Zuul 373d1f3879 Merge "Provide override for glance image size limit" 2021-07-19 20:29:15 +00:00
Zuul 92cb77b93e Merge "libvirt: Stop installing python bindings from pip" 2021-07-19 18:27:41 +00:00
Dan Smith c8b66ff33e Add configuration notes about glance limits
Change-Id: I21a43584116f4b719cf99d3942044cbf13fefb9a
2021-07-19 11:25:09 -07:00
Julia Kreger 5a642450d6 Provide override for glance image size limit
The glance image size limitation was added and unfortuantely
does prevent larger images from being uploaded to glance. In the
case of all baremetal testing, this value is realistically smaller
than stock "cloud" images which support booting to baremetal with
often requisite firmware blobs, which forces some images over 1GB
in size.

Adds GLANCE_LIMIT_IMAGE_SIZE_TOTAL which allows users who need
larger images to be able to override the default while still
enabling limits enforcement in their deployment. The default
value is 1000.

Change-Id: Id425aa546f1a5973bae8be9c017782d18f0b4a47
2021-07-19 10:13:42 -07:00
Zuul 4465472270 Merge "Configure glance unified limit quotas" 2021-07-17 09:09:49 +00:00
Zuul 7f5e4ed4f3 Merge "Add enforce_scope setting support for keystone" 2021-07-16 16:17:31 +00:00
zenkuro 6f4eafb823 Added AlmaLinux to CentOS 8 family
Change-Id: I9fb6f010842a495c838d468b47dc5081596f41a2
2021-07-15 21:47:23 +03:00
Zuul 0d5ba5b250 Merge "Make explicit the network backend used in the CI jobs" 2021-07-11 19:00:41 +00:00
Zuul 6c46859f7e Merge "Use specific credentials for tempest plugin setup" 2021-07-07 22:31:48 +00:00
Przemyslaw Szczerbik 1ab63132df Allow to install os-resource-classes from git repo
Example local.conf config snippet:

LIBS_FROM_GIT="os-resource-classes"
OS_RESOURCE_CLASSES_REPO="${LOCAL_GIT_BASE}/os-resource-classes"
OS_RESOURCE_CLASSES_BRANCH="dev_branch"

Closes-Bug: #1934784
Change-Id: I972a2a49aa816433152e5cfac4f672c0465d083f
2021-07-06 14:48:21 +02:00
Lee Yarwood f0bf2bdff1 libvirt: Stop installing python bindings from pip
As set out in bug #1933096 these bindings are dynamically built against
the version of libvirt present in the environment at build time.

As a result using a pre-built wheel can cause AttributeError's when the
bindings have previously been built elsewhere against an older version
of libvirt installed on the host. This is currently the case in CentOS 8
stream based CI jobs where we try to use 7.4.0 bindings that appear to
be built against libvirt <= 6.10 leading to bug #1933096.

This change seeks to avoid this by installing the bindings from packages
that will always be built against the correct corresponding version of
libvirt.

Change-Id: I76184c17a776c4e1ecaab9549d9d36c8c07c60fa
Closes-Bug: #1933096
2021-06-29 11:53:22 +01:00
Zuul 94d7cacfe2 Merge "Revert edk2 workaround" 2021-06-25 10:16:44 +00:00
Lee Yarwood 2175ff3108 zuul: Add /etc/libvirt to log collection
Useful when debugging libvirtd issues such as bug #1912310.

Related-Bug: #1912310
Change-Id: Ic8504bd61316e44215672cc44436a3b9a19e114d
2021-06-25 10:59:52 +01:00
Rodolfo Alonso Hernandez bf13075632 Make explicit the network backend used in the CI jobs
All Neutron CI jobs (except for unit, functional and fullstack jobs),
have explicitly defined the network backend used:
- linuxbridge
- ovs
- ovn

That was discussed and approved during the Neutron CI meetings [1].

[1]https://meetings.opendev.org/meetings/neutron_ci/2021/neutron_ci.2021-06-15-15.00.log.html

Depends-On: https://review.opendev.org/c/openstack/neutron/+/797051
Change-Id: Ib14542311e9b1d49829bef54f433b8a04709a9fd
2021-06-23 13:03:52 +00:00
Zuul 2e559c7dfb Merge "os_vif: Add support for configuring os_vif_ovs plugin" 2021-06-22 19:03:33 +00:00
Julia Kreger 5c9affdd9a Use specific credentials for tempest plugin setup
The tempest plugin expects the classic environment variables
to be present for credentials to access the cloud, but this is
wrong in cases where we're trying to setup system
scoped services and need to remove the environment variables
that was being used.

Instead, change the plugin to use the os-cloud entry definitions,
and specifically in this case devstack-admin which makes sense
until we begin to start to make tempest itself scope aware.

We likely will want to change the environment variables from being
registered in devstack at some point and completely shift towards
passing an-os-cloud parameter, but that is outside the scope of
this change as doing so will likely break all plugins.

Change-Id: I8d4ec68f116eea07bc7346f939e134fa2e655eac
2021-06-22 14:49:12 +00:00
Gregory Thiemonge a5d52831dc Fix updating setuptools in Centos
In RHEL-based distributions, updating setuptools using pip removes the
files from the python3-setuptools RPM. It breaks some tools such as
semanage (which is used by diskimage-builder) that use the -s flag of
the python interpreter (don't import modules from /usr/local).
This commit reinstalls python3-setuptools to fix those applications.

Change-Id: Ib44857e83f75acf37823fae912960a801c83cf7f
2021-06-21 09:58:47 +02:00
Gregory Thiemonge 7befae663c Delay horizon startup
Move the 'Starting Horizon' task after the end of the wait for
create_flavors.
The start_horizon function restarts the httpd server, the openstack
services are unavailable during a short period of time, so the
"openstack flavor create" calls might fail randomly.

Closes-Bug: #1932580
Change-Id: I32ee7457586e3de8ba4dfce3b1a12025f9776542
2021-06-19 14:19:26 +02:00
Sean Mooney 5344885a61 os_vif: Add support for configuring os_vif_ovs plugin
This change add an os-vif lib that declares two new variables
OS_VIF_OVS_OVSDB_INTERFACE and OS_VIF_OVS_ISOLATE_VIF

The former is introduced to workaround bug #1929446 which cause the nova
and neutron agents to periodically block waiting for ovs to respond.

OS_VIF_OVS_ISOLATE_VIF is added to address bug #1734320 when using
ml2/ovs vif isolation should always be used to prevent cross tenant
traffic during a live migration.  This makes devstack more closely
mirror reality by enabling it when ml2/ovs is used and disabling it
otherwise.

Related-Bug: #1734320
Related-Bug: #1929446
Related-Bug: #1912310
Change-Id: I88254c6e22b52585506ee4907c1c03b8d4f2dac7
2021-06-18 14:05:39 +00:00
Radosław Piliszek 808331488d Revert edk2 workaround
It is not needed anymore.

Change-Id: I706a33b0a7c737a23b9a7270af1e53e5de83c66f
2021-06-18 12:06:02 +00:00
Julia Kreger 6af3cb9eb2 nova ironic-hypevisor - support scoped auth config
The Secure RBAC effort has updated Ironic such that it
can support a mode where it is scope enforcing for all
interactions with the API. Due to the design, and operating
nature of Ironic's API, services speaking with it must
authenticate with a system scope to have a full picture
of the universe.

In this case, we need to update the nova configuration
accordingly such that the compute service understands
how to talk to ironic so that it can see the nodes under
management.

Ironic will likely update this again at a later point in
time to enable a "hybrid" mixed-mode as the operating model
and related permissions *should* allow nova to use a project
scoped "owner" account with Ironic, in order to access
and command nodes to deploy. But at this time, we're
focusing on the exclusive operating mode.

Change-Id: I1946725ce08c495178c419eaf38829f921c91bbe
Needed-By: https://review.opendev.org/c/openstack/ironic/+/778957
2021-06-15 11:32:45 -07:00
Zuul 74bcc0b4ef Merge "Drop broute from ebtables_dump" 2021-06-15 07:13:31 +00:00
Artem Goncharov 89baa314c1 Temporary add feature pragma
OpenStackSDK has a feature branch "feature/r1" as a preparation for the
R1.0 release. Due to different branch naming functional tests with
devstack are not running. Add temporarily (for the duration of the
feature branch) pragma to the zuul.yaml to allow Zuul run functional
tests. It will be dropped once SDK gets next major release.
Previous attemp didn't work well for other projects, therefore
explicitly include master as well.

Change-Id: I3a5722873f395bc52cc55a0fd6bcea0ebe3b74fc
2021-06-11 17:06:16 +02:00
Zuul 416902ee4b Merge "[OVN] Set up routing on public bridge like OVS did" 2021-06-11 01:16:03 +00:00
Mohammed Naser 20d6a21e8a Switch fedora-latest to use fedora-34
Fedora 32 is now EOL, we should test against the newly released
version of Fedora which is 34.

Depends-On: https://review.opendev.org/c/openstack/project-config/+/795604
Change-Id: I10d868aca20d1a10d3e7fcfeb78f6fda4c896ee8
2021-06-09 14:20:11 -04:00
Zuul a6fca2b742 Merge "Move verify-ipv6-only-deployments" 2021-06-09 17:22:39 +00:00
Jens Harbott 5a684eb51b Drop broute from ebtables_dump
This table is no longer present on most installations, drop it
from the list to avoid error messages during log collection
that people mistake to be the real error why devstack is failing.

This may lose some debugging information in edge cases, but I
think the improvement of the general user experience is more
important.

Change-Id: Ibb9b247a018a788c8c4b40487762319fe470bf0f
Closes-Bug: 1885198
2021-06-09 09:37:34 +02:00
Radosław Piliszek 9529878808 [OVN] Set up routing on public bridge like OVS did
This fixes various reported and unreported issues with the new
behaviour.

Removes code repetition as well to pay off some technical debt.

Closes-Bug: #1930360
Change-Id: I726c532e96ca434520838ae8a35d5b88b6dd337b
2021-06-08 16:19:40 +00:00
Radosław Piliszek 2fb8c7a5ee Move verify-ipv6-only-deployments
from Tempest to DevStack as it tests DevStack side of things and
is useful for projects not using Tempest.

Verbatim copy except for the devstack- prefix and the /devstack/
path.

Change-Id: Ie166730843f874b9c99e37244e460d7ad33b7eeb
2021-06-07 17:44:54 +00:00
Radosław Piliszek 81937a230a [CI] Drop CentOS Linux 8 job and nodeset
CentOS Stream 8 (aka CentOS 8 Stream) is the currently
supported runtime platform. [0]

DevStack works with CentOS Stream only now. [1]

The only usage of the nodeset being dropped is handled by the
Depends-On.

[0] https://governance.openstack.org/tc/reference/runtimes/xena.html
[1] https://review.opendev.org/c/openstack/devstack/+/759122

Depends-On: https://review.opendev.org/c/openstack/cinder-tempest-plugin/+/795159
Change-Id: Ic0f696b46dce3dba529b53a8f9de8cda6b913c7b
2021-06-07 17:28:38 +00:00
Radosław Piliszek 96509ea025 Check centos-8-stream
CentOS Stream 8 (aka CentOS 8 Stream) is the currently
supported runtime platform. [0]

Some background history:
The Manila team has asked QA to test centos-8-stream
in the common gate.
A bit later it turned out the point releases of CentOS 8 (aka
CentOS Linux 8) will stop happening entirely by the end of 2021.
[1]

Includes a workaround to the edk2-ovmf issue on CentOS Stream 8
x86_64.

[0] https://governance.openstack.org/tc/reference/runtimes/xena.html
[1] https://lists.centos.org/pipermail/centos-devel/2020-December/075451.html

Change-Id: Iee5a262af757f27f79ba1d6f790e949427dca190
2021-06-07 06:54:20 +00:00
Zuul 4c4b9bc9ef Merge "Revert "Temporary add feature pragma"" 2021-06-05 15:05:53 +00:00
Ghanshyam 3ad1661384 Revert "Temporary add feature pragma"
This reverts commit 6843bc798c.

Reason for revert: not sure why but this end up disabling the integration job on check pipeline,

Change-Id: Icfaf8ea17b3ce2e405414c23f8075b18d297bf8b
example: latest recheck on PS12 check pipeline job for neutron - https://review.opendev.org/c/openstack/neutron/+/790060
2021-06-04 21:32:17 +00:00
Zuul 1cefb089ba Merge "setup.cfg: Replace dashes with underscores" 2021-06-04 20:38:29 +00:00
Zuul f42347285a Merge "Temporary add feature pragma" 2021-06-04 17:52:46 +00:00
Zuul 3662e10ef6 Merge "Updated from generate-devstack-plugins-list" 2021-06-04 17:16:34 +00:00
Monty Taylor 6843bc798c Temporary add feature pragma
OpenStackSDK has a feature branch "feature/r1" as a preparation for the
R1.0 release. Due to different branch naming functional tests with
devstack are not running. Add temporarily (for the duration of the
feature branch) pragma to the zuul.yaml to allow Zuul run functional
tests. It will be dropped once SDK gets next major release.

Change-Id: I671b589150fe731125e16316a994a5942219920b
2021-06-04 15:28:30 +00:00
Dan Smith 4e916aeb06 Configure glance unified limit quotas
This makes us configure limits for glance and enable enforcement.

Depends-On: https://review.opendev.org/c/openstack/glance/+/794247
Change-Id: If58d8474cae95b1be3044bd52010b8288a7f5fcc
2021-06-03 06:50:17 -07:00
OpenStack Proposal Bot cbc0b64a34 Updated from generate-devstack-plugins-list
Change-Id: I2d5b0c59d5dd33f639ec685b16768325d67e9dbf
2021-06-03 06:14:05 +00:00
Gregory Thiemonge 949f5ada60 Add route to IPv6 private subnets in ML2/OVN
Enable IPv6 private subnet routing in ML2/OVN, it uses the behavior that
already exists in ML2/OVS: add a route from the devstack node to the
CIDRs of the default IPv6 subnet pool. Any IPv6 subnet created using the
default subnet pool and plugged into the default router is reachable
from the host (ex: ipv6-private-subnet).

Change-Id: I02ca1d94e9f4d5ad4a06182f5ac9a2434941cf08
2021-06-02 12:40:46 +00:00
Zuul aa25b741fe Merge "OVN : include source compliation functions" 2021-06-01 22:24:53 +00:00
Ghanshyam Mann 8ea11c2947 Update IRC network to OFTC
Change-Id: I260d9e65782add011f00d9087e0a5ac71e2be324
2021-05-31 15:04:29 -05:00
Anand Bhat 58f6048dd4 setup.cfg: Replace dashes with underscores
Setuptools v54.1.0 introduces a warning that the use of dash-separated
options in 'setup.cfg' will not be supported in a future version [1].
Get ahead of the issue by replacing the dashes with underscores. Without
this, we see 'UserWarning' messages like the following on new enough
versions of setuptools:

  UserWarning: Usage of dash-separated 'description-file' will not be
  supported in future versions. Please use the underscore name
  'description_file' instead

[1] https://github.com/pypa/setuptools/commit/a2e9ae4cb

Change-Id: I6b8e791c06319fa5fa0935337520c36800b1abd6
2021-05-28 11:36:23 +05:30
Ian Wienand 77835633c5 OVN : include source compliation functions
This patch moves the OVS compilation module from Neutron into DevStack.
It also renamed it to "ovs_source" to highlight its function, and the
include has been moved to where the rest of the includes are located.

Although this module is not required since by default DevStack installs
OVS/OVN from the host OS packages instead of compiling from source,
this is a nice to have as it avoids having bits and pieces of the code
scattered around multiple repositories.

Co-Authored-By: Lucas Alvares Gomes <lucasagomes@gmail.com>
Change-Id: I39ec9ce0a91bea05cf8c446a9767ab879ac8e8f3
2021-05-27 17:10:53 +01:00
Lucas Alvares Gomes 22038a9a8c [OVN] Configure public bridge enabled by default
This patch makes the OVN_L3_CREATE_PUBLIC_NETWORK configuration True by
default. This option makes the OVN lib in DevStack create & configure
the external bridge, matching the same behavior from the OVS driver
in DevStack.

Change-Id: Icda53b95fdc3c169ac48a6ec4343c87ba404baa4
Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
2021-05-27 16:17:06 +01:00
Zuul a634c7f91c Merge "[CI] Add no-tls-proxy job" 2021-05-26 19:23:31 +00:00
Ghanshyam Mann 7604e085b4 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:10:44 +00:00
Zuul e4b0685b6b Merge "docs: recommend Ubuntu 20.04 instead of Bionic" 2021-05-25 16:23:16 +00:00
Zuul 6a4e7b0413 Merge "[TrivialFix] Delete symlink apts-debs" 2021-05-25 15:26:48 +00:00
Zuul 249ded23ad Merge "Change default network backend driver to ML2/OVN" 2021-05-25 02:45:36 +00:00
Radosław Piliszek ddb66f2344 [CI] Add no-tls-proxy job
Some gates run devstack like this and it follows different code
paths.
Let's ensure we don't break it now and then.

Change-Id: I6ee1bfc30bced53f6d7fb841e01714069919fd88
Reference: http://lists.openstack.org/pipermail/openstack-discuss/2020-July/015997.html
Reference: http://eavesdrop.openstack.org/meetings/qa/2021/qa.2021-05-11-14.00.log.html
2021-05-24 17:45:06 +00:00
Lucas Alvares Gomes e38a39ad40 Change default network backend driver to ML2/OVN
This patch is changing the default network backend driver in DevStack to
OVN.

This is a long effort from the Neutron community that has been
discussed on previous PTGs and agreed upon.

A similar patch to this one [0] have been merged in the past but got
reverted [1] because it did break some zuul jobs. This one also include
fixes for such jobs and was verified at [2]

[0] https://review.opendev.org/c/openstack/devstack/+/735097
[1] https://review.opendev.org/c/openstack/neutron/+/775632
[2] https://review.opendev.org/c/zuul/zuul-jobs/+/791117

Change-Id: I8c2be82f33ed9f6c36f5509b3b210ee1a38e87ca
Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
2021-05-24 09:48:35 +01:00
Zuul fcdc8aff6a Merge "Add support for ceph_iscsi cinder driver" 2021-05-20 23:25:33 +00:00
Zuul 0e31ce488f Merge "Remove Block Storage API v2 support" 2021-05-20 22:26:26 +00:00
Ghanshyam Mann f0736406f5 Fix unit test to use python3 command
unit test jobs staretd to run on ubuntu-focal now
and failing for using 'python' command.

Change-Id: Ie002faf4c96ac7f207207a481c057b8df0289e6c
2021-05-19 11:20:06 -05:00
Ihar Hrachyshka 2a9673f027 docs: recommend Ubuntu 20.04 instead of Bionic
Bionic support was dropped in I39e38e4a6c2e52dd3822c9fdea354258359a9f53.

Change-Id: I765aac352590fd2f74d3fd90676d6d098548e6b8
2021-05-19 10:23:05 -04:00
Brian Rosmaita 35cec0d7c0 Remove Block Storage API v2 support
The Block Storage API v2 was deprecated in Pike by change
I913c44799cddc37c3342729ec0ef34068db5b2d4 and is (finally)
being removed in Xena [0].  So remove v2 support from devstack.

[0] https://wiki.openstack.org/wiki/CinderXenaPTGSummary#Removing_the_Block_Storage_API_v2

Depends-on: https://review.opendev.org/c/openstack/devstack/+/792048
Change-Id: I856d78648d28ac4cad0fb212bef1ae6ad32fca90
2021-05-19 08:43:44 -04:00
Zuul 9ee7821e80 Merge "Replace dstat with pcp-dstat" 2021-05-18 08:06:39 +00:00
Zuul c9abd1d6ba Merge "Drop Bionic support" 2021-05-18 07:54:47 +00:00
Brian Rosmaita 6e9f7c2570 Support optimized cinder backend for glance
When Glance is configured with a cinder glance_store, Cinder can be
configured to allow cloning of image data directly in the backend
instead of transferring data through Glance.  Expose these
configuration options in devstack to facilitate testing this feature.

Adds:
- CINDER_ALLOWED_DIRECT_URL_SCHEMES
- GLANCE_SHOW_DIRECT_URL
- GLANCE_SHOW_MULTIPLE_LOCATIONS

Change-Id: Iee619b443088fd77cf7b1a48563203bdf4a93a39
2021-05-17 19:29:19 -04:00
Lucas Alvares Gomes c19c1262c8 Replace dstat with pcp-dstat
The dstat project is no longer maintained.

The pcp-dstat package installs a dstat command so no further updates to
the scripts should be needed.

Change-Id: Ied8c9d29bed4f887c364db7080a0f2a0c02328af
Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
2021-05-17 16:11:34 +01:00
Zuul b04a62beff Merge "Revert "Change Neutron's default ML2 driver to OVN"" 2021-05-14 04:33:52 +00:00
Ghanshyam ff073a5643 Revert "Change Neutron's default ML2 driver to OVN"
This reverts commit 5c304d8176.

Reason for revert: There are more things to fix/move like done in 791085 and 791282 Also let's change all required default in devstack scripts instead of devstack's zuul job side. Basically do this change without any change in .zuul.yaml

Change-Id: Ie0f59d1b9a4b97ad9fd8131819054dfb616f31fd
2021-05-13 16:25:17 +00:00
Zuul 1769eebed0 Merge "Change Neutron's default ML2 driver to OVN" 2021-05-12 17:58:29 +00:00
Zuul 082f4786f0 Merge "Changed minversion in tox to 3.18.0" 2021-05-12 17:46:23 +00:00
Zuul 1259b7ecbc Merge "Cinder: only set volume_clear for LVM" 2021-05-12 16:26:21 +00:00
Anand Bhat 230f5c434c Changed minversion in tox to 3.18.0
The patch bumps min version of tox to 3.18.0 python in order to
replace tox's whitelist_externals by allowlist_externals option:
https://github.com/tox-dev/tox/blob/master/docs/changelog.rst#v3180-2020-07-23

Change-Id: Id8bdda703afc39d352e3a53877318dc30d91a5f7
2021-05-12 17:01:05 +05:30
Lucas Alvares Gomes 69a66fb62b Fix docs job
Sphinx 4.0.0 added a new dependency [0] which is causing the job to fail
at the moment.

This patch fix the problem by adding UC to the docs jobs.

[0] https://www.sphinx-doc.org/en/master/changes.html (LaTeX: add
tex-gyre font dependency)

Change-Id: I28019331017405c06577ada88f8e9f6d9a2afc23
Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
2021-05-11 14:05:22 +01:00
Lucas Alvares Gomes 5c304d8176 Change Neutron's default ML2 driver to OVN
As part of the Victoria PTG the Neutron community [0] agreed on changing
the default backend driver from ML2/OVS to ML2/OVN in DevStack. A lot of
changes have been submitted towards this goal including but not limted
to:

* Moving the OVN module to DevStack:
  https://review.opendev.org/c/openstack/devstack/+/734621

* Updating the OVN module to use distro packages instead of compiling
  OVN from source: https://review.opendev.org/c/openstack/devstack/+/763402o

And now this patch is changing the the actual Q_AGENT,
Q_ML2_TENANT_NETWORK_TYPE and Q_ML2_PLUGIN_MECHANISM_DRIVERS values in
devstack to what is expected by OVN as well as updating the Zuul
templates to enable the OVN services.

[0] https://etherpad.opendev.org/p/neutron-victoria-ptg

Change-Id: I92054ce9d2ab7a42746ed5dececef583b0f8a833
Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
2021-05-10 14:43:28 +01:00
Zuul 166c88b610 Merge "Handle disappearing pids in mlock_report.py" 2021-05-02 15:03:07 +00:00
Clark Boylan 06b7352478 Fix async race updating nova configs
The configure_neutron_nova function updates nova configs. While that is
still running we separately update nova configs in stack.sh. This can
result in unexpected configs (that don't work). Fix this by waiting for
configure_neutron_nova to complete its work before we do nova config
updates directly in stack.sh.

For specifics we say that:

  [neutron]
  project_domain_name = Default

was missing from both nova.conf and nova-cpu.conf and instances could
not be created because keystone complained about not finding domain in
project. The strong suspicion here is that on some systems
configure_neutron_nova would write out project_domain_name while the
stack.sh inisets were running resulting in stack.sh overwriting the
project_domain_name content.

One theory is that disabling swift makes this problem more likely as
there is swift work in the middle of the async period. This is supported
by the fact that our job that hits this problem does indeed disable
swift.

Change-Id: I0961d882d555a21233c6b4fbfc077cfe33b88499
2021-04-29 11:54:50 -07:00
Zuul bab78dede2 Merge "cinder: Increase VOLUME_BACKING_FILE_SIZE" 2021-04-29 16:26:21 +00:00
Ghanshyam Mann 7ad4cd07c8 Drop Bionic support
Since victoria cycle, we have moved upstream testing to
Ubuntu Focal (20.04) and so does no Bionic distro in
Xena cycle testing runtime[1]. Grenade jobs also started
running on Focal since victoria was released.

Only thing left was legacy jobs which were not migrated to
Ubuntu Focal in Victoria and as per another community-wide
goal[2], all the lgeacy jobs were suppsoed to be migrated
to zuulv3 native jobs in victoria cycle itself. One of the
pending job was in nova (nova-grenade-multinode) which is also
migrated to zuulv3 native now
- https://review.opendev.org/c/openstack/nova/+/778885

If there is any job running on bionic, we strongly recommend
to migrate it to Ubuntu Focal.

[1] https://governance.openstack.org/tc/reference/runtimes/xena.html
[2] https://governance.openstack.org/tc/goals/selected/victoria/native-zuulv3-jobs.html

Change-Id: I39e38e4a6c2e52dd3822c9fdea354258359a9f53
2021-04-29 09:33:59 -05:00
Ian Wienand b02a43291c Handle disappearing pids in mlock_report.py
If a pid disappears on us while we're reading, we should just continue
on.

EnvironmentError is just an alias for OSError since Python 3.3, so use
the latter name. [0]

[0] https://docs.python.org/3/library/exceptions.html#OSError

Change-Id: I3a25cca328e1469f72c84a118a9691c1c0258bc4
Closes-Bug: #1926434
2021-04-28 16:31:17 +00:00
Lee Yarwood 0386c1cda6 cinder: Default CINDER_ISCSI_HELPER to tgtadm on Bionic
If5c860d1e69aaef9a9236303c370479a7714ad43 attempted to move this default
to lioadm while pinning certain Bionic based jobs to tgtadm.

Unfortunately it missed the legacy dsvm based jobs within various
projects that do not inherit from the devstack-platform-bionic base job
and that are also not covered by devstack's gate.

This change simply forces CINDER_ISCSI_HELPER to tgtadm on Bionic based
hosts to ensure it is always used.

Closes-Bug: #1926411
Change-Id: Ib4b38b45f25575c92fb09b8e97fa1b24af0cc06a
2021-04-28 09:32:39 +01:00
Lee Yarwood c062792709 cinder: Default CINDER_ISCSI_HELPER to lioadm
As outlined in bug #1917750 the use of tgtadm in multinode environments
with multiple c-vol services can cause volumes to use duplicate WWNs.

This has been shown to cause some encrypted volume test failures as
os-brick returns a /dev/disk/by-id path to n-cpu that can point to the
wrong underlying volume when multiple volumes with the same WWN are
connected to a host.

There is also some speculation that the duplicate WWNs are also causing
libvirt to fail to detach volumes from instances but as yet this has not
been proven.

This change aims to avoid all of the above by switching the default of
CINDER_ISCSI_HELPER to lioadm for all deployments instead of just EL and
SUSE based deployments.

The Bionic platform job however is pinned to tgtadm as there issues
installing python3-rtslib-fb.

Closes-Bug: #1917750
Change-Id: If5c860d1e69aaef9a9236303c370479a7714ad43
2021-04-23 10:53:10 +01:00
Zuul e59b945a7d Merge "[OVN] Fix Fedora/CentOS OVN configuration" 2021-04-19 12:34:43 +00:00
Radosław Piliszek d04e795b31 [TrivialFix] Delete symlink apts-debs
Follow up on old I0416180db5b6add996ce5b48c6966c1b68adbcb0

Change-Id: If2f6166cf7c585bf303d0f6c28a2745d85eabbed
2021-04-19 06:52:30 +00:00
Zuul 6a5dd3fd9d Merge "Add some debug to async_wait failures" 2021-04-16 21:18:06 +00:00
Zuul 9bc8f8e627 Merge "Move gawk into general for post-config" 2021-04-15 23:08:23 +00:00
Zuul 84a2d4d35a Merge "Work around CHILD_MAX bash limitation for async" 2021-04-15 13:27:35 +00:00
Dan Smith 51e384554b Add some debug to async_wait failures
This dumps some data in the case where we fail to wait for a child
pid to help debug what is going on. This also cleans up a few review
comments from the actual fix.

Change-Id: I7b58ce0cf2b41bdffa448973edb4c992fe5f730c
Related-Bug: #1923728
2021-04-15 06:16:42 -07:00
Zuul a37704691c Merge "Rely on ceph.conf settings when cinder backup pool is created" 2021-04-15 09:43:26 +00:00
Dan Smith aa5c38727b Work around CHILD_MAX bash limitation for async
Apparently bash (via POSIX) only guarantees a small (32ish) number of
children can be started and their statuses retrieved at any given
point. On larger jobs with lots of plugins and additional work, we
may go over that limit, especially for long-lived children, such
as the install_tempest task.

This works around that issue by creating a fifo for each child at
spawn time. When the child is complete, it will block on a read
against that fifo (and thus not exit). When the parent goes to wait
on the child, it first writes to that fifo, unblocking the child so
that it can exit near the time we go to wait.

Closes-Bug: #1923728
Change-Id: Id755bdb1e7f1664ec08742d034c174e87a3d2902
2021-04-14 14:33:07 -07:00
Zuul ef1e9ada9b Merge "Make stackviz tasks not to fail jobs" 2021-04-10 13:41:29 +00:00
Ghanshyam Mann 580fec54c3 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
2021-04-08 22:17:56 +00:00
Zuul e53142ed0d Merge "Default to parallel execution" 2021-04-08 18:10:36 +00:00
Zuul cd0147194d Merge "Configure Cinder backup driver" 2021-04-08 15:33:49 +00:00
Zuul 5a12a7fc4b Merge "Update DEVSTACK_SERIES to xena" 2021-04-08 01:03:01 +00:00
Francesco Pantano 448db9ec41 Rely on ceph.conf settings when cinder backup pool is created
Ceph adds the osd pool default size option on ceph.conf via [1];
this means we don't need to specify the size of this pool if
the same value (same variable) is used (CEPH_REPLICAS).
This change is an attempt of removing the size setting, relying
on the implicit declaration of the value provided by ceph.conf.

[1] https://github.com/openstack/devstack-plugin-ceph/blob/master/devstack/lib/ceph#L425

Change-Id: I5fa2105ceb3b97a4e38926d76c1e4028f1108d4a
2021-04-07 22:57:29 +02:00
Zuul 2c275ab7db Merge "gzip, not xz" 2021-04-07 13:12:25 +00:00
Radosław Piliszek 6f2c807bfa gzip, not xz
xz may cause POST_FAILUREs due to memory pressure [1].

[1] http://lists.openstack.org/pipermail/openstack-discuss/2021-April/021609.html

Change-Id: I2ea3175ecf2508b62640bfffdd798d7072e55550
2021-04-06 18:43:32 +00:00
Ghanshyam Mann 25d37efb91 Update DEVSTACK_SERIES to xena
stable/wallaby branch has been created now and
current master is for xena.

Change-Id: I42f67361fe50795d929752434342effddf123486
2021-04-06 10:35:19 -05:00
Lee Yarwood 362641b1b8 cinder: Increase VOLUME_BACKING_FILE_SIZE
As reported in bug #1920136 the tempest-integrated-compute job has
started to see insufficient free virtual space errors being reported by
c-sch and c-vol when creating volumes. This change simply increases the
default size of the underlying LVM PV used to host these volumes within
the default LVM/iSCSI c-vol backend deployed by devstack.

Change-Id: I965d4a485215ac482403f1e83609452550dfd860
Closes-Bug: #1920136
2021-04-06 11:35:44 +01:00
Nobuhiro MIKI 110b9a9b1b Fix typo in multinode-lab document
Signed-off-by: Nobuhiro MIKI <nmiki@yahoo-corp.jp>
Change-Id: I1b6100d6b8231f1f96a7768e26ab83f010f1e4dc
2021-04-01 11:14:27 +09:00
Hironori Shiina 01a84d2d03 Configure Cinder backup driver
This patch adds a new environment variable, CINDER_BACKUP_DRIVER for
configuring cinder backup driver used when c-bak service is enabled.
This gets cinder backup driver configurable with a similar pattern to
cinder backends. Although the current configurable backup drivers don't
need cleanup functions, the interface for cleanup is prepared for the
future.

The following backup drivers can be configured:
  swift:
  This is the default backup driver.
  ceph:
  This already can be configured if ceph backend driver is enabled. For
  backward compatibility, ceph backup driver is used if ceph backend
  driver is enabled and no backup driver is specified.
  s3_swift:
  The s3 backup driver gets configurable with this patch. By specifying
  's3_swift', the driver is configured for swift s3api.

In the future, lib/cinder_backups/s3 should be created separatedly for
external S3 compatible storage. This file will just set given parameters
such as a URL and credentials.

Change-Id: I356c224d938e1aa59c8589387a03682b3ec6e23d
2021-03-31 15:12:25 -04:00
Toshiaki Takahashi d207ba9015 Move gawk into general for post-config
Devstack script for setting post-config needs gawk.
So this patch moves gawk from files/*/nova into files/*/general.

Closes-Bug: #1909041
Change-Id: I06a1a5524f146a8d7337963e846b5a6b7561be13
2021-03-30 09:44:06 +00:00
Dan Smith 84b328c814 Default to parallel execution
Several jobs have been running in parallel since the late Wallaby
cycle, and other developers have had it enabled locally. I have heard
no async-related stability or debug-ability complaints thus far.
I think that we should convert the default to parallel early in the
Xena cycle in an attempt to spread the speed improvements across the
board, while also collecting data on a wider set of configurations.

Change-Id: I83d56c9363d481bb6d5921f5e1f9b024f136044b
2021-03-26 07:17:42 -07:00
Zuul a64c843052 Merge "Set default OVS_SYSCONFDIR value depending on OVS_PREFIX" 2021-03-24 19:23:22 +00:00
Zuul 83821a11ac Merge "Address feedback from glance-remote patch" 2021-03-23 16:56:21 +00:00
Zuul 64efd9862c Merge "nova: Default NOVA_USE_SERVICE_TOKEN to True" 2021-03-23 14:44:24 +00:00
Rodolfo Alonso Hernandez 30819e66dd Set default OVS_SYSCONFDIR value depending on OVS_PREFIX
When OVN is built from source, the value of OVS_PREFIX is set to
"/usr/local". All other paths referring to OVS should be prefixed
with this value.

Closes-Bug: #1920634
Related-Bug: #1918656

Change-Id: I9a45a5379d1c47cdf67b9c6d3d0409a88501e61e
2021-03-22 07:18:44 +00:00
Zuul 8ef0d73cba Merge "Use (or set properly) system-id generated by openvswitch" 2021-03-20 02:58:55 +00:00
Zuul 195c885cb3 Merge "Allow to install os-ken from git repo" 2021-03-18 12:45:10 +00:00
Zuul e049a31970 Merge "[OVN] Support for network-logging config" 2021-03-17 18:05:59 +00:00
Slawek Kaplonski 1ed276c177 Use (or set properly) system-id generated by openvswitch
In case when OVN_UUID isn't set by user, and it isn't stored
in /etc/openvswith/system-id.conf file, Devstack will reuse it.
If it's not, it will generate and store it in the
/etc/openvswitch/system-id.conf file so it can be set to same value
after openvswitch will be e.g. restarted.

In case when OVN_UUID is set by user, it will be also saved in
/etc/openvswitch/system-id.conf file to make it persistent when e.g
openvswitch will be restarted.

Closes-Bug: #1918656
Change-Id: I8e3b05f3ab83e204bc1ce895baec0e1ba515895b
2021-03-17 14:04:06 +00:00
Brian Haley af79a934ef Use 'ip addr replace' in OVN code
Instead of doing a flush/add, use replace like the ML2/OVS
code does. Should have the same behavior of not failing if
the address is already present.

Change-Id: If9d8a848b079ccb8c0c9b8e6fb708107aa0d46c7
2021-03-15 12:20:42 -04:00
Zuul f3e9399d38 Merge "Update Cirros to 0.5.2" 2021-03-12 13:31:13 +00:00
Zuul ff895cc787 Merge "Add a variable to configure the Tempest venv upper constraints" 2021-03-09 21:50:25 +00:00
Zuul d5a97c1787 Merge "Simulate a remote/standalone g-api worker" 2021-03-09 20:24:56 +00:00
Dan Smith 61b4fbf143 Address feedback from glance-remote patch
This cleans up some of the quote and variable handling that was
pointed out in review of the previous patch. This is non-critical,
so I'm putting it in a subsequent patch to avoid disturbing the
careful alignment of patches across three projects that are mostly
approved.

Change-Id: I9b281efd74ba5cd78f97b84e5704b41fd040e481
2021-03-09 09:28:16 -08:00
Dan Smith 802259a496 Simulate a remote/standalone g-api worker
In order to be able to test glance's distributed import function,
we need to have multiple workers in an arrangement like they
would be if one was on another host (potentially at another site).
This extra worker must be separate from the default image service
in order to repeatedly hit one and then the other to test cross-
service interactions.

This allows you to enable_service g-api-r, which will clone the main
g-api service, modify it to run on a different port, and start it.
The service will be registered in the catalog as image_remote.

Depends-On: https://review.opendev.org/c/openstack/glance/+/769976
Change-Id: I0e2bb5412701d515153c023873addb9d7abdb8a4
2021-03-08 18:25:32 -08:00
Lee Yarwood 38fed19acc Update Cirros to 0.5.2
This release [1] includes a single fix [2] pulling in the ahci module
which is required by Iad1adbc23b31dd54a96299e7a8a4b622c15eed8d, a
nova-next change introducing q35 testing to the job.

This depends on the following change caching the image within the CI
host image:

Depends-On: https://review.opendev.org/c/openstack/project-config/+/779178/

[1] https://github.com/cirros-dev/cirros/releases/tag/0.5.2
[2] https://github.com/cirros-dev/cirros/pull/65

Change-Id: I12e0bdb3699e5343592ab834468ba6b2fcdcaaf4
2021-03-08 08:50:53 +00:00
Ghanshyam Mann bd0d0fde24 Add enforce_scope setting support for Cinder
Conder started moving to new RBAC and cinder-tempest-plugin
and Tempest need to set few configuration to enable the
scope checks on cinder side and on Temepst side to tell
cinder is all configured with scope checks and test can be run with
scoped token.

Change-Id: Ic7cd919c000c4e7b9a3a06638a5bd87b1617e749
2021-03-06 17:23:39 -06:00
Ghanshyam Mann 8c93049220 Add enforce_scope setting support for Glance
Glance started moving to new RBAC and glance-tempest-plugin
and Tempest need to set few configuration to enable the
scope checks on glance side and so does on Temepst side to tell
glance is ready with scope checks so that test can be run with
scoped token.

Change-Id: I09f513d08212bc80a3a86a750b29b1c6625d2f89
2021-03-05 09:40:39 -06:00
Ghanshyam Mann 9dc2b88eb4 Add enforce_scope setting support for keystone
Keystone-tempest-plugin has implemented the secure RBAC
tests and enabling the enforce_scope via keystone devstack
plugin. Doing those setting in devstack will help to manage
easily and in central place also avoid restarting the api
service.

Change-Id: I30da189474476d3397152a0a15c2e30a62d712ad
2021-03-05 09:32:19 -06:00
Stephen Finucane 3948fcb03c Remove MAINTAINERS.rst
This file is mega out-of-date and no longer helpful. Remove it.

Change-Id: Ic7e215c3e48a9c453d19355ad7d683494811d2af
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2021-03-05 15:10:19 +00:00
Stephen Finucane 970891a4ef Remove references to XenAPI driver
The XenAPI driver was removed during the Victoria release [1], while the
libvirt+xen driver has been removed in the Wallaby release [2]. Remove
references to Xen from DevStack since its all a no-op now.

[1] I42b302afbb1cfede7a0f7b16485a596cd70baf17
[2] I73305e82da5d8da548961b801a8e75fb0e8c4cf1

Change-Id: If7055feb88391f496a5e5e4c72008bf0050c5356
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2021-03-05 15:10:19 +00:00
Stephen Finucane 3c6d105929 nova: Remove nova-xvpvncproxy
This was removed this service from nova in Ussuri [1]. There's no need
to keep this around.

[1] I2f7f2379d0cd54e4d0a91008ddb44858cfc5a4cf

Change-Id: Idc95c6467a8c6e0c0ed07a6458425ff0a10ff995
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2021-03-05 15:10:11 +00:00
Akihiro Motoki f548ce4816 Allow to install os-ken from git repo
os-ken is used by neutron ML2/OVS agent.
We need to install os-ken from source to test os-ken changes
against neutron. We already have tempest-integrated-networking job
in os-ken repo but it turns out it consumes os-ken from PyPI :-(

Change-Id: Ibcff212591e9fed25f1316403627269d81455b09
2021-03-04 10:31:30 +09:00
Stephen Finucane 8f3e51d79f nova: Die if console TLS enabled with tls-proxy
We require the 'tls-proxy' service to set up certificates for us. Hard
fail if 'NOVA_CONSOLE_PROXY_COMPUTE_TLS' is enabled but the 'tls-proxy'
service is not.

Change-Id: I52fec12b78ecd8f76f835551ccb84dfb1d5b3d8a
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2021-03-02 16:18:48 +00:00
Lucas Alvares Gomes 8903d8c1e2 [OVN] Fix Fedora/CentOS OVN configuration
When installing OVN from packages, the rpm for Fedora / CentOS pre set
some configurations that conflicts with the post configuration done by
DevStack.

This patch fixes this problem by erasing the pre-set configuration from
the packages and leaving it to DevStack to configure OVN for its use
(just like we would do when compiling it from source).

Change-Id: I9c18023c9aa79c0633748a6169f4f283e9d74ef0
Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
2021-02-24 13:52:33 +00:00
Zuul 0de8a5534f Merge "Stop configure 'member' role in tempest_roles" 2021-02-23 19:43:06 +00:00
Ghanshyam Mann 3bdc8f66ad 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

Change-Id: I5b2217d85e6871ca3f7a3f6f859fdce9a50d3946
2021-02-20 14:05:36 -06:00
Zuul 49cd2252f0 Merge "Fix DevStack setup on CentOS 8.3" 2021-02-20 18:23:04 +00:00
Zuul bacaf0c4aa Merge "Fix nova db dependency" 2021-02-18 12:22:17 +00:00
Pierre Riteau f361122798 Fix DevStack setup on CentOS 8.3
CentOS 8.3 changed the name of the PowerTools repository to powertools:
https://wiki.centos.org/Manuals/ReleaseNotes/CentOS8.2011#Yum_repo_file_and_repoid_changes

With this repository disabled, DevStack fails to install libyaml-devel,
which causes a failure to install many packages. In my environment
DevStack stopped with an error caused by a missing wget.

Keep the command using the old repository name, for compatibility with
older CentOS releases.

Change-Id: I5541a8aee8467abf10ce8a10d770618bdd693f02
2021-02-17 17:43:13 +01:00
Dan Smith 48b7633ae8 Fix nova db dependency
When I reordered the nova database creation for better performance
and cleaner arrangement, I broke the non-standard arrangement where
the super and cell conductors are squashed together. In devstack,
this is implemented by pointing the controllers at cell1 in the
config, which makes it hard to create and sync the databases in the
natural order. This manifested in a failure when running in this
mode (which apparently Trove is).

As a quick fix, this special-cases the setup for cell0 if that mode
is enabled. I will follow this up with a cleaner refactor of all that
stuff so this hack isn't required, but that will take a bit longer.

Change-Id: I5385157c281beb041bf67cba546be20cf9497cbe
2021-02-16 16:02:00 -08:00
Zuul 18bf75e52f Merge "Always verify os_glance reserved namespace" 2021-02-16 21:16:48 +00:00
Ghanshyam Mann 57b092dbce Stop configure 'member' role in tempest_roles
Config option auth.tempest_roles is used to set the
extra roles to all dynamic cred tests users.
- https://opendev.org/openstack/tempest/src/commit/9b6f441fdc2a970410ea631dc1318896349e010f/tempest/common/credentials_factory.py#L82

Devstack set the 'member' role in CONF.auth.tempest_roles
- https://opendev.org/openstack/devstack/src/commit/556f84aea90c572873fc9834292635b41e590224/lib/tempest#L628

This cause issue if any tests testing for speciifc rols and want
to exclude the 'member' role, basically this bug
- https://bugs.launchpad.net/devstack/+bug/1915740

Also with 'member' role assigned by default, Tempest will not be
able to test the secure RBAC new default 'reader' role.

Let's remove  this role assignment now and let test congfigure what
they want.

Closes-Bug: #1915740

Change-Id: I0b6ab9fb943c7b0925a0a0d2490a8bcdfa76cedc
2021-02-15 17:34:17 +00:00
Lee Yarwood b516efedf9 nova: Default NOVA_USE_SERVICE_TOKEN to True
Introduced in devstack by I2d7348c4a72af96c0ed2ef6c0ab75d16e9aec8fc and
long tested by nova-next this enabled by most deployment tools by
default now and should be enabled by default in devstack.

Change-Id: Ia76b96fe87d99560db947a59cd0660aab9b05335
2021-02-15 10:32:03 +00:00
Zuul 556f84aea9 Merge "Async task support" 2021-02-11 22:33:01 +00:00
Zuul f9047f3151 Merge "Increase volumes quota for service project" 2021-02-11 20:55:48 +00:00
Zuul 357698d4cb Merge "orchestrate-devstack: Copy controller ceph.conf and keyrings to subnode" 2021-02-11 03:23:23 +00:00
Lee Yarwood e11d367d8e orchestrate-devstack: Copy controller ceph.conf and keyrings to subnode
This change introduces a basic role to copy the contents of /etc/ceph
between the controller and subnodes during orchestrate-devstack allowing
a multinode ceph job to be introduced by
I9ffdff44a3ad42ebdf26ab72e24dfe3b12b1ef8b.

Note that this role is only used when devstack-plugin-ceph is enabled.

Change-Id: I324c0f35db34f8540ca164bf8c6e3dea67c5b1b4
2021-02-10 16:01:04 +00:00
Dan Smith 30d9bf9a6d Async task support
We have a *ton* of stuff in devstack that is very linear, specifically
the ten-ish minutes we spend loading osc to run a single API command
against something. We also generate configs, sync databases, and other
things that use one core of our worker and make our runtime longer
than it really needs to be.

The idea in this patch is to make it super simple to run some things
in the background and then wait for them to finish before proceeding
to something that will require them to be done. This avoids the
interleaving you would expect by redirecting the async tasks to a log
file, and then cat'ing that log file synchronously during the wait
operation. The per-task log file remains so it's easier to examine
it in isolation.

Multiple people have reported between 22-30% improvement in the
time it takes to stack with this. More can be done, but what is here
already makes a significant difference.

Change-Id: I270a910b531641b023c13f75dfedca057a1f1031
2021-02-09 15:57:04 -08:00
Flavio Fernandes a2273cc4c8 [OVN] Support for network-logging config
This patchset adds configuration support for network logging
when the OVN driver is enabled.

Depends-On: https://review.opendev.org/768129
Change-Id: I6fc0973bedfd1dcc72b01981cd64f9283662d37c
Signed-off-by: Flavio Fernandes <flaviof@redhat.com>
2021-02-08 10:56:38 -05:00
Dan Smith b4bba2f2c8 Increase volumes quota for service project
If we are backing glance with cinder, we will use more volumes and
if timing is right, we will clash with other tests and be unable
to create what we need. If we are backing glance with cinder, we
should increase the volumes quota, which this patch does (to 50 from
a default of 10).

Closes-Bug: #1914665
Change-Id: I2ad1c4d21f996ee1a9ce29ba4f1a4b8f5720f8fb
2021-02-05 15:36:01 +00:00
Zuul aa2821eb89 Merge "Drop opensuse platform job" 2021-02-02 18:18:36 +00:00
Vanou Ishii eef2a0d751 Fix Early Use of die function in stack.sh
This commit fixes use of die function before it's defined.
die function can be used after sourcing $TOP_DIR/functions chain-
sources $TOP_DIR/functions-common.
Because fixed portion of stack.sh checks existence of $TOP_DIR/inc
and sourcing $TOP_DIR/function chain source $TOP_DIR/inc, this commit
uses echo & exit command instead of die function.

Closes-Bug: #1913021
Change-Id: I5ec174cf7b02269525b1bfd0bfa94ea889d16fce
2021-01-25 16:51:19 +09:00
Zuul 84ead5aacf Merge "Also cap pip in tempest tox venv" 2021-01-23 01:19:20 +00:00
Dan Smith ed164289a5 Always verify os_glance reserved namespace
On master, we should always enable tempest's verification of Glance's
os_glance namespace enforcement.

Change-Id: Ia71878e6c53ee683a868112959876798e946e2ce
Depends-On: https://review.opendev.org/c/openstack/glance/+/771070
2021-01-18 09:57:00 -08:00
Dan Smith bcd0acf6c0 Also cap pip in tempest tox venv
I am still unable to stack because of pip 20.3, but this time
because of the tempest venv build. This forces it to the same
capped pip, which further works around the problem.

Change-Id: Icfaaefe1aa576733764b393cba96d276c9b1cf68
Related-Bug: #1906367
2021-01-13 12:28:18 -08:00
Dan Smith edee6dc341 Add debug helper script
I'm not sure if others will find this useful, but I use this
script to run pieces of devstack while trying to write/debug
things. It saves me a lot of time being able to get to some
project-lib function without a full clean/re-stack.

Figured I'd share in case it's worth putting into the tree.

Change-Id: I9a92fa71d34f50c2f5ba7d11c1a45301bd4478bf
2021-01-12 17:41:19 -08:00
Zuul e2f574fb90 Merge "cinder: Double [DEFAULT]/rpc_response_timeout to 120" 2021-01-08 10:35:39 +00:00
Zuul 643ee3d51e Merge "Clean up create_disk() a little" 2021-01-08 10:19:27 +00:00
Jens Harbott b37240382d Drop opensuse platform job
It has been broken for over a month. Feel free to revert in combination
with a fix, better with a commitment to keep the job in working shape
permanently.

Change-Id: I2604374c23716d56de29e16a459b7c7f45b84891
2021-01-08 09:41:56 +01:00
Dan Smith 36a575b036 Clean up create_disk() a little
The create_disk() helper had some redundant checks and dead code. This
refactors it to put all the stale cleanup at the top, and groups the
new actions together with more relevant comments to make it easier
to understand.

Change-Id: I1f6218a1994e66786ed9a8065e30bcceec7b8956
2021-01-07 11:29:01 -08:00
Zuul 5867ff9b75 Merge "Install systemd-python from distribution package" 2021-01-07 11:02:00 +00:00
Zuul aef50ed18c Merge "[OVN] Use OVN from packages" 2020-12-30 16:29:29 +00:00
Federico Ressi 7e3428b987 Install systemd-python from distribution package
CentOS 8 support start to fail because of an issue [1]
compiling systemd python binding modules.
Let install it from distribution packages as documented by
python-systemd project Web page [2]

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1862714
[2] https://github.com/systemd/python-systemd

Closes-Bug: #1908386
Change-Id: Ic7cfd72ce1b875e75b1cdbdd44a902b25d51abb8
2020-12-23 14:22:27 +00:00
Lee Yarwood fc41717222 cinder: Double [DEFAULT]/rpc_response_timeout to 120
Bug #1873234 documents a number of CI failures caused by RPC requests
from c-api to c-vol timing out due to `lvchange` taking longer than the
default rpc_response_timeout of 60 seconds to complete.

While the underlying reason for the slowness should be investigated by
the cinder team a trivial workaround to the fallout created by these
timeouts is to simply double the client RPC timeout used by c-api,
allowing c-vol to return and overall the request to succeed.

Change-Id: I53dc0ae10af6aa13f1349b58373932eb6a15ab02
Related-Bug: #1873234
2020-12-23 10:58:26 +00:00
Ghanshyam Mann 04b0b61557 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
2020-12-23 09:51:24 +00:00
Lucas Alvares Gomes e651d9ef88 [OVN] Use OVN from packages
This patch changes the OVN module from DevStack to allow for using the
OSapackaged version of OVN instead of compiling it from source.

A new variable called OVN_BUILD_FROM_SOURCE has been introduced and when
set to False (the default value) OVN will then use the packaged version
for setting up DevStack.

Note, in the stop_ovn() function, the OVN metadata agent service name
was wrong and the service wasn't being stopped as part of ./unstack.sh.
This patch also fixed it as well.

Change-Id: Ib41e3b486550200572afd6b3ba783d7644d70d44
Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
Co-Authored-By: Slawek Kaplonski <skaplons@redhat.com>
2020-12-19 18:50:48 +01:00
Zuul a9afdb18b4 Merge "fix is_fedora for centos 8 stream" 2020-12-18 02:32:54 +00:00
Masayuki Igawa 89acae9779 Use python3-guestfs in Ubuntu
This commit makes to use python3-guestfs instead of python-guestfs in
Ubuntu because python-guestfs package is not provided in focal[1][2].
This causes errors in some gate job if `ENABLE_FILE_INJECTION` is true
like the following.

```
...
Package python-guestfs is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  python3-guestfs

E: Package 'python-guestfs' has no installation candidate
...
```
http://paste.openstack.org/show/801073/

[1] https://packages.ubuntu.com/search?lang=en&keywords=python3-guestfs
[2] https://packages.ubuntu.com/search?lang=en&suite=default&arch=any&searchon=names&keywords=python-guestfs

Change-Id: Iffe60aa0351b732d543927afa1f1e846ba2a89fd
2020-12-16 09:17:08 +09:00
Sean Mooney e7c017bd89 fix is_fedora for centos 8 stream
When deploying on the centos 8 stream variant
the output of "lsb_release -i -s" is
CentOSStream instead of CentOS

This breaks the is_fedora function in devstack
preventing package installation and removal.

Change-Id: I39ccefbd06f46adf5077f8d8001f37d3b190f040
2020-12-15 19:58:37 +00:00
Zuul 97f3100c4f Merge "zuul: Remove nova-live-migration from check queue" 2020-12-06 21:44:11 +00:00
Zuul 5dff818602 Merge "Decrease MTU to account for IPv6 header" 2020-12-04 05:28:02 +00:00
Elod Illes 7a3a7ce876 Workaround for new pip 20.3 behavior
This patch caps pip version during bootstrap to avoid the issue:

"ERROR: Links are not allowed as constraints"

A proper fix would be to adapt to new pip behavior.

Depends-On: https://review.opendev.org/764811
Change-Id: I1feed4573820436f91f8f654cc189fa3a21956fd
2020-11-30 17:01:20 -06:00
Zuul 907b9042b8 Merge "tempest: Enable shelve_migrate tests with Libvirt" 2020-11-29 12:43:55 +00:00
Zuul 6d735429da Merge "Make create_disk() persistent" 2020-11-23 23:15:36 +00:00
Zuul 788b6a97f8 Merge "Remove deprecated tail_log function" 2020-11-23 10:24:34 +00:00
Lee Yarwood cdc2e9f656 zuul: Remove nova-live-migration from check queue
As documented in the associated TODO this job can be removed now that it
has been migrated to zuulv3 by Ib342e2d3c395830b4667a60de7e492d3b9de2f0a.

Change-Id: Id7c0fd8eec09386cd638956a46c1f75844194b9d
2020-11-19 09:19:11 +00:00
Zuul 3a96dd10c6 Merge "[CI] Copy /etc/ceph output to logs" 2020-11-16 06:50:49 +00:00
Victoria Martinez de la Cruz 7a5fda8326 [CI] Copy /etc/ceph output to logs
Change-Id: I91317c7d4972f07f741cdde2f406e290bb65467b
2020-11-13 12:58:41 -03:00
Zuul b958edd3f9 Merge "enable ussuri cloud archive on ubuntu bionic" 2020-11-13 02:44:57 +00:00
Zuul 0d2d6f93f6 Merge "Look for ipv6 routes so ipv6-only jobs will not fail" 2020-11-11 18:07:28 +00:00
Zuul 4e86376c0b Merge "Configure os-vif ovsdb_connection" 2020-11-11 18:00:04 +00:00
Sean Mooney 6c03a85d8b enable ussuri cloud archive on ubuntu bionic
This change updates bionic installs to use the
ussuri cloud archive to enable the use of libvirt 6.0.0.
This is required to prevent a libvirt bug that causes intermittent
failures for the tempest test_live_block_migration_paused testcase.

Change-Id: I9c395c2b5fdfe6ad9a43477280e88e9a9b34f057
Related-Bug: 1901739
2020-11-11 04:59:21 +00:00
Weronika Sikora d7d87b0202 Set image_alt_ssh_user during stack
At this moment, only image_ssh_user is present in the config
of Tempest. It's set to cirros by default and used for
SSH connections in tests. However, several tests build
instances with image_ref_alt, but still use image_ssh_user to
connect, which results in failure if image_ref_alt is set to
a non-cirros image. They should use image_alt_ssh_user instead,
which can be set to whichever user the image_ref_alt needs in
either local.conf or during plugin installation.

Change-Id: I899909fb71a9862c891e94ba54c6a8fa137f9769
Partial-Bug: #1844535
2020-11-10 12:43:47 +01:00
Dan Smith 6766f71d62 Make create_disk() persistent
Right now a system configured with the ceph plugin will not survive
a reboot because the backing disk we create and mount isn't mounted
at startup, preventing ceph from starting and the rest of nova/glance
from working.

This makes create_disk() idempotently write an fstab rule for the
disk we make, and adds a destroy_disk() handler for cleanup.

Change-Id: I50cd4234f51a335af25be756bd2459dca5aa343c
2020-11-09 14:59:23 -08:00
Nate Johnston efc04eec00 Look for ipv6 routes so ipv6-only jobs will not fail
For change 739139 [1] PS 12, the
neutron-tempest-plugin-scenario-linuxbridge died in devstack with
"/opt/stack/devstack/functions-common:237 Failure retrieving default
route device", which comes from
"/opt/stack/devstack/lib/neutron-legacy:237:die_if_not_set".

Looking at the worlddump.txt for that job [2] I see that there is a
default ipv6 route; the vm was not configured with ipv4 networking.

    ip route
    --------

    ip -6 route
    -----------

    ::1 dev lo proto kernel metric 256 pref medium
    2607:ff68:100:54::/64 dev ens3 proto kernel metric 256 expires 86380sec pref medium
    fe80::/64 dev ens3 proto kernel metric 256 pref medium
    default via fe80::f816:3eff:fe77:b05c dev ens3 proto ra metric 1024 expires 280sec hoplimit 64 pref medium

Looking at the devstack code that throws the error [3] it looks like
it only looks for a default route in the output of `ip route`, which
does not include ipv6 information.  This change should look in both
the ipv4 and ipv6 route table.  A similar check in the L3 setup code
is also updated.

[1] https://review.opendev.org/#/c/739139/
[2] https://d4eb7e3efe98cba79a4b-f4d168cdb20f40841821e4b213645c0f.ssl.cf2.rackcdn.com/739139/12/gate/neutron-tempest-plugin-scenario-linuxbridge/9a6b4f7/controller/logs/worlddump-latest.txt
[3] https://opendev.org/openstack/devstack/src/branch/master/lib/neutron-legacy#L236

Closes-Bug: #1902002
Change-Id: I839e8c222368df98fec308cf41248a9dd0a8c187
2020-11-09 17:05:38 -05:00
Brian Haley 2bb62b43bf Decrease MTU to account for IPv6 header
(MTU - 50) only supports VxLAN over IPv4, decrease it
to support IPv6 as well, which is 20 bytes larger.

Change-Id: I0cf258770f628c1b4fb590bd274b5433fbcc1450
2020-11-06 17:34:53 -05:00
Jens Harbott 47f76acbba Determine default IPv4 route device only when needed
Sometimes instances don't have an IPv4 default route, so only check for
it when we actually need it. In a followup patch we could extend the
code to check for an IPv6 default route instead or in addition.

Related-Bug: 1902002
Change-Id: Ie6cd241721f6b1f8e030960921a696939b2dab10
2020-10-30 09:43:55 +01:00
Jens Harbott 3f28c272d0 Remove deprecated tail_log function
This function has been deprecated for a long time, let's finally
remove it. It is only generating a warning anyway.

Change-Id: I7bd440adf2ce8283e3ad3d5d09e6b2b877e2b42e
2020-10-28 13:06:52 +00:00
Lucas Alvares Gomes 6ecfe67d8e Configure os-vif ovsdb_connection
This patch set the os-vif "ovsdb_connection" configuration option so it
can connect to the local OVSDB. By default, this option points to
tcp:127.0.0.1:6640 and would fail if SERVICE_IP_VERSION == 6.

Also, if SERVICE_IP_VERSION is an IPv6 address, it should be wraped with
square brackets for it to work.

Change-Id: Ie6eec4e140c7464936cf0b0c6307026a94c9f4ee
Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
2020-10-26 13:55:33 +00:00
Sean Mooney 7de6e0b2ec fix ipv6 flag order in worlddump
this change corrects the flag order from 'route -6'
to '-6 route' as the -6 flag is an option when used with
ip is an argument to the the ip command and not the route
subcommand.

-6 is accpeted as an argument to the standalone 'route'
commannd but not 'ip route' subcommand.

Change-Id: Ic2ae472e42b7b455693d0aade48dc5109e1f21ba
2020-10-21 14:05:17 +01:00
Walter A. Boring IV b107f9cf18 Add support for ceph_iscsi cinder driver
This patch adds support to configure the new ceph iscsi driver

Depends-On: https://review.opendev.org/#/c/662829/
Depends-On:https://review.opendev.org/668667
Change-Id: Ica180e00dedb8e7ed60e27e3f4841faa8fef938c
2020-10-15 22:04:46 +00:00
Jens Harbott 0545b48f3b Add IPv6 route information to worlddump
The "ip route" command only outputs IPv4 routes, add a command to also
show IPv6 route information.

Drop output from "ip link" as that information is contained within the
"ip addr" output already.

Change-Id: Iae87f43c4b1c57f07de041e823da9d350c670389
2020-10-13 16:06:44 +02:00
Zuul 6e68add275 Merge "Fix: do not lose the tox_environment value in func tests" 2020-10-13 10:22:08 +00:00
Luigi Toscano 906d824a19 Fix: do not lose the tox_environment value in func tests
The current code always overrides tox_environment when running
functional tests, but the correct behavior is to add
the discovered environment variables to tox_environments,
while keeping the user-specified value for it.

The current behavior breaks the devstack-tox-functional children
jobs, like openstacksdk-functional-devstack-ironic, which set
tox_environment.

Change-Id: I5dc9054a1495ca0ef7745c08316441ab153956f4
2020-10-11 21:59:07 +02:00
Zuul 48bc0924cf Merge "Removing fixup for f32 + dnsmasq 2.81" 2020-10-10 15:01:18 +00:00
Dan Radez 3ebb95f9b5 Removing fixup for f32 + dnsmasq 2.81
workaround reported https://bugs.launchpad.net/neutron/+bug/1896945
fixed by https://review.opendev.org/#/c/755356/

Change-Id: I86a0be548e344ed4e95eab7212ba432bf570d2ae
2020-10-10 10:34:12 +00:00
Riccardo Pittau 8e74a617df Move supported distros to variable
Improve redability of the distro check using a variable to
store supported distributions.

Change-Id: Iffa1619065358d459bd04523b7eeae9049f8f2f0
2020-10-06 11:01:12 +02:00
Ghanshyam Mann 29efb72822 Update DEVSTACK_SERIES to wallaby
stable/victoria branch has been created now and
current master is for wallaby.

Change-Id: I5f5b233127d6ef24452fcd05db990f9ddc244dc4
2020-09-30 11:06:49 -05:00
Zuul 4727c5c946 Merge "Change glance default back to WSGI mode" 2020-09-29 18:49:20 +00:00
Zuul 680298e7c6 Merge "Add possibility to not compile ovs and ovn if that's disabled" 2020-09-29 00:33:58 +00:00
Zuul 07bda155e9 Merge "Update opensuse version" 2020-09-28 19:29:34 +00:00
Zuul 0d14595b02 Merge "Remove Fedora 30 support" 2020-09-28 17:26:48 +00:00
Dan Smith 155109df89 Change glance default back to WSGI mode
The situation around glance under WSGI has changed a lot in a week.
We can now run tasks and imports under WSGI, so let's switch the
default back so that glance is consistent (by default) with the
other projects.

Change-Id: I3ae285b2ac4972c0b8abaccfc7c0ede0e1c49bf1
2020-09-28 08:28:57 -07:00
Zuul 2c07049b40 Merge "Add Fedora 32 to supported list and use as fedora-latest" 2020-09-28 12:15:11 +00:00
Clark Boylan 471f1625bb 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
2020-09-28 09:45:39 +00:00
Zuul 09430e43c4 Merge "Enable access rules tempest tests" 2020-09-27 10:00:45 +00:00
Lee Yarwood f966e28739 Remove Fedora 30 support
Fedora 30 hit EOL earlier in the year and can be removed from devstack.

https://en.wikipedia.org/wiki/Fedora_version_history#Version_history

Change-Id: I47452700d520a544c93c0c187143ec763f026612
2020-09-25 11:34:03 +01:00
Lee Yarwood fa5742f8e1 Add Fedora 32 to supported list and use as fedora-latest
This includes a workaround to a known dnsmasq >= 2.81 issue that
results in unanswered DHCP requests from instances as documented in the
following Neutron bug:

dnsmasq >= 2.81 not responding to DHCP requests with current q-dhcp configs
https://bugs.launchpad.net/neutron/+bug/1896945

For the time being we will attempt to downgrade to 2.80 to avoid this.

Related-Bug: #1896945
Change-Id: I3a760c43956221424926bd9dad0ebe9b28ae2b52
2020-09-25 11:33:57 +01:00
Alexandre Arents 4a1186aa90 tempest: Enable shelve_migrate tests with Libvirt
Enable the compute feature for shelve_migrate on all but LXC and
Xen virt_types.

Related-Bug: #1732428
Depends-On: https://review.opendev.org/#/c/696084/
Change-Id: I31cd00c9117607682213cfa0399709e560f4ad0d
2020-09-25 07:12:42 +00:00
Zuul 77dd657fe7 Merge "Configure cinder store for glance" 2020-09-24 18:37:26 +00:00
Zuul 0e45edd3bf Merge "Switch devstack base job to Ubuntu Focal" 2020-09-24 02:22:16 +00:00
Abhishek Kekane 057aaa6ec9 Configure cinder store for glance
This patch will enable user to configure single cinder store as well as
multiple cinder stores for glance. Below are the parameters needs to be
added in local.conf.

A. For single store
USE_CINDER_FOR_GLANCE=True

B. For Multiple stores
USE_CINDER_FOR_GLANCE=True
GLANCE_ENABLE_MULTIPLE_STORES=True
CINDER_ENABLED_BACKENDS=${CINDER_ENABLED_BACKENDS:-lvm:lvmdriver-1,lvm:lvmdriver-2,nfs:nfsdriver-1,ceph:cephdriver-1}
GLANCE_CINDER_DEFAULT_BACKEND=lvmdriver-1

enable_plugin devstack-plugin-nfs https://opendev.org/openstack/devstack-plugin-nfs
enable_plugin devstack-plugin-ceph https://opendev.org/openstack/devstack-plugin-ceph

NOTE:
GLANCE_CINDER_DEFAULT_BACKEND should be one of the value from CINDER_ENABLED_BACKENDS.
If you need to configure nfs and ceph backend for cinder then you need to add respective plugins in
local.conf file.
If GLANCE_ENABLE_MULTIPLE_STORES is True then it will not configure
swift store for glance even if it is enabled in local.conf file.

Needed-by: https://review.opendev.org/#/c/750018
Change-Id: Id0d63c4ea41cce389eee8dc9a96913a7d427f186
2020-09-23 15:23:15 +00:00
Ghanshyam Mann 848aaf83ed Add nova-ceph-multistore job in devstack gate
nova-ceph-multistore is defined in nova side to test the
glance multistore on ceph and it is voting on nova gate.

There are other multistore testing enhancement going on for
example- https://review.opendev.org/#/c/743800/. so to avoid
any regression, let's run exiting mutistore job on devstack
gate too.

Change-Id: Ie82b4057463df4b6138c53b14a582bd84866aebd
2020-09-23 15:10:36 +00:00
Zuul eac2b0789c Merge "Bionic: Enable Train UCA for updated QEMU and libvirt" 2020-09-21 23:52:43 +00:00
Slawek Kaplonski 7ba26f5cf9 Add possibility to not compile ovs and ovn if that's disabled
There is flag Q_BUILD_OVS_FROM_GIT which can be used to not compile
ovs from source.
But this wasn't respected in the ovn_agent's module in install_ovn
function which was always installing from source ovn and ovs.
We need to disable that e.g. on grenade jobs when new version is
installed.

Change-Id: I7d3f92365e880191dcfe7c618a6f79d5f741144f
2020-09-21 12:59:16 +02:00
Zuul 1f8109ac29 Merge "Further py2 cleanup for Fedora" 2020-09-19 11:36:12 +00:00
Lee Yarwood 7f7f488bc3 Bionic: Enable Train UCA for updated QEMU and libvirt
This is will allow the openstack/nova project to facilitate a minimum
required version bump of QEMU and libvirt within the libvirt virt driver
in I8e349849db0b1a540d295c903f1470917b82fd97 ahead of the planned switch
to focal later in Victoria.

Change-Id: I85eb45632ff229676f7c29708f4a7cc64b3d90e3
2020-09-17 17:47:21 +01:00
Zuul a7252cc0f4 Merge "Make grenade jobs voting again" 2020-09-16 07:27:42 +00:00
Zuul f533ce5408 Merge "Update HACKING doc" 2020-09-16 06:24:39 +00:00
Zuul 68d639f4d6 Merge "Fix propose-updates job" 2020-09-16 06:24:38 +00:00
Sean Mooney ae21b3556f move cleanup of pyc files
Previously pyc files were only cleaned if clean.sh was run.
with this change a new clean_pyc_files function was introduced
with the logic that was previously in clean.sh but it is now
invoked from unstack.sh

With the previous behavior you could not stack with horizon
enabled then unstack and stack again due to the presence of pyc
files that were owned by root.

By moving the clean to unstack in stead of clean.sh you can
now stack, unstack and stack again without hitting the pyc issue.
since unstack is invoked by clean the existing clean.sh behavior has
not changed in practice except for the fact the pyc files are
removed sooner in the process.

This change also removes support for findutils < 4.2.3
Ubuntu 12.04 and CentOS 6 both have 4.4.2 since they were
released 8 years ago and are now EOL its fair to assume
that all modern distros have 4.2.3+
https://repology.org/project/findutils/versions

Change-Id: I13c9aad9be7e0930a0d875b7d382090caf0b8982
2020-09-02 04:48:31 +00:00
Jens Harbott cb8a4a6882 Make grenade jobs voting again
This reverts the changes made to the zuul config in [0]. Since the
backports to the stable branches have been merged, the jobs can be
voting again.

[0] I5d8aa0e58e0409c54451b51de5eb70ba9a68d849

Change-Id: I3f5972e05faea8f11d7e87f3f8b05e4979e6c328
2020-09-01 14:04:00 +02:00
Ian Wienand 18b4251bf4 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.

Temporarily make grenade jobs non-voting in order to allow this
patch to be backported.

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

Change-Id: I5d8aa0e58e0409c54451b51de5eb70ba9a68d849
2020-08-31 15:01:20 +02:00
Lucas Alvares Gomes e7625fc72c [OVN] Follow up of OVN module migration to DevStack
This patch is a follow-up of Ib4194329474e8d68a90886d2a04f027eecd741df.

This patch removes the configure_port_forwarding call from the
neutron-legacy module because port forwarding (just like other
extensions such as DNS, QOS, etc...) are already enabled in the
plugin.sh file in the neutron repository [0]. The
configure_port_forwarding method itself is also defined in the neutron
repository so calling it here may result in a failure in case the plugin
is not enabled.

We are also removing the "dns" extensions from the default
Q_ML2_PLUGIN_EXT_DRIVERS variable because this extension conflicts with
the default DNS extensions that is enabled by Neutron when
q-dns/neutron-dns service is enabled (also in [0]). The LP for this
conflict problem is: https://bugs.launchpad.net/neutron/+bug/1887163.

[0]
https://github.com/openstack/neutron/blob/945a244588b81064e4301b6f055a3c90f472bd7e/devstack/plugin.sh#L101-L103

Change-Id: Iafb9e45520798b2a612192cfc6cca28501465862
Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
2020-08-26 09:46:35 +01:00
Zuul 5aa38f51b3 Merge "[OVN] Move OVN module from Neutron to DevStack" 2020-08-25 15:51:48 +00:00
Jens Harbott f0c12bd4b5 Further py2 cleanup for Fedora
Change-Id: I2433e2ed067f866751bf49983c0a7efce4be8900
2020-08-22 14:06:14 +02:00
Carlos Goncalves b9fe9c74f6 Make PyYAML overridable on Red Hat family distros
This patch fixes an early stack issue where the following error message
would be presented:

ERROR: Cannot uninstall 'PyYAML'. It is a distutils installed project
and thus we cannot accurately determine which files belong to it which
would lead to only a partial uninstall.

We also drop references to removal of Python 2 library egg infos now
that Python 2 is EOL.

Closes-Bug: #1892363
Change-Id: I2876ee58ab6b73682869d6b4e684e10ac5e56ad9
2020-08-20 15:15:10 +02:00
Zuul 5b1d5a99fa Merge "New get-devstack-os-environment role" 2020-08-19 09:01:10 +00:00
Luigi Toscano 6fba3fdfa1 New get-devstack-os-environment role
The role reads the OS_* variables set by devstack through openrc
for the specified user and project and exports them as
the os_env_vars fact. It is meant to be used as a porting aid
for the jobs of the non-unified *clients only.

This is useful to run functional tests against the generated
environment. A slightly less generic version of this role
is currently used by python-cinderclient and python-novaclient
(get-os-environment).

In order to make this more useful, call it from
devstack-tox-functional and derived jobs. The role
execution is disabled by default and it can be enabled
by setting openrc_enable_export: true.

Change-Id: I15f5a187dbc54c82e8f4a08b4bb58d56e0d66961
2020-08-18 22:29:50 +02:00
Zuul c303194450 Merge "Fix is_fedora RHEL 8 detection" 2020-08-17 15:52:03 +00:00
Luigi Toscano 52e52d8937 Add a dependency file for os-brick (and add lsscsi)
There are a few dependencies which are really os-brick-specific.
They are listed in its bindep.txt file, but os-brick is usually
installed from pip, so its bindep.txt file is not available.

As those dependencies are needed by the various services
which use os-brick, move them to their own dependency file
(with the addition of the new lsscsi, required by the next
os-brick stable release) and make sure that file is parsed
when installing the services which require os-brick.

Side note: there should be a way to avoid this duplication
also for pip-installed libraries (normal services can use
files/ or even bindep, but in this case the source is not always
available), (temporarily?) duplicate them, as it has been
the case for the other os-brick dependencies already listed here.

Change-Id: I9ab6e215dbef9ebdb1946da2f9a40ce020ecc95b
2020-08-13 09:55:08 +02:00
Lucas Alvares Gomes 1d468d45db [OVN] Move OVN module from Neutron to DevStack
As part of the Victoria PTG the Neutron team entertained the idea of
having the OVN driver as the default backend in DevStack (this hasn't
yet being decided by the community, this will be discussed within this
cycle).

For this to happen, we also would need to move the module that configures
OVN to the DevStack repository. This is what this patch is doing.

Note that we are updating the lib/neutron-legacy module instead of
lib/neutron in this patch, this is because as part of the PTG the
Neutron team has decided to un-deprecate the neutron-legacy module since
the "new" lib/neutron module is broken and nobody is current working on
it (also all services uses neutron-legacy).

Also, the ovsdbapp has been added to the ALL_LIBS list because a gate
job in the ovsdbapp project repository relies on installing the library
from source instead of pip to run.

Depends-On: https://review.opendev.org/#/c/740663/
Change-Id: Ib4194329474e8d68a90886d2a04f027eecd741df
Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
2020-08-11 15:47:01 +01:00
Jens Harbott 04fdd8c9eb Fix propose-updates job
We need to use python3, our deps are no longer installed in python.

Includes the current set of updates to the plugin registry.

Change-Id: I4753ddf60ed066cc11fa74dbbd63210dbad733a8
2020-08-02 13:13:00 +02:00
Carlos Goncalves 587e0a3510 Fix is_fedora RHEL 8 detection
While RHEL 7 is detected as RedHatEnterpriseServer, RHEL 8 is
RedHatEnterprise.

  $ lsb_release -i -s
  RedHatEnterprise

Change-Id: I3d750d808c6ebea9c230f0508cdbc016415b9922
2020-08-01 21:47:55 +02:00
Zuul 647fef0b40 Merge "Install bindep packages when installing lib from src" 2020-07-30 09:27:55 +00:00
Zuul 9208a371f3 Merge "Remove standalone requirement for glance import" 2020-07-28 14:25:47 +00:00
Sean McGinnis dd3731c86a Install bindep packages when installing lib from src
Most libs maintain their own system packages in a local bindep.txt file.
We don't currently use those when installing packages from source, which
can result in broken package installs.

This adds a flag to always attempt to install bindep packages if the
bindep.txt file exists. If a file cannot be found, it will just emit a
warning and carry on.

Change-Id: Ia0570f837b8af1c3fee0a314b026a4a7ed27e6a9
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-07-28 08:57:22 -05:00
Ghanshyam Mann 32d5b1ea2f Enable image import test
If glance is in standalone mode, image import works
fine so enable the tempest tests. Once we will have image
import or other async tasks working with glance under uwsgi
then we can remove this flag and run import tests by default.

Depends-On: https://review.opendev.org/#/c/741425/
Change-Id: I853e8a3815187f0aa8f05c70488ec948a97e55a6
2020-07-24 17:57:50 +00:00
Dan Smith 33f8f6e684 Remove standalone requirement for glance import
As of the referenced patch in glance, we can do import in wsgi mode.
Also remove the enforcement that import methods are disabled.

Change-Id: I8da4b4ad6105bb64c4045ca80db9742591d01564
Depends-On: https://review.opendev.org/#/c/742065
2020-07-22 07:03:57 -07:00
Zuul e799770f59 Merge "Fix setting enabled_import_methods if glance is standalone" 2020-07-22 02:46:07 +00:00
Zuul 376f3ebb50 Merge "zuul: clean up some legacy jobs" 2020-07-21 16:30:30 +00:00
Dan Smith 7700d5a825 Fix setting enabled_import_methods if glance is standalone
I forgot to update devstack with the section name when I did Grenade.

Change-Id: I928072e935e7a7ec24609cdc4522c96f65d3ba3b
2020-07-20 17:01:41 -07:00
Zuul 56a38c47e2 Merge "Disable all import methods if glance is not standalone" 2020-07-20 21:12:46 +00:00
Zuul 46953439c2 Merge "Fix glance standalone when tls-proxy is disabled" 2020-07-18 18:57:52 +00:00
Dan Smith fcbf3e976c Fix glance standalone when tls-proxy is disabled
We always want to start glance on the internal port now,
regardless of whether or not tls-proxy is in use, because we
write_local_proxy_http_config() for the standalone case.

Change-Id: I47dea645d4a852e02e25af0e1df9c28fec92c42a
Co-Authored-By: Radosław Piliszek <radoslaw.piliszek@gmail.com>
2020-07-18 11:16:10 +00:00
Zuul 369f2cc571 Merge "Add missing glance multi-store configurations" 2020-07-17 21:56:07 +00:00
Zuul eee60c7671 Merge "Only set hw_rng_model by default if we're on libvirt" 2020-07-17 14:53:32 +00:00
Zuul fa75c5dd8a Merge "Default Glance to standalone mode" 2020-07-17 14:10:33 +00:00
Abhishek Kekane f2577fc574 Add missing glance multi-store configurations
While removing registry [1] we by mistake removed some code related to
multiple store configuration for glance. This must be happened during
resolving merged conflicts.

Adding it back.

[1] https://review.opendev.org/708062

Change-Id: I2b84f7b7c51b7b20765a06b48c75006fd2e8ab71
2020-07-17 08:19:55 +00:00
Dan Smith 442c57e168 Disable all import methods if glance is not standalone
Glance should not be exposing import methods that cannot work via its
API, but it does today. In order for tempest (et al) to be able to
properly detect whether import is possible, we must configure the
import methods in standalone mode, or disable them in wsgi mode. The
referenced Glance patch will make this a requirement.

Change-Id: I3bf3498d83607c5e98b70877c061dc54fc3c0a6e
Needed-By: https://review.opendev.org/#/c/741497/
2020-07-16 10:41:13 -07:00
Dan Smith cc0821a586 Default Glance to standalone mode
A whole set of Glance functionality is not usable under uwsgi, including any
of the more powerful async import, customization, and copying functions.
In order to facilitate writing and running tempest tests for these features
in all environments covered by the various jobs across all the projects that
include Glance, we should default to this deployment method.

It is still possible to deploy glance in uwsgi mode by setting the flag to
False, and we can do that for some jobs to make sure that it continues to
work. However, the default should be what we expect deployers will use,
which is standalone mode.

Depends-On: https://review.opendev.org/741479
Change-Id: I141acab2a07a4eebd8d850f900058bc8cbf9c7bf
2020-07-16 08:16:19 -07:00
Dan Smith 49ad4850c8 Only set hw_rng_model by default if we're on libvirt
This makes no sense to set on _every_ devstack deployment, only
if we are using libvirt qemu or kvm. Make it conditional.

Change-Id: I860e899274646ff73b8f084a0583325239aee9cc
2020-07-16 06:30:54 -07:00
Zuul 302ce78aef Merge "Fix ami/aki image create use of $img_property" 2020-07-16 04:54:29 +00:00
Zuul 489645f79e Merge "Use python3-mod-wsgi instead of mod_wsgi on CentOS8" 2020-07-16 04:54:23 +00:00
Dan Smith 2614c1bba1 Fix ami/aki image create use of $img_property
This abstracts out the conversion of key=value,... property lists to a function
and makes both _upload_image() and the two ami/aki image create calls use it. The
move to bare key=value properties introduced a regression for ami/aki where
the --property flag stopped being passed to osc in that case.

Change-Id: Idf7fdfe3f5800f79f6c48f9d9606a7b53436a730
2020-07-16 00:26:42 +00:00
Zuul 12a88cfb76 Merge "Make Glance standalone-ness a separate flag" 2020-07-15 15:02:30 +00:00
Zuul 7376939755 Merge "Use glance import workflow for creating image" 2020-07-15 15:02:28 +00:00
Dan Smith 09eea0b20b Make Glance standalone-ness a separate flag
Full Glance functionality requires Glance being run in a configuration
where it can spawn long-running task threads. The default uwsgi mode
does not allow this, and the current workaround is to set WSGI_MODE
to something other than uwsgi to get the devstack code to deploy
Glance as a standalone service. Since this affects the entire rest of
the deployment, this patch separates out a flag to control this behavior
specifically for Glance. When WSGI_MODE=uwsgi, control of the Glance
deployment mechanism is allowed via GLANCE_STANDALONE=True|False. If
WSGI_MODE!= uwsgi then we deploy standalone Glance anyway.

Change-Id: I79068ce0bd7414bc48ff534ee22f0de5d7b091cb
2020-07-14 08:07:07 -07:00
Zuul 2906645d76 Merge "Re-enable memory_tracker" 2020-07-14 08:52:10 +00:00
Abhishek Kekane 73ad9760a3 Use glance import workflow for creating image
Added new boolean option 'GLANCE_USE_IMPORT_WORKFLOW' default to False.
If this parameter set in local.conf as True then devstack will use the
new import workflow to create the image.

In order to use new import workflow of glance;
user need to set below options in local.conf

GLANCE_USE_IMPORT_WORKFLOW=True

Note that the import workflow does not work in uwsgi because of
some fundamental restrictions it has. Thus, devstack must be configured
with WSGI_MODE=mod_wsgi, otherwise glance will not be able to process
the imports. The new helper function will abort to avoid in that case
to avoid the image never being moved to "active" state by an import
task that will never be executed.

Co-Authored-By: Abhishek Kekane <akekane@redhat.com>
Co-Authored-By: Dan Smith <dansmith@redhat.com>
Needed-By: https://review.opendev.org/#/c/734184
Change-Id: I1306fe816b7a3eca1e2312c0c454be3d81118eca
2020-07-13 13:59:36 -07:00
Luigi Toscano 0cbbefc0cb zuul: clean up some legacy jobs
Replace legacy-tempest-dsvm-lvm-multibackend with its native version,
cinder-tempest-lvm-multibackend.

Remove legacy-tempest-dsvm-neutron-dvr-multinode-full, which was defined
as an experimental job in neutron and removed during the ussuri lifecycle.
See https://review.opendev.org/#/c/693630/

Change-Id: I76d1efaa3a6c1fe9825e8457438f514114b2ecad
2020-07-10 13:21:45 +02:00
Zuul 3b37b95684 Merge "Allow plugins to override initial network creation" 2020-07-09 15:11:25 +00:00
Jens Harbott 95634d9905 Re-enable memory_tracker
The old peakmem_tracker service has been disabled in [0], now enable
the replacement memory_tracker.

Also fail when the old service is still configured, otherwise
consumers might never notice.

Depends-On: https://review.opendev.org/739995
Change-Id: I583caf3f36a8ff41d7d4106dabc6c5f24243085e
2020-07-08 14:11:18 +00:00
Zuul 6fd4daf8dc Merge "Remove n-api-metadata service from compute nodes" 2020-07-08 10:57:04 +00:00
Rui Zang 6184dea966 Remove n-api-metadata service from compute nodes
Starting up n-api-metadata service on every compute nodes does
not solve the problem of isolated networks (no route to metadata
service). It all depends on how 'enable_isolated_metadata' and
related options (e.g. force_metadata) are set in dhcp agent and
what is configured for the 'nova_metadata_host' option of q-meta
service. Having a global n-api-metadata service in the control
node is sufficient for a mult-node lab setup.
Besides, the n-api-metadata services on compute nodes are not
really working due to https://bugs.launchpad.net/nova/+bug/1815082

Change-Id: Ib8691c3eeee59758fbd98989d9460f1458ea422f
Related-Bug: 1815082
2020-07-07 19:43:52 -07:00
Zuul 2ecd182385 Merge "Remove GLANCE_V1_ENABLED option" 2020-07-07 19:16:32 +00:00
Zuul d3b41b528d Merge "Allow IP-based subject alt names" 2020-07-07 08:43:50 +00:00
Zuul 3e0960d78f Merge "Revert "Drop keystone dedicated ports"" 2020-07-06 22:21:42 +00:00
Zuul edd867daef Merge "Remove tempest deprecated img_dir option" 2020-07-06 20:07:29 +00:00
Abhishek Kekane f8dbfd394a Revert "Drop keystone dedicated ports"
This reverts commit f6286cb586.

This patch is blocking glance as it needs mod_wsgi to perform new import workflow.

Change-Id: I4475247dfe986114d37678b3d3d552c0c7d02ddc
2020-07-06 14:01:08 -05:00
Zuul 105b2f4ee5 Merge "Fix string comparison" 2020-07-06 15:10:00 +00:00
Zuul 79722c78d5 Merge "Move process-stackviz role from Tempest to Devstack" 2020-07-06 15:09:57 +00:00
Zuul 153de584d0 Merge "Add neutron-ovn-tempest-ovs-release job to the check queue" 2020-07-06 15:09:55 +00:00
Zuul e3e8063380 Merge "Cleanup VM instances during unstack" 2020-07-02 11:27:25 +00:00
Xinliang Liu 8956006e51 Fix string comparison
String comparison should be included with square brackets.

Change-Id: I9a4fab7848e5dba8a5b3b09a75e7aac213368706
2020-07-02 08:34:01 +00:00
Hirotaka Wakabayashi 1e26508983 Use python3-mod-wsgi instead of mod_wsgi on CentOS8
This fixes a stack.sh execution error on CentOS8. We should use
python3-mod_wsgi instead of mod_wsgi since mod_wsgi is replaced by
python3-mod_wsgi. The following change may affect this issue.
https://git.centos.org/rpms/mod_wsgi/c/4a746b53e9e3fef74b227e016e785449160871b8?branch=c8s

Change-Id: I5344ecf519e1a79091b6158c2d711d09b21fae0c
Closes-Bug: #1885645
2020-07-02 06:27:06 +00:00
Radosław Piliszek 3cbb33e5c6 Fix python3_enable to return true
Recent regression spotted by Dmitry Tantsur.
DevStack dropped Py2 support but the now-unused-in-devstack
python3_enable got its result nastily inversed.

Change-Id: I4b37cc847a24705c4955cec2e6e45f0514705f1b
2020-06-30 17:52:10 +02:00
Zuul 48c0d38502 Merge "Add "OVN" debs and rpms package files" 2020-06-30 11:37:29 +00:00
Zuul 6d9591fe41 Merge "Make opensuse platform job non-voting again" 2020-06-30 11:01:35 +00:00
Zuul e0d06adffc Merge "Drop support for python2" 2020-06-30 08:53:44 +00:00
Zuul 1041007e89 Merge "Drop keystone dedicated ports" 2020-06-29 18:24:40 +00:00
Jens Harbott 59519ca5cc Make opensuse platform job non-voting again
The non-voting flag was accidentally dropped in [0].

[0] Ib4416dc2f5e003fd770f5240a8f78213c56af8e6

Change-Id: If9519f1ac9afd66553e1c1410fdc16369f166b98
2020-06-29 10:24:21 +02:00
Xinliang Liu b066707d64 Fix targetcli install error on ubuntu focal
No targetcli package on Ubuntu Focal, it should use targetcli-fb also
when "$CINDER_ISCSI_HELPER" == "lioadm".

Although Xenial only has targetcli, but Xenial is dropped from CI. And
starting from bionic, Ubuntu uses targetcli-fb to replace targetcli. So
here we can use is_ubuntu to make ubuntu use targetcli-fb.

Change-Id: I6d35b6651d486e716980dcd9f4d693bed560463a
2020-06-28 09:59:02 +00:00
Ghanshyam Mann bde1804ee9 Switch devstack base job to Ubuntu Focal
As per Victoria cycle testing runtime[1], we need
to test upstream CI/CD on Ubuntu 20.04(Focal). TC is
in the process of defining this as a community goal[2]

By moving the devstack base job to Ubuntu focal, all project side job
or devstack-tempest job will automatically migrate to the new distro
until they override the nodeset.

As devstack is branched, all the stable jobs derived from devstack jobs will
keep working on Bionic.

[1] https://governance.openstack.org/tc/reference/runtimes/victoria.html
[2] https://governance.openstack.org/tc/goals/proposed/migrate-ci-cd-jobs-to-ubuntu-focal.html

Depends-On: https://review.opendev.org/#/c/738328/

Story: #2007865
Task: #40212

Change-Id: I63e69e898376e728eaf6d857426276fc93a1a0e3
2020-06-28 00:40:20 +00:00
Zuul 46e74f339d Merge "Prepare for dropping keystone admin endpoint" 2020-06-27 12:25:29 +00:00
Zuul 85825f1c2c Merge "Provide integer number to arping "-w" parameter" 2020-06-27 12:25:26 +00:00
Brian Rosmaita ee5cf747d8 Remove GLANCE_V1_ENABLED option
This option sets enable_v1_api in glance-api.conf, a setting that
was removed by change Ia086230cc8c92f7b7dfd5b001923110d5bc55d4d
in July 2018, so remove the devstack option from lib/glance.

It occurs in two other places:

This option is used in lib/cinder to set an option that was removed
from Cinder by change Ice379db9ae83420bacf9e96e242c7515930eae86 in
Queens, so remove the related code.

When this option is False, it is used in lib/tempest to set
[image-feature-enabled]/api_v1 to False in the tempest config file.
However, the default value of ths setting has been False since
change Iab3a209c744375bf2618afc00a3f7731b62f557e in Sept 2018,
so remove the related code.

Change-Id: I4b18a0a388ed7e7a392fabeac613778e0d23dee7
2020-06-27 10:47:53 +02:00
Jens Harbott d7a82f41e4 Drop support for python2
python2 is EOL, let's move on and only support python3.

Change-Id: Ieffda4edea9cc19484c04420ed703f7141ef9f15
2020-06-26 15:27:32 +02:00
Jens Harbott f6286cb586 Drop keystone dedicated ports
Those historic references to port 5000 and 35357 aren't being used
anymore for some time, so let us drop them.

Clean up some python2/3 wording along the way.

No longer mention Identity API v2, which is also a thing of the past.

Change-Id: Iafff097eee082f24ea2ae27ad038ad115aa36c61
2020-06-26 15:26:22 +02:00
Jens Harbott 32c00890ed Prepare for dropping keystone admin endpoint
Keystone no longer has any special functionality hidden behind the admin
endpoint. Stop referencing it in consumers, so it can later be dropped
completely.

Change-Id: I04a5d77908005268cc7c59e7e9ddeea70f6732e2
2020-06-26 15:26:22 +02:00
Ghanshyam Mann 02da0c40f9 Add focal nodeset
This commit adds the focal nodeset for
multinode so that those can be used for
projects side jobs or testing.

We need to define these as first step to avoid
any conflict on nodeset name if project started
defining these.
Example: three node focal nodeset is already
defined in x/tobiko, fixing the same in depends on.
-I30a6bb63269f031a74f9bff6c765d59d91088797

Depends-On: https://review.opendev.org/#/c/738128/

Change-Id: I5ce49f7a7d52d00555c14b08864bc8975956b20c
Story: #2007865
Task: #40212
2020-06-26 01:17:20 +00:00
Rodolfo Alonso Hernandez ca486c5259 Provide integer number to arping "-w" parameter
Some arping versions only accept an integer number for the
"deadline" (-w) parameter.

Change-Id: Ie21c9b5820262d049c0fcd8147d85cc110d88272
Closes-Bug: #1885169
2020-06-25 18:22:28 +00:00
Zuul 572815884c Merge "Remove dragonflow reference" 2020-06-24 08:18:36 +00:00
Zuul 966665a85a Merge "Update distros on the docs start page" 2020-06-24 06:00:51 +00:00
Zuul 48c2f9de74 Merge "Stop claiming to support Debian distros" 2020-06-24 02:19:04 +00:00
Zuul 9b0364f20e Merge "Make devstack run on focal (Ubuntu LTS 20.04)" 2020-06-24 01:59:51 +00:00
Zuul f395253c48 Merge "Use python3 pip module instead of pip binary" 2020-06-23 21:33:20 +00:00
Zuul 76d1729f94 Merge "Enable certificate check for glance_store+swift" 2020-06-23 16:47:11 +00:00
Sean McGinnis 8b099c408b Remove dragonflow reference
Dragonflow was retired in 2018 and is now being retired. This removes a
documentation reference to it.

Change-Id: I24ab79482306a7c816b5242a981f1b508ff8f6ec
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-06-23 10:30:20 -05:00
Zuul 3db45118b6 Merge "Remove neutron-fwaas from the jobs' required project" 2020-06-23 08:38:25 +00:00
Jens Harbott cd57449c9f Stop claiming to support Debian distros
We haven't had a working job for stretch or jessie in years, attempts
to get things fixed have been dropped, set let's be honest and drop
those from our support list.

Change-Id: Ia6152be79f8044f7ff039ec0911ad4938d6271f4
2020-06-23 08:08:13 +02:00
Dr. Jens Harbott 3480093b93 Make devstack run on focal (Ubuntu LTS 20.04)
- Add a nodeset and a platform job
- Drop uwsgi-py2 pkg that no longer exists
- Blacklist tests that are currently failing

Change-Id: Ib4416dc2f5e003fd770f5240a8f78213c56af8e6
2020-06-23 08:04:18 +02:00
Jens Harbott f1ed7c77c5 Use python3 pip module instead of pip binary
Focal only provides a pip3 binary, no pip3.8. Instead of working around
that with a symlink, use the module instead.

Add version information output for this variant.

Change-Id: I7af194ecc40e4d43c10ce067a661bb6ab4ca37d4
2020-06-23 08:02:52 +02:00
Ghanshyam Mann 264d2a2e5f 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:32:09 +00:00
Federico Ressi c2c2b6b415 Handle uwsgi install for CentOS/RHEL
Change-Id: Ifa876b3e5f89258f40055fa7ce03f5e9c601771c
2020-06-18 10:18:06 +00:00
Zuul a13ab8db2d Merge "Revert "Work around uwsgi breakage"" 2020-06-17 19:09:28 +00:00
Slawek Kaplonski 744f50b970 Add neutron-ovn-tempest-ovs-release job to the check queue
During the Victoria cycle we plan to switch default Neutron backend in
Devstack from OVS to OVN.
As first step before we will start discussion about this change with
whole community, we want to add tempest ovn based neutron job to
the devstack check queue so that we can keep verifying that with
devstack changes.

Change-Id: I8484baa7398b28ed5ef62f86b55022c7d8703f56
2020-06-16 22:28:28 +02:00
Abhishek Kekane 0ae5787611 Remove glance registry configuration
Glance has deprecated registry serivce for long and now efforts are placed to
remove the registry code from the glance repo.

To avoid regression on other projects, gate jobs etc. removing
configuring registry service from the devstack.

Change-Id: I6a7be6bdc97acc43c8e985060aeea05d92642e80
2020-06-16 17:31:49 +00:00
Slawek Kaplonski 66c812d392 Remove neutron-fwaas from the jobs' required project
Neutron-fwaas is going to be deprecated in master branch with [1].

[1] https://review.opendev.org/#/c/735828/

Change-Id: I513ef36e681fc3f9e5aa9f81c9aedba716366729
2020-06-16 12:13:45 +02:00
Zuul 038ea9ab92 Merge "Undeprecate neutron-legacy scripts" 2020-06-15 17:15:45 +00:00
Andreas Jaeger 10c3ffd265 Handle uwsgi install for openSUSE
Add packages for openSUSE distribution for installation of uwsgi.

Change-Id: I2ce8959460a79b6472bd9dd59edd7d94eccbacf5
2020-06-15 10:03:42 +02:00
Jens Harbott a267c5f477 Revert "Work around uwsgi breakage"
This reverts commit 84737ebd96.

Change-Id: I1544c1ad9cfe3ff199153736acadba0761b51fc4
2020-06-15 09:54:47 +02:00
Ian Wienand 2d903568ed 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.

Change-Id: I82f539bfa533349293dd5a8ce309c9cc0ffb0393
2020-06-15 09:53:04 +02:00
Jens Harbott 84737ebd96 Work around uwsgi breakage
uwsgi broke installation from source with their latest release [0].
Since we want to move away from source installation anyway, make
grenade based jobs non-voting for the moment so that we can backport
[1] properly.

[0] https://bugs.launchpad.net/bugs/1883468
[1] https://review.opendev.org/577955

Related-Bug: 1883468
Change-Id: I8e47bb7c70031a4df7f1af6b811df4c6cc784b2a
2020-06-15 09:52:40 +02:00
Zuul 40879683cc Merge "Don't install uwsgi for keystone" 2020-06-12 18:14:03 +00:00
Zuul 44e7f58aa2 Merge "Use uwsgi binary from path" 2020-06-12 18:14:01 +00:00
Martin Kopec 729546a1ad 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
Depends-On: https://review.opendev.org/#/c/710996/
Related-Bug: #1393881
2020-06-11 19:59:51 +00:00
Jens Harbott c3b58f5335 Fix typos in networking document
The FLOATING_RANGE variable should specify the network address of the
used prefix for clarity.

Change-Id: I547bd42d8bdc5f0f2001d47f2d5b43729773b1bc
Closes-Bug: 1870204
2020-06-08 11:58:29 +02:00
Zuul 0d6234b4b1 Merge "Doc: g-reg is no longer required" 2020-06-04 21:43:07 +00:00
Zuul c0bb22d36e Merge "swift: Configure s3token appropriately" 2020-06-04 21:43:05 +00:00
Zuul 3f2fafc83a Merge "swift: Fix s3api/keystone interaction" 2020-06-04 21:26:28 +00:00
Takashi Kajinami c3db92b9d7 Doc: g-reg is no longer required
The glance-registry service was deprecated in Queeens release, and
no longer required.

Change-Id: I0d2b4604cd39d5131410b8038f92057128ca7b75
2020-06-04 23:57:18 +09:00
Zuul 4c0a8f2eef Merge "Stop to use the __future__ module." 2020-06-04 11:45:04 +00:00
Zuul e0f051ced7 Merge "Clean up remainders of USE_SYSTEMD and logging setup" 2020-06-04 10:36:47 +00:00
Zuul ff479d03ee Merge "Fix devstack default settings in aarch64" 2020-06-04 10:13:00 +00:00
Hervé Beraud 4f2a617105 Stop to use the __future__ module.
The __future__ module [1] was used in this context to ensure compatibility
between python 2 and python 3.

We previously dropped the support of python 2.7 [2] and now we only support
python 3 so we don't need to continue to use this module and the imports
listed below.

Imports commonly used and their related PEPs:
- `division` is related to PEP 238 [3]
- `print_function` is related to PEP 3105 [4]
- `unicode_literals` is related to PEP 3112 [5]
- `with_statement` is related to PEP 343 [6]
- `absolute_import` is related to PEP 328 [7]

[1] https://docs.python.org/3/library/__future__.html
[2] https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html
[3] https://www.python.org/dev/peps/pep-0238
[4] https://www.python.org/dev/peps/pep-3105
[5] https://www.python.org/dev/peps/pep-3112
[6] https://www.python.org/dev/peps/pep-0343
[7] https://www.python.org/dev/peps/pep-0328

Change-Id: Icf8bd00b271f44b6bb0c932d6d49fe6de8a22537
2020-06-02 20:10:56 +02:00
Zuul d6a8784041 Merge "nova: Remove configuration of '[scheduler] driver'" 2020-06-02 12:37:54 +00:00
Ian Wienand 076c9f1b4b Don't install uwsgi for keystone
This is already unconditionally installed via install_apache_uwsgi in
stack.sh; we don't need to install it again in keystone.  Since we
need workarounds on some platforms (see
I3bc5260e77cebe852cc8d70d9eddf84ef71d74bb) we only want to do this in
one place.

Change-Id: I40d84cbdf68cf6bb5cba143b6c0c126cdb8a84d4
2020-06-01 15:50:31 +00:00
Ian Wienand 312517d510 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.

Change-Id: I298e3374e9c84e209ffcabbaaacda17f8df19f4f
2020-06-01 15:48:16 +00:00
Dr. Jens Harbott de41a18909 Update distros on the docs start page
Centos 7 is no longer supported, replace with Centos 8. Also Debian
hasn't been working for some time and progress in fixing it has stalled,
so drop it for now.

Change-Id: Ic1513b20f296978bca095c7aa79f022d7d9ab7ac
Closes-Bug: 1881183
2020-05-29 07:23:48 +00:00
OpenStack Proposal Bot 90c6c65987 Updated from generate-devstack-plugins-list
Change-Id: I77d03c088a6b5019ac69048becfff3f24573a0b3
2020-05-29 06:06:08 +00:00
Zuul 3d13e82f0c Merge "Remove sgabios.bin workaround" 2020-05-28 15:08:27 +00:00
Stephen Finucane 65102e772e nova: Remove configuration of '[scheduler] driver'
This option was deprecated in Ussuri [1] as nova no longer provided any
schedulers aside from the filter scheduler and the existence of
third-party schedulers was very unlikely. Stop configuring this and
simply use the default.

[1] https://review.opendev.org/#/c/707225/

Change-Id: Iabdd1d00e00ee269334f0fe0db265a97207e2dc6
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2020-05-27 14:24:09 +01:00
Zuul 9a6ae3419c Merge "Switch to newer openstackdocstheme version" 2020-05-27 06:43:24 +00:00
Tim Burke 6681a1f126 swift: Configure s3token appropriately
We need an appropriate auth_uri for s3token to be able to contact
Keystone.

Since tempauth is always enabled, we want to delay the auth decision
until after tempauth has had a chance to try.

Change-Id: Ie4ff33a617b9dc74d51d037ec8ebd0d9787dd76d
2020-05-26 20:11:30 -07:00
Tim Burke 5b48e362af swift: Fix s3api/keystone interaction
For a long time, swift3 recommended a pipeline like

   ... swift3 s3token authtoken keystoneauth ...

This led to inefficiencies where the proxy would first contact Keystone
to validate the S3 signature and issue a token, then contact Keystone
*again* to validate the token ID that was just issued.

After s3token moved into the swift3 repo, it was improved to be able
to put all of the headers into the WSGI environment that Swift's
keystoneauth middleware expected and the recommended pipeline was
changed to something like

   ... authtoken s3api s3token keystoneauth ...

At the time, the old order would still work, it would just be less
efficient. When support was added for Keystone v3, however, the new
order became mandatory.

All of that happened before swift3 moved back into Swift as s3api, but
the pipeline placement problems are the same: Keystone users won't be
able to use the S3 api with the current order.

Change-Id: Id0659f109cc2fc12ddb371df0b26812ba8c442d9
Related-Change: I21e38884a2aefbb94b76c76deccd815f01db7362
Related-Change: Ic9af387b9192f285f0f486e7171eefb23968007e
2020-05-26 16:21:49 -07:00
Maciej Józefczyk 7a0fa4fd9e Update cirros image to cirros-0.5.1
New cirros with recent fixes for metadata service
has been released. [1]
Let's update the image version in gate.

This also includes a fix to pass image name to SDK tests.

[1] https://github.com/cirros-dev/cirros/pull/11/commits/e40bcd2964aa496a9d03e1aaf95cf7a86938f129

Change-Id: I6ccd646f1c22a99bed0bebf6e363d2190241b667
Co-authored-by: Radosław Piliszek <radoslaw.piliszek@gmail.com>
2020-05-26 16:08:19 +00:00
Riccardo Pittau e726ecb537 Remove sgabios.bin workaround
The bug has been fixed since a while, also in recent distributions,
for example Ubuntu 20.04, the sgabios.bin ROM is provided directly
by qemu-system-data as an actual file under /usr/share/qemu and
it conflicts with the one provided by sgabios, so removing the
workaround is actually needed to prevent failures.

Change-Id: Ib5f23dbd8839a0927418692054f4ed4abd76babc
2020-05-25 11:50:59 +02:00
Andreas Jaeger 7f1a8c1c3e Switch to newer openstackdocstheme version
Switch to openstackdocstheme 2.2.1 version. Using
this version will allow especially:
* Linking from HTML to PDF document
* Allow parallel building of documents
* Fix some rendering problems

Update Sphinx version as well.

Set openstackdocs_pdf_link to link to PDF file. Note that
the link to the published document only works on docs.openstack.org
where the PDF file is placed in the top-level html directory. The
site-preview places the PDF in a pdf directory.

Set openstackdocs_auto_version to not auto-version the documents.

Set openstackdocs_auto_name to use 'project' as name.

openstackdocstheme renames some variables, so follow the renames
before the next release removes them. A couple of variables are also
not needed anymore, remove them.

Change pygments_style to 'native' since old theme version always used
'native' and the theme now respects the setting and using 'sphinx' can
lead to some strange rendering.

See also
http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014971.html

Change-Id: I26887b175b9c1ced7347289b7d5d4f57a20ec36a
2020-05-22 17:26:24 +00:00
Lee Yarwood 54edc7aeef 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
2020-05-22 15:40:03 +01:00
Vladislav Kuzmin 9cbd02d8c8 Enable certificate check for glance_store+swift
Disable insecure option for glance_store with
swift backend when tls is enabled.
Specify swift_store_cacert option.

Change-Id: Ia1e8f596c95dd7b6e63cb21a94c8316dc71bf945
2020-05-20 12:14:04 +04:00
Zuul 43c172acd0 Merge "New TEMPEST_VOLUME_REVERT_TO_SNAPSHOT setting" 2020-05-15 23:32:01 +00:00
Luigi Toscano 8fd45dec50 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
2020-05-12 12:00:20 +02:00
Colleen Murphy 782efb0f8a Fix pip distro package removal for focal
Ubuntu Focal doesn't have python-pip, only python3-pip. Trying to
uninstall a package that apt doesn't know about (installed or
uninstalled) results in a nonzero exit code so devstack fails. This
patch makes the package removal safer for both python2 and python3 cases
by checking first if the package exists.

Change-Id: I3b1118888cb0617ffb99b72c7e9a32308033783e
2020-05-11 18:28:32 -07:00
Kevin Zhao 551848dd69 Fix devstack default settings in aarch64
1. Lack qemu-efi in ubuntu
2. Lack edk2.git-aarch64 in Fedora/Centos
3. Remove NOVNC disable.

Change-Id: Ifbd0c386df6b28bc64cef20cab8e08f99a85c782
Signed-off-by: Kevin Zhao <kevin.zhao@linaro.org>
2020-05-11 08:24:54 +00:00
Andreas Jaeger 53c2f6fe23 Cleanup py27 support
This repo is now testing only with Python 3, so let's make
a few cleanups:
- Remove obsolete section from setup.cfg
- Use newer openstackdocstheme and Sphinx version for python 3
- Remove install_command from tox.ini, the default is fine
- Move basepython into testenv
- Update bashate version

Change-Id: I3d78b3787af2efce831d223dbcab6cf84c358028
2020-05-09 13:35:01 +02:00
Andreas Jaeger c104afec7d Switch to new grenade job name
The integrated gate template (integrated-gate-py3) has been switched
to the new grenade name (grenade-py3 -> grenade). This repo uses the
template but also has for irrelevant files an extra entry.

Rename the job following the template change to avoid duplicate
grenade runs.

Details:
- http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014602.html

Depends-On: https://review.opendev.org/725148
Change-Id: I73e67c0e01ca231678903b2460dab672f17251e3
2020-05-04 08:21:02 +02:00
Ian Wienand 67fd81a484 Cleanup yum things
We no longer support platforms with Yum on master.  Cleanup old
references and convert to dnf.

We don't need any of the failure wrapper stuff as dnf runs in strict
mode by default.

There seem to be a few callers out there, so we'll leave it called
yum_install for now.

Change-Id: Ie71a48fd85b00a97a14bf260cd013b18af4cce06
2020-04-30 16:05:15 +10:00
Ian Wienand 36705b5233 CentOS 8 support
This adds support for CentOS 8

Change-Id: If7ddbd6655086657db03074a27a2d47053fd88e0
2020-04-30 12:53:52 +10:00
Ian Wienand 1147300b9c Remove bridge-utils/brctl usage
This package isn't available on some distributions hasn't been
required in Neutron for several years
If679e79fa3242ee1cd8610b5525deca35b41c87e.  Remove it.

Change-Id: I7308a885c1d084efe2f0b9f542443d35966140ed
2020-04-30 10:09:47 +10:00
Zuul 773fd20dd9 Merge "setup-devstack-source-dirs: add var for paths" 2020-04-28 22:00:26 +00:00
Zuul f4a629b4b0 Merge "Bump noVNC to 1.1.0" 2020-04-28 04:16:11 +00:00
Ghanshyam Mann bc86e82a61 Update DEVSTACK_SERIES to victoria
stable/ussuri branch has been created now and
current master is for victoria.

Change-Id: I10bd20adf6ce43c6c73acaa646d425c6df6da199
2020-04-27 12:03:38 -05:00
OpenStack Proposal Bot ccc5826725 Updated from generate-devstack-plugins-list
Change-Id: I04b13cb0114233afca9aa7987144bd69d6d0f185
2020-04-27 06:13:34 +00:00
Mohammed Naser 332992ace2 setup-devstack-source-dirs: add var for paths
The paths for the devstack source directories are currently hardcoded,
this patch allows overriding that list.

Change-Id: I2b673b0d110d84658b89bb14663584330deaf3aa
2020-04-26 12:39:05 -04:00
Zuul 1b01f23b74 Merge "Support upload of qcow2.xz image format" 2020-04-23 09:01:44 +00:00
Zuul 31189db8bb Merge "[ussuri][goal] Update contributor documentation" 2020-04-23 07:30:06 +00:00
Ghanshyam Mann 4578f98944 [ussuri][goal] Update contributor documentation
This patch updates/adds the contributor documentation to follow
the guidelines of the Ussuri cycle community goal[1].

[1] https://governance.openstack.org/tc/goals/selected/ussuri/project-ptl-and-contrib-docs.html
Story: #2007236
Task: #38554

Change-Id: I870955fda7ee6e0d7809faa309bbc31c2ddd653a
2020-04-23 02:56:13 +00:00
Bharat Kunwar f70cb70acb Support upload of qcow2.xz image format
Some images come in *.xz format [1] and this needs to be
uncompressed before being uploaded.

[1] https://builds.coreos.fedoraproject.org/prod/streams/stable/builds/31.20200323.3.2/x86_64/fedora-coreos-31.20200323.3.2-openstack.x86_64.qcow2.xz

Change-Id: I11f8484ba939c4b2c0a98aa08ef7db730baf71e8
2020-04-22 15:54:58 +00:00
Zuul 13dac66885 Merge "libs/rpms : update for CentOS 7 removal" 2020-04-22 11:06:02 +00:00
Zuul 125ed50794 Merge "Cleanup rpm-distro mariadb install" 2020-04-22 11:06:00 +00:00
Zuul 95d3d7a5fc Merge "lib/tls: use python3 to run inline script" 2020-04-22 10:39:29 +00:00
Ian Wienand 39bc71cedd libs/rpms : update for CentOS 7 removal
With the removal of CentOS 7, we can re-evaluate the rpm
installations.

We should not need virtualenv after https://review.opendev.org/712609

There should be no need for python-devel as we're python3

pyOpenSSL was added to workaround memory issues in
9e98f9435e (2015) ... I think we've
moved on.

pyxattr is not a package; remove it.

I don't see we need packaged m2crypto, which isn't a package on CentOS
8.  nor libxml2-python; these days it has wheels which should work
with the normal installation process.

centos8 has:

 * targetcli
 * pcp-system-tools (and no dstat)
 * iptables-services
 * java-1.8.0-openjdk-headless
 * kernel-modules
 * rsync-daemon

just as all supported fedora's do, so we can remove any matching here.

Change-Id: I542c426a67a98f331d2a29bacd220af81fab8cc4
2020-04-22 14:02:10 +10:00
Ian Wienand 812e7846c9 Cleanup rpm-distro mariadb install
We have lib/databases/mysql which is installing databases, remove it
from the bulk package lists.

Split is_fedora (fedora & centos8 -- soon) to install mariadb-server
and mariadb-devel to retain status-quo.

On suse this seems to be a meta-package

 'mariadb-server' not found in package names. Trying capabilities.

so split that out.  It seems it has never been installing the -devel
package, and things work (presumably clients are coming from wheels so
don't need to build against it).

Change-Id: I86433318e8f76c40c5c792b795411a5c9d8351d3
2020-04-22 14:02:10 +10:00
Ian Wienand 3cd41019b0 lib/tls: use python3 to run inline script
We only need to run this fixup for the active python now we are 3 only.

Change-Id: I7616e5ee5693b2890fb7f6bd9052890a82904c22
2020-04-22 14:01:53 +10:00
Lee Yarwood ad1635147c Bump noVNC to 1.1.0
v1.1.0 was released over a year ago now so move to it ahead of 1.2.0.

Change-Id: I13c5638f320b18c4f6f945528352471d2bb31313
2020-04-19 20:58:37 +01:00
Zuul 5b5aefb089 Merge "tempest: Enable stable_rescue tests with Libvirt" 2020-04-18 22:40:03 +00:00
Zuul ef4e75137d Merge "Fedora: install python3-libguestfs" 2020-04-16 17:11:44 +00:00
Zuul 9e7a454d23 Merge "Remove CentOS 7 as supported environment" 2020-04-16 17:11:41 +00:00
Zuul 18f0d67706 Merge "Fedora: Mark Fedora 31 as supported and use within fedora-latest" 2020-04-16 17:11:39 +00:00
Zuul fb40a23713 Merge "Fedora: Update required RPMs for Fedora 31" 2020-04-16 17:11:37 +00:00
Zuul fd68534a68 Merge "Updated from generate-devstack-plugins-list" 2020-04-16 17:10:05 +00:00
Ian Wienand 9b8b7021d0 Fedora: install python3-libguestfs
All platforms are python3 now

Change-Id: Ie9f4c7e52f23a45bb8cf70a5fddf1b21a40d7000
2020-04-16 13:03:56 +10:00
Ian Wienand c287e7ec3c Remove CentOS 7 as supported environment
We do not support CentOS 7 on master branch due to no Python 3 or
ongoing eco-system (i.e. RDO) support; see
Id9ef507dd6f4226d65c6ed3043666b0aa6a3bd1c.

Change-Id: If98581708568e7a8d15e6edc588a008df0cac0fb
2020-04-16 12:47:38 +10:00
Zuul 07be557472 Merge "Use venv for VIRTUALENV_CMD" 2020-04-15 16:16:30 +00:00
Lee Yarwood c36e51b0ae Fedora: Mark Fedora 31 as supported and use within fedora-latest
Change-Id: I06235eb5bf722e6f3ab05da577fa0f00638c87b1
2020-04-14 10:12:02 +01:00
Lee Yarwood f9e81d3438 Fedora: Update required RPMs for Fedora 31
This includes the addition of the python3-virtualenv package required to
provide the virtualenv binary that is no longer present in the image.

Change-Id: Ie8e66d8b9f93063b97f88f41a626daddf235339b
2020-04-14 10:11:33 +01:00
OpenStack Proposal Bot e0da11cec5 Updated from generate-devstack-plugins-list
Change-Id: I0c3950729380646e1a98a90ee82e8562cc8c33c1
2020-04-14 06:10:51 +00:00
Ian Wienand e6852eadb1 Use venv for VIRTUALENV_CMD
Using venv, which is part of python3, we avoid an extra dependency on
the virtualenv package.  For Debuntu, which splits this out into a
separate package, add this to debs/general.

This is part of the infra efforts to ship "plain" nodes without any
dependencies installed.  While devstack can re-install virtualenv, we
don't need any features it provides and it means one less dependency.

Change-Id: I3c323640f288e57581a4eb8adba2a08d0b0cbd8f
2020-04-14 15:32:42 +10:00
Lee Yarwood e16e925e12 Fedora: Do not start the lvmetad service after Fedora 30
This deprecated service has been removed from lvm2 in Fedora 31:

https://src.fedoraproject.org/rpms/lvm2/c/0469456b352530d9f507f2515e674bfb03671f48

Change-Id: I06d572a72969c5e5e8e038caef19e358e4f97b2b
2020-04-12 11:19:12 +01:00
Zuul 01826e1c5b Merge "Remove fixup_virtualenv" 2020-04-09 16:00:35 +00:00
Zuul fdceb69319 Merge "Add python3-dev package for Debian based distros" 2020-04-06 08:41:22 +00:00
Colleen Murphy 497caf0157 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
2020-04-03 10:14:07 -07:00
Witek Bedyk 7a2c1c2b1b Add python3-dev package for Debian based distros
When stacking outside of Zuul CI the wheels have to be built locally and
python3-dev package is required.

Story: 2007491
Task: 39213

Change-Id: I0960269d5cf193c9ececc5490485522c74646382
2020-04-03 10:42:21 +00:00
Zuul f4ab2ce564 Merge "Update docs about python-systemd pkg" 2020-04-03 05:21:40 +00:00
Zuul 3f72ef7872 Merge "Test also swift-dsvm-functional-py3" 2020-04-03 05:21:39 +00:00
Ian Wienand 1587ba1bd5 Remove fixup_virtualenv
This first came in with Id749c37ab7fefa96b35f11816b56b9def5ef4b08.  It
talks about ancient versions of pip; can't see we need it any more.

Change-Id: I9d4831955070990a81a809d988612d9d5b1aa672
2020-04-03 09:36:01 +11:00
Radosław Piliszek be26306b4a Support extras in Glance Store install
Recent change to devstack dropped installing test-requirements [1]
However, this caused gate failures due to lack of glance-store
deps for cinder and swift support.

This patch makes devstack install relevant extras depending on
enabled features.

Additionally, relevant functions are added/fixed to make this
possible.

glance-store = glance_store (for gerrit search match)

[1] https://review.opendev.org/715469

Change-Id: I0bf5792a6058b52936115b515ea8360f6264a7c9
2020-03-30 19:53:32 +02:00
Radosław Piliszek aa71ebf92c Test also swift-dsvm-functional-py3
Swift keeps testing py2 but we should keep both in shape.

To fix stestr on py2:
Depends-on: https://review.opendev.org/715942

Change-Id: I616e39c64e22d467d7186dba98226cc5beef23ea
2020-03-30 13:45:34 +00:00
Monty Taylor 09b5b05c47 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
2020-03-27 11:22:39 -05:00
Monty Taylor c2830fb267 Revert "Run pip check at end of devstack"
This reverts commit 79b8e79488.

This is breaking things in various jobs, most notably because
we do not put constraints on linters - but we install
test-requirements which then can conflict with each other.

Change-Id: Ibc5603c61b38ce44db58fb27a27352f59123ad09
2020-03-27 11:12:31 -05:00
Monty Taylor c26dfb0d6f Run pip check at end of devstack
The new pip depsolver is coming this summer. Until it's ready,
run pip check at the end of devstack to make sure we're not
somehow installing conflicting package versions. We shouldn't
be, because of constraints, but if we are, better to know and
start figuring it out.

Change-Id: Id98f0848ff5a252d93e5f8029df2d069924d603f
2020-03-26 09:44:23 +00:00
OpenStack Proposal Bot 3765992792 Updated from generate-devstack-plugins-list
Change-Id: Ide7724ed3b4b5bb709b7dd79a367a5d2420bcda2
2020-03-21 06:15:49 +00:00
Zuul c0447b53f7 Merge "Make database code work with mysql8" 2020-03-20 14:26:50 +00:00
OpenStack Proposal Bot 4af912d889 Updated from generate-devstack-plugins-list
Change-Id: I86601bc3bf114583ccad7a301af4e5b71e3ba2bf
2020-03-20 08:33:13 +00:00
Zuul d89eb74437 Merge "Amend python pkgs for debian-based distros" 2020-03-19 21:09:51 +00:00
Mohammed Naser 7db34f6cae Use MEMCACHE_SERVERS in configure_keystone_authtoken_middleware
The function was using a hard coded value of localhost:11211 when
we have an option MEMCACHE_SERVERS that can be defined and used
inside DevStack.

Change-Id: I4947928fe406a9844d5bdaa3c826d273952fa097
2020-03-18 15:35:27 -04:00
Zuul 3bbad9d150 Merge "Glance: Add support to configure multiple file stores" 2020-03-18 19:03:33 +00:00
Zuul a766d68a2e Merge "Bring back load balance v2 guide" 2020-03-18 19:03:32 +00:00
ushen 90f0baf3cb 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
2020-03-18 20:26:53 +08:00
Mohammed Naser 5ae8a3504c Drop DEVSTACK_GATE_FEATURE_MATRIX
DEVSTACK_GATE_FEATURE_MATRIX seems to be an old legacy thing that
is no longer being used.  It currently prevents using the jobs in
openstack/devstack without adding openstack/devstack-gate for the
role.

Change-Id: Iab9b4862c01043d2c158398bac4b3b289a0adba0
2020-03-17 20:54:07 -04:00
Zuul db51518178 Merge "Use py3 version of Tempest Multinode job" 2020-03-17 10:14:42 +00:00
Ghanshyam Mann d22a8bcb1f Use py3 version of Tempest Multinode job
tempest-multinode-full is py2 job and not needed to
run on ussuri onwards. Chaning this to its py3
version tempest-multinode-full-py3

Change-Id: Iff271eabcf1a39d6bf6c1fcd55ff2749cab2373f
2020-03-15 18:22:45 -05:00
Zuul 2c0bb5ad62 Merge "remove duplicate entries under title guides in table of contents" 2020-03-15 20:11:23 +00:00
Lucas Alvares Gomes e87428908a Add "OVN" debs and rpms package files
The networking-ovn code is being moved into the neutron repository as
part of the effort [0].

This change is needed so we are able to install OVN from packages
when running the networking-ovn functional tests along with
the Neutron ones (see [1]). In the old networking-ovn repository we did
compile OVN from source instead of installing it from packages but
that took time. We want to do better in the Neutron repository.

[0] https://blueprints.launchpad.net/neutron/+spec/neutron-ovn-merge
[1] https://review.opendev.org/#/c/697440/

Change-Id: I92ab727d9954eb729c41b9a67ecb60b56883097b
Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
2020-03-13 16:42:54 +00:00
OpenStack Proposal Bot d0886f1ee9 Updated from generate-devstack-plugins-list
Change-Id: I92025c92bae7a673aae16192cfe892f3bdee269f
2020-03-05 06:13:02 +00:00
Lee Yarwood 4361ef1eb8 tempest: Enable stable_rescue tests with Libvirt
Enable the compute feature for stable device rescue on all but LXC and
Xen virt_types.

Depends-On: https://review.opendev.org/#/c/700812/
Depends-On: https://review.opendev.org/#/c/700813/
Change-Id: Icfc717b4932be050a169fc00dae720d29a6497f7
2020-03-03 15:25:58 +00:00
Zuul f5fd629ae3 Merge "Updated from generate-devstack-plugins-list" 2020-02-28 16:09:46 +00:00
Lee Yarwood 5837ce504b zuul: Remove devstack-plugin-ceph-tempest job
This job is now failing 100% of the time on master since the EOL of py2:

https://zuul.opendev.org/t/openstack/builds?job_name=devstack-plugin-ceph-tempest&branch=master

Change-Id: I0bb03190f39b5ae5494b2d10a0e819013d60bddf
2020-02-28 10:47:42 +00:00
OpenStack Proposal Bot 2b6c2b41a0 Updated from generate-devstack-plugins-list
Change-Id: I03cd12d5b2de5c2ff4ee92d66a631da34d4255c5
2020-02-28 06:11:43 +00:00
Abhishek Kekane 6f91da9a2d Glance: Add support to configure multiple file stores
From Train release Glance has added support [0][1] to configure multiple stores
of same or different types. This patch enables developers to configure
multiple file stores for glance. In order to configure multiple file stores
user need to set below options in local.conf

GLANCE_ENABLE_MULTIPLE_STORES=True/False
To enable multiple stores of glance.

GLANCE_MULTIPLE_FILE_STORES=veryfast,fast,cheap,verycheap,slow,veryslow
Comma separated list of store identifiers.

GLANCE_DEFAULT_BACKEND=fast
Default glance store in which image should be stored if store identifier not
specified explicilty. Should be one of the store identifier from
GLANCE_MULTIPLE_FILE_STORES config option.

NOTE: This support is added so that we can start adding tempest/CI tests for
glance multiple stores.

[0] 515412b59f5b3af07a1787b9f8e85a4d656d3e1c
[1] https://docs.openstack.org/glance/train/admin/multistores.html

Change-Id: I494f77555cfe9115356ce0ee75c7d7f192141447
2020-02-26 10:34:47 +00:00
Zuul b6bd467f74 Merge "zuul: Add the fedora-latest-virt-preview job to the experimental queue" 2020-02-24 17:27:09 +00:00
OpenStack Proposal Bot 1e6b06ede0 Updated from generate-devstack-plugins-list
Change-Id: I543faced83a685d48706d004ae49800abfb89dc5
2020-02-21 06:12:07 +00:00
Zuul 635b0b6052 Merge "bug-fix: 'bytes' type in python3 cause command fail" 2020-02-20 11:25:15 +00:00
Lee Yarwood 96ddc69a2e zuul: Add the fedora-latest-virt-preview job to the experimental queue
Allowing the job to be tested outside of openstack/nova's own
experimental queue.

Change-Id: Ib07d9522d1cb6e288edb7f78ee1960ab48d89d76
2020-02-20 09:24:44 +00:00
Lee Yarwood b4375af841 zuul: Add a devstack-platform-fedora-latest-virt-preview job
Building on I5c3e1b7b632fd73310c462530990cdb0e0c0ceea we can now add a
Fedora job using the virt-preview repo that will be used by Nova's
experimental queue.

Change-Id: Iad9d64912bb07f307e4897ece1621f275f1d5211
2020-02-19 20:46:03 +00:00
LuyaoZhong 8d4ae4ffc4 bug-fix: 'bytes' type in python3 cause command fail
'str' type in python2 is 'bytes' type in python3,
when use python3, we will get a prefix 'b':

sudo ip netns exec b'qrouter-39cc2b45-a27c-49c5-94a6-26443a49ac63' ip
neigh
--------------------------------------------------------------------------
*** Failed to run 'sudo ip netns exec
b'qrouter-39cc2b45-a27c-49c5-94a6-26443a49ac63' ip neigh': Command 'sudo
ip netns exec b'qrouter-39cc2b45-a27c-49c5-94a6-26443a49ac63' ip neigh'
returned non-zero exit status 1.

The message above is raised by running tools/worlddump.py with python3.

Change-Id: Ic254af86fa27729839f00c0ad4a5bbbc9e545a09
2020-02-19 08:37:45 +00:00
Lee Yarwood 347abd41ce Drop Fedora 29 support
With fedora-latest now using Fedora 30 images and Fedora 29 itself EOL
we can now remove support for it from devstack. This change also cleans
up references to earlier Fedora releases under files/rpms/.

Change-Id: I24332f7016ebb549ea678acf677c477b55ec4d4b
2020-02-18 11:38:34 +00:00
Lee Yarwood 1d1f53ddc1 Use fedora-30 as the fedora-latest image
With the open-iscsi rebase we should now be able to move the
fedora-latest job to fedora 30 ahead of the removal of support for 29.

Change-Id: Ia80f03f275e595d3b26b52b3478f303036d59438
2020-02-18 11:38:34 +00:00
Lee Yarwood c6f53dacd2 nova: Use iscsi-initiator-utils 2.1.0 on Fedora 30 and 31
I2f16658c5a3e22cac70912a0f3ad65cdd7071a1e worked around an open-iscsi
bug that remains unpatched in Fedora 30 and 31 by using a private copr
repo with the patch applied. Rawhide has finally been rebased to 2.1.0
where this issue and many others have been resolved.

We can now use a new repo that has been built for Fedora 30 and 31 that
provides this rebased package that we can either use until the rebase is
backported to 31 and 30 or 32 is supported.

Change-Id: I5ba5885bd9c784949602aeb4ddff9d75fecc6b3d
2020-02-18 11:38:34 +00:00
Lee Yarwood f1966d7763 Add Fedora 30 as a supported distro
With Fedora 29 now officially EOL [1] we need to start the move to 30. A
later change will remove f29 support from devstack entirely once
fedora-latest moves to the based f30 image.

[1] https://lists.fedoraproject.org/archives/list/devel-announce@lists.fedoraproject.org/thread/VUK3CJ5LO4ROUH3JTCDVHYAVVYAOCU62/

Change-Id: If87fe93757129f931a3417fc6275ffad280cdf46
2020-02-18 11:38:33 +00:00
Lee Yarwood 79ffa1f04f Fedora: Always install python3-devel
With the recent switch to py3 we need to ensure python3-devel is
installed on Fedora >= 29 before pip installing any dependencies.

Change-Id: I21417687db5b3827c5272ed22f6dc95db13f2870
2020-02-18 11:38:33 +00:00
Zuul 60a2a89232 Merge "Use python3 as default python command" 2020-02-18 03:25:53 +00:00
Zuul bef5e6ab7c Merge "Remove networking-calico from plugin-registry.rst" 2020-02-17 18:53:32 +00:00
Dr. Jens Harbott 08d84bc47f Make database code work with mysql8
The GRANT command in mysql8 can no longer create a user implicitly.
Split that part into a dedicated CREATE USER command.

Also drop disabling the query_cache, it is off by default for some time
and the option got removed in mysql8.

Change-Id: I31bcc285ff8e373abbacb303c1269857c9cfa9ed
2020-02-17 17:15:13 +00:00
Dr. Jens Harbott 64ae08383a Amend python pkgs for debian-based distros
Drop python2 packages that are no longer needed. Replace other py2 pkgs
with their py3 variant.

Change-Id: Id5fc11d1ae0a7daf439c7d72f831f298f5d0ce31
2020-02-17 17:14:50 +00:00
Federico Ressi 21a10d3499 Use python3 as default python command
After Python 2 is getting unsupported, new distros
like CentOS 8 and RHEL8 have stopped providing 'python'
package forcing user to decide which alternative to
use by installing 'python2' or 'python3.x' package
and then setting python alternative.

This change is intended to make using python3 command as
much as possible and use it as default 'python' alternative
where needed.

The final goals motivating this change are:
 - stop using python2 as much as possible
 - help adding support for CentOS 8 and RHEL8

Change-Id: I1e90db987c0bfa6206c211e066be03ea8738ad3f
2020-02-17 17:03:47 +00:00
Federico Ressi 2dcbc28aba Install versioned python RPMs on RedHat distros
Set default python3 version as 3 for cases python3
is not installed before running DevStack.

Implements installation of required python3x package
for RedHat family distros with package name depending on
configurable ${PYTHON3_VERSION}. Examples:

  3 => python3 python3-devel (default one)
  3.6 => python36 python36-devel
  3.7 => python37 python37-devel

This should help in situations where there are more
than one python available for given platform and
DevStack is asked to pick one by its full 3.x version

Change-Id: I49d86bc9193165e0a41e8e8720be37d81a4e7ee0
2020-02-17 12:00:41 +00:00
Andreas Jaeger d05efc6ae9 Remove networking-calico from plugin-registry.rst
Networking-calico has been removed from openstack repositories, remove
it from docs.

Change-Id: I58d2964ee52d66fe89aa84c1d88c4d8d4d349b0d
2020-02-17 12:32:12 +01:00
Zuul 93d22d8298 Merge "Add LIBVIRT_CPU_MODE to set CPU mode" 2020-02-17 01:05:14 +00:00
Zuul 80758e6932 Merge "Always install python3 and its dev package" 2020-02-15 16:01:08 +00:00
Ghanshyam Mann 64b3c5f468 Drop the tempest-full py2 job
We have dropped the tempest-full from
Tempest gate and made this to run on py2
explicitly which is nothing but for stable gates.
- I75868d5c9b6630fe78958ff89e58a0aced09a6b3

This job is not supposed to run on ussuri onwards master
gate as everything will be python3-only.

Change-Id: I372bde6a1753884efaf15da5fab48f1bddb4dab5
2020-02-14 11:07:30 -06:00
Zuul e51cbf0ea9 Merge "Install psutil required by tools/mlock_report.py script" 2020-02-11 23:19:03 +00:00
Zuul fdd631d27a Merge "Switch to python3 for memory_peak service" 2020-01-31 05:57:23 +00:00
Zuul 38f5d0b856 Merge "Add -r option when removing egg-info files/folders" 2020-01-31 05:56:07 +00:00
Zuul 96fda3528a Merge "Support TEMPEST_BRANCH with tag name" 2020-01-30 20:32:48 +00:00
Carlos Camacho 7611d3dfd2 Add -r option when removing egg-info files/folders
We are hitting this error:
+ tools/fixup_stuff.sh:fixup_ubuntu:82 :
    sudo rm -f /usr/lib/python3/dist-packages/httplib2-0.11.3.egg-info
rm: cannot remove
    '/usr/lib/python3/dist-packages/httplib2-0.11.3.egg-info': Is a directory

This patch adds the -r option to allow removing folders.

Change-Id: Ib7bb8b0a3dcf747bcc06da1a2fb17fa9d8808484
2020-01-30 14:41:14 +01:00
Federico Ressi 3555b48ff4 Switch to python3 for memory_peak service
When starting 'memory_peak' service is using python command instead of
python3, while psutil (required package) is most probably being
installed into the python3 environment (as we are dropping python2.7
support).

Closes-Bug: #1860753
Change-Id: Ia2b7e2e33d784560443131e2965f520b361a54e3
2020-01-30 12:35:34 +00:00
Zuul 455be66098 Merge "Remove conflicting packages in Ubuntu" 2020-01-30 00:01:06 +00:00
Ghanshyam e1c0406d10 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-29 15:39:17 -06:00
Dr. Jens Harbott f6597b1b46 Undeprecate neutron-legacy scripts
Work on the new neutron scripts has stalled and they aren't in a useable
state yet. Given the ongoing decline in contributions, let us
acknowledge this and undeprecate the neutron-legacy scripts so that
people can continue to use them without feeling guilty about it.

Change-Id: I4bce19da861abf18ddb89d82fd312c5e49a4ee7c
2020-01-29 15:46:35 +00:00
Zuul d5c964d95e Merge "libvirt: Support the use of the virt-preview repo when using Fedora" 2020-01-29 04:51:39 +00:00
Lee Yarwood 169f5dee47 libvirt: Support the use of the virt-preview repo when using Fedora
The virt-preview repo provides the latest rawhide versions of QEMU,
Libvirt and other virt tools for older releases of Fedora. This repo is
extremely useful when testing features in OpenStack that rely on these
latest builds well in advance of them landing in full Fedora, CentOS or
RHEL releases.

This change adds a ``ENABLE_FEDORA_VIRT_PREVIEW_REPO`` configurable
to control when this repo is enabled and used when deploying on Fedora.

Change-Id: I5c3e1b7b632fd73310c462530990cdb0e0c0ceea
2020-01-27 18:02:30 +00:00
Witek Bedyk e727dd5682 Remove conflicting packages in Ubuntu
Following packages conflict with pip installed versions:
* httplib2
* pyasn1-modules

Change-Id: Ic4f70f839765e67394509cc543560aac7f50e287
2020-01-27 17:11:23 +01:00
Federico Ressi 19e4d97288 Install psutil required by tools/mlock_report.py script
'tools/mlock_report.py' script requires 'psutil' package to be
installed. This ensures it is done before memory_peak service is
started.

Partial-Bug: #1860753
Change-Id: I7b2b6eaf9856c6057e1a4a0054d15074150a6cb6
2020-01-27 08:08:59 +00:00
Zuul 761663dbfb Merge "Remove fixup_python_packages" 2020-01-26 16:50:03 +00:00
Witek Bedyk 4dc02f97e7 Remove fixup_python_packages
The hack has be around for pip 1.4.1 and older. It should be safe to
remove it by now. In fact it causes problems in my Ubutu Bionic VM when
trying to overwrite httplib2 library installed from the distro package.

Change-Id: I34b826f4e8f10f8d44b888120f19fcc7ba501b3d
2020-01-26 09:41:57 +00:00
Zuul 5b41670970 Merge "Remove Sheepdog plugin information" 2020-01-25 12:22:52 +00:00
Radosław Piliszek 29bf852396 Do not try finding pip for python2 when not required
[1] stopped installing pip for py2 when py3 is being used.

This patch makes sure we check only for py3 pip then.

Also removed some no-longer-relevant comment and
made uninstall behave the same.

Check for pip>=6 removed too.

See also [2].

[1] 279a7589b0
[2] http://lists.openstack.org/pipermail/openstack-discuss/2020-January/012182.html

Change-Id: I36ee53e57e468d760b80a7e621b90899867a8efd
2020-01-24 12:55:21 +01:00
Zuul f9a6986b90 Merge "Revert "Revert "Stop enabling g-reg by default""" 2020-01-23 15:07:30 +00:00
Zuul b47bdd6f21 Merge "Run Glance initialization when Glance is enabled, not just registry (v2)" 2020-01-23 15:05:43 +00:00
Zuul 6a4c74dda8 Merge "devstack-plugins-list: skip openstack/openstack" 2020-01-23 13:56:04 +00:00
Dr. Jens Harbott 6808a3468d Clean up remainders of USE_SYSTEMD and logging setup
We dropped the ability to override USE_SYSTEMD to False when we deleted
screen support in [0], so we can also clean up any conditionals based
on it.

Also clean up the logging setup functions, dropping local vars for
parameters that we don't actually support anymore.

[0] I8c27182f60b0f5310b3a8bf5feb02beb7ffbb26a

Change-Id: I5cbce9f2c42e111761e8689447b3f8cbb7ea2eb5
2020-01-23 11:50:07 +00:00
Sean McGinnis 97d8575937 Remove Sheepdog plugin information
The Sheepdog project has been defunct for awhile now, and the Sheepdog
driver and os-brick connector is now being removed from Cinder. This
cleans up plugin references for the driver.

Change-Id: Ieb2d9cf653b2d3a4af30cab26b8428a7c7edff98
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-01-23 02:19:58 +00:00
Ian Wienand afd346a0a1 devstack-plugins-list: skip openstack/openstack
The proposal job to update the plugin list has been failing for a long
time as it gets a 500 error from gitea on the openstack/openstack
repo.  This is an odd "superrepo" with all projects as submodules;
thus openstack/openstack/devstack is actually a project, not the
directory with a plugin in it.

Skip this repo (gitea shouldn't return a 500, but that's another
thing...)

Regenerate the list manually for this run.

Change-Id: I6ed65bcb720d4cb10702cbf66106120e001ec35f
2020-01-23 13:13:05 +11:00
Terry Wilson 78cf6f642a Always install python3 and its dev package
Some distros do not install python3/python3-devel with the minimal
install. F29 doesn't install -devel, and neither Centos 7 or 8
install either. This patch ensures that these packages get installed.

Ideally, PYTHON3_VERSION would be set *after* ensuring that python3
was installed, but it gets a little tricky with all of the includes.
This sets it to 3.6 as nothing uses 3.5 anymore.

Change-Id: I7bdfc408b7c18273639ec26eade475856ac43593
2020-01-22 20:03:29 -06:00
Radosław Piliszek 89cb80d212 Revert "Revert "Stop enabling g-reg by default""
This reverts commit 98f3bbe509.

This is no longer necessary as proper fix [1]
is now applied.

[1] https://review.opendev.org/703288

Change-Id: Ibc40f79b1daf30246ed24790e9b305caea497cb2
Related-bug: #1859847
Related-bug: #1860021
2020-01-22 13:43:23 +00:00
Radosław Piliszek 09e860fc2c Run Glance initialization when Glance is enabled, not just registry (v2)
Per [1] Glance registry should not be required to run since Queens.

v2 improves on v1 [2] (now reverted [3]) by applying minor comments
from reviews so far and ensuring nova-live-migration job does not see
a change in behavior and hence does not break [4].
[5] tried to fix the issue but it did only partially, regarding
the database but not the image upload [6].
This patch ensures double cirros image upload does not happen as well.

[1] https://specs.openstack.org/openstack/glance-specs/specs/queens/approved/glance/deprecate-registry.html
[2] https://review.opendev.org/702707
[3] https://review.opendev.org/703131
[4] https://bugs.launchpad.net/devstack/+bug/1860021
[5] https://review.opendev.org/702960
[6] https://bugs.launchpad.net/devstack/+bug/1860021/comments/16

Change-Id: I61538acd6bd4c7b3da26c4084225b220d7d1aa2c
Closes-bug: #1859847
Related-bug: #1860021
2020-01-22 13:43:06 +00:00
Dr. Jens Harbott e18325ca67 Fix pip uncap fallout for nova and barbican
Need to make PyYAML overridable on Ubuntu, it is a dependency for e.g.
cloud-init, so we cannot remove it.

Depends-On: https://review.opendev.org/703792
Change-Id: I4423dfb2c30299903b52a2bb06d846dd487f5b8b
2020-01-22 13:37:11 +00:00
Ghanshyam 2e45f2c267 Adding nova-live-migration job in devstack gate
nova-live-migration is legacy job and  and rely on
devstack-gate + devstack setting so any change in devstack can
break it. Example bug: 1860021

We can remove this job once it is migrated to zuulv3 native.

Change-Id: Ie34d4dc1ab30ced8161796fe32628db07de86cc9
Related-bug: #1860021
2020-01-22 05:59:03 +00:00
Zuul 5ae6f5ec37 Merge "Revert "Do not use pip 10 or higher"" 2020-01-21 18:36:06 +00:00
Zuul b9dfa46f0a Merge "inc/python: Remove ability to mark packages as non-Python3" 2020-01-21 07:40:40 +00:00
Zuul 46fd644897 Merge "Fix DevStack to configure tempest's service_availability" 2020-01-20 13:44:18 +00:00
Carlos Goncalves 8dd6f153d6 Add LIBVIRT_CPU_MODE to set CPU mode
In same cases, the hypervisor presents to the guest OS a named CPU model
is similar to the host CPU and adds extra features to approximate the
host model. However, this does not guarantee all features will be
precisely match.

This patch adds LIBVIRT_CPU_MODE to allow users to define the CPU mode
they want to use, for example "host-passthrough".

Change-Id: I83792c776b50d1d22584be2a37cc6a166f09c72b
2020-01-20 14:16:12 +01:00
Zuul 0d3f08f692 Merge "Stop configuring '[DEFAULT] use_neutron' for nova" 2020-01-19 17:42:45 +00:00
Zuul bae2257d5e Merge "Stop configuring '[DEFAULT] firewall_driver' for nova" 2020-01-19 17:42:43 +00:00
Zuul 63f07a1af9 Merge "Revert "Run Glance initialization when Glance is enabled, not just registry"" 2020-01-19 08:43:35 +00:00
Zuul c615f37c93 Merge "Init Glance database only on the node with the database backend" 2020-01-18 19:41:17 +00:00
Stephen Finucane 48d1f028c4 Revert "Run Glance initialization when Glance is enabled, not just registry"
This reverts commit d8dec362ba. This has
knock on effects for devstack-gate, which configures g-api on subnodes
node but not mysql, resulting in failures. A longer term fix would be to
either a) stop configuring g-api on subnodes if we can determine it's
not necessary or b) only configure the database if on the main node.
However, both options are subject to debate so for now just unclog the
gate.

Change-Id: I58baa3b6c63c648836ae8152c2d6d7ceff11a388
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Closes-bug: #1860021
2020-01-17 17:42:23 +00:00
Stephen Finucane 98f3bbe509 Revert "Stop enabling g-reg by default"
This reverts commit d7dfcdb467. A
subsquent change that depends on this,
d8dec362ba, has knock on effects for
devstack-gate and needs to be reverted. Revert this first.

Change-Id: Ic5402f57052648e10eacf3c3de67d2cdd2d42f63
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Partial-bug: #1860021
2020-01-17 17:42:23 +00:00
Stephen Finucane 6b6bdc7111 inc/python: Remove ability to mark packages as non-Python3
Everything in OpenStack *must* be Python 3 supporting now, which means
it's time to remove the functionality that allows us to blacklist
packages that didn't support Python 3.

Change-Id: I7c8cf538ec88bd4056b0109f19671e3d65f5da3a
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2020-01-17 11:19:16 +00:00
Radosław Piliszek ec3543a028 Init Glance database only on the node with the database backend
Since [1] Glance init depends on either g-api or g-reg being
enabled.
This broke multinode g-api deployments with singlenode database
backend.
This commit aligns Glance with other services w.r.t when to
apply database init.

[1] d8dec362ba

Change-Id: Idc07764d6ba3a828f19691f56c73cbe9179c2673
Closes-bug: #1860021
2020-01-16 19:58:37 +01:00
Stephen Finucane f9ff151549 Stop configuring '[DEFAULT] use_neutron' for nova
This has now been removed and even prior to removal defaulted to True.

Change-Id: I847a873d833a4dbee96afa1d2726fea2b8045eeb
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2020-01-16 10:52:52 +00:00
Stephen Finucane 248d4bb8d2 Stop configuring '[DEFAULT] firewall_driver' for nova
This option has default to the 'NoopFirewallDriver' for some time and
will soon be removed. Stop configuring it entirely.

Change-Id: I4dbc0015cf26d7edf51d0d5fd978ccd3a1ad1b79
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2020-01-16 09:27:54 +00:00
Zuul 035b41b9b2 Merge "Stop enabling g-reg by default" 2020-01-16 07:38:54 +00:00
Zuul decb662ff3 Merge "Run Glance initialization when Glance is enabled, not just registry" 2020-01-16 07:23:33 +00:00
Zuul f483e85a87 Merge "do not gzip legacy service logs" 2020-01-16 03:22:18 +00:00
Zuul 9b09e77e9c Merge "Don't install glance default policy" 2020-01-16 00:58:08 +00:00
Radosław Piliszek d7dfcdb467 Stop enabling g-reg by default
Per [1] Glance registry should not be required to run since Queens.

[1] https://specs.openstack.org/openstack/glance-specs/specs/queens/approved/glance/deprecate-registry.html

Change-Id: I93325cbd26dbc6a30062d9ba83acab248897b18e
Depends-on: https://review.opendev.org/702707
Related-bug: #1859847
2020-01-15 18:37:51 +01:00
Radosław Piliszek d8dec362ba Run Glance initialization when Glance is enabled, not just registry
Per [1] Glance registry should not be required to run since Queens.

[1] https://specs.openstack.org/openstack/glance-specs/specs/queens/approved/glance/deprecate-registry.html

Change-Id: I5477c8769ff4ae151d4d6ccb5e5d8dd5788909b0
Closes-bug: #1859847
2020-01-15 18:34:21 +01:00
Akihiro Motoki 85c5ec11c9 Cleanup VM instances during unstack
Currently VMs created by a previous DevStack run still exists even
after re-run stack.sh. This leads to a failure in launching a VM after
the second run of stack.sh. We need to check the reason of the failure
by nova compute log and clean up remaining VMs. It is annoying.

IIRC we cleaned up existing VMs. While I failed to identify which commit
changed this behavior, I believe it is worth recovering it.

This commit changes unstack.sh to call cleanup_nova. cleanup_cinder()
already cleans up LVM volumes and some of them may be used by VMs,
so I believe it is reasonable to clean up VMs in unstack.sh.

Change-Id: I9fcbc5105e443037fada1ef6a76a078145964256
2020-01-15 11:12:46 +09:00
Sean Mooney d02fa6f856 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.

Change-Id: I4557a737cb13b9c2406056be08ab8a32ddd45162
2020-01-14 15:52:23 +00:00
Ian Wienand bcb2c30c31 Remove TRACK_DEPENDS
This was added in 2012 with I89677fd54635e82b10ab674ddeb9ffb3f1a755f0,
but I can not see it being used anywhere currently.

It's use of virtualenv's has become problematic in a python2
deprecated world, but since it is not used, remove it to avoid further
confusion.

Change-Id: I65d44d24f449436ca6229928eee2c5a021793055
2020-01-13 16:31:20 +11:00
Ian Wienand 4143ce6fc9 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
2020-01-13 16:05:11 +11:00
Colleen Murphy f8aa74bc04 Enable access rules tempest tests
In Train, the access rules API was introduced in keystone. This change
enables testing it in tempest.

Depends-on: https://review.opendev.org/699519
Change-Id: I2af21868cbf584a6881c6208bc2afc3bdb323ab9
2019-12-27 09:30:57 -08:00
Soniya Vyas 7634c78002 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
2019-12-27 14:01:17 +05:30
ghanshyam f0dd9996cc Fix DevStack to configure tempest's service_availability
Tempest's service_availability config option includes all the service
availability which is further used by tests to take decision of skip
or run the test.

For example, [service_availability].nova is true then, compute test will run
or if [service_availability].aodh is false then, all aodh related tests either
in aodh tempest plugin or any other plugins will be skipped.

Now question is what is the best way to set the each service availability for
tempest or tempest plugins tests. We have 2 category of service here-
1. Service tested by Tempest (nova, cinder, keystone, glance, swift, neutron)
   (let's say type1 service)
2. Services tested by Tempest plugins (all other than above list)
   (let's say type2 service)

We need the standard way to set both type of service so that we can maintain
the setting of service_availability config options in consistent way.

As discussed on bug#1743688/ and review https://review.openstack.org/#/c/536723/,
we will use devstack lib/tempest to set the type1 service which is services test
owned by Tempest and type2 service setting will be done by devstack plugins of
those service.

For example - [service_availability].ironic will be set by ironic's devstack plugin.
because that is best place we know ironic is installed and available.

To do that we need:
1. Add setting of [service_availability].* in devstack plugins
2. Remove setting of type2 service from devstack lib/tempest

This commit does the second part and all depends-on patches handle the first part.

Related-Bug: #1743688

Change-Id: If3aec9fd1c61e2bb53233be437b97b811dc82414
2019-12-20 18:05:01 +00:00
Zuul 937b96d4a7 Merge "Create OVS bridge even if OVS_BRIDGE_MAPPINGS is not empty" 2019-12-19 20:08:41 +00:00
Eyal 56b2e7fe8b fix a command typo
Change-Id: I01787641c887bfc0f4620b90b4ff488958dac53e
2019-12-19 13:32:55 +02:00
Lenny Verkhovsky d6a7b73fc8 Create OVS bridge even if OVS_BRIDGE_MAPPINGS is not empty
in complex cases when mapping is defined in local.conf OVS bridge
can be created automatically.

Change-Id: I2e5e1068e77291d1d199cd698cec4946480c7601
2019-12-18 08:09:11 +00:00
Zuul 1a6c22e489 Merge "lib/tempest: Do not rely on six for image_size_in_gib" 2019-12-13 20:48:01 +00:00
Slawek Kaplonski f7a7076fac Include dnsmasq-utils package on all Ubuntu versions
This package provides dhcp_release tool but in files/debs/neutron-common
it was listed to be installed only on Ubuntu Precise.
The same file is also in Nova's packages but there is no restriction to
Ubuntu Precise only there.
So on all Neutron jobs it was fine but on Ironic's job where Nova
wasn't enabled, this package was not installed and caused problems
in Neutron DHCP agent.

Change-Id: Idd0711cfe6d43f21754a2f0c230cd094ea33cb27
Closes-Bug: #1855910
2019-12-11 09:51:58 +01:00
YAMAMOTO Takashi ede8b1269c mysql: Don't bother to change auth plugin on centos
This partially reverts the previous change [1], which
broke networking-midonet jobs.

[1] https://review.opendev.org/#/c/681201/

Closes-Bug: #1855516
Change-Id: I0255c6acce72a8376dbc6d8f8d0314a7dabf019c
2019-12-09 14:23:59 +09:00
Zuul 6ac1bb80b1 Merge "Enable libvirt virtio rng device" 2019-12-09 00:37:53 +00:00
Zuul 92de86fb64 Merge "Add possibility to configure manually MYSQL_SERVICE_NAME" 2019-12-07 01:02:54 +00:00
Zuul ae7e10f5ee Merge "Dump the upper constraints for tempest in a temporary file" 2019-12-06 01:49:36 +00:00
Clark Boylan 7ddbece508 Enable libvirt virtio rng device
We've seen jobs where tests fail due to what appears to be rng
starvation. Enable virtio rng device to try and alleviate this.

Change-Id: I70d800cdc45b6008f775110f22c0000736421529
2019-12-05 07:58:23 -08:00
Zuul 893126cd64 Merge "Drop Xenial support" 2019-12-05 09:40:27 +00:00
Lucas Alvares Gomes 40f7579bb8 lib/tempest: Do not rely on six for image_size_in_gib
input() should work on both python versions for what we need. I
understand the concern about eval() on python2 but, in the case it's
used we should be fine, plus, python2 is being removed from OpenStack
projects.

Change-Id: I86a7c31374986f81132bc4f49aee0a76b90e6553
Signed-off-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
2019-12-05 09:20:47 +00:00
Zuul edc239d1ea Merge "Centralize and configure nova with cinder service user access" 2019-12-05 06:26:54 +00:00
Zuul eeb444bc43 Merge "stackrc: Make REQUIREMENTS_DIR configurable" 2019-12-05 02:09:00 +00:00
Slawek Kaplonski d54a1c6869 Add possibility to configure manually MYSQL_SERVICE_NAME
This variable can be now set in Devstack's config file and in
such case Devstack will not set it automatically to value most
likely correct for the distro.
By default this value is empty string and in such case Devstack
will work in exactly same way as it was before this patch and
will determine automatically what name should be used there.

In addition in case of Ubuntu package $MYSQL_SERVICE_NAME-server
will be now installed instead of mysql-server always.
This will allow to easy configure e.g. CI job which will run using
Mariadb instead of Mysql on Ubuntu.

Change-Id: I25af0b54ad235b08c6c399b4125c737acf57ee2e
2019-12-04 19:58:31 +00:00
Rodolfo Alonso Hernandez 8579f58307 Dump the upper constraints for tempest in a temporary file
This will avoid the creation of an unneeded file in the "tempest"
repository directory.

TrivialFix

Change-Id: Id3f46b3537cd3232cb29c42808bde44c667565f1
2019-11-29 13:56:45 +00:00
Ian Wienand 2e66778699 Drop Xenial support
With the goals of Ussuri being Python 3.6 [1], the python 3.5
environment on Xenial is too old.  Remove testing and the most obvious
bits of support from devstack.

Also drop claimed support for artful, which is long EOL.

[1] https://governance.openstack.org/tc/reference/runtimes/ussuri.html

Change-Id: Iefcca99904dde76b34efbbfc0e04515dfa5a09e5
2019-11-21 18:38:32 +00:00
Zuul 595759c764 Merge "Drop centos7 platform job" 2019-11-21 15:50:54 +00:00
Jens Harbott (frickler) 279a7589b0 Revert "Do not use pip 10 or higher"
This reverts commit f99d1771ba.

Added workarounds that might want to get split into their own patch
before merging:

- Don't install python-psutil
- Don't run peakmem_tracker

Change-Id: If4fb16555e15082a4d97cffdf3cfa608a682997d
2019-11-20 21:02:39 +00:00
Matt Riedemann 48b519b5c6 Change USE_PYTHON3=True by default
Since Stein, gate jobs have been using bionic nodes so they
are running with python 3.6, so it makes sense to also default
devstack itself to run with python3 by default.

Depends-On: https://review.opendev.org/688731

Change-Id: I52b03caee0ba700da3a15035201ea6cd91baa06b
2019-11-19 20:12:14 +00:00
Jens Harbott 39082a3b4e Handle localrc early enough in stackrc
We need to source the environment overrides before they get evaluated.
Otherwise e.g. USE_PYTHON3 is factually being ignored for some settings.

Also fix creating python3 venvs by using the "virtualenv" command for
that task.

Change-Id: I16c78a7fef80372d9a1684c3256c5b50b052ecae
2019-11-19 20:11:23 +00:00
Slawek Kaplonski 2d112db86b Drop old neutron-grenade job
This job is still running python 2.7. As we are dropping py2 support in
Ussuri cycle, lets drop this job now.
There is same job called "grenade-py3" which runs on python 3 already
and this will be now used in project's CI.

Depends-On: https://review.opendev.org/#/c/695036/

Change-Id: I5cd8e137a3ae06e49a4351629c5eb207c4e6bf1a
2019-11-19 19:34:11 +00:00
Jens Harbott 277f29f683 Drop centos7 platform job
The centos7 job is running with python2, which is no longer supported by
nova, so we can drop it in master.

Change-Id: Id9ef507dd6f4226d65c6ed3043666b0aa6a3bd1c
2019-11-19 10:09:11 +00:00
Zuul b0f87b2866 Merge "Fix brctl calls" 2019-11-16 16:49:02 +00:00
Zane Bitter 0e02e7fd55 Don't install glance default policy
With Glance defining default policies in code, it's no longer necessary
to install policy.json from the repo.

Change-Id: I9f9160f5a2bf9fd77fb3807e12de219b7a49952d
Depends-On: https://review.opendev.org/693129
2019-11-14 14:01:27 -05:00
Zuul 0610413f05 Merge "Add override variable for LIBVIRT_TYPE" 2019-11-08 01:30:31 +00:00
Flavio Fernandes 6c15c38f1a stackrc: Make REQUIREMENTS_DIR configurable
In cases where global REQUIREMENTS_DIR is set, use it
instead of overwriting it. This is particularly needed
in cases where users of pip_install wrapper have the
upper-constraints.txt at another location.

Change-Id: I34e9f94548c575e1af5bca9655a3b7d1915375a8
Signed-off-by: Flavio Fernandes <flaviof@redhat.com>
2019-11-06 07:11:37 -05:00
Brian Haley da18895162 Fix brctl calls
Some distros no longer ship brctl, iproute2 should be used
in its place. The linuxbridge agent plugin script was still
using it, as was worlddump, which generates this warning on
a failure:

    Running devstack worlddump.py
    /bin/sh: 1: brctl: not found

Conditionalizing worlddump based on whether brctl is installed
to make this go away.

Change-Id: Iafbf4038bab08c261d45d117b12d4629ba32d65e
2019-11-06 09:55:47 +08:00
Zuul 63ab664baf Merge "Revert "install LIBS_FROM_GIT using python 2 and 3 where appropriate"" 2019-11-04 20:18:13 +00:00
Zuul b461a092c4 Merge "Remove n-novnc service requirement for TLS configuration" 2019-10-25 12:10:55 +00:00
Zuul 8d614d0a42 Merge "Fix benign epmd@0.0.0.0.socket failure" 2019-10-24 01:28:28 +00:00
melanie witt 1d378dcf6d Remove n-novnc service requirement for TLS configuration
When configuring TLS between the console proxy (where the n-novnc
service runs) and the compute host, some configuration for QEMU needs
to be done on the compute host. The existing code for this requires the
n-novnc service to be running, which it is in a single node all-in-one
deployment. However, when running in a multinode deployment, the
n-novnc service runs only on the controller and not on the subnode.
Yet, we need to configure QEMU on the subnode compute host as well.

This removes the n-novnc service requirement to enable TLS QEMU
configuration to occur on a compute subnode in a multinode deployment.

Closes-Bug: #1849418

Change-Id: I8b6970e91ad7f52ff489cb9f776ca216d8f86aa4
2019-10-23 04:53:42 +00:00
Armando Migliaccio a676c4029e Revert "Generate deprecation warning for postgresql"
Based on resolution [1], there's no clear indication that next
steps involve the removal of the DB from Devstack or from the gate.

[1] I332cef8ec4539520adcf37c6d2ea11488289fcfd

This reverts commit d9aaae95f2.

Change-Id: I8410d65c0e0b24035aa035fac7560a686d53ec50
2019-10-17 15:58:34 -04:00
Matt Riedemann b14665f0dd Revert "Remove deprecated PostgreSQL database driver"
This reverts commit 168ca7f0a4.

Removing postgresql support from devstack was unnecessary
since it's not broken and not causing maintenance issues
as far as I know. The commit being reverted said that pg
support was deprecated in Pike but nothing in the docs or
commit message refer to official deprecation of postgres
support in devstack or openstack in general. Not to mention
that there are still postgres-based jobs that will no
longer work *and* the notification to the mailing list about
doing this happened *after* it was already done [1] leaving
stakeholders with no time to reply.

[1] http://lists.openstack.org/pipermail/openstack-discuss/2019-October/010196.html

Change-Id: Ie7036d37d79e6aba462b7c97f917e2e7aed108f9
2019-10-17 15:58:34 -04:00
Eric Harney 8c86e5a53e Cinder: only set volume_clear for LVM
This only applies to the LVM driver (when using
thick provisioning), and doesn't have any effect on
other backends like NFS, so only write the conf entry
for LVM.

Change-Id: I722ba2fa0010d9887ed9b7fdd9e050cd4694768e
2019-10-17 15:48:08 -04:00
Zuul cf1c847191 Merge "Remove deprecated PostgreSQL database driver" 2019-10-17 11:39:34 +00:00
Zuul 7840b6e291 Merge "Ensure that the zuul home can be traversed" 2019-10-08 19:33:53 +00:00
Zuul 56f23cc50d Merge "Fix target branch for pbr and diskimage-builder" 2019-10-08 19:33:51 +00:00
Ghanshyam Mann dad5665036 Update DEVSTACK_SERIES to ussuri
stable/train branch has been created now and
current master is for ussuri.

Change-Id: I2bb84cb4b32e344572a7c3e6f300c1aa19e486df
2019-10-07 17:21:46 +00:00
Zuul e6f495e2dd Merge "generate-devstack-plugins-list: Retry on opendev.org 500" 2019-10-07 10:55:13 +00:00
Ian Wienand 5c6b3c3279 Add override variable for LIBVIRT_TYPE
Allow jobs to set LIBVIRT_TYPE, but retain the current default.  This
is for testing nested virt.

Change-Id: Ife215db3f59f011574a50b0d1cbd5565a7408dfe
2019-10-04 09:31:53 +10:00
Akihiro Motoki deb3ff50f1 lib/horizon: no need to specify keystone v3 to API version
keystone v3 is the default API version in horizon now,
so there is no need to specify it in local_settings.py explicitly.

This commit also makes minor changes in lib/horizon
_horizon_config_set().

* Do not insert a blank line after each setting.
* Use the local variable $file to specify the target file
  consistently.

Change-Id: I5faea3e1f357726a256d2b48fc1afeabfead4998
2019-10-02 16:33:46 +09:00
Luigi Toscano c67a689fe5 Ensure that the zuul home can be traversed
The default permissions for the zuul home directory
are not the same in the various distributions.
As /home/zuul contains the sources, a 700 default may be
problematic when accessing those files, so make sure
that the executable permissions are set.

Closes-Bug: 1846251
Change-Id: Ic9769e56274d7205844b86d3b5200a6415e4acad
2019-10-01 20:14:22 +02:00
Zuul 729f8b8ca6 Merge "Fix six package on opensuse for pip 10" 2019-09-30 17:15:28 +00:00
Matt Riedemann 594885c808 Centralize and configure nova with cinder service user access
Since Queens [1] nova has been able to be configured with
cinder service user credentials for operating on cinder
resources without a user auth token similar to things nova
needs to do without a user auth token for working with neutron
and placement resources.

This change:

- centralizes the nova [cinder] section configuration
- adds the necessary auth configuration

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

[1] I3c35bba43fee81baebe8261f546c1424ce3a3383

Change-Id: I5640ee431f6856853f6b00ec7ed1ea21d05117dd
2019-09-30 10:23:44 -04:00
Masayuki Igawa 12e5ddcc2d Add PDF documentation build
This commit adds PDF documentation build target 'pdf-docs' that will
build PDF versions of our docs. As per the Train community goal:

 https://governance.openstack.org/tc/goals/selected/train/pdf-doc-generation.html

Change-Id: Iecb0fe5b957af7dae66bea04dfbd9c2fb4f74a99
Story: #2006070
Task: #35456
2019-09-26 18:06:46 +09:00
Colleen Murphy 6eb2c5990d 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.

Change-Id: I4649abe06b5893a5251bfcdd4234abccde6ceda2
2019-09-26 07:26:27 +00:00
Matt Riedemann c6f588df02 Fix target branch for pbr and diskimage-builder
The target branch was centralized in change
I82aa19e739eeda3721bac1cb5153ad0bf2d1125a but there
are two issues, pbr and diskimage-builder are using
TARGET_BRANCH which gets changed to stable/* for
each openstack stable branch that gets created for
devstack, e.g. I861068ae1a9902cef61c52c70dda7bb42f4371a0,
but pbr and diskimage-builder don't have stable branches
so they should be using BRANCHLESS_TARGET_BRANCH i.e. master.

Change-Id: I47ac7a7e194ca6d613d0ccaebfd557346644c2df
2019-09-25 10:31:09 -04:00
Zuul e3cd502252 Merge "Enable accept_ra before enabling forwarding" 2019-09-24 22:41:48 +00:00
Ian Wienand 893817d30a generate-devstack-plugins-list: Retry on opendev.org 500
A 500 error from gitea can occasionally show up as a project dropping
their devstack plugin (I543faced83a685d48706d004ae49800abfb89dc5).

To avoid noise in the proposal jobs, implement a small retry loop for
500 errors.

Change-Id: Ide23e4de819a2c751d887eeaa7f0b9d0437f8e2c
2019-09-25 08:30:07 +10:00
Ian Wienand 1a46c898db Restrict iscsi package hack to Fedora
I forgot in I2f16658c5a3e22cac70912a0f3ad65cdd7071a1e that "is_fedora"
matches rhel/centos for historical reasons.  Restrict the install to
just the Fedora platforms by checking DISTRO matches

Change-Id: Ica4a690a4f2894a03ceb8557a947ed2ea4a60e53
2019-09-20 08:11:08 +10:00
Jens Harbott 0c9a6cab91 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.

Change-Id: I1fdeede59547de896ed89222ecf121fd9e6b810d
2019-09-19 13:59:28 +00:00
Artem Goncharov ba50347526 Update for f29
In Fedora 29 dstat was merged with pcp-system-tools (see
https://pagure.io/fesco/issue/1956)

Work around a iscsi bug with external packages until we can get the
package fixed.

Obsolete F27

Change-Id: I2f16658c5a3e22cac70912a0f3ad65cdd7071a1e
2019-09-16 10:15:17 +00:00
Zuul c6a4c4547d Merge "Switch to fedora-29 for fedora-latest nodeset" 2019-09-13 15:17:20 +00:00
Zuul bfb176579b Merge "Fix worlddump log collection" 2019-09-13 15:17:18 +00:00
Zuul 7d2663d44c Merge "oscwrap: make a little quieter" 2019-09-13 10:00:44 +00:00
Zuul 916659374a Merge "Make stop/disable of apparmor work on all SLE systems" 2019-09-13 08:08:26 +00:00
Jens Harbott ce396d374b Fix worlddump log collection
All credit for figuring this out goes to frickler (and that was the hard
bit so thank you!). The worlddump files were not being collected because
they weren't in our log collection list. Add worlddump to this list
so that we collect these files.

One thing that makes this slightly complicated is the worlddump files
are named with a timestamp and we can't have globs in our collection
list. To address this we create a copy of the file with a -latest.txt
suffix. This gives us a deterministic file name for log collection
without using globs.

Note we do not use a symlink here because some jobs gzip their log files
(breaking symlinks) and others do not. This makes it painful to always
have a valid link. Not having a valid link can break log collection.

Hardlinks may be another option but simply making a copy is easier to
manage as you don't have to worry about links preexisting and the
dumpfiles are not that large.

Change-Id: I96ae5f5290546ad25ca434c1106c01354d2d053c
2019-09-12 10:21:17 +00:00
Peter Penchev 16bccbcea4 Revert "install LIBS_FROM_GIT using python 2 and 3 where appropriate"
All the OpenStack projects should be able to run under Python 3 now so
the fallback installation of the Python 2 libraries should not be
needed any longer. This also avoids the problem of script files
installed by the libraries sometimes being overwritten by the Python 2
version leading to incorrect execution later, as discussed in
http://lists.openstack.org/pipermail/openstack-discuss/2019-September/009226.html

This reverts commit a2eb89417f.

Change-Id: I1cdb7e4a209872f1620be556b7278879a4b86df5
2019-09-09 15:14:11 +03:00
Bharat Kunwar 951e14d6dd Fix default security group in samples/local.sh
The script currently complains about multiple default security groups. This
obtains the default and uses it when creating security group rules.

Change-Id: I81e59eae5df79889ed1fb02d45af26e3a55aa0e9
2019-09-05 14:30:41 +00:00
Zuul 650769a311 Merge "flat_networks - Don't hardcode public network name" 2019-08-30 16:12:11 +00:00
Zuul 2b6e83d7c8 Merge "Fix MySQL log collection" 2019-08-30 16:12:09 +00:00
Zuul 0e8934c5ba Merge "Set cinder's my_ip based on SERVICE_IP_VERSION value" 2019-08-30 07:24:38 +00:00
Zuul e966ba1519 Merge "Select proper flavor_ref_alt for Tempest" 2019-08-29 07:21:37 +00:00
Stephen Finucane 168ca7f0a4 Remove deprecated PostgreSQL database driver
This was deprecated for removal in Pike. It's probably time to drop it.
Note that the 'postgresql-devel'/'postgresql-server-dev-all' packages
are retained since some packages still include 'psycopg2' in their
general requirements.

Change-Id: I51e8354e99972757253ce259e6c03c91da24398c
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2019-08-26 10:16:06 +01:00
Szymon Datko 28c498150d Select proper flavor_ref_alt for Tempest
Currently if user selects the default instance type for Tempest
tests, some of resize-related tests may fail due to resize attempt
into flavor with smaller disk size. It is because there is just
simple check if flavor_ref and flavor_ref_alt (IDs) aren't the same.
To ensure resize is really possible, there shall be additional
verification introduced.

Co-Authored-By: Michał Madarasz <michal.madarasz@corp.ovh.com>
Change-Id: Iaa1bfa9cb76cbe54be658d2d70d97d99e7fb5be9
2019-08-23 12:57:42 +02:00
Zuul 6926ed8ac5 Merge "Merge (don't overwrite) $NOVA_CPU_CONF" 2019-08-22 18:37:26 +00:00
Matt Riedemann f92c346131 Fix MySQL log collection
The mysql logs weren't being copied to logs and published.

Change-Id: I20740b468e4b310ac07e77f3930cae92026942fb
2019-08-22 12:15:09 -04:00
Eric Fried 2468ceaa72 Merge (don't overwrite) $NOVA_CPU_CONF
Per the referenced bug, $NOVA_CPU_CONF was previously being initialized
by copying $NOVA_CONF, thereby trashing any values already configured in
$NOVA_CPU_CONF.

With this commit, we merge the values from $NOVA_CPU_CONF in after the
copy.

Note that this makes use of the merge_config_file function, which is
defined in inc/meta-config, which wasn't being sourced from every code
path that hit start_nova_compute; so this commit also moves that import
from stack.sh to functions (next to the other imports from inc/, which
makes sense anyway).

Change-Id: Id3e2baa2221e13f512f8dcf1248e1e15b6a7597f
Closes-Bug: #1802143
2019-08-22 13:34:17 +00:00
Zuul 78e94096ce Merge "Set ksa retry conf options for n-cpu [ironic]" 2019-08-22 12:15:04 +00:00
Zuul 7bc5220493 Merge "DVR-Enable ARP Responder when DVR and L2pop is enabled" 2019-08-21 17:34:47 +00:00
Eric Fried e273c0433f Set ksa retry conf options for n-cpu [ironic]
We're trying to get nova to talk to ironic through openstacksdk and need
to be able to specify retry limits/intervals there. We could reuse the
existing conf options, but better to support the standard ones exposed
from keystoneauth1 via [1] and [2].

Note that these will be ignored unless you have keystoneauth1 3.15.0
(for [1]) or 3.16.0 ([1] and [2]) and are building your adapter using
ksa-derived conf options (see the Needed-By).

Needed-By: https://review.opendev.org/642899

[1] https://review.opendev.org/#/c/666287/
[2] https://review.opendev.org/#/c/672930/

Change-Id: I79c416e25d635b0ffa419640b4bd91e36f78b1ab
2019-08-21 08:59:51 +00:00
Harald Jensås f1a794e132 flat_networks - Don't hardcode public network name
Use the PUBLIC_NETWORK_NAME variable instead of hardcoding
it when setting the [ml2_type_flat]/flat_networks option.

Change-Id: I8bfc37089ec90eb06ee41d85744dad0f3f734c16
2019-08-21 10:52:08 +02:00
Ghanshyam Mann d331fa7a2d Set cinder's my_ip based on SERVICE_IP_VERSION value
Devstack's lib/cinder set the my_ip on cinder side but it
hard-code it with HOST_IP[1]. It is no issue for IPv4 env
but when you build or run the IPv6 job then this ip is left
to set with IPv6. my_ip should be set to HOST_IP or HOST_IPV6
based on SERVICE_IP_VERSION value.

As part of Train community goal 'Support IPv6-Only Deployments',
we will expand the 'devstack-tempest-ipv6' job to do IPv6-only
deployments verification so we need fix the the my_ip setting.

Closes-Bug: #1838250

Depends-On: https://review.opendev.org/#/c/677524/

[1]https://github.com/openstack/devstack/blob/6aeaceb0c4ef078d028fb6605cac2a37444097d8/lib/cinder#L231

Change-Id: I71c74e46467a5d3c1bf9c7d683f364cba7cf9d80
2019-08-21 05:42:08 +00:00
Zuul 03f94cc403 Merge "nova: Stop setting '[DEFAULT] use_ipv6'" 2019-08-20 18:37:05 +00:00
Zuul 5406b6f3cc Merge "Permit use of sudo-ldap instead of sudo package" 2019-08-20 10:41:05 +00:00
Jens Harbott 5a30480ce1 Update HACKING doc
Some minor updates.

Change-Id: I0d4e20e394f0fa420e896e0b1a90872ccf909b58
2019-08-16 09:57:59 +00:00
Zuul 3ff4f9ebed Merge "Add the IPv6 IP to the TLS cert" 2019-08-15 11:23:56 +00:00
Brian Haley 005004eded Switch to fedora-29 for fedora-latest nodeset
F28 is EOL as of 5.29.19, so change to use fedora-29
and remove it from stack.sh.

Depends-on: https://review.opendev.org/#/c/662538/
Change-Id: I5ebdb68fcd01a1e63be4b3c0735a274783aad818
2019-08-14 17:10:20 -04:00
Zuul 9d53f615a0 Merge "Use list tables" 2019-08-14 15:59:39 +00:00
Andreas Jaeger d3a2fcf485 Use list tables
Reformat overlong table into a list-table to make it easier to edit.
The change contains no wording changes besides giving titles to the
list-tables.

Fix formatting for setup-devstack-source-dirs so that the variable does
not get displayed with a grey bar at
https://docs.openstack.org/devstack/latest/zuul_roles.html#role-setup-devstack-source-dirs

Change-Id: I7378d46c507b1d86f1d5319655a55f2a8c5a8f60
2019-08-14 14:45:02 +02:00
Zuul ae73b23373 Merge "Update docs building" 2019-08-14 03:11:02 +00:00
Julia Kreger 0fe25e31a8 Add the IPv6 IP to the TLS cert
For some crazy reason, we've forgotten about trying
to use IPv6 addresses directly with the SSL certificates.

So lets add some logic so clients can connect directly
with the v6 IP.

Change-Id: Ie8b8a2d99945f028bebe805b83bfd863b7b72d57
2019-08-12 08:46:56 +02:00
Andreas Jaeger 8dd89e52d0 Update docs building
Switch to "modern" way of building docs using sphinx-build directly,
remove now unsed parts from setup.cfg.

Upgrade to openstackdocstheme 1.20 and remove obsolete variables from
conf.py.

Convert external links to internal RST links so that Sphinx can verify
that they are correct.

Replace redirected links with new targets.

Use opendev.org instead of github.com where appropriate.

Change-Id: Iedcc008b170821aa74acefc02ec6a243a0dc307c
2019-08-11 16:15:34 +02:00
melanie witt 0a3288c1b4 Set console server host/address in nova-cpu.conf for multi-host
Currently, the console server host and listen address on the compute
host is always being set to localhost. This works fine in a single
node all-in-one deployment, but will not work properly when
nova-compute is running on a separate host in a multi-node deployment.

This sets the console server host and listen address on the compute
host to the nova host IP and service listen address instead of the
localhost.

Co-Authored-By: Matt Riedemann <mriedem.os@gmail.com>

Closes-Bug: #1669468

Change-Id: Id8b0b4159b98c7ff3c85ec3daa03d556d9897ce9
2019-08-10 08:24:12 +00:00
Adam Spiers 6c7337e80e Make stop/disable of apparmor work on all SLE systems
The existing code to disable apparmor on SUSE systems only worked for
recent openSUSE / SLE releases.  On SLE12 (at least), aa-enabled and
aa-teardown are not available, so instead use systemd's interface for
stop/disable.  However on newer releases, systemctl stop apparmor is a
no-op:

    https://www.suse.com/releasenotes/x86_64/SUSE-SLES/15/#fate-325343
    https://gitlab.com/apparmor/apparmor/merge_requests/81
    https://build.opensuse.org/package/view_file/openSUSE:Leap:15.2/apparmor/apparmor.service?expand=1

So we still need to call aa-teardown if it's available.

Change-Id: I8d99c8d743cc1935324e2e4fcb67efaa5241199e
2019-08-08 12:52:07 +01:00
Zuul c9abbf5709 Merge "Add 'tempest-ipv6-only' job on devstack gate" 2019-08-08 05:24:10 +00:00
Ian Wienand 474f535a14 oscwrap: make a little quieter
A huge part of the logs is irrelevant bash aliases captured by the
openstack client timing wrapper from the run of "openstack complete",
which is only helpful on interactive systems where you'll interact
with the command line.  Call it directly to avoid capturing the logs.

While we're here, turn off tracing inside the oscwrap function, which
is called frequently.  It's not useful for debugging.

Change-Id: I1cb5399fe7ee6f0e547a9cfff70396aa2007632e
2019-08-08 09:15:11 +10:00
Zuul 1f6bea1768 Merge "Add options to configure cache in nova" 2019-08-02 17:38:42 +00:00
Zuul aae311a1be Merge "Only modify folders created by devstack" 2019-08-02 13:17:49 +00:00
Zuul b9f4a73e5a Merge "Un-quote metadata address if it is IPv6" 2019-08-02 13:17:48 +00:00
Zuul 76a58003c4 Merge "Configure console proxy ports in nova-cpu.conf" 2019-08-02 12:07:35 +00:00
Slawek Kaplonski d33cdd01f8 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
2019-08-01 18:16:30 +02:00
Ghanshyam Mann 99bcaf5721 Add 'tempest-ipv6-only' job on devstack gate
We recently added the 'tempest-ipv6-only' job on
tempest side which will use the devstack base job
'devstack-ipv6' job and add more verification and testing
for IPv6 deployment.

Let's add that job on devstack gate also to avoid any
break due to devstack changes.

Change-Id: Ib2c85ec262b027351872e2b5a39b06a4ba1b880a
Story: #2005477
Task: #35923
2019-08-01 05:01:38 +00:00
Brian Haley a54919180b Un-quote metadata address if it is IPv6
In lib/neutron-legacy, the Nova metadata host address is
un-quoted if it is IPv6, i.e. 2001:db8::1, not [2001:db8::1].
We should be doing the same in lib/neutron.

Change-Id: I80c96603a41ef9d289712ef15b464859aa9257be
2019-07-31 12:18:39 -04:00
Andreas Jaeger 0fc6b2c5a8 Update api-ref location
The api documentation is now published on docs.openstack.org instead
of developer.openstack.org. Update all links that are changed to the
new location.

Note that redirects will be set up as well but let's point now to the
new location.

For details, see:
http://lists.openstack.org/pipermail/openstack-discuss/2019-July/007828.html

Change-Id: I8a6c3403192d1416cb66cc9e92ec827b339f1270
2019-07-30 17:52:55 +02:00
Zuul 6f9fc85af1 Merge "Remove VNC server listen addresses seeting to IPv4 from base job" 2019-07-30 12:31:36 +00:00
Zuul df70dfaf8a Merge "Make 'devstack-ipv6' job as voting" 2019-07-30 05:16:25 +00:00
Zuul 2542354fb5 Merge "Fix error in configure_nova_hypervisor with hardware Ironic node" 2019-07-29 12:51:58 +00:00
Jan Gutter 97096e0a29 Fix benign epmd@0.0.0.0.socket failure
* The restart loop for rabbitmq-server can trigger socket activation
  of epmd without rabbitmq-server running. This can lead to 'systemctl
  status' reporting 'State: degraded' with no simple way to reset to
  'State: running'.
* It's important to note that this socket activation failure is benign
  and is not an indicator of system failure.

Change-Id: Iede4f5ebeffb59644dee4a17b6331b3cdd04d146
Signed-off-by: Jan Gutter <jan.gutter@netronome.com>
2019-07-27 13:32:43 +02:00
Graham Hayes 352d58a7af Only modify folders created by devstack
running chown and chmod on files and folders not created by
devstack causes a few issues:

* On nfs mounted directories it can take an extremely
  long time to chown -R some of the git repos, especially
  if any tox commands have been ran in the host
* chown can cause the host files to get into a weird state
  if nfs is set up wrong.

If files and folders are pre-existing we should assume
they are in the correct state, and not modify them.

Fix setup-devstack-log-dir to create the logs directory with
correct permissions in the first place.

Change-Id: I5ebdaded3ffd0a5bc70c5e9ab5b18daefb358f58
Signed-off-by: Graham Hayes <gr@ham.ie>
2019-07-26 11:49:29 +01:00
Zuul 6aeaceb0c4 Merge "Remove Swift from default DISABLED_PYTHON3_PACKAGES" 2019-07-26 09:56:46 +00:00
Zuul ffbab01c08 Merge "Add and switch to the newly created opensuse-15 nodeset" 2019-07-26 09:52:04 +00:00
Ghanshyam Mann b0b80d76e1 Remove VNC server listen addresses seeting to IPv4 from base job
'devstack' job set the VNC listen addresses 'VNCSERVER_LISTEN' and
'VNCSERVER_PROXYCLIENT_ADDRESS' IPv4 which makes 'devstack-ipv6' job
to either unset those or set for IPv6 values.

Let's remove the setting of those in base job and let lib/nova
set based on configured ip version from job.

'devstack-ipv6' base job will be used to define the IPv6-only jobs
on Tempest and project side gate.

Change-Id: Iea469128b15298aee61245e702d20603c8d376fb
Story: #2005477
Task: #35923
2019-07-26 08:25:56 +00:00
Zuul c17ad84a00 Merge "Enable vlan networking for newer neutron plugin" 2019-07-26 08:20:32 +00:00
Zuul b36afa110b Merge "Remove RetryFilter from config" 2019-07-25 22:06:30 +00:00
Ghanshyam Mann 420d3df481 Make 'devstack-ipv6' job as voting
'devstack-ipv6' job set the devstack to deploy
the services on IPv6. As part of community goal
'Support IPv6-Only Deployments'[1], this is going
to be the base job for all project specific or tempest
IPv6 jobs. Running this as voting make sure any devstack
setting or changes would not break the IPv6 jobs.

Story: #2005477
Task: #35923

[1] https://storyboard.openstack.org/#!/story/2005477

Change-Id: Id6580e8b29b6b04e34c2c1eca3125fa08920eb1d
2019-07-25 06:48:39 +00:00
OpenStack Proposal Bot 4106e46b2e Updated from generate-devstack-plugins-list
Change-Id: Ie46214ed8a5a5887f04805b9157b76ebf44f9616
2019-07-24 06:12:42 +00:00
Zuul 8072595150 Merge "Remove the usage of read_password from library files" 2019-07-15 12:15:42 +00:00
Matt Riedemann d51baee40d 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
2019-07-12 11:51:17 -04:00
Tim Burke 764ccd07a7 Remove Swift from default DISABLED_PYTHON3_PACKAGES
As of https://review.opendev.org/#/c/653548/ this is no longer
necessary.

Change-Id: Iab43d77c3444fa97f3339f0e5fa4ad24e87e3fd6
2019-07-11 09:47:52 -07:00
Vanou Ishii 705e9cb5dc Fix error in configure_nova_hypervisor with hardware Ironic node
Trying to deploy OpenStack environment consisting of ironic nova
hypervisor & hardware Ironic node (not VM Ironic node) with devstack
got failed.

Devstack error says error occurred while calling configure_libvirt
in configure_nova_hypervisor. This happens because libvirt related
packages are not installed when specifying "VIRT_DRIVER=ironic"
and "IRONIC_IS_HARDWARE=True".

To fix this problem, this commit add "if" statement to check
Ironic node is hardware or not using "is_ironic_hardware" function
in "function-common" file.

Change-Id: I1113478175fadec79d0f8bf6ae842ed86e5e686b
Closes-Bug: #1834985
2019-07-05 01:22:09 +00:00
Zuul 15c64f109e Merge "Add capability of adding additional network API extensions" 2019-07-04 11:46:33 +00:00
Dirk Mueller 70fca49de7 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.

Change-Id: Ic3f4d6998a66da5226bc95088d7e3c83dfe737ce
2019-07-03 19:16:03 +02:00
Zuul 5674ce8e37 Merge "Updated from generate-devstack-plugins-list" 2019-07-03 16:38:23 +00:00
Zuul 9ee5347e69 Merge "Enable universe repository on Ubuntu" 2019-07-03 16:38:21 +00:00
Zuul 134064ff8a Merge "nova: Set '[neutron] default_floating_pool' instead" 2019-07-03 14:35:49 +00:00
Jens Harbott 3446481a23 Update docs about python-systemd pkg
The package has been renamed in order to avoid the namespace collision
with systemd, update our doc accordingly.

Change-Id: I1b9a434d9bb6a7d9dc38ef965017ed9f8773d595
Closes-Bug: 1825949
2019-07-03 13:16:04 +00:00
melanie witt d7d902f6b6 Configure console proxy ports in nova-cpu.conf
In change I8934d0b9392f2976347391c8a650ad260f337762, we began
configuring console proxy ports for multiple cells in the nova
controller config files to avoid "Address already in use" errors from
port collisions when running multiple cells on a single host.

This correspondingly configures the console proxy ports in the nova
compute config file based on what cell we're in, according to the
NOVA_CPU_CELL variable.

The base_url config for serial console is also added where the default
was previously used. The url is taken from the config option default in
the nova code: nova/conf/serial_console.py [1].

[1] https://github.com/openstack/nova/blob/8f00b5d/nova/conf/serial_console.py#L54

Change-Id: Id885fc5a769bce8111f1052a1b55d26be817c890
Closes-Bug: #1830417
2019-07-03 10:45:01 +01:00
OpenStack Proposal Bot 45ded1cca0 Updated from generate-devstack-plugins-list
Change-Id: I1b4c9571b8f3dece270865fb336e73aca3a36a76
2019-07-03 06:12:23 +00:00
Carlos Goncalves 8b31dce38b 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
2019-07-01 13:05:51 +02:00
Dirk Mueller 8ab64b3236 Drop signing_dir option from configure_auth_token_middleware
This is no longer being used due to Keystone PKI tokens no longer
being implemented.

In order to not break backward compatibility we create a new function
that is to be used instead and deprecate the old one. Modify the old
function to ignore the 3rd argument and display a deprecation warning.
Adjust callers to no longer create and set that directory, calling the
new function instead.

Change-Id: Id0dec1ba72467cce5cacfcfdb2bc0af2bd3a3610
2019-06-28 16:28:03 +00:00
Zuul 20190ee83a Merge "Use L3RouterPlugin alias" 2019-06-28 09:05:16 +00:00
Zuul 2d7b8cf502 Merge "Add nova-multi-cell job to experimental queue" 2019-06-26 15:44:08 +00:00
Zuul 46f05ea237 Merge "Adjust repo namespace for pbr" 2019-06-26 06:39:48 +00:00
Zuul a928853692 Merge "Update (git|review).openstack.org links to opendev" 2019-06-24 20:23:20 +00:00
Zuul 2490e08bc7 Merge "Change the GIT_BASE default to https://opendev.org" 2019-06-24 20:14:06 +00:00
Zuul f62365ed38 Merge "Fix plugin doc generation for opendev transition" 2019-06-22 01:08:12 +00:00
Ghanshyam Mann 52c2886f7e 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
2019-06-21 17:05:01 +00:00
Matt Riedemann 99e7445fb2 Adjust repo namespace for pbr
This is a follow up for change Ifcfce490edb3d77e4e436e002d35bc909e1a057c
where the GIT_BASE was changed to the opendev URL to avoid redirects.
The pbr namespace in stackrc was old and still getting redirected and
this change fixes that.

Change-Id: Ib444e928fa2ca7650670f97be6927202333a1dd7
2019-06-21 09:38:24 -04:00
Zuul 5e09df086c Merge "Install from bindep.txt in plugins" 2019-06-21 08:04:35 +00:00
Zuul ad8f03da50 Merge "Add setting of placement microversion on tempest conf" 2019-06-21 07:22:51 +00:00
Matt Riedemann 9b6d2f20b4 Update (git|review).openstack.org links to opendev
This updates links going to git.openstack.org and review.openstack.org
to go to their respective opendev locations to avoid redirects.

Change-Id: I78e3bb5303718962f591117f9c0ee11f2314b128
Closes-Bug: #1833256
2019-06-21 14:35:16 +10:00
Mark McClain 371a253285 Change the GIT_BASE default to https://opendev.org
Change-Id: Ifcfce490edb3d77e4e436e002d35bc909e1a057c
2019-06-21 14:33:29 +10:00
Ian Wienand d5634c4723 Fix plugin doc generation for opendev transition
Update the server to opendev and update paths for gitea, along with
any other references.

Switch to a blacklist where we just remove stackforge; this leaves all
the new namespaces like x/ and starlingx/ being checked.

Use a common session for checking for the plugin file which makes it a
*lot* faster.

Remove unsed "plugins" array variable

Regenerate the file

Change-Id: Ie3e615ba352a389da22e129c5c67cf6abd8cfdc8
2019-06-21 14:33:29 +10:00
Sean McGinnis f7302e1af1 Fix configuration doc block formatting
Many of the code blocks in the configuration documentation had extra
leading spaces. This resulted in the blocks being both code block
formatted as well as blockquoted in the output.

This patch removes leading spaces and some minor cleanup to get the
formatted output correct.

Change-Id: Ic4dfb49c547d51e16b673bc88d7b2b1a907e3258
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2019-06-19 11:51:05 -05:00
Kenichi Omichi 5b8656e748 Remove RetryFilter from config
Since Ic0a03e89903bf925638fa26cca3dac7db710dca3 RetryFilter has been
deprecated. So we should not enable the RetryFilter on our tests.

Change-Id: I48c2c4d0714f582af8948dc88b48df1c2c62fcd2
2019-06-18 23:40:15 +00:00
Zuul fc9b41d733 Merge "Add NOVA_NOTIFICATION_FORMAT variable" 2019-06-15 10:03:05 +00:00
Matt Riedemann b57757ae14 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 "unversioned" to match the
nova default but allows downstream CI jobs to easily configure
another value.

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

Change-Id: Ied9d50b07c368d5c2be658c744f340a8d1ee41e0
2019-06-11 13:53:51 -04:00
Julia Kreger 6e5b138466 Enable vlan networking for newer neutron plugin
Ironic's CI makes extensive use of VLAN based networking
and the newer neutron plugin hardcodes the tenant networking
type to vxlan which is naturally problematic. It also lacks the
ability to set the necessary constraints for vlan networking
which are added for vxlan networking.

This patch enables the type of tenant networking to be defined
as vlan, and enables for a physical network vlan range mapping
setting to be configured which is required for a vlan to be
allocated upon network creation.

Change-Id: I55874c1ce82898e9dfb81505d8f3b14abde33579
2019-06-11 08:59:18 +00:00
Matt Riedemann 58abccb89f Add nova-multi-cell job to experimental queue
Nova has had a multi-cell job (nova-multi-cell) since the
Train release but is currently non-voting in the check queue
for nova changes. This change adds the job to the experimental
queue for devstack changes so we can test changes to devstack
and make sure they work for the multi-cell job.

Change-Id: Icf31baf6fd4313aec5ecfb9e8f9cbcef1ff7f61d
2019-06-06 12:15:22 -04:00
Zuul 66175f1ad6 Merge "Use neutron-legacy on subnodes in devstack zuul job" 2019-06-05 09:53:41 +00:00
Ghanshyam Mann fc20705098 Add setting of placement microversion on tempest conf
Tempest not support placement microversion setting so that
test can call APIs with specific placement microversion.

This commit adds the setting of placement API microversion on
Tempest conf.

Change-Id: Ie04aa993ec7a1495740d9267b076a40f4291e25e
2019-06-05 08:24:45 +00:00
Zuul eadd84b718 Merge "Remove n-cells, n-net and n-cauth" 2019-06-05 04:11:57 +00:00
Zuul 5ffdd616e7 Merge "End support for changing cinder periodic_interval" 2019-06-04 22:08:27 +00:00
Zuul 16d11d27f3 Merge "Option "lock_path" from group "DEFAULT" is deprecated" 2019-06-04 09:18:22 +00:00
Zuul 63daca4af5 Merge "Fix Typo on Devstack-with-lbaas-v2.rst" 2019-06-04 07:15:57 +00:00
Alex Monk 5e2d0e0bb5 Permit use of sudo-ldap instead of sudo package
If the sudo-ldap package is providing the sudo command instead of the plain
sudo package, accept that instead of breaking the system and requiring direct
root login intervention to fix things.

Change-Id: I45d7e4617bd59e72b4f0bf2e91750a6830e2a010
2019-06-04 01:23:37 +01:00
shenjiatong 1639594938 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
2019-06-03 10:58:54 +08:00
Zuul 9ffa41ac39 Merge "Make most platform jobs run with python3" 2019-06-02 15:09:03 +00:00
Slawek Kaplonski 1b15176b05 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.

Change-Id: I0d7f9f2baaee2836a719f199939156bd4f53f778
2019-05-31 16:23:57 +02:00
Stephen Finucane a23e4153ef nova: Stop setting '[DEFAULT] use_ipv6'
Change I188fc2cd1b26fe7a71804f7e7d66b111d6f15e30 in nova stopped us
respecting this when generating the network templates injected into
instances on boot. With the removal of nova-network, there is no longer
any other reason to set this.

Change-Id: I925b7c6c23133cd5a835960f4507c979f615d78e
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2019-05-31 15:12:04 +01:00
Stephen Finucane 283e86fbb5 nova: Set '[neutron] default_floating_pool' instead
In change I2ce8ff3d7c33a402b8af50182ec01f512859c388, we duplicated the
'default_floating_pool' option, found in the '[DEFAULT]' group, to the
'[neutron]' group. This allowed us to continue with our deprecation
plans for the former option, which should be retired along with
nova-network.

Update the nova lib module so it'll set the new option, we can safely
assume to be the correct one now that we've removed support for cells v1
and nova-network.

Change-Id: If9a02b640e6c2e1300c7b11b7552ba13c1496d79
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
2019-05-31 15:12:04 +01:00
Stephen Finucane 4b8cba77fe Remove n-cells, n-net and n-cauth
Remove nova cells v1 support, which also allows/necessitates removing
support for nova networks (which was only supported with cells v1) and
nova-consoleauth (which was required by cells v1 but is unnecessary
otherwise).

The Depends-On isn't really necessary, but it's here to make sure this
doesn't merge until we _really_ have killed cells v1.

I honestly expected this patch would be bigger.

Change-Id: I90316208d1af42c1659d3bee386f95e38aaf2c56
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Depends-On: Ib0e0b708c46e4330e51f8f8fdfbb02d45aaf0f44
2019-05-31 15:10:05 +01:00
Lucas Xu f745a0a7aa Fix Typo on Devstack-with-lbaas-v2.rst
Change "creeate" to "create" in thie CLI

Change-Id: Ic9997ad2b852ae25b28c5ad7481fad188b632a50
2019-05-30 20:49:29 +00:00
Zuul 984c3ae33b Merge "Safety check for python version in get_pip_command" 2019-05-21 10:23:18 +00:00
Zuul 45c1aa2f7d Merge "sync-devstack-data: new argument devstack_data_base_dir" 2019-05-20 07:46:21 +00:00
Zuul fdbe849d95 Merge "Deprecate swift3, use s3api in Swift repo" 2019-05-20 07:46:19 +00:00
Tom Barron 4db9d567d1 Safety check for python version in get_pip_command
We know empirically that some legacy gate jobs pass and appear
to be running with python3 but actually pip was invoked with
PYTHON3_VERSION unset so that they are actually ran with python2
packages.

As a followup to this discussion [1], add a safety check in the
get_pip_command function to ensure that a python version has been
set when it is invoked.

[1] https://review.openstack.org/#/c/622415/4/inc/python@283

Change-Id: I3a08406fb7d68282c6b98abb33a625821510046a
2019-05-20 06:01:35 +00:00
Zuul 172f02f1e0 Merge "Configure console proxy ports in nova_cellN.conf" 2019-05-19 13:41:50 +00:00
Swaminathan Vasudevan 9bf7e26541 DVR-Enable ARP Responder when DVR and L2pop is enabled
This patch enables ARP Responder with DVR routers along with
l2pop in devstack.

Related-Bug: #1774459

Change-Id: I82f628c32f6e38c2419b6ffe90d9f9adf96777b1
2019-05-16 19:08:58 +00:00
Zuul ed43ca9856 Merge "Remove pkg/elasticsearch.sh" 2019-05-15 12:26:16 +00:00
Rodolfo Alonso Hernandez 8b8158ed8f "raw_input()" deprecated in Python3
Built-in function "raw_input()" is deprecated in favor of "input()" [1].

[1] https://www.python.org/dev/peps/pep-3111/

Change-Id: I31c4c59373a2ad04987da3daffb3eed50916a6db
Closes-Bug: #1823321
2019-05-14 16:25:48 +00:00
Zuul 46b442ca46 Merge "Add nova-status upgrade check call post-deploy" 2019-05-10 08:40:22 +00:00
Zuul 0cb721b790 Merge "Fix is_neutron_legacy_enabled function" 2019-05-04 22:38:45 +00:00
Zuul 15b098d470 Merge "Remove n-obj from zuul and docs" 2019-05-03 22:12:00 +00:00
Zuul 2b4196f89a Merge "Add region_name to ironic compute configuration" 2019-05-03 22:11:59 +00:00
Kota Tsuyuzaki 070e4ee65e Deprecate swift3, use s3api in Swift repo
swift3 is no longer actively maintained in the upstream.
That has been moved to Swift repository as s3api so we should
use s3api middleware instead. As well as swift3, s3token is
also maintained in Swift upstream.

Change-Id: I4582d81da066ab53e6f11ad1df7af91425f2b0ca
2019-05-01 18:07:58 +00:00
Matt Riedemann 9e3b3bf524 Add nova-status upgrade check call post-deploy
Once nova is setup and n-cpu on the host is reporting
a service record and discovered (the host is mapping in
the API DB), we should run the nova-status upgrade check
to verify the deployment.

Change-Id: I9683bf94233ebacb3057ce159cb3dc53aa55a2f4
Related-Bug: #1790721
2019-04-30 18:28:36 -04:00
ZhongShengping 5fe60c1a34 Option "lock_path" from group "DEFAULT" is deprecated
Option "lock_path" from group "DEFAULT" is deprecated. Use option
"lock_path" from group "oslo_concurrency".

Change-Id: I7c7501a4a351155eeba77bb7cd43c8d6f5ea73bc
2019-04-30 10:13:27 +08:00
Zuul 58de715453 Merge "Explicitly set scheduler_available_filters" 2019-04-29 12:23:17 +00:00
Brian Rosmaita 87daf8abe6 End support for changing cinder periodic_interval
Support for changing the cinder periodic_interval config option
was added way back in havana as a workaround for bug #1180976
by change I20e52e66fcc94b224476cdd14c88bd6981b4e617.  As the fix
for that bug does not require modifying this config value, and
such modification may have unintentional adverse effects, end
the support.

Change-Id: I1ef1fe564123216b19582262726cdb1078b7650e
Partial-bug: #1824837
2019-04-24 09:41:57 -04:00
Matt Riedemann 62e27d3b1c Remove n-obj from zuul and docs
n-obj hasn't been around for many years and devstack
doesn't use it anymore anyway so this just cleans up
some vestigial use of the old service.

Change-Id: I04b2d2dc2b4e49fab90f5ef94f4e087e969aa24b
2019-04-23 13:44:37 -04:00
Artom Lifshitz 4705861dd0 Explicitly set scheduler_available_filters
Tempest's scheduler_available_filters has a special 'all' value that
is understood to mean 'all filters are enabled' by various tempest
tests. However, what it really means is 'the default nova filters are
enabled.' In an effort to help clean that up, this patch explicitly
sets scheduler_available_filters to nova's $FILTERS. Because $FILTERS
is now used in both lib/nova and lib/tempest, it is renamed
$NOVA_FILTERS.

Change-Id: I6ffc1e9989cd61d666f9c1db9c94fbabd7151918
Related-bug: 1628443
2019-04-23 10:15:23 -05:00
Monty Taylor dc9ba8b8ae Add opendev to repo search list
glean is in opendev and is used by nodepool devstack jobs.

Change-Id: I38dfd7cc531b20b26862193be14f4ebb53352efa
2019-04-23 13:02:54 +00:00
Dean Troyer e7f3d91a7d 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:

* starlingx/
* x/
* zuul/

Depends-On: https://review.opendev.org/653988
Change-Id: I8a55522a5fee46f415f0c0ce580ded3476133460
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
2019-04-20 09:58:34 -05:00
OpenDev Sysadmins 666f5491b6 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:10 +00:00
Erik Olof Gunnar Andersson a13474fd78 Add region_name to ironic compute configuration
We should always pass on a region when talking to
ironic. This will also help detect and test issues
specific to regions.

Change-Id: Iaab3c1bcedc5aaa2106c0758cbb43bade3de2cf5
2019-04-18 21:14:40 -07:00
Slawek Kaplonski a9a51ca638 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
2019-04-18 07:54:34 +00:00
Colleen Murphy 10f4409882 Add hack to fix ply installation on opensuse
The python3-ply package is indirectly a dependency of dhcp-client, which
is not exactly an optional package. Pip >=10 refuses to install ply from
global-requirements with this distro package is installed, so our only
option is to remove it manually.

Change-Id: I377fdd4a581eb4b6275584d92cafc0b783fe3b84
2019-04-15 19:03:57 +00:00
OpenStack Proposal Bot 7fbc70e2cb Updated from generate-devstack-plugins-list
Change-Id: I2798fe053669be212c47ee9c579ca4f6262af5a1
2019-04-15 06:24:44 +00:00
Zuul 53ee5230c6 Merge "stack.sh: Clear OpenStack related envvars" 2019-04-12 21:14:28 +00:00
Zuul 1d05008d71 Merge "Updated from generate-devstack-plugins-list" 2019-04-12 17:50:00 +00:00
Zuul 7b04151810 Merge "Add openstacksdk functional job to devstack pipelines" 2019-04-12 17:49:59 +00:00
Monty Taylor 28a6224284 Add openstacksdk functional job to devstack pipelines
openstacksdk gates on the new-style devstack functional base jobs. It
serves as a good test case to make sure the functional base jobs don't
break.

Change-Id: I817639ed30cda8ea51d156872a14bbcf10a4e63d
2019-04-12 12:26:38 +00:00
OpenStack Proposal Bot 70f5d91a61 Updated from generate-devstack-plugins-list
Change-Id: Id100f77027445edf849cc295ecebb31c79601b40
2019-04-12 06:14:57 +00:00
Trinh Nguyen 56af9229a0 Remove pkg/elasticsearch.sh
The pkg/elasticsearch.sh is only used by Panko but Panko has
moved the script to its own repository [1].

[1] https://review.openstack.org/#/c/643262/

Change-Id: I0ce40f4299246b68624abd2072c2abce06f1e70b
Signed-off-by: Trinh Nguyen <dangtrinhnt@gmail.com>
2019-04-12 13:40:52 +09:00
Zuul b5db83f2cc Merge "Update DEVSTACK_SERIES to train" 2019-04-11 08:16:12 +00:00
Akihiro Motoki 1348ac990d stack.sh: Clear OpenStack related envvars
stack.sh usually fails when it is started in a shell session
where OpenStack related environment variables OS_* are set.
Most common failure scenarios are failures in keystone operations.

This commits clears OpenStack related environment variables
at the begining of stack.sh.

Change-Id: I3a924a0586dc9bb28f3bf3e151e100c24015efe5
2019-04-06 11:57:55 +00:00
Clark Boylan cc072fd32f Run devstack CA and cert setup early
Previously apache was configured and restarted before we configured
the CA and certs. In most cases this is fine because those specific
vhosts didn't use tls. However, if you had previously run devstack
and had leftover vhosts and an unconfigured CA or certs devstack would
fail.

This is a small corner case, but its simple to address by moving CA and
cert setup up in stack.sh to before we do anything related to web
servers.

Change-Id: I31dbaf9471088b9faff26c7b790da6f6feebb2d5
2019-04-05 17:34:01 -07:00
Zuul a6e4e42fb3 Merge "Fix double quoting issue when writing localconf" 2019-04-05 12:13:30 +00:00
Zuul b11fa00fe4 Merge "Remove crusty old python 3 package version logic" 2019-04-05 01:01:26 +00:00
Jens Harbott 5fcb4447cf Make most platform jobs run with python3
python2.7 will be EOL soon, let's test on python3 instead.
Exclude CentOS 7, as there is no python3 easily available.

Change-Id: I24d8812c0c37b6d376fd5ae38067513bb62a2804
2019-04-03 12:31:22 +00:00
Zuul 683454f319 Merge "Update docs index page" 2019-04-03 06:39:52 +00:00
melanie witt d5a68a6b70 Configure console proxy ports in nova_cellN.conf
We're able to run multiple cells in devstack by setting the variable
NOVA_NUM_CELLS in the devstack local.conf. Since we run console
proxies per cell, we will start two console proxies if
NOVA_NUM_CELLS=2. However, we've not been configuring the console
proxy ports in the nova_cellN.conf files, so an attempt to start
more than one will result in a port conflict and failure to start
the subsequent console proxy services with error:

  ERROR nova error: [Errno 98] Address already in use

This adds configuration of the console proxy ports based on an offset
while looping across NOVA_NUM_CELLS. The base port values are taken
from the config option defaults in the nova code: nova/conf/vnc.py,
nova/conf/spice.py, and nova/conf/serial_console.py.

Closes-Bug: #1822873

Change-Id: I8934d0b9392f2976347391c8a650ad260f337762
2019-04-03 04:19:30 +00:00
Luigi Toscano 3ffc00940f 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
2019-04-02 12:28:31 +02:00
Matt Riedemann e03bcb2c8b 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
2019-04-02 10:13:13 +00:00
Zuul 13e260ea2c Merge "Don't install numpy packages" 2019-04-01 14:50:54 +00:00
Zuul 2b51c29121 Merge "Workaround pip10 uninstall of packages" 2019-04-01 14:50:52 +00:00
Jens Harbott 7f0b4f3001 Fix double quoting issue when writing localconf
When [0] introduced quoting all arguments, it broke existing consumers
that already quote their value themselves. Fix this by avoiding to add
additional quotes to the value when it already starts with a double
quote.

[0] https://review.openstack.org/636078

Change-Id: I92146e04731efc6dcc632ae6c3a7c374e783cdba
Closes-Bug: 1822453
2019-04-01 11:43:28 +00:00
Jens Harbott 7224a6b54d Update docs index page
- Switch from proposing Ubuntu 16.04 to 18.04 as the most tested
  platform.
- Make it clearer that creating an additional "stack" user is
  optional when running on a cloud image, as this step often leads
  to errors for new users.
- Fix some minor nits along the way.

Change-Id: I39aef1a230b668b932b1681fcd0deeb423b411f1
2019-04-01 11:16:53 +00:00
Zuul 03f7c4c2cb Merge "Handle pcp-dstat transition" 2019-03-31 06:09:23 +00:00
Zuul 378d0d5808 Merge "Add ISCSI_DEBUG option" 2019-03-31 06:09:21 +00:00
Zuul 358cc122c3 Merge "Add service to tcpdump during run" 2019-03-31 06:03:32 +00:00
Zuul 97a320d18b Merge "Export all journal logs" 2019-03-31 06:03:30 +00:00
Zuul 8ca63acff8 Merge "Fixed support python 2 on Fedora 27" 2019-03-30 00:45:27 +00:00
Zuul b359b960d2 Merge "Have lib/tempest to create shared network" 2019-03-30 00:06:19 +00:00
Ian Wienand 1124a05571 Handle pcp-dstat transition
dstat is Python 2, never going to be updated and effectively
abandonded.  The replacement is pcp-dstat [1] which is mostly
compatible, with a few differences.  As distro start transitioning
(Fedora has), just drop the unsupported args for now.

[1] https://pcp.io/man/man1/pcp-dstat.1.html

Change-Id: Ibec8a37cb18a14656d97e2096c66bc8b21406068
2019-03-29 11:20:19 -07:00
Ian Wienand 8213d7c039 Add ISCSI_DEBUG option
This option adds a systemd override to start the iscsi daemon with
debugging enabled.

Change-Id: Ie27991776aa07a695026036e47513221220332a0
2019-03-29 11:20:19 -07:00
Ian Wienand 2bbc9bbbb8 Add service to tcpdump during run
This adds a service to run a tcpdump during the run.  This can be
useful to capture various network traffic for post analysis.

There didn't seem to quite be an appropriate place to document it, so
a new debugging file is started, with some terse explaination of our
various system-wide debugging services.

Change-Id: I09aaa57611c5047d09a9bce7932d34e9d50b30e6
2019-03-29 11:20:19 -07:00
Ian Wienand 59ce1d902e Export all journal logs
Currently we only export the devstack@ services, and then separately
export the kernel & sudo logs to syslog.txt.

This leaves a lot of logs potentially behind in the journal for
various daemons.  Just export the whole lot.

Using this output is currently very opaque and makes use of systemd
export tools that are very un-discoverable.  Add a README that will
appear alongside the journal explaining how to actually use it.  This
is a template as it would be nice to put into things like the list of
services that are in the journal, or maybe other magic.

Also make sure we export the logs since the start timestamp; currently
during a full run we drop the initial logs.

Change-Id: Id2626f9113d82c6d524039acda8a8ec74afb2081
2019-03-29 11:20:19 -07:00
Ian Wienand e769348882 Quote devstack_localrc arguments
If you have

 devstack_localrc:
   ARGUMENT: "argument with spaces"

The quotes get lost during YAML processing and the resulting file has

  ARGUMENT=argument with spaces

which is a shell error.

Quote all arguments to avoid this sort of thing.

Change-Id: Ia63a53d745dfea7262bcdb5d46425f431c3ccfe5
2019-03-29 11:20:14 -07:00
ghanshyam 315bc13595 Update DEVSTACK_SERIES to train
stable/stein branch has been created now and
current master is for train.

Change-Id: I119f0388891db44c9753e49cedfeb32c74f2a40d
2019-03-26 18:47:06 +00:00
Zuul 8bdbf85096 Merge "Set ownership of /etc/pki/<console> files for TLS" 2019-03-26 08:07:26 +00:00
melanie witt e2853bf2d0 Set ownership of /etc/pki/<console> files for TLS
OpenSSL 1.0.2 generates key files with default permissions: 644 and the
files are copied to the /etc/pki/* directories with sudo.

When the default CI node Ubuntu version was changed from Xenial =>
Bionic we changed from OpenSSL 1.0.2 => 1.1.0. And OpenSSL 1.1.0
generates key files with default permissions: 600. When we copy the key
file to /etc/pki/* using sudo, it becomes owned by root and then the
console-related users are unable to read it.

This sets the ownership of the /etc/pki/<console> files to the
user:group intended to read them.

Closes-Bug: #1819794

Change-Id: I437a46c875cf633272e8cad0811e5557f2ac3641
2019-03-25 03:42:18 +00:00
Lenny Verkhovsky a30dd1cc96 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
2019-03-24 11:46:45 +02:00
Brian Haley 245445b1bd Use L3RouterPlugin alias
The 'router' alias for the L3RouterPlugin has been in
setup.cfg for a while, let's use it.

Change-Id: Ifa196bd33959f1425df9a34cdab4acf4c3b8071b
2019-03-21 11:40:17 -04:00
Luigi Toscano 29771c1c1e Remove the usage of read_password from library files
The read_password function is defined inside stack.sh
and it cannot be used inside the "public library interface"
provided by DevStack.

Move the calls found inside library files to stack.sh,
following the same pattern of the other calls to read_password.

Change-Id: I8adc6723b677dfac2bef735f660e056c498bf773
2019-02-21 10:37:45 +01:00
Ian Wienand 543aed422f Don't install numpy packages
numpy is a python requirement of the websockify package (it appears
there was some disucssion over *removing* this in [1], but did not
happen).  Possibly these packages were installed a long time ago
before wheel support as it was taking a long time to build.  But we
have wheels today, and later versions than the distro provides are
being dragged in anyway.  Remove all distro installs.

[1] https://github.com/novnc/websockify/pull/163

Change-Id: I322dd9e1a07d8ce03c26cf3fcccebd6e21282fe4
2019-02-20 14:28:58 +00:00
Ian Wienand f0dc93dcb4 Workaround pip10 uninstall of packages
As noted in comments, this is a hack to get pip10 to overwrite some
package installed libraries.

Change-Id: Iea24a3ea915e13f7e0882144028ec5ff5bfdfae1
2019-02-20 14:27:47 +00:00
Ian Wienand fa9aadfdd8 Install from bindep.txt in plugins
This allows plugins to specify their binary dependencies in bindep
format.

Some thinking on the implementation: this is in contrast to the
files/[deb|rpm] installation, which is called from the external
install_prereqs.sh script.  This script being an externally callable
entry-point is really an artifact of the days when we would build
snapshot images for CI and wanted to pre-cache downloads.  These days
we use the mirror system to keep packages close to CI nodes.  Thus
rather than expand install_prereqs.sh to also be installing
virtualenvs and python dependencies, this seems to fit better as a
separate internal phase of stack.sh.

Documentation is updated

Change-Id: Icbdfbf97c17c906a7ae86f43e80eb2c445816228
2019-01-16 11:14:09 +11:00
Tim Burke 0137703825 Allow IP-based subject alt names
... even when no other subject alt names provided

Previously, a non-voting job in barbican's gate would fail with something like

  X509 V3 routines:X509V3_parse_list:invalid null name:v3_utl.c:319:
  X509 V3 routines:DO_EXT_NCONF:invalid extension string:v3_conf.c:140:name=subjectAltName,section=DNS:pykmip-server,,IP:198.72.124.103
  X509 V3 routines:X509V3_EXT_nconf:error in extension:v3_conf.c:95:name=subjectAltName, value=DNS:pykmip-server,,IP:198.72.124.103

because we'd have an invalid empty string.

Change-Id: I5459b8976539924cd6cc6c1e681b6753a76b804c
2018-11-30 14:40:12 -08:00
Jens Harbott 8d1b20b4c2 Enable universe repository on Ubuntu
The universe repository is not enabled when installing Ubuntu from an
ISO (at least for Bionic). This leads to some errors during the devstack
run that are not seen when running based on a cloud image which has that
repo enabled by default. Enable that repository unconditionally, the
operation is idempotent.

Change-Id: Ifcb7ecd78fb25ca2136f5848c19b74500e520873
Closes-Bug: 1792936
2018-11-22 13:17:01 +00:00
Attila Fazekas 0d4c9c9fa3 Have lib/tempest to create shared network
In order to make sure not possible to introduce a change in tempest
which breaks the shared network compatibility.

Depends-On: I6e3e53c4ac26b4fef09fefb9c590dfa91f577565

Change-Id: Ib2e7096175c991acf35de04e840ac188752d3c17
2018-11-04 13:28:46 +01:00
Jens Harbott f8755bd468 Allow plugins to override initial network creation
The same code is already in place for the new lib/neutron library, allow
this functionality to be used also when the neutron legacy services are
still being deployed. This was mangled in [0].

[0] I868afeb065d80d8ccd57630b90658e330ab94251

Change-Id: I7214c4893943fbfbeb42ad140f433eecd6c3e9f0
2018-05-16 14:40:01 +00:00
Huan Xiong 63beab5243 init_cinder() shouldn't always create DEFAULT_VOLUME_GROUP_NAME
DEFAULT_VOLUME_GROUP_NAME volume group is LVM ephemeral storage used by
Nova. It is created by init_nova() if user sets NOVA_BACKEND to "LVM".
However, init_cinder() is also hardcoded to create it, based on the
asumption that CINDER_ENABLED_BACKENDS includes it. That assumption
doesn't hold for the current code. What's more important, even if user
wants to use DEFAULT_VOLUME_GROUP_NAME as one of cinder backends and
adds it to CINDER_ENABLED_BACKENDS, the current code in init_cinder()
are general enough and should work fine. This change removes relevant
code in init_cinder(). It also moves DEFAULT_VOLUME_GROUP_NAME clean-up
code from unstack.sh to cleanup_nova().

Change-Id: I53762f8eda6256f962cc4e1f1098406879bbcf5c
2018-03-23 14:42:37 +00:00
YAMAMOTO Takashi 6839d42819 neutron-legacy: Remove no longer necessary vpnaas conditional
VPNaaS agent is going to be an L3 agent extention.

Related-Bug: #1692128
Depends-On: I0b86c432e4b2210e5f2a73a7e3ba16d10467f0f2
Change-Id: Id827274b7c74cdf71db6d1f2ab3eadb5fef099f5
2017-10-17 12:59:27 +09:00
189 changed files with 6645 additions and 3565 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=unmaintained/zed
+328 -130
View File
@@ -8,6 +8,26 @@
nodes:
- controller
- nodeset:
name: openstack-single-node-jammy
nodes:
- name: controller
label: ubuntu-jammy
groups:
- name: tempest
nodes:
- controller
- nodeset:
name: openstack-single-node-focal
nodes:
- name: controller
label: ubuntu-focal
groups:
- name: tempest
nodes:
- controller
- nodeset:
name: openstack-single-node-bionic
nodes:
@@ -29,30 +49,30 @@
- controller
- nodeset:
name: devstack-single-node-centos-7
name: devstack-single-node-centos-9-stream
nodes:
- name: controller
label: centos-7
label: centos-9-stream
groups:
- name: tempest
nodes:
- controller
- nodeset:
name: devstack-single-node-opensuse-150
name: devstack-single-node-opensuse-15
nodes:
- name: controller
label: opensuse-150
label: opensuse-15
groups:
- name: tempest
nodes:
- controller
- nodeset:
name: devstack-single-node-fedora-latest
name: devstack-single-node-debian-bullseye
nodes:
- name: controller
label: fedora-28
label: debian-bullseye
groups:
- name: tempest
nodes:
@@ -88,6 +108,66 @@
nodes:
- compute1
- nodeset:
name: openstack-two-node-centos-9-stream
nodes:
- name: controller
label: centos-9-stream
- name: compute1
label: centos-9-stream
groups:
# Node where tests are executed and test results collected
- name: tempest
nodes:
- controller
# Nodes running the compute service
- name: compute
nodes:
- controller
- compute1
# Nodes that are not the controller
- name: subnode
nodes:
- compute1
# Switch node for multinode networking setup
- name: switch
nodes:
- controller
# Peer nodes for multinode networking setup
- name: peers
nodes:
- compute1
- nodeset:
name: openstack-two-node-focal
nodes:
- name: controller
label: ubuntu-focal
- name: compute1
label: ubuntu-focal
groups:
# Node where tests are executed and test results collected
- name: tempest
nodes:
- controller
# Nodes running the compute service
- name: compute
nodes:
- controller
- compute1
# Nodes that are not the controller
- name: subnode
nodes:
- compute1
# Switch node for multinode networking setup
- name: switch
nodes:
- controller
# Peer nodes for multinode networking setup
- name: peers
nodes:
- compute1
- nodeset:
name: openstack-two-node-bionic
nodes:
@@ -148,6 +228,41 @@
nodes:
- compute1
- nodeset:
name: openstack-three-node-focal
nodes:
- name: controller
label: ubuntu-focal
- name: compute1
label: ubuntu-focal
- name: compute2
label: ubuntu-focal
groups:
# Node where tests are executed and test results collected
- name: tempest
nodes:
- controller
# Nodes running the compute service
- name: compute
nodes:
- controller
- compute1
- compute2
# Nodes that are not the controller
- name: subnode
nodes:
- compute1
- compute2
# Switch node for multinode networking setup
- name: switch
nodes:
- controller
# Peer nodes for multinode networking setup
- name: peers
nodes:
- compute1
- compute2
- nodeset:
name: openstack-three-node-bionic
nodes:
@@ -198,10 +313,9 @@
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/openstack-zuul-jobs
vars:
devstack_localrc:
DATABASE_PASSWORD: secretdatabase
@@ -219,8 +333,8 @@
VERBOSE_NO_TIMESTAMP: true
NOVNC_FROM_PACKAGE: true
ERROR_ON_CLONE: true
# Gate jobs can't deal with nested virt. Disable it.
LIBVIRT_TYPE: qemu
# Gate jobs can't deal with nested virt. Disable it by default.
LIBVIRT_TYPE: '{{ devstack_libvirt_type | default("qemu") }}'
devstack_services:
# Ignore any default set by devstack. Emit a "disable_all_services".
base: false
@@ -232,16 +346,20 @@
'{{ devstack_log_dir }}/dstat-csv.log': logs
'{{ devstack_log_dir }}/devstacklog.txt': logs
'{{ devstack_log_dir }}/devstacklog.txt.summary': logs
'{{ devstack_log_dir }}/tcpdump.pcap': logs
'{{ devstack_log_dir }}/worlddump-latest.txt': logs
'{{ devstack_log_dir }}/qemu.coredump': logs
'{{ devstack_full_log}}': logs
'{{ stage_dir }}/verify_tempest_conf.log': logs
'{{ stage_dir }}/performance.json': logs
'{{ stage_dir }}/apache': logs
'{{ stage_dir }}/apache_config': logs
'{{ 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/libvirt: logs
/etc/sudoers: logs
/etc/sudoers.d: logs
'{{ stage_dir }}/iptables.txt': logs
@@ -252,8 +370,10 @@
'{{ stage_dir }}/rpm-qa.txt': logs
'{{ stage_dir }}/core': logs
'{{ stage_dir }}/listen53.txt': logs
'{{ stage_dir }}/services.txt': logs
'{{ stage_dir }}/deprecations.log': logs
'{{ stage_dir }}/audit.log': logs
/etc/ceph: logs
/var/log/ceph: logs
/var/log/openvswitch: logs
/var/log/glusterfs: logs
@@ -305,9 +425,9 @@
description: |
Minimal devstack base job, intended for use by jobs that need
less than the normal minimum set of required-projects.
nodeset: openstack-single-node-bionic
nodeset: openstack-single-node-focal
required-projects:
- git.openstack.org/openstack/requirements
- opendev.org/openstack/requirements
vars:
devstack_localrc:
# Multinode specific settings
@@ -316,17 +436,17 @@
PUBLIC_BRIDGE_MTU: '{{ external_bridge_mtu }}'
devstack_services:
# Shared services
dstat: true
dstat: false
etcd3: true
memory_tracker: true
mysql: true
peakmem_tracker: true
rabbit: true
group-vars:
subnode:
devstack_services:
# Shared services
dstat: true
peakmem_tracker: true
dstat: false
memory_tracker: true
devstack_localrc:
# Multinode specific settings
HOST_IP: "{{ hostvars[inventory_hostname]['nodepool']['private_ipv4'] }}"
@@ -365,13 +485,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:
@@ -379,11 +499,9 @@
SWIFT_REPLICAS: 1
SWIFT_START_ALL_SERVICES: false
SWIFT_HASH: 1234123412341234
CINDER_PERIODIC_INTERVAL: 10
DEBUG_LIBVIRT_COREDUMPS: true
NOVA_VNC_ENABLED: true
VNCSERVER_LISTEN: 0.0.0.0
VNCSERVER_PROXYCLIENT_ADDRESS: $HOST_IP
OVN_DBS_LOG_LEVEL: dbg
devstack_local_conf:
post-config:
$NEUTRON_CONF:
@@ -393,42 +511,33 @@
# Core services enabled for this branch.
# This list replaces the test-matrix.
# Shared services
dstat: true
dstat: false
etcd3: true
memory_tracker: true
mysql: true
peakmem_tracker: true
rabbit: true
tls-proxy: true
# Keystone services
key: true
# Glance services
g-api: true
g-reg: true
# Nova services
n-api: true
n-api-meta: true
n-cauth: true
n-cond: true
n-cpu: true
n-novnc: true
n-obj: true
n-sch: true
# Placement service
placement-api: true
# OVN services
ovn-controller: true
ovn-northd: true
ovs-vswitchd: true
ovsdb-server: true
# Neutron services
# 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
q-dhcp: true
q-l3: true
q-meta: true
q-metering: true
q-svc: true
# neutron-api: true
# neutron-agent: true
# neutron-dhcp: true
# neutron-l3: true
# neutron-metadata-agent: true
# neutron-metering: true
q-ovn-metadata-agent: true
# Swift services
s-account: true
s-container: true
@@ -439,7 +548,6 @@
c-bak: true
c-sch: true
c-vol: true
cinder: true
# Services we don't need.
# This section is not really needed, it's for readability.
horizon: false
@@ -453,14 +561,19 @@
# Core services enabled for this branch.
# This list replaces the test-matrix.
# Shared services
dstat: true
peakmem_tracker: true
dstat: false
memory_tracker: true
tls-proxy: true
# Nova services
n-cpu: true
# Placement services
placement-client: true
# OVN services
ovn-controller: true
ovs-vswitchd: true
ovsdb-server: true
# Neutron services
neutron-agent: true
q-ovn-metadata-agent: true
# Cinder services
c-bak: true
c-vol: true
@@ -470,7 +583,7 @@
# s-*: false
horizon: false
tempest: false
# Test matrix emits ceilometer but ceilomenter is not installed in the
# Test matrix emits ceilometer but ceilometer is not installed in the
# integrated gate, so specifying the services has not effect.
# ceilometer-*: false
devstack_localrc:
@@ -478,78 +591,140 @@
GLANCE_HOSTPORT: "{{ hostvars['controller']['nodepool']['private_ipv4'] }}:9292"
Q_HOST: "{{ hostvars['controller']['nodepool']['private_ipv4'] }}"
NOVA_VNC_ENABLED: true
VNCSERVER_LISTEN: 0.0.0.0
VNCSERVER_PROXYCLIENT_ADDRESS: $HOST_IP
ENABLE_CHASSIS_AS_GW: false
- job:
name: devstack-ipv6
parent: devstack
description: |
Devstack single node job for integration gate with IPv6.
Devstack single node job for integration gate with IPv6,
all services and tunnels using IPv6 addresses.
vars:
devstack_localrc:
SERVICE_IP_VERSION: 6
SERVICE_HOST: ""
# IPv6 and certificates known issue with python2
# https://bugs.launchpad.net/devstack/+bug/1794929
USE_PYTHON3: true
TUNNEL_IP_VERSION: 6
- job:
name: devstack-xenial
name: devstack-enforce-scope
parent: devstack
nodeset: openstack-single-node-xenial
description: |
Simple singlenode test to verify functionality on devstack
side running on Xenial.
This job runs the devstack with scope checks enabled.
vars:
devstack_localrc:
ENFORCE_SCOPE: true
- job:
name: devstack-multinode
parent: devstack
nodeset: openstack-two-node-bionic
nodeset: openstack-two-node-focal
description: |
Simple multinode test to verify multinode functionality on devstack side.
This is not meant to be used as a parent job.
- job:
name: devstack-multinode-xenial
parent: devstack
nodeset: openstack-two-node-xenial
description: |
Simple multinode test to verify multinode functionality on devstack
side running on Xenial.
This is not meant to be used as a parent job.
vars:
devstack_localrc:
MYSQL_REDUCE_MEMORY: true
# NOTE(ianw) Platform tests have traditionally been non-voting because
# 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
name: devstack-platform-centos-9-stream
parent: tempest-full-py3
description: CentOS 9 Stream platform test
nodeset: devstack-single-node-centos-9-stream
timeout: 9000
# TODO(kopecmartin) n-v until the following is resolved:
# https://bugs.launchpad.net/neutron/+bug/1979047
voting: false
vars:
configure_swap_size: 4096
- job:
name: devstack-platform-opensuse-150
parent: tempest-full
description: openSUSE 15.0 platform test
nodeset: devstack-single-node-opensuse-150
voting: false
name: devstack-platform-debian-bullseye
parent: tempest-full-py3
description: Debian Bullseye platform test
nodeset: devstack-single-node-debian-bullseye
timeout: 9000
vars:
configure_swap_size: 4096
- job:
name: devstack-platform-fedora-latest
parent: tempest-full
description: Fedora latest platform test
nodeset: devstack-single-node-fedora-latest
voting: false
name: devstack-platform-ubuntu-jammy
parent: tempest-full-py3
description: Ubuntu 22.04 LTS (jammy) platform test
nodeset: openstack-single-node-jammy
timeout: 9000
vars:
configure_swap_size: 4096
devstack_services:
# Horizon doesn't like py310
horizon: false
- job:
name: devstack-platform-xenial
parent: tempest-full
description: Ubuntu Xenial platform test
nodeset: openstack-single-node-xenial
name: devstack-platform-ubuntu-jammy-ovn-source
parent: devstack-platform-ubuntu-jammy
description: Ubuntu 22.04 LTS (jammy) platform test (OVN from source)
voting: false
vars:
devstack_localrc:
OVN_BUILD_FROM_SOURCE: True
OVN_BRANCH: "v21.06.0"
OVS_BRANCH: "a4b04276ab5934d087669ff2d191a23931335c87"
OVS_SYSCONFDIR: "/usr/local/etc/openvswitch"
- job:
name: devstack-platform-ubuntu-jammy-ovs
parent: tempest-full-py3
description: Ubuntu 22.04 LTS (jammy) platform test (OVS)
nodeset: openstack-single-node-jammy
voting: false
timeout: 9000
vars:
configure_swap_size: 8192
devstack_localrc:
Q_AGENT: openvswitch
Q_ML2_PLUGIN_MECHANISM_DRIVERS: openvswitch
Q_ML2_TENANT_NETWORK_TYPE: vxlan
devstack_services:
# Horizon doesn't like py310
horizon: false
# Disable OVN services
ovn-northd: false
ovn-controller: false
ovs-vswitchd: false
ovsdb-server: false
# Disable Neutron ML2/OVN services
q-ovn-metadata-agent: false
# Enable Neutron ML2/OVS services
q-agt: true
q-dhcp: true
q-l3: true
q-meta: true
q-metering: true
group-vars:
subnode:
devstack_services:
# Disable OVN services
ovn-controller: false
ovs-vswitchd: false
ovsdb-server: false
# Disable Neutron ML2/OVN services
q-ovn-metadata-agent: false
# Enable Neutron ML2/OVS services
q-agt: true
- job:
name: devstack-no-tls-proxy
parent: tempest-full-py3
description: |
Tempest job with tls-proxy off.
Some gates run devstack like this and it follows different code paths.
vars:
devstack_services:
tls-proxy: false
- job:
name: devstack-tox-base
@@ -607,6 +782,7 @@
- job:
name: devstack-unit-tests
nodeset: ubuntu-focal
description: |
Runs unit tests on devstack project.
@@ -616,43 +792,54 @@
- project:
templates:
- integrated-gate
- integrated-gate-py3
- publish-openstack-docs-pti
check:
jobs:
- devstack
- devstack-xenial
- devstack-ipv6:
voting: false
- devstack-platform-centos-7
- devstack-platform-opensuse-150
- devstack-platform-fedora-latest
- devstack-platform-xenial
- devstack-ipv6
- devstack-enforce-scope
- devstack-platform-centos-9-stream
- devstack-platform-debian-bullseye
- devstack-platform-ubuntu-jammy
- devstack-platform-ubuntu-jammy-ovn-source
- devstack-platform-ubuntu-jammy-ovs
- devstack-multinode
- devstack-multinode-xenial
- devstack-unit-tests
- openstack-tox-bashate
- ironic-tempest-ipa-wholedisk-bios-agent_ipmitool-tinyipa:
voting: false
- swift-dsvm-functional:
- ironic-tempest-bios-ipmi-direct-tinyipa
- swift-dsvm-functional
- grenade:
irrelevant-files:
- ^.*\.rst$
- ^doc/.*$
- neutron-ovs-grenade-multinode:
irrelevant-files:
- ^.*\.rst$
- ^doc/.*$
- neutron-linuxbridge-tempest:
irrelevant-files:
- ^.*\.rst$
- ^doc/.*$
- neutron-ovn-tempest-ovs-release:
voting: false
irrelevant-files:
- ^.*\.rst$
- ^doc/.*$
- neutron-grenade:
- tempest-multinode-full-py3:
voting: false
irrelevant-files:
- ^.*\.rst$
- ^doc/.*$
- neutron-grenade-multinode:
- openstacksdk-functional-devstack:
irrelevant-files:
- ^.*\.rst$
- ^doc/.*$
- neutron-tempest-linuxbridge:
- tempest-ipv6-only:
irrelevant-files:
- ^.*\.rst$
- ^doc/.*$
- tempest-multinode-full:
- nova-ceph-multistore:
voting: false
irrelevant-files:
- ^.*\.rst$
@@ -660,32 +847,51 @@
gate:
jobs:
- devstack
- devstack-xenial
- devstack-ipv6
# TODO(kopecmartin) n-v until the following is resolved:
# https://bugs.launchpad.net/neutron/+bug/1979047
# - devstack-platform-centos-9-stream
- devstack-platform-debian-bullseye
- devstack-platform-ubuntu-jammy
- devstack-enforce-scope
- devstack-multinode
- devstack-multinode-xenial
- devstack-unit-tests
- openstack-tox-bashate
- neutron-grenade-multinode:
- neutron-ovs-grenade-multinode:
irrelevant-files:
- ^.*\.rst$
- ^doc/.*$
- neutron-tempest-linuxbridge:
- neutron-linuxbridge-tempest:
irrelevant-files:
- ^.*\.rst$
- ^doc/.*$
- neutron-grenade:
- ironic-tempest-bios-ipmi-direct-tinyipa
- swift-dsvm-functional
- grenade:
irrelevant-files:
- ^.*\.rst$
- ^doc/.*$
- openstacksdk-functional-devstack:
irrelevant-files:
- ^.*\.rst$
- ^doc/.*$
- tempest-ipv6-only:
irrelevant-files:
- ^.*\.rst$
- ^doc/.*$
# TODO(elod.illes): nova-ceph-multistore is broken in this branch,
# so it is set as non-voting in check queue and commented out here
# in gate queue until the job gets fixed.
# - nova-ceph-multistore:
# irrelevant-files:
# - ^.*\.rst$
# - ^doc/.*$
# Please add a note on each job and conditions for the job not
# being experimental any more, so we can keep this list somewhat
# pruned.
#
# * nova-cells-v1: maintained by nova for cells v1 (nova-cells service);
# it's in experimental here (and in nova) for testing cells v1
# changes to devstack w/o gating on it for all devstack changes.
# * nova-next: maintained by nova for unreleased/undefaulted
# things like cellsv2 and placement-api
# things
# * neutron-fullstack-with-uwsgi: maintained by neutron for fullstack test
# when neutron-api is served by uwsgi, it's in exprimental for testing.
# the next cycle we can remove this job if things turn out to be
@@ -695,38 +901,29 @@
# stable engouh with uwsgi.
# * neutron-tempest-with-uwsgi: maintained by neutron for tempest test.
# Next cycle we can remove this if everything run out stable enough.
# * nova-multi-cell: maintained by nova and currently non-voting in the
# check queue for nova changes but relies on devstack configuration
experimental:
jobs:
- nova-cells-v1:
irrelevant-files:
- ^.*\.rst$
- ^doc/.*$
- nova-multi-cell
- nova-next
- neutron-fullstack-with-uwsgi
- neutron-functional-with-uwsgi
- neutron-tempest-with-uwsgi
- devstack-plugin-ceph-tempest:
irrelevant-files:
- ^.*\.rst$
- ^doc/.*$
- devstack-plugin-ceph-tempest-py3:
irrelevant-files:
- ^.*\.rst$
- ^doc/.*$
- neutron-tempest-dvr:
- neutron-ovs-tempest-dvr:
irrelevant-files:
- ^.*\.rst$
- ^doc/.*$
- legacy-tempest-dsvm-neutron-dvr-multinode-full:
- neutron-ovs-tempest-dvr-ha-multinode-full:
irrelevant-files:
- ^.*\.rst$
- ^doc/.*$
- neutron-tempest-dvr-ha-multinode-full:
irrelevant-files:
- ^.*\.rst$
- ^doc/.*$
- legacy-tempest-dsvm-lvm-multibackend:
- cinder-tempest-lvm-multibackend:
irrelevant-files:
- ^.*\.rst$
- ^doc/.*$
@@ -734,3 +931,4 @@
irrelevant-files:
- ^.*\.rst$
- ^doc/.*$
- devstack-no-tls-proxy
+19
View File
@@ -0,0 +1,19 @@
The source repository for this project can be found at:
https://opendev.org/openstack/devstack
Pull requests submitted through GitHub are not monitored.
To start contributing to OpenStack, follow the steps in the contribution guide
to set up and use Gerrit:
https://docs.openstack.org/contributors/code-and-documentation/quick-start.html
Bugs should be filed on Launchpad:
https://bugs.launchpad.net/devstack
For more specific information about contributing to this repository, see the
Devstack contributor guide:
https://docs.openstack.org/devstack/latest/contributor/contributing.html
+9 -13
View File
@@ -10,8 +10,8 @@ and so is limited to Bash (version 4 and up) and compatible shells.
Shell script was chosen because it best illustrates the steps used to
set up and interact with OpenStack components.
DevStack's official repository is located on git.openstack.org at
https://git.openstack.org/openstack-dev/devstack. Besides the master branch that
DevStack's official repository is located on opendev.org at
https://opendev.org/openstack/devstack. Besides the master branch that
tracks the OpenStack trunk branches a separate branch is maintained for all
OpenStack releases starting with Diablo (stable/diablo).
@@ -23,10 +23,10 @@ __ contribute_
.. _contribute: https://docs.openstack.org/infra/manual/developers.html
__ lp_
.. _lp: https://launchpad.net/~devstack
.. _lp: https://launchpad.net/devstack
The `Gerrit review
queue <https://review.openstack.org/#/q/project:openstack-dev/devstack,n,z>`__
queue <https://review.opendev.org/#/q/project:openstack/devstack>`__
is used for all commits.
The primary script in DevStack is ``stack.sh``, which performs the bulk of the
@@ -74,8 +74,7 @@ of test of specific fragile functions in the ``functions`` and
``tools`` - Contains a collection of stand-alone scripts. While these
may reference the top-level DevStack configuration they can generally be
run alone. There are also some sub-directories to support specific
environments such as XenServer.
run alone.
Scripts
@@ -145,8 +144,8 @@ follows:
* Global configuration that may be referenced in ``local.conf``, i.e. ``DEST``, ``DATA_DIR``
* Global service configuration like ``ENABLED_SERVICES``
* Variables used by multiple services that do not have a clear owner, i.e.
``VOLUME_BACKING_FILE_SIZE`` (nova-compute, nova-volumes and cinder) or
``PUBLIC_NETWORK_NAME`` (nova-network and neutron)
``VOLUME_BACKING_FILE_SIZE`` (nova-compute and cinder) or
``PUBLIC_NETWORK_NAME`` (only neutron but formerly nova-network too)
* Variables that can not be cleanly declared in a project file due to
dependency ordering, i.e. the order of sourcing the project files can
not be changed for other reasons but the earlier file needs to dereference a
@@ -163,7 +162,7 @@ Documentation
The DevStack repo now contains all of the static pages of devstack.org in
the ``doc/source`` directory. The OpenStack CI system rebuilds the docs after every
commit and updates devstack.org (now a redirect to docs.openstack.org/developer/devstack).
commit and updates devstack.org (now a redirect to https://docs.openstack.org/devstack/latest/).
All of the scripts are processed with shocco_ to render them with the comments
as text describing the script below. For this reason we tend to be a little
@@ -189,7 +188,7 @@ to enforce basic guidelines, similar to pep8 and flake8 tools for Python. The
list below is not complete for what bashate checks, nor is it all checked
by bashate. So many lines of code, so little time.
.. _bashate: https://pypi.python.org/pypi/bashate
.. _bashate: https://pypi.org/project/bashate/
Whitespace Rules
----------------
@@ -275,9 +274,6 @@ your change
even years from now -- why we were motivated to make a change at the
time.
* **Reviewers** -- please see ``MAINTAINERS.rst`` for a list of people
that should be added to reviews of various sub-systems.
Making Changes, Testing, and CI
-------------------------------
-92
View File
@@ -1,92 +0,0 @@
MAINTAINERS
===========
Overview
--------
The following is a list of people known to have interests in
particular areas or sub-systems of devstack.
It is a rather general guide intended to help seed the initial
reviewers list of a change. A +1 on a review from someone identified
as being a maintainer of its affected area is a very positive flag to
the core team for the veracity of the change.
The ``devstack-core`` group can still be added to all reviews.
Format
~~~~~~
The format of the file is the name of the maintainer and their
gerrit-registered email.
Maintainers
-----------
.. contents:: :local:
Ceph
~~~~
* Sebastien Han <sebastien.han@enovance.com>
Cinder
~~~~~~
Fedora/CentOS/RHEL
~~~~~~~~~~~~~~~~~~
* Ian Wienand <iwienand@redhat.com>
Neutron
~~~~~~~
MidoNet
~~~~~~~
* Jaume Devesa <devvesa@gmail.com>
* Ryu Ishimoto <ryu@midokura.com>
* YAMAMOTO Takashi <yamamoto@midokura.com>
OpenDaylight
~~~~~~~~~~~~
* Kyle Mestery <mestery@mestery.com>
OpenFlow Agent (ofagent)
~~~~~~~~~~~~~~~~~~~~~~~~
* YAMAMOTO Takashi <yamamoto@valinux.co.jp>
* Fumihiko Kakuma <kakuma@valinux.co.jp>
Swift
~~~~~
* Chmouel Boudjnah <chmouel@enovance.com>
SUSE
~~~~
* Ralf Haferkamp <rhafer@suse.de>
* Vincent Untz <vuntz@suse.com>
Tempest
~~~~~~~
Xen
~~~
* Bob Ball <bob.ball@citrix.com>
Zaqar (Marconi)
~~~~~~~~~~~~~~~
* Flavio Percoco <flaper87@gmail.com>
* Malini Kamalambal <malini.kamalambal@rackspace.com>
Oracle Linux
~~~~~~~~~~~~
* Wiekus Beukes <wiekus.beukes@oracle.com>
+1 -1
View File
@@ -38,7 +38,7 @@ You can also pick specific OpenStack project releases by setting the appropriate
`stackrc` for the default set). Usually just before a release there will be
milestone-proposed branches that need to be tested::
GLANCE_REPO=https://git.openstack.org/openstack/glance.git
GLANCE_REPO=https://opendev.org/openstack/glance.git
GLANCE_BRANCH=milestone-proposed
Start A Dev Cloud
+7 -16
View File
@@ -113,7 +113,7 @@ cleanup_rpc_backend
cleanup_database
# Clean out data and status
sudo rm -rf $DATA_DIR $DEST/status
sudo rm -rf $DATA_DIR $DEST/status $DEST/async
# Clean out the log file and log directories
if [[ -n "$LOGFILE" ]] && [[ -f "$LOGFILE" ]]; then
@@ -123,12 +123,10 @@ if [[ -n "$LOGDIR" ]] && [[ -d "$LOGDIR" ]]; then
sudo rm -rf $LOGDIR
fi
# Clean out the systemd user unit files if systemd was used.
if [[ "$USE_SYSTEMD" = "True" ]]; then
sudo find $SYSTEMD_DIR -type f -name '*devstack@*service' -delete
# Make systemd aware of the deletion.
$SYSTEMCTL daemon-reload
fi
# Clean out the systemd unit files.
sudo find $SYSTEMD_DIR -type f -name '*devstack@*service' -delete
# Make systemd aware of the deletion.
$SYSTEMCTL daemon-reload
# Clean up venvs
DIRS_TO_CLEAN="$WHEELHOUSE ${PROJECT_VENV[@]} .config/openstack"
@@ -147,12 +145,5 @@ done
rm -rf ~/.config/openstack
# Clean up all *.pyc files
if [[ -n "$DEST" ]] && [[ -d "$DEST" ]]; then
find_version=`find --version | awk '{ print $NF; exit}'`
if vercmp "$find_version" "<" "4.2.3" ; then
sudo find $DEST -name "*.pyc" -print0 | xargs -0 rm
else
sudo find $DEST -name "*.pyc" -delete
fi
fi
# Clear any fstab entries made
sudo sed -i '/.*comment=devstack-.*/ d' /etc/fstab
+2 -2
View File
@@ -2,8 +2,8 @@ pbr>=2.0.0,!=2.1.0
Pygments
docutils
sphinx>=1.6.2
openstackdocstheme>=1.11.0
sphinx>=2.0.0,!=2.1.0 # BSD
openstackdocstheme>=2.2.1 # Apache-2.0
nwdiag
blockdiag
sphinxcontrib-blockdiag
+16 -26
View File
@@ -11,9 +11,6 @@
# All configuration values have a default; values that are commented out
# serve to show the default.
import sys
import os
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
@@ -26,13 +23,22 @@ import os
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = [ 'sphinx.ext.autodoc', 'zuul_sphinx', 'openstackdocstheme', 'sphinxcontrib.blockdiag', 'sphinxcontrib.nwdiag' ]
extensions = [ 'sphinx.ext.autodoc',
'zuul_sphinx',
'openstackdocstheme',
'sphinxcontrib.blockdiag',
'sphinxcontrib.nwdiag' ]
# openstackdocstheme options
repository_name = 'openstack-dev/devstack'
bug_project = 'devstack'
bug_tag = ''
html_last_updated_fmt = '%Y-%m-%d %H:%M'
openstackdocs_repo_name = 'openstack-dev/devstack'
openstackdocs_pdf_link = True
openstackdocs_bug_project = 'devstack'
openstackdocs_bug_tag = ''
openstackdocs_auto_name = False
# This repo is not tagged, so don't set versions
openstackdocs_auto_version = False
version = ''
release = ''
todo_include_todos = True
@@ -81,7 +87,7 @@ add_module_names = False
show_authors = False
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
pygments_style = 'native'
# A list of ignored prefixes for module index sorting.
modindex_common_prefix = ['DevStack-doc.']
@@ -119,11 +125,6 @@ html_theme = 'openstackdocs'
# pixels large.
#html_favicon = None
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
git_cmd = "git log --pretty=format:'%ad, commit %h' --date=local -n1"
html_last_updated_fmt = os.popen(git_cmd).read()
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
#html_use_smartypants = True
@@ -167,21 +168,10 @@ htmlhelp_basename = 'DevStack-doc'
# -- Options for LaTeX output --------------------------------------------------
latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#'papersize': 'letterpaper',
# The font size ('10pt', '11pt' or '12pt').
#'pointsize': '10pt',
# Additional stuff for the LaTeX preamble.
#'preamble': '',
}
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
('index', 'DevStack-doc.tex', u'DevStack Docs',
('index', 'doc-devstack.tex', u'DevStack Docs',
u'OpenStack DevStack Team', 'manual'),
]
+107 -123
View File
@@ -205,7 +205,7 @@ Historical Notes
Historically DevStack obtained all local configuration and
customizations from a ``localrc`` file. In Oct 2013 the
``local.conf`` configuration method was introduced (in `review 46768
<https://review.openstack.org/#/c/46768/>`__) to simplify this
<https://review.opendev.org/#/c/46768/>`__) to simplify this
process.
Configuration Notes
@@ -224,25 +224,22 @@ check out. These may be overridden in ``local.conf`` to pull source
from a different repo for testing, such as a Gerrit branch
proposal. ``GIT_BASE`` points to the primary repository server.
::
::
NOVA_REPO=$GIT_BASE/openstack/nova.git
NOVA_BRANCH=master
NOVA_REPO=$GIT_BASE/openstack/nova.git
NOVA_BRANCH=master
To pull a branch directly from Gerrit, get the repo and branch from
the Gerrit review page:
the Gerrit review page::
::
git fetch https://review.opendev.org/openstack/nova \
refs/changes/50/5050/1 && git checkout FETCH_HEAD
git fetch https://review.openstack.org/p/openstack/nova refs/changes/50/5050/1 && git checkout FETCH_HEAD
The repo is the stanza following ``fetch`` and the branch is the
stanza following that::
The repo is the stanza following ``fetch`` and the branch is the
stanza following that:
::
NOVA_REPO=https://review.openstack.org/p/openstack/nova
NOVA_BRANCH=refs/changes/50/5050/1
NOVA_REPO=https://review.opendev.org/openstack/nova
NOVA_BRANCH=refs/changes/50/5050/1
Installation Directory
@@ -255,13 +252,15 @@ By setting it early in the ``localrc`` section you can reference it in
later variables. It can be useful to set it even though it is not
changed from the default value.
::
::
DEST=/opt/stack
DEST=/opt/stack
Logging
-------
.. _enable_logging:
Enable Logging
~~~~~~~~~~~~~~
@@ -271,21 +270,21 @@ runs. It can be sent to a file in addition to the console by setting
timestamp will be appended to the given filename for each run of
``stack.sh``.
::
::
LOGFILE=$DEST/logs/stack.sh.log
LOGFILE=$DEST/logs/stack.sh.log
Old log files are cleaned automatically if ``LOGDAYS`` is set to the
number of days of old log files to keep.
::
::
LOGDAYS=1
LOGDAYS=2
Some coloring is used during the DevStack runs to make it easier to
see what is going on. This can be disabled with::
LOG_COLOR=False
LOG_COLOR=False
When using the logfile, by default logs are sent to the console and
the file. You can set ``VERBOSE`` to ``false`` if you only wish the
@@ -317,12 +316,12 @@ Example Logging Configuration
For example, non-interactive installs probably wish to save output to
a file, keep service logs and disable color in the stored files.
::
::
[[local|localrc]]
DEST=/opt/stack/
LOGFILE=$LOGDIR/stack.sh.log
LOG_COLOR=False
[[local|localrc]]
DEST=/opt/stack/
LOGFILE=$LOGDIR/stack.sh.log
LOG_COLOR=False
Database Backend
----------------
@@ -330,12 +329,10 @@ Database Backend
Multiple database backends are available. The available databases are defined
in the lib/databases directory.
``mysql`` is the default database, choose a different one by putting the
following in the ``localrc`` section:
following in the ``localrc`` section::
::
disable_service mysql
enable_service postgresql
disable_service mysql
enable_service postgresql
``mysql`` is the default database.
@@ -347,11 +344,9 @@ backends may be available via external plugins. Enabling or disabling
RabbitMQ is handled via the usual service functions and
``ENABLED_SERVICES``.
Example disabling RabbitMQ in ``local.conf``:
Example disabling RabbitMQ in ``local.conf``::
::
disable_service rabbit
disable_service rabbit
Apache Frontend
@@ -370,34 +365,23 @@ override toggle available that can be set in your ``local.conf``.
Keystone is run under Apache with ``mod_wsgi`` by default.
Example (Keystone)
::
Example (Keystone)::
KEYSTONE_USE_MOD_WSGI="True"
Example (Nova):
::
Example (Nova)::
NOVA_USE_MOD_WSGI="True"
Example (Swift):
::
Example (Swift)::
SWIFT_USE_MOD_WSGI="True"
Example (Heat):
::
Example (Heat)::
HEAT_USE_MOD_WSGI="True"
Example (Cinder):
::
Example (Cinder)::
CINDER_USE_MOD_WSGI="True"
@@ -413,9 +397,9 @@ system you can have devstack install it from upstream, or from local
git trees by specifying it in ``LIBS_FROM_GIT``. Multiple libraries
can be specified as a comma separated list.
::
::
LIBS_FROM_GIT=python-keystoneclient,oslo.config
LIBS_FROM_GIT=python-keystoneclient,oslo.config
Setting the variable to ``ALL`` will activate the download for all
libraries.
@@ -431,9 +415,9 @@ Each entry in the ``PROJECT_VENV`` array contains the directory name
of a venv to be used for the project. The array index is the project
name. Multiple projects can use the same venv if desired.
::
::
PROJECT_VENV["glance"]=${GLANCE_DIR}.venv
PROJECT_VENV["glance"]=${GLANCE_DIR}.venv
``ADDITIONAL_VENV_PACKAGES`` is a comma-separated list of additional
packages to be installed into each venv. Often projects will not have
@@ -442,20 +426,9 @@ are 'optional' requirements, i.e. only needed for certain
configurations. By default, the enabled databases will have their
Python bindings added when they are enabled.
::
::
ADDITIONAL_VENV_PACKAGES="python-foo, python-bar"
Use python3
------------
By default ``stack.sh`` uses python2 (the exact version set by the
``PYTHON2_VERSION``). This can be overriden so devstack will run
python3 (the exact version set by ``PYTHON3_VERSION``).
::
USE_PYTHON3=True
ADDITIONAL_VENV_PACKAGES="python-foo, python-bar"
A clean install every time
--------------------------
@@ -465,9 +438,9 @@ exist in ``$DEST``. ``stack.sh`` will freshen each repo on each run if
``RECLONE`` is set to ``yes``. This avoids having to manually remove
repos in order to get the current branch from ``$GIT_BASE``.
::
::
RECLONE=yes
RECLONE=yes
Upgrade packages installed by pip
---------------------------------
@@ -478,9 +451,9 @@ requirement. If ``PIP_UPGRADE`` is set to ``True`` then existing
required Python packages will be upgraded to the most recent version
that matches requirements.
::
::
PIP_UPGRADE=True
PIP_UPGRADE=True
Guest Images
------------
@@ -494,11 +467,11 @@ their testing-requirements in ``stack.sh``. Setting
these default images; in that case, you will want to populate
``IMAGE_URLS`` with sufficient images to satisfy testing-requirements.
::
::
DOWNLOAD_DEFAULT_IMAGES=False
IMAGE_URLS="http://foo.bar.com/image.qcow,"
IMAGE_URLS+="http://foo.bar.com/image2.qcow"
DOWNLOAD_DEFAULT_IMAGES=False
IMAGE_URLS="http://foo.bar.com/image.qcow,"
IMAGE_URLS+="http://foo.bar.com/image2.qcow"
Instance Type
@@ -513,13 +486,13 @@ should be specified in the configuration file so Tempest selects the
default flavors instead.
KVM on Power with QEMU 2.4 requires 512 MB to load the firmware -
`QEMU 2.4 - PowerPC <http://wiki.qemu.org/ChangeLog/2.4>`__ so users
`QEMU 2.4 - PowerPC <https://wiki.qemu.org/ChangeLog/2.4>`__ so users
running instances on ppc64/ppc64le can choose one of the default
created flavors as follows:
::
::
DEFAULT_INSTANCE_TYPE=m1.tiny
DEFAULT_INSTANCE_TYPE=m1.tiny
IP Version
@@ -530,26 +503,26 @@ IPv4, IPv6, or dual-stack self-service project data-network by with
either ``IP_VERSION=4``, ``IP_VERSION=6``, or ``IP_VERSION=4+6``
respectively.
::
::
IP_VERSION=4+6
IP_VERSION=4+6
The following optional variables can be used to alter the default IPv6
behavior:
::
::
IPV6_RA_MODE=slaac
IPV6_ADDRESS_MODE=slaac
IPV6_ADDRS_SAFE_TO_USE=fd$IPV6_GLOBAL_ID::/56
IPV6_PRIVATE_NETWORK_GATEWAY=fd$IPV6_GLOBAL_ID::1
IPV6_RA_MODE=slaac
IPV6_ADDRESS_MODE=slaac
IPV6_ADDRS_SAFE_TO_USE=fd$IPV6_GLOBAL_ID::/56
IPV6_PRIVATE_NETWORK_GATEWAY=fd$IPV6_GLOBAL_ID::1
*Note*: ``IPV6_ADDRS_SAFE_TO_USE`` and ``IPV6_PRIVATE_NETWORK_GATEWAY``
can be configured with any valid IPv6 prefix. The default values make
use of an auto-generated ``IPV6_GLOBAL_ID`` to comply with RFC4193.
Service Version
~~~~~~~~~~~~~~~
Service IP Version
~~~~~~~~~~~~~~~~~~
DevStack can enable service operation over either IPv4 or IPv6 by
setting ``SERVICE_IP_VERSION`` to either ``SERVICE_IP_VERSION=4`` or
@@ -565,11 +538,30 @@ address.
The default value for this setting is ``4``. Dual-mode support, for
example ``4+6`` is not currently supported. ``HOST_IPV6`` can
optionally be used to alter the default IPv6 address
optionally be used to alter the default IPv6 address::
::
HOST_IPV6=${some_local_ipv6_address}
HOST_IPV6=${some_local_ipv6_address}
Tunnel IP Version
~~~~~~~~~~~~~~~~~
DevStack can enable tunnel operation over either IPv4 or IPv6 by
setting ``TUNNEL_IP_VERSION`` to either ``TUNNEL_IP_VERSION=4`` or
``TUNNEL_IP_VERSION=6`` respectively.
When set to ``4`` Neutron will use an IPv4 address for tunnel endpoints,
for example, ``HOST_IP``.
When set to ``6`` Neutron will use an IPv6 address for tunnel endpoints,
for example, ``HOST_IPV6``.
The default value for this setting is ``4``. Dual-mode support, for
example ``4+6`` is not supported, as this value must match the address
family of the local tunnel endpoint IP(v6) address.
The value of ``TUNNEL_IP_VERSION`` has a direct relationship to the
setting of ``TUNNEL_ENDPOINT_IP``, which will default to ``HOST_IP``
when set to ``4``, and ``HOST_IPV6`` when set to ``6``.
Multi-node setup
~~~~~~~~~~~~~~~~
@@ -627,8 +619,8 @@ used when adding nodes to the Swift rings.
Swift S3
++++++++
If you are enabling ``swift3`` in ``ENABLED_SERVICES`` DevStack will
install the swift3 middleware emulation. Swift will be configured to
If you are enabling ``s3api`` in ``ENABLED_SERVICES`` DevStack will
install the s3api middleware emulation. Swift will be configured to
act as a S3 endpoint for Keystone so effectively replacing the
``nova-objectstore``.
@@ -657,26 +649,6 @@ outside of tox. If you would like to install it add the following to your
INSTALL_TEMPEST=True
Xenserver
~~~~~~~~~
If you would like to use Xenserver as the hypervisor, please refer to
the instructions in ``./tools/xen/README.md``.
Cells
~~~~~
`Cells <https://wiki.openstack.org/wiki/Blueprint-nova-compute-cells>`__ is
an alternative scaling option. To setup a cells environment add the
following to your ``localrc`` section:
::
enable_service n-cell
Be aware that there are some features currently missing in cells, one
notable one being security groups.
Cinder
~~~~~~
@@ -685,11 +657,17 @@ set by ``VOLUME_GROUP_NAME``, the logical volume name prefix is set with
``VOLUME_NAME_PREFIX`` and the size of the volume backing file is set
with ``VOLUME_BACKING_FILE_SIZE``.
::
::
VOLUME_GROUP_NAME="stack-volumes"
VOLUME_NAME_PREFIX="volume-"
VOLUME_BACKING_FILE_SIZE=24G
VOLUME_GROUP_NAME="stack-volumes"
VOLUME_NAME_PREFIX="volume-"
VOLUME_BACKING_FILE_SIZE=24G
When running highly concurrent tests, the default per-project quotas
for volumes, backups, or snapshots may be too small. These can be
adjusted by setting ``CINDER_QUOTA_VOLUMES``, ``CINDER_QUOTA_BACKUPS``,
or ``CINDER_QUOTA_SNAPSHOTS`` to the desired value. (The default for
each is 10.)
Keystone
@@ -715,7 +693,6 @@ In RegionTwo:
disable_service horizon
KEYSTONE_SERVICE_HOST=<KEYSTONE_IP_ADDRESS_FROM_REGION_ONE>
KEYSTONE_AUTH_HOST=<KEYSTONE_IP_ADDRESS_FROM_REGION_ONE>
REGION_NAME=RegionTwo
KEYSTONE_REGION_NAME=RegionOne
@@ -728,15 +705,22 @@ KEYSTONE_REGION_NAME to specify the region of Keystone service.
KEYSTONE_REGION_NAME has a default value the same as REGION_NAME thus we omit
it in the configuration of RegionOne.
Disabling Identity API v2
+++++++++++++++++++++++++
Glance
++++++
The Identity API v2 is deprecated as of Mitaka and it is recommended to only
use the v3 API. It is possible to setup keystone without v2 API, by doing:
The default image size quota of 1GiB may be too small if larger images
are to be used. Change the default at setup time with:
::
ENABLE_IDENTITY_V2=False
GLANCE_LIMIT_IMAGE_SIZE_TOTAL=5000
or at runtime via:
::
openstack --os-cloud devstack-system-admin registered limit update \
--service glance --default-limit 5000 --region RegionOne image_size_total
.. _arch-configuration:
+56
View File
@@ -0,0 +1,56 @@
============================
So You Want to Contribute...
============================
For general information on contributing to OpenStack, please check out the
`contributor guide <https://docs.openstack.org/contributors/>`_ to get started.
It covers all the basics that are common to all OpenStack projects: the accounts
you need, the basics of interacting with our Gerrit review system, how we
communicate as a community, etc.
Below will cover the more project specific information you need to get started
with Devstack.
Communication
~~~~~~~~~~~~~
* IRC channel ``#openstack-qa`` at OFTC.
* Mailing list (prefix subjects with ``[qa][devstack]`` for faster responses)
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-discuss
Contacting the Core Team
~~~~~~~~~~~~~~~~~~~~~~~~
Please refer to the `Devstack Core Team
<https://review.opendev.org/#/admin/groups/50,members>`_ contacts.
New Feature Planning
~~~~~~~~~~~~~~~~~~~~
If you want to propose a new feature please read `Feature Proposal Process`_
Devstack features are tracked on `Launchpad BP <https://blueprints.launchpad.net/devstack>`_.
Task Tracking
~~~~~~~~~~~~~
We track our tasks in `Launchpad <https://bugs.launchpad.net/devstack>`_.
Reporting a Bug
~~~~~~~~~~~~~~~
You found an issue and want to make sure we are aware of it? You can do so on
`Launchpad <https://bugs.launchpad.net/devstack/+filebug>`__.
More info about Launchpad usage can be found on `OpenStack docs page
<https://docs.openstack.org/contributors/common/task-tracking.html#launchpad>`_
Getting Your Patch Merged
~~~~~~~~~~~~~~~~~~~~~~~~~
All changes proposed to the Devstack require two ``Code-Review +2`` votes from
Devstack core reviewers before one of the core reviewers can approve the patch
by giving ``Workflow +1`` vote. One exception is for patches to unblock the gate
which can be approved by single core reviewers.
Project Team Lead Duties
~~~~~~~~~~~~~~~~~~~~~~~~
All common PTL duties are enumerated in the `PTL guide
<https://docs.openstack.org/project-team-guide/ptl.html>`_.
The Release Process for QA is documented in `QA Release Process
<https://wiki.openstack.org/wiki/QA/releases>`_.
.. _Feature Proposal Process: https://wiki.openstack.org/wiki/QA#Feature_Proposal_.26_Design_discussions
+46
View File
@@ -0,0 +1,46 @@
=====================
System-wide debugging
=====================
A lot can go wrong during a devstack run, and there are a few inbuilt
tools to help you.
dstat
-----
Enable the ``dstat`` service to produce performance logs during the
devstack run. These will be logged to the journal and also as a CSV
file.
memory_tracker
--------------
The ``memory_tracker`` service periodically monitors RAM usage and
provides consumption output when available memory is seen to be
falling (i.e. processes are consuming memory). It also provides
output showing locked (unswappable) memory.
tcpdump
-------
Enable the ``tcpdump`` service to run a background tcpdump. You must
set the ``TCPDUMP_ARGS`` variable to something suitable (there is no
default). For example, to trace iSCSI communication during a job in
the OpenStack gate and copy the result into the log output, you might
use:
.. code-block:: yaml
job:
name: devstack-job
parent: devstack
vars:
devstack_services:
tcpdump: true
devstack_localrc:
TCPDUMP_ARGS: "-i any tcp port 3260"
zuul_copy_output:
'{{ devstack_log_dir }}/tcpdump.pcap': logs
+1 -2
View File
@@ -80,8 +80,7 @@ I'd like to help!
~~~~~~~~~~~~~~~~~
That isn't a question, but please do! The source for DevStack is at
`git.openstack.org
<https://git.openstack.org/cgit/openstack-dev/devstack>`__ and bug
`opendev.org <https://opendev.org/openstack/devstack>`__ and bug
reports go to `LaunchPad
<https://bugs.launchpad.net/devstack/>`__. Contributions follow the
usual process as described in the `developer guide
+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
----------------------------
+8 -11
View File
@@ -6,7 +6,7 @@ providing load balancing services for OpenStack.
This guide will show you how to create a devstack with `Octavia API`_ enabled.
.. _Octavia API: https://developer.openstack.org/api-ref/load-balancer/v2/index.html
.. _Octavia API: https://docs.openstack.org/api-ref/load-balancer/v2/index.html
Phase 1: Create DevStack + 2 nova instances
--------------------------------------------
@@ -19,7 +19,7 @@ Install devstack
::
git clone https://git.openstack.org/openstack-dev/devstack
git clone https://opendev.org/openstack/devstack
cd devstack/tools
sudo ./create-stack-user.sh
cd ../..
@@ -35,14 +35,11 @@ Edit your ``/opt/stack/devstack/local.conf`` to look like
::
[[local|localrc]]
enable_plugin octavia https://git.openstack.org/openstack/octavia
enable_plugin octavia https://opendev.org/openstack/octavia
# If you are enabling horizon, include the octavia dashboard
# enable_plugin octavia-dashboard https://git.openstack.org/openstack/octavia-dashboard.git
# enable_plugin octavia-dashboard https://opendev.org/openstack/octavia-dashboard.git
# If you are enabling barbican for TLS offload in Octavia, include it here.
# enable_plugin barbican https://github.com/openstack/barbican.git
# If you have python3 available:
# USE_PYTHON3=True
# enable_plugin barbican https://opendev.org/openstack/barbican
# ===== BEGIN localrc =====
DATABASE_PASSWORD=password
@@ -59,10 +56,10 @@ Edit your ``/opt/stack/devstack/local.conf`` to look like
# Horizon - enable for the OpenStack web GUI
# ENABLED_SERVICES+=,horizon
# Nova
ENABLED_SERVICES+=,n-api,n-crt,n-obj,n-cpu,n-cond,n-sch,n-api-meta,n-sproxy
ENABLED_SERVICES+=,n-api,n-crt,n-cpu,n-cond,n-sch,n-api-meta,n-sproxy
ENABLED_SERVICES+=,placement-api,placement-client
# Glance
ENABLED_SERVICES+=,g-api,g-reg
ENABLED_SERVICES+=,g-api
# Neutron
ENABLED_SERVICES+=,q-svc,q-agt,q-dhcp,q-l3,q-meta,neutron
ENABLED_SERVICES+=,octavia,o-cw,o-hk,o-hm,o-api
@@ -91,7 +88,7 @@ Create two nova instances that we can use as test http servers:
#create nova instances on private network
openstack server create --image $(openstack image list | awk '/ cirros-.*-x86_64-.* / {print $2}') --flavor 1 --nic net-id=$(openstack network list | awk '/ private / {print $2}') node1
openstack server creeate --image $(openstack image list | awk '/ cirros-.*-x86_64-.* / {print $2}') --flavor 1 --nic net-id=$(openstack network list | awk '/ private / {print $2}') node2
openstack server create --image $(openstack image list | awk '/ cirros-.*-x86_64-.* / {print $2}') --flavor 1 --nic net-id=$(openstack network list | awk '/ private / {print $2}') node2
openstack server list # should show the nova instances just created
#add secgroup rules to allow ssh etc..
+1 -1
View File
@@ -105,7 +105,7 @@ The commands in this section should all be run inside your container.
::
git clone https://git.openstack.org/openstack-dev/devstack
git clone https://opendev.org/openstack/devstack
#. Configure
+12 -15
View File
@@ -75,13 +75,21 @@ Otherwise create the stack user:
useradd -s /bin/bash -d /opt/stack -m stack
Ensure home directory for the ``stack`` user has executable permission for all,
as RHEL based distros create it with ``700`` and Ubuntu 21.04+ with ``750``
which can cause issues during deployment.
::
chmod +x /opt/stack
This user will be making many changes to your system during installation
and operation so it needs to have sudo privileges to root without a
password:
::
echo "stack ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
echo "stack ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/stack
From here on use the ``stack`` user. **Logout** and **login** as the
``stack`` user.
@@ -103,7 +111,7 @@ Grab the latest version of DevStack:
::
git clone https://git.openstack.org/openstack-dev/devstack
git clone https://opendev.org/openstack/devstack
cd devstack
Up to this point all of the steps apply to each node in the cluster.
@@ -120,11 +128,8 @@ cluster controller's DevStack in ``local.conf``:
[[local|localrc]]
HOST_IP=192.168.42.11
FLAT_INTERFACE=eth0
FIXED_RANGE=10.4.128.0/20
FIXED_NETWORK_SIZE=4096
FLOATING_RANGE=192.168.42.128/25
MULTI_HOST=1
LOGFILE=/opt/stack/logs/stack.sh.log
ADMIN_PASSWORD=labstack
DATABASE_PASSWORD=supersecret
@@ -160,11 +165,8 @@ machines, create a ``local.conf`` with:
[[local|localrc]]
HOST_IP=192.168.42.12 # change this per compute node
FLAT_INTERFACE=eth0
FIXED_RANGE=10.4.128.0/20
FIXED_NETWORK_SIZE=4096
FLOATING_RANGE=192.168.42.128/25
MULTI_HOST=1
LOGFILE=/opt/stack/logs/stack.sh.log
ADMIN_PASSWORD=labstack
DATABASE_PASSWORD=supersecret
@@ -175,17 +177,12 @@ machines, create a ``local.conf`` with:
MYSQL_HOST=$SERVICE_HOST
RABBIT_HOST=$SERVICE_HOST
GLANCE_HOSTPORT=$SERVICE_HOST:9292
ENABLED_SERVICES=n-cpu,q-agt,n-api-meta,c-vol,placement-client
ENABLED_SERVICES=n-cpu,c-vol,placement-client,ovn-controller,ovs-vswitchd,ovsdb-server,q-ovn-metadata-agent
NOVA_VNC_ENABLED=True
NOVNCPROXY_URL="http://$SERVICE_HOST:6080/vnc_lite.html"
VNCSERVER_LISTEN=$HOST_IP
VNCSERVER_PROXYCLIENT_ADDRESS=$VNCSERVER_LISTEN
**Note:** the ``n-api-meta`` service is a version of the api server
that only serves the metadata service. It's needed because the
computes created won't have a routing path to the metadata service on
the controller.
Fire up OpenStack:
::
@@ -406,7 +403,7 @@ SSH keys need to be exchanged between each compute node:
3. Verify that login via ssh works without a password::
ssh -i /root/.ssh/id_rsa.pub stack@DESTINATION
ssh -i /root/.ssh/id_rsa stack@DESTINATION
In essence, this means that every compute node's root user's public RSA key
must exist in every other compute node's stack user's authorized_keys file and
+2 -2
View File
@@ -567,7 +567,7 @@ you do not require them.
Q_ML2_PLUGIN_MECHANISM_DRIVERS=macvtap
Q_USE_PROVIDER_NETWORKING=True
enable_plugin neutron https://git.openstack.org/openstack/neutron
enable_plugin neutron https://opendev.org/openstack/neutron
## MacVTap agent options
Q_AGENT=macvtap
@@ -622,7 +622,7 @@ For the MacVTap compute node, use this local.conf:
# Services that a compute node runs
disable_all_services
enable_plugin neutron https://git.openstack.org/openstack/neutron
enable_plugin neutron https://opendev.org/openstack/neutron
ENABLED_SERVICES+=n-cpu,q-agt
## MacVTap agent options
+3 -3
View File
@@ -10,7 +10,7 @@ nova-serialproxy
================
In Juno, nova implemented a `spec
<http://specs.openstack.org/openstack/nova-specs/specs/juno/implemented/serial-ports.html>`_
<https://specs.openstack.org/openstack/nova-specs/specs/juno/implemented/serial-ports.html>`_
to allow read/write access to the serial console of an instance via
`nova-serialproxy
<https://docs.openstack.org/nova/latest/cli/nova-serialproxy.html>`_.
@@ -63,7 +63,7 @@ The service can be enabled by adding ``n-sproxy`` to
Enabling the service is enough to be functional for a single machine DevStack.
These config options are defined in `nova.conf.serial_console
<https://github.com/openstack/nova/blob/master/nova/conf/serial_console.py>`_.
<https://opendev.org/openstack/nova/src/master/nova/conf/serial_console.py>`_.
For more information on OpenStack configuration see the `OpenStack
Compute Service Configuration Reference
@@ -83,7 +83,7 @@ some fake resource inventory values and keeps track of the state of the
compute API but is good enough for most API testing, and is also used within
the nova functional tests themselves so is fairly robust.
.. _fake virt driver: http://git.openstack.org/cgit/openstack/nova/tree/nova/virt/fake.py
.. _fake virt driver: https://opendev.org/openstack/nova/src/branch/master/nova/virt/fake.py
Configuration
-------------
+12 -9
View File
@@ -49,13 +49,21 @@ below)
$ sudo useradd -s /bin/bash -d /opt/stack -m stack
Ensure home directory for the ``stack`` user has executable permission for all,
as RHEL based distros create it with ``700`` and Ubuntu 21.04+ with ``750``
which can cause issues during deployment.
.. code-block:: console
$ sudo chmod +x /opt/stack
Since this user will be making many changes to your system, it will need
to have sudo privileges:
.. code-block:: console
$ apt-get install sudo -y || yum install -y sudo
$ echo "stack ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
$ echo "stack ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/stack
.. note:: On some systems you may need to use ``sudo visudo``.
@@ -74,7 +82,7 @@ We'll grab the latest version of DevStack via https:
.. code-block:: console
$ sudo apt-get install git -y || sudo yum install -y git
$ git clone https://git.openstack.org/openstack-dev/devstack
$ git clone https://opendev.org/openstack/devstack
$ cd devstack
Run DevStack
@@ -87,11 +95,8 @@ do the following:
- Set ``FLOATING_RANGE`` to a range not used on the local network, i.e.
192.168.1.224/27. This configures IP addresses ending in 225-254 to
be used as floating IPs.
- Set ``FIXED_RANGE`` and ``FIXED_NETWORK_SIZE`` to configure the
internal address space used by the instances.
- Set ``FLAT_INTERFACE`` to the Ethernet interface that connects the
host to your local network. This is the interface that should be
configured with the static IP address mentioned above.
- Set ``FIXED_RANGE`` to configure the internal address space used by the
instances.
- Set the administrative password. This password is used for the
**admin** and **demo** accounts set up as OpenStack users.
- Set the MySQL administrative password. The default here is a random
@@ -108,8 +113,6 @@ do the following:
[[local|localrc]]
FLOATING_RANGE=192.168.1.224/27
FIXED_RANGE=10.11.12.0/24
FIXED_NETWORK_SIZE=256
FLAT_INTERFACE=eth0
ADMIN_PASSWORD=supersecret
DATABASE_PASSWORD=iheartdatabases
RABBIT_PASSWORD=flopsymopsy
+2 -2
View File
@@ -60,7 +60,7 @@ passed as the user-data file when booting the VM.
DEBIAN_FRONTEND=noninteractive sudo apt-get install -qqy git || sudo yum install -qy git
sudo chown stack:stack /home/stack
cd /home/stack
git clone https://git.openstack.org/openstack-dev/devstack
git clone https://opendev.org/openstack/devstack
cd devstack
echo '[[local|localrc]]' > local.conf
echo ADMIN_PASSWORD=password >> local.conf
@@ -78,7 +78,7 @@ As DevStack will refuse to run as root, this configures ``cloud-init``
to create a non-root user and run the ``start.sh`` script as that user.
If you are using cloud-init and you have not
`enabled custom logging <../configuration.html#enable-logging>`_ of the stack
:ref:`enabled custom logging <enable_logging>` of the stack
output, then the stack output can be found in
``/var/log/cloud-init-output.log`` by default.
+33 -20
View File
@@ -11,9 +11,8 @@
and how to go beyond this setup. Both should be a set of quick
links to other documents to let people explore from there.
==========
DevStack
==========
DevStack
========
.. image:: assets/images/logo-blue.png
@@ -23,8 +22,7 @@ everything from git master. It is used interactively as a development
environment and as the basis for much of the OpenStack project's
functional testing.
The source is available at
`<https://git.openstack.org/cgit/openstack-dev/devstack>`__.
The source is available at `<https://opendev.org/openstack/devstack>`__.
.. warning::
@@ -33,55 +31,63 @@ The source is available at
are dedicated to this purpose.
Quick Start
===========
+++++++++++
Install Linux
-------------
Start with a clean and minimal install of a Linux system. Devstack
Start with a clean and minimal install of a Linux system. DevStack
attempts to support the two latest LTS releases of Ubuntu, the
latest/current Fedora version, CentOS/RHEL 7, as well as Debian and
OpenSUSE.
latest/current Fedora version, CentOS/RHEL 8 and OpenSUSE.
If you do not have a preference, Ubuntu 16.04 is the most tested, and
will probably go the smoothest.
If you do not have a preference, Ubuntu 20.04 (Focal Fossa) is the
most tested, and will probably go the smoothest.
Add Stack User
--------------
Add Stack User (optional)
-------------------------
Devstack should be run as a non-root user with sudo enabled
DevStack should be run as a non-root user with sudo enabled
(standard logins to cloud images such as "ubuntu" or "cloud-user"
are usually fine).
You can quickly create a separate `stack` user to run DevStack with
If you are not using a cloud image, you can create a separate `stack` user
to run DevStack with
.. code-block:: console
$ sudo useradd -s /bin/bash -d /opt/stack -m stack
Ensure home directory for the ``stack`` user has executable permission for all,
as RHEL based distros create it with ``700`` and Ubuntu 21.04+ with ``750``
which can cause issues during deployment.
.. code-block:: console
$ sudo chmod +x /opt/stack
Since this user will be making many changes to your system, it should
have sudo privileges:
.. code-block:: console
$ echo "stack ALL=(ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/stack
$ sudo su - stack
$ sudo -u stack -i
Download DevStack
-----------------
.. code-block:: console
$ git clone https://git.openstack.org/openstack-dev/devstack
$ git clone https://opendev.org/openstack/devstack
$ cd devstack
The ``devstack`` repo contains a script that installs OpenStack and
templates for configuration files
templates for configuration files.
Create a local.conf
-------------------
Create a ``local.conf`` file with 4 passwords preset at the root of the
Create a ``local.conf`` file with four passwords preset at the root of the
devstack git repo.
.. code-block:: ini
@@ -152,8 +158,15 @@ Get :doc:`the big picture <overview>` of what we are trying to do
with devstack, and help us by :doc:`contributing to the project
<hacking>`.
If you are a new contributor to devstack please refer: :doc:`contributor/contributing`
.. toctree::
:hidden:
contributor/contributing
Contents
--------
++++++++
.. toctree::
:glob:
+2 -2
View File
@@ -40,7 +40,7 @@ updates. Tempest tests will work in this environment.
Locally Accessible Guests
=========================
If you want to make you guests accessible from other machines on your
If you want to make your guests accessible from other machines on your
network, we have to connect ``br-ex`` to a physical interface.
Dedicated Guest Interface
@@ -81,7 +81,7 @@ of addresses, and have them all exactly correct.
[[local|localrc]]
PUBLIC_INTERFACE=eth0
HOST_IP=10.42.0.52
FLOATING_RANGE=10.42.0.52/24
FLOATING_RANGE=10.42.0.0/24
PUBLIC_NETWORK_GATEWAY=10.42.0.1
Q_FLOATING_ALLOCATION_POOL=start=10.42.0.250,end=10.42.0.254
+168 -180
View File
@@ -21,185 +21,173 @@ available DevStack plugins. This includes, but is not limited to,
official OpenStack projects.
====================================== ===
Plugin Name URL
====================================== ===
almanach `https://git.openstack.org/openstack/almanach <https://git.openstack.org/cgit/openstack/almanach>`__
aodh `https://git.openstack.org/openstack/aodh <https://git.openstack.org/cgit/openstack/aodh>`__
apmec `https://git.openstack.org/openstack/apmec <https://git.openstack.org/cgit/openstack/apmec>`__
barbican `https://git.openstack.org/openstack/barbican <https://git.openstack.org/cgit/openstack/barbican>`__
bilean `https://git.openstack.org/openstack/bilean <https://git.openstack.org/cgit/openstack/bilean>`__
blazar `https://git.openstack.org/openstack/blazar <https://git.openstack.org/cgit/openstack/blazar>`__
broadview-collector `https://git.openstack.org/openstack/broadview-collector <https://git.openstack.org/cgit/openstack/broadview-collector>`__
castellan-ui `https://git.openstack.org/openstack/castellan-ui <https://git.openstack.org/cgit/openstack/castellan-ui>`__
ceilometer `https://git.openstack.org/openstack/ceilometer <https://git.openstack.org/cgit/openstack/ceilometer>`__
ceilometer-powervm `https://git.openstack.org/openstack/ceilometer-powervm <https://git.openstack.org/cgit/openstack/ceilometer-powervm>`__
cloudkitty `https://git.openstack.org/openstack/cloudkitty <https://git.openstack.org/cgit/openstack/cloudkitty>`__
collectd-openstack-plugins `https://git.openstack.org/openstack/collectd-openstack-plugins <https://git.openstack.org/cgit/openstack/collectd-openstack-plugins>`__
congress `https://git.openstack.org/openstack/congress <https://git.openstack.org/cgit/openstack/congress>`__
cyborg `https://git.openstack.org/openstack/cyborg <https://git.openstack.org/cgit/openstack/cyborg>`__
designate `https://git.openstack.org/openstack/designate <https://git.openstack.org/cgit/openstack/designate>`__
devstack-plugin-additional-pkg-repos `https://git.openstack.org/openstack/devstack-plugin-additional-pkg-repos <https://git.openstack.org/cgit/openstack/devstack-plugin-additional-pkg-repos>`__
devstack-plugin-amqp1 `https://git.openstack.org/openstack/devstack-plugin-amqp1 <https://git.openstack.org/cgit/openstack/devstack-plugin-amqp1>`__
devstack-plugin-bdd `https://git.openstack.org/openstack/devstack-plugin-bdd <https://git.openstack.org/cgit/openstack/devstack-plugin-bdd>`__
devstack-plugin-ceph `https://git.openstack.org/openstack/devstack-plugin-ceph <https://git.openstack.org/cgit/openstack/devstack-plugin-ceph>`__
devstack-plugin-container `https://git.openstack.org/openstack/devstack-plugin-container <https://git.openstack.org/cgit/openstack/devstack-plugin-container>`__
devstack-plugin-glusterfs `https://git.openstack.org/openstack/devstack-plugin-glusterfs <https://git.openstack.org/cgit/openstack/devstack-plugin-glusterfs>`__
devstack-plugin-hdfs `https://git.openstack.org/openstack/devstack-plugin-hdfs <https://git.openstack.org/cgit/openstack/devstack-plugin-hdfs>`__
devstack-plugin-kafka `https://git.openstack.org/openstack/devstack-plugin-kafka <https://git.openstack.org/cgit/openstack/devstack-plugin-kafka>`__
devstack-plugin-libvirt-qemu `https://git.openstack.org/openstack/devstack-plugin-libvirt-qemu <https://git.openstack.org/cgit/openstack/devstack-plugin-libvirt-qemu>`__
devstack-plugin-mariadb `https://git.openstack.org/openstack/devstack-plugin-mariadb <https://git.openstack.org/cgit/openstack/devstack-plugin-mariadb>`__
devstack-plugin-nfs `https://git.openstack.org/openstack/devstack-plugin-nfs <https://git.openstack.org/cgit/openstack/devstack-plugin-nfs>`__
devstack-plugin-pika `https://git.openstack.org/openstack/devstack-plugin-pika <https://git.openstack.org/cgit/openstack/devstack-plugin-pika>`__
devstack-plugin-sheepdog `https://git.openstack.org/openstack/devstack-plugin-sheepdog <https://git.openstack.org/cgit/openstack/devstack-plugin-sheepdog>`__
devstack-plugin-vmax `https://git.openstack.org/openstack/devstack-plugin-vmax <https://git.openstack.org/cgit/openstack/devstack-plugin-vmax>`__
devstack-plugin-zmq `https://git.openstack.org/openstack/devstack-plugin-zmq <https://git.openstack.org/cgit/openstack/devstack-plugin-zmq>`__
dragonflow `https://git.openstack.org/openstack/dragonflow <https://git.openstack.org/cgit/openstack/dragonflow>`__
drbd-devstack `https://git.openstack.org/openstack/drbd-devstack <https://git.openstack.org/cgit/openstack/drbd-devstack>`__
ec2-api `https://git.openstack.org/openstack/ec2-api <https://git.openstack.org/cgit/openstack/ec2-api>`__
freezer `https://git.openstack.org/openstack/freezer <https://git.openstack.org/cgit/openstack/freezer>`__
freezer-api `https://git.openstack.org/openstack/freezer-api <https://git.openstack.org/cgit/openstack/freezer-api>`__
freezer-tempest-plugin `https://git.openstack.org/openstack/freezer-tempest-plugin <https://git.openstack.org/cgit/openstack/freezer-tempest-plugin>`__
freezer-web-ui `https://git.openstack.org/openstack/freezer-web-ui <https://git.openstack.org/cgit/openstack/freezer-web-ui>`__
gce-api `https://git.openstack.org/openstack/gce-api <https://git.openstack.org/cgit/openstack/gce-api>`__
glare `https://git.openstack.org/openstack/glare <https://git.openstack.org/cgit/openstack/glare>`__
group-based-policy `https://git.openstack.org/openstack/group-based-policy <https://git.openstack.org/cgit/openstack/group-based-policy>`__
gyan `https://git.openstack.org/openstack/gyan <https://git.openstack.org/cgit/openstack/gyan>`__
heat `https://git.openstack.org/openstack/heat <https://git.openstack.org/cgit/openstack/heat>`__
heat-dashboard `https://git.openstack.org/openstack/heat-dashboard <https://git.openstack.org/cgit/openstack/heat-dashboard>`__
horizon-mellanox `https://git.openstack.org/openstack/horizon-mellanox <https://git.openstack.org/cgit/openstack/horizon-mellanox>`__
ironic `https://git.openstack.org/openstack/ironic <https://git.openstack.org/cgit/openstack/ironic>`__
ironic-inspector `https://git.openstack.org/openstack/ironic-inspector <https://git.openstack.org/cgit/openstack/ironic-inspector>`__
ironic-staging-drivers `https://git.openstack.org/openstack/ironic-staging-drivers <https://git.openstack.org/cgit/openstack/ironic-staging-drivers>`__
ironic-ui `https://git.openstack.org/openstack/ironic-ui <https://git.openstack.org/cgit/openstack/ironic-ui>`__
karbor `https://git.openstack.org/openstack/karbor <https://git.openstack.org/cgit/openstack/karbor>`__
karbor-dashboard `https://git.openstack.org/openstack/karbor-dashboard <https://git.openstack.org/cgit/openstack/karbor-dashboard>`__
keystone `https://git.openstack.org/openstack/keystone <https://git.openstack.org/cgit/openstack/keystone>`__
kingbird `https://git.openstack.org/openstack/kingbird <https://git.openstack.org/cgit/openstack/kingbird>`__
kuryr-kubernetes `https://git.openstack.org/openstack/kuryr-kubernetes <https://git.openstack.org/cgit/openstack/kuryr-kubernetes>`__
kuryr-libnetwork `https://git.openstack.org/openstack/kuryr-libnetwork <https://git.openstack.org/cgit/openstack/kuryr-libnetwork>`__
kuryr-tempest-plugin `https://git.openstack.org/openstack/kuryr-tempest-plugin <https://git.openstack.org/cgit/openstack/kuryr-tempest-plugin>`__
magnum `https://git.openstack.org/openstack/magnum <https://git.openstack.org/cgit/openstack/magnum>`__
magnum-ui `https://git.openstack.org/openstack/magnum-ui <https://git.openstack.org/cgit/openstack/magnum-ui>`__
manila `https://git.openstack.org/openstack/manila <https://git.openstack.org/cgit/openstack/manila>`__
manila-ui `https://git.openstack.org/openstack/manila-ui <https://git.openstack.org/cgit/openstack/manila-ui>`__
masakari `https://git.openstack.org/openstack/masakari <https://git.openstack.org/cgit/openstack/masakari>`__
meteos `https://git.openstack.org/openstack/meteos <https://git.openstack.org/cgit/openstack/meteos>`__
meteos-ui `https://git.openstack.org/openstack/meteos-ui <https://git.openstack.org/cgit/openstack/meteos-ui>`__
mistral `https://git.openstack.org/openstack/mistral <https://git.openstack.org/cgit/openstack/mistral>`__
mixmatch `https://git.openstack.org/openstack/mixmatch <https://git.openstack.org/cgit/openstack/mixmatch>`__
mogan `https://git.openstack.org/openstack/mogan <https://git.openstack.org/cgit/openstack/mogan>`__
mogan-ui `https://git.openstack.org/openstack/mogan-ui <https://git.openstack.org/cgit/openstack/mogan-ui>`__
monasca-analytics `https://git.openstack.org/openstack/monasca-analytics <https://git.openstack.org/cgit/openstack/monasca-analytics>`__
monasca-api `https://git.openstack.org/openstack/monasca-api <https://git.openstack.org/cgit/openstack/monasca-api>`__
monasca-ceilometer `https://git.openstack.org/openstack/monasca-ceilometer <https://git.openstack.org/cgit/openstack/monasca-ceilometer>`__
monasca-events-api `https://git.openstack.org/openstack/monasca-events-api <https://git.openstack.org/cgit/openstack/monasca-events-api>`__
monasca-log-api `https://git.openstack.org/openstack/monasca-log-api <https://git.openstack.org/cgit/openstack/monasca-log-api>`__
monasca-tempest-plugin `https://git.openstack.org/openstack/monasca-tempest-plugin <https://git.openstack.org/cgit/openstack/monasca-tempest-plugin>`__
monasca-transform `https://git.openstack.org/openstack/monasca-transform <https://git.openstack.org/cgit/openstack/monasca-transform>`__
murano `https://git.openstack.org/openstack/murano <https://git.openstack.org/cgit/openstack/murano>`__
networking-6wind `https://git.openstack.org/openstack/networking-6wind <https://git.openstack.org/cgit/openstack/networking-6wind>`__
networking-ansible `https://git.openstack.org/openstack/networking-ansible <https://git.openstack.org/cgit/openstack/networking-ansible>`__
networking-arista `https://git.openstack.org/openstack/networking-arista <https://git.openstack.org/cgit/openstack/networking-arista>`__
networking-bagpipe `https://git.openstack.org/openstack/networking-bagpipe <https://git.openstack.org/cgit/openstack/networking-bagpipe>`__
networking-baremetal `https://git.openstack.org/openstack/networking-baremetal <https://git.openstack.org/cgit/openstack/networking-baremetal>`__
networking-bgpvpn `https://git.openstack.org/openstack/networking-bgpvpn <https://git.openstack.org/cgit/openstack/networking-bgpvpn>`__
networking-brocade `https://git.openstack.org/openstack/networking-brocade <https://git.openstack.org/cgit/openstack/networking-brocade>`__
networking-calico `https://git.openstack.org/openstack/networking-calico <https://git.openstack.org/cgit/openstack/networking-calico>`__
networking-cisco `https://git.openstack.org/openstack/networking-cisco <https://git.openstack.org/cgit/openstack/networking-cisco>`__
networking-cumulus `https://git.openstack.org/openstack/networking-cumulus <https://git.openstack.org/cgit/openstack/networking-cumulus>`__
networking-dpm `https://git.openstack.org/openstack/networking-dpm <https://git.openstack.org/cgit/openstack/networking-dpm>`__
networking-fortinet `https://git.openstack.org/openstack/networking-fortinet <https://git.openstack.org/cgit/openstack/networking-fortinet>`__
networking-generic-switch `https://git.openstack.org/openstack/networking-generic-switch <https://git.openstack.org/cgit/openstack/networking-generic-switch>`__
networking-hpe `https://git.openstack.org/openstack/networking-hpe <https://git.openstack.org/cgit/openstack/networking-hpe>`__
networking-huawei `https://git.openstack.org/openstack/networking-huawei <https://git.openstack.org/cgit/openstack/networking-huawei>`__
networking-hyperv `https://git.openstack.org/openstack/networking-hyperv <https://git.openstack.org/cgit/openstack/networking-hyperv>`__
networking-infoblox `https://git.openstack.org/openstack/networking-infoblox <https://git.openstack.org/cgit/openstack/networking-infoblox>`__
networking-l2gw `https://git.openstack.org/openstack/networking-l2gw <https://git.openstack.org/cgit/openstack/networking-l2gw>`__
networking-lagopus `https://git.openstack.org/openstack/networking-lagopus <https://git.openstack.org/cgit/openstack/networking-lagopus>`__
networking-midonet `https://git.openstack.org/openstack/networking-midonet <https://git.openstack.org/cgit/openstack/networking-midonet>`__
networking-mlnx `https://git.openstack.org/openstack/networking-mlnx <https://git.openstack.org/cgit/openstack/networking-mlnx>`__
networking-nec `https://git.openstack.org/openstack/networking-nec <https://git.openstack.org/cgit/openstack/networking-nec>`__
networking-odl `https://git.openstack.org/openstack/networking-odl <https://git.openstack.org/cgit/openstack/networking-odl>`__
networking-onos `https://git.openstack.org/openstack/networking-onos <https://git.openstack.org/cgit/openstack/networking-onos>`__
networking-opencontrail `https://git.openstack.org/openstack/networking-opencontrail <https://git.openstack.org/cgit/openstack/networking-opencontrail>`__
networking-ovn `https://git.openstack.org/openstack/networking-ovn <https://git.openstack.org/cgit/openstack/networking-ovn>`__
networking-ovs-dpdk `https://git.openstack.org/openstack/networking-ovs-dpdk <https://git.openstack.org/cgit/openstack/networking-ovs-dpdk>`__
networking-plumgrid `https://git.openstack.org/openstack/networking-plumgrid <https://git.openstack.org/cgit/openstack/networking-plumgrid>`__
networking-powervm `https://git.openstack.org/openstack/networking-powervm <https://git.openstack.org/cgit/openstack/networking-powervm>`__
networking-sfc `https://git.openstack.org/openstack/networking-sfc <https://git.openstack.org/cgit/openstack/networking-sfc>`__
networking-spp `https://git.openstack.org/openstack/networking-spp <https://git.openstack.org/cgit/openstack/networking-spp>`__
networking-vpp `https://git.openstack.org/openstack/networking-vpp <https://git.openstack.org/cgit/openstack/networking-vpp>`__
networking-vsphere `https://git.openstack.org/openstack/networking-vsphere <https://git.openstack.org/cgit/openstack/networking-vsphere>`__
neutron `https://git.openstack.org/openstack/neutron <https://git.openstack.org/cgit/openstack/neutron>`__
neutron-classifier `https://git.openstack.org/openstack/neutron-classifier <https://git.openstack.org/cgit/openstack/neutron-classifier>`__
neutron-dynamic-routing `https://git.openstack.org/openstack/neutron-dynamic-routing <https://git.openstack.org/cgit/openstack/neutron-dynamic-routing>`__
neutron-fwaas `https://git.openstack.org/openstack/neutron-fwaas <https://git.openstack.org/cgit/openstack/neutron-fwaas>`__
neutron-fwaas-dashboard `https://git.openstack.org/openstack/neutron-fwaas-dashboard <https://git.openstack.org/cgit/openstack/neutron-fwaas-dashboard>`__
neutron-lbaas `https://git.openstack.org/openstack/neutron-lbaas <https://git.openstack.org/cgit/openstack/neutron-lbaas>`__
neutron-lbaas-dashboard `https://git.openstack.org/openstack/neutron-lbaas-dashboard <https://git.openstack.org/cgit/openstack/neutron-lbaas-dashboard>`__
neutron-tempest-plugin `https://git.openstack.org/openstack/neutron-tempest-plugin <https://git.openstack.org/cgit/openstack/neutron-tempest-plugin>`__
neutron-vpnaas `https://git.openstack.org/openstack/neutron-vpnaas <https://git.openstack.org/cgit/openstack/neutron-vpnaas>`__
neutron-vpnaas-dashboard `https://git.openstack.org/openstack/neutron-vpnaas-dashboard <https://git.openstack.org/cgit/openstack/neutron-vpnaas-dashboard>`__
nova-dpm `https://git.openstack.org/openstack/nova-dpm <https://git.openstack.org/cgit/openstack/nova-dpm>`__
nova-lxd `https://git.openstack.org/openstack/nova-lxd <https://git.openstack.org/cgit/openstack/nova-lxd>`__
nova-mksproxy `https://git.openstack.org/openstack/nova-mksproxy <https://git.openstack.org/cgit/openstack/nova-mksproxy>`__
nova-powervm `https://git.openstack.org/openstack/nova-powervm <https://git.openstack.org/cgit/openstack/nova-powervm>`__
oaktree `https://git.openstack.org/openstack/oaktree <https://git.openstack.org/cgit/openstack/oaktree>`__
octavia `https://git.openstack.org/openstack/octavia <https://git.openstack.org/cgit/openstack/octavia>`__
octavia-dashboard `https://git.openstack.org/openstack/octavia-dashboard <https://git.openstack.org/cgit/openstack/octavia-dashboard>`__
omni `https://git.openstack.org/openstack/omni <https://git.openstack.org/cgit/openstack/omni>`__
openstacksdk `https://git.openstack.org/openstack/openstacksdk <https://git.openstack.org/cgit/openstack/openstacksdk>`__
os-faults `https://git.openstack.org/openstack/os-faults <https://git.openstack.org/cgit/openstack/os-faults>`__
os-xenapi `https://git.openstack.org/openstack/os-xenapi <https://git.openstack.org/cgit/openstack/os-xenapi>`__
osprofiler `https://git.openstack.org/openstack/osprofiler <https://git.openstack.org/cgit/openstack/osprofiler>`__
oswin-tempest-plugin `https://git.openstack.org/openstack/oswin-tempest-plugin <https://git.openstack.org/cgit/openstack/oswin-tempest-plugin>`__
panko `https://git.openstack.org/openstack/panko <https://git.openstack.org/cgit/openstack/panko>`__
patrole `https://git.openstack.org/openstack/patrole <https://git.openstack.org/cgit/openstack/patrole>`__
picasso `https://git.openstack.org/openstack/picasso <https://git.openstack.org/cgit/openstack/picasso>`__
qinling `https://git.openstack.org/openstack/qinling <https://git.openstack.org/cgit/openstack/qinling>`__
qinling-dashboard `https://git.openstack.org/openstack/qinling-dashboard <https://git.openstack.org/cgit/openstack/qinling-dashboard>`__
rally `https://git.openstack.org/openstack/rally <https://git.openstack.org/cgit/openstack/rally>`__
rally-openstack `https://git.openstack.org/openstack/rally-openstack <https://git.openstack.org/cgit/openstack/rally-openstack>`__
rsd-virt-for-nova `https://git.openstack.org/openstack/rsd-virt-for-nova <https://git.openstack.org/cgit/openstack/rsd-virt-for-nova>`__
sahara `https://git.openstack.org/openstack/sahara <https://git.openstack.org/cgit/openstack/sahara>`__
sahara-dashboard `https://git.openstack.org/openstack/sahara-dashboard <https://git.openstack.org/cgit/openstack/sahara-dashboard>`__
scalpels `https://git.openstack.org/openstack/scalpels <https://git.openstack.org/cgit/openstack/scalpels>`__
searchlight `https://git.openstack.org/openstack/searchlight <https://git.openstack.org/cgit/openstack/searchlight>`__
searchlight-ui `https://git.openstack.org/openstack/searchlight-ui <https://git.openstack.org/cgit/openstack/searchlight-ui>`__
senlin `https://git.openstack.org/openstack/senlin <https://git.openstack.org/cgit/openstack/senlin>`__
slogging `https://git.openstack.org/openstack/slogging <https://git.openstack.org/cgit/openstack/slogging>`__
solum `https://git.openstack.org/openstack/solum <https://git.openstack.org/cgit/openstack/solum>`__
stackube `https://git.openstack.org/openstack/stackube <https://git.openstack.org/cgit/openstack/stackube>`__
storlets `https://git.openstack.org/openstack/storlets <https://git.openstack.org/cgit/openstack/storlets>`__
stx-config `https://git.openstack.org/openstack/stx-config <https://git.openstack.org/cgit/openstack/stx-config>`__
stx-fault `https://git.openstack.org/openstack/stx-fault <https://git.openstack.org/cgit/openstack/stx-fault>`__
stx-integ `https://git.openstack.org/openstack/stx-integ <https://git.openstack.org/cgit/openstack/stx-integ>`__
stx-metal `https://git.openstack.org/openstack/stx-metal <https://git.openstack.org/cgit/openstack/stx-metal>`__
stx-nfv `https://git.openstack.org/openstack/stx-nfv <https://git.openstack.org/cgit/openstack/stx-nfv>`__
stx-update `https://git.openstack.org/openstack/stx-update <https://git.openstack.org/cgit/openstack/stx-update>`__
tacker `https://git.openstack.org/openstack/tacker <https://git.openstack.org/cgit/openstack/tacker>`__
tap-as-a-service `https://git.openstack.org/openstack/tap-as-a-service <https://git.openstack.org/cgit/openstack/tap-as-a-service>`__
tap-as-a-service-dashboard `https://git.openstack.org/openstack/tap-as-a-service-dashboard <https://git.openstack.org/cgit/openstack/tap-as-a-service-dashboard>`__
tatu `https://git.openstack.org/openstack/tatu <https://git.openstack.org/cgit/openstack/tatu>`__
telemetry-tempest-plugin `https://git.openstack.org/openstack/telemetry-tempest-plugin <https://git.openstack.org/cgit/openstack/telemetry-tempest-plugin>`__
tobiko `https://git.openstack.org/openstack/tobiko <https://git.openstack.org/cgit/openstack/tobiko>`__
tricircle `https://git.openstack.org/openstack/tricircle <https://git.openstack.org/cgit/openstack/tricircle>`__
trio2o `https://git.openstack.org/openstack/trio2o <https://git.openstack.org/cgit/openstack/trio2o>`__
trove `https://git.openstack.org/openstack/trove <https://git.openstack.org/cgit/openstack/trove>`__
trove-dashboard `https://git.openstack.org/openstack/trove-dashboard <https://git.openstack.org/cgit/openstack/trove-dashboard>`__
valet `https://git.openstack.org/openstack/valet <https://git.openstack.org/cgit/openstack/valet>`__
vitrage `https://git.openstack.org/openstack/vitrage <https://git.openstack.org/cgit/openstack/vitrage>`__
vitrage-dashboard `https://git.openstack.org/openstack/vitrage-dashboard <https://git.openstack.org/cgit/openstack/vitrage-dashboard>`__
vitrage-tempest-plugin `https://git.openstack.org/openstack/vitrage-tempest-plugin <https://git.openstack.org/cgit/openstack/vitrage-tempest-plugin>`__
vmware-nsx `https://git.openstack.org/openstack/vmware-nsx <https://git.openstack.org/cgit/openstack/vmware-nsx>`__
vmware-vspc `https://git.openstack.org/openstack/vmware-vspc <https://git.openstack.org/cgit/openstack/vmware-vspc>`__
watcher `https://git.openstack.org/openstack/watcher <https://git.openstack.org/cgit/openstack/watcher>`__
watcher-dashboard `https://git.openstack.org/openstack/watcher-dashboard <https://git.openstack.org/cgit/openstack/watcher-dashboard>`__
zaqar `https://git.openstack.org/openstack/zaqar <https://git.openstack.org/cgit/openstack/zaqar>`__
zaqar-ui `https://git.openstack.org/openstack/zaqar-ui <https://git.openstack.org/cgit/openstack/zaqar-ui>`__
zun `https://git.openstack.org/openstack/zun <https://git.openstack.org/cgit/openstack/zun>`__
zun-ui `https://git.openstack.org/openstack/zun-ui <https://git.openstack.org/cgit/openstack/zun-ui>`__
====================================== ===
======================================== ===
Plugin Name URL
======================================== ===
openstack/aodh `https://opendev.org/openstack/aodh <https://opendev.org/openstack/aodh>`__
openstack/barbican `https://opendev.org/openstack/barbican <https://opendev.org/openstack/barbican>`__
openstack/blazar `https://opendev.org/openstack/blazar <https://opendev.org/openstack/blazar>`__
openstack/ceilometer `https://opendev.org/openstack/ceilometer <https://opendev.org/openstack/ceilometer>`__
openstack/ceilometer-powervm `https://opendev.org/openstack/ceilometer-powervm <https://opendev.org/openstack/ceilometer-powervm>`__
openstack/cinderlib `https://opendev.org/openstack/cinderlib <https://opendev.org/openstack/cinderlib>`__
openstack/cloudkitty `https://opendev.org/openstack/cloudkitty <https://opendev.org/openstack/cloudkitty>`__
openstack/cyborg `https://opendev.org/openstack/cyborg <https://opendev.org/openstack/cyborg>`__
openstack/designate `https://opendev.org/openstack/designate <https://opendev.org/openstack/designate>`__
openstack/devstack-plugin-amqp1 `https://opendev.org/openstack/devstack-plugin-amqp1 <https://opendev.org/openstack/devstack-plugin-amqp1>`__
openstack/devstack-plugin-ceph `https://opendev.org/openstack/devstack-plugin-ceph <https://opendev.org/openstack/devstack-plugin-ceph>`__
openstack/devstack-plugin-container `https://opendev.org/openstack/devstack-plugin-container <https://opendev.org/openstack/devstack-plugin-container>`__
openstack/devstack-plugin-kafka `https://opendev.org/openstack/devstack-plugin-kafka <https://opendev.org/openstack/devstack-plugin-kafka>`__
openstack/devstack-plugin-nfs `https://opendev.org/openstack/devstack-plugin-nfs <https://opendev.org/openstack/devstack-plugin-nfs>`__
openstack/devstack-plugin-open-cas `https://opendev.org/openstack/devstack-plugin-open-cas <https://opendev.org/openstack/devstack-plugin-open-cas>`__
openstack/ec2-api `https://opendev.org/openstack/ec2-api <https://opendev.org/openstack/ec2-api>`__
openstack/freezer `https://opendev.org/openstack/freezer <https://opendev.org/openstack/freezer>`__
openstack/freezer-api `https://opendev.org/openstack/freezer-api <https://opendev.org/openstack/freezer-api>`__
openstack/freezer-tempest-plugin `https://opendev.org/openstack/freezer-tempest-plugin <https://opendev.org/openstack/freezer-tempest-plugin>`__
openstack/freezer-web-ui `https://opendev.org/openstack/freezer-web-ui <https://opendev.org/openstack/freezer-web-ui>`__
openstack/heat `https://opendev.org/openstack/heat <https://opendev.org/openstack/heat>`__
openstack/heat-dashboard `https://opendev.org/openstack/heat-dashboard <https://opendev.org/openstack/heat-dashboard>`__
openstack/ironic `https://opendev.org/openstack/ironic <https://opendev.org/openstack/ironic>`__
openstack/ironic-inspector `https://opendev.org/openstack/ironic-inspector <https://opendev.org/openstack/ironic-inspector>`__
openstack/ironic-prometheus-exporter `https://opendev.org/openstack/ironic-prometheus-exporter <https://opendev.org/openstack/ironic-prometheus-exporter>`__
openstack/ironic-ui `https://opendev.org/openstack/ironic-ui <https://opendev.org/openstack/ironic-ui>`__
openstack/keystone `https://opendev.org/openstack/keystone <https://opendev.org/openstack/keystone>`__
openstack/kuryr-kubernetes `https://opendev.org/openstack/kuryr-kubernetes <https://opendev.org/openstack/kuryr-kubernetes>`__
openstack/kuryr-libnetwork `https://opendev.org/openstack/kuryr-libnetwork <https://opendev.org/openstack/kuryr-libnetwork>`__
openstack/kuryr-tempest-plugin `https://opendev.org/openstack/kuryr-tempest-plugin <https://opendev.org/openstack/kuryr-tempest-plugin>`__
openstack/magnum `https://opendev.org/openstack/magnum <https://opendev.org/openstack/magnum>`__
openstack/magnum-ui `https://opendev.org/openstack/magnum-ui <https://opendev.org/openstack/magnum-ui>`__
openstack/manila `https://opendev.org/openstack/manila <https://opendev.org/openstack/manila>`__
openstack/manila-tempest-plugin `https://opendev.org/openstack/manila-tempest-plugin <https://opendev.org/openstack/manila-tempest-plugin>`__
openstack/manila-ui `https://opendev.org/openstack/manila-ui <https://opendev.org/openstack/manila-ui>`__
openstack/masakari `https://opendev.org/openstack/masakari <https://opendev.org/openstack/masakari>`__
openstack/mistral `https://opendev.org/openstack/mistral <https://opendev.org/openstack/mistral>`__
openstack/monasca-api `https://opendev.org/openstack/monasca-api <https://opendev.org/openstack/monasca-api>`__
openstack/monasca-events-api `https://opendev.org/openstack/monasca-events-api <https://opendev.org/openstack/monasca-events-api>`__
openstack/monasca-tempest-plugin `https://opendev.org/openstack/monasca-tempest-plugin <https://opendev.org/openstack/monasca-tempest-plugin>`__
openstack/murano `https://opendev.org/openstack/murano <https://opendev.org/openstack/murano>`__
openstack/networking-bagpipe `https://opendev.org/openstack/networking-bagpipe <https://opendev.org/openstack/networking-bagpipe>`__
openstack/networking-baremetal `https://opendev.org/openstack/networking-baremetal <https://opendev.org/openstack/networking-baremetal>`__
openstack/networking-bgpvpn `https://opendev.org/openstack/networking-bgpvpn <https://opendev.org/openstack/networking-bgpvpn>`__
openstack/networking-generic-switch `https://opendev.org/openstack/networking-generic-switch <https://opendev.org/openstack/networking-generic-switch>`__
openstack/networking-hyperv `https://opendev.org/openstack/networking-hyperv <https://opendev.org/openstack/networking-hyperv>`__
openstack/networking-odl `https://opendev.org/openstack/networking-odl <https://opendev.org/openstack/networking-odl>`__
openstack/networking-powervm `https://opendev.org/openstack/networking-powervm <https://opendev.org/openstack/networking-powervm>`__
openstack/networking-sfc `https://opendev.org/openstack/networking-sfc <https://opendev.org/openstack/networking-sfc>`__
openstack/neutron `https://opendev.org/openstack/neutron <https://opendev.org/openstack/neutron>`__
openstack/neutron-dynamic-routing `https://opendev.org/openstack/neutron-dynamic-routing <https://opendev.org/openstack/neutron-dynamic-routing>`__
openstack/neutron-fwaas `https://opendev.org/openstack/neutron-fwaas <https://opendev.org/openstack/neutron-fwaas>`__
openstack/neutron-fwaas-dashboard `https://opendev.org/openstack/neutron-fwaas-dashboard <https://opendev.org/openstack/neutron-fwaas-dashboard>`__
openstack/neutron-tempest-plugin `https://opendev.org/openstack/neutron-tempest-plugin <https://opendev.org/openstack/neutron-tempest-plugin>`__
openstack/neutron-vpnaas `https://opendev.org/openstack/neutron-vpnaas <https://opendev.org/openstack/neutron-vpnaas>`__
openstack/neutron-vpnaas-dashboard `https://opendev.org/openstack/neutron-vpnaas-dashboard <https://opendev.org/openstack/neutron-vpnaas-dashboard>`__
openstack/nova-powervm `https://opendev.org/openstack/nova-powervm <https://opendev.org/openstack/nova-powervm>`__
openstack/octavia `https://opendev.org/openstack/octavia <https://opendev.org/openstack/octavia>`__
openstack/octavia-dashboard `https://opendev.org/openstack/octavia-dashboard <https://opendev.org/openstack/octavia-dashboard>`__
openstack/octavia-tempest-plugin `https://opendev.org/openstack/octavia-tempest-plugin <https://opendev.org/openstack/octavia-tempest-plugin>`__
openstack/openstacksdk `https://opendev.org/openstack/openstacksdk <https://opendev.org/openstack/openstacksdk>`__
openstack/osprofiler `https://opendev.org/openstack/osprofiler <https://opendev.org/openstack/osprofiler>`__
openstack/oswin-tempest-plugin `https://opendev.org/openstack/oswin-tempest-plugin <https://opendev.org/openstack/oswin-tempest-plugin>`__
openstack/ovn-octavia-provider `https://opendev.org/openstack/ovn-octavia-provider <https://opendev.org/openstack/ovn-octavia-provider>`__
openstack/patrole `https://opendev.org/openstack/patrole <https://opendev.org/openstack/patrole>`__
openstack/rally-openstack `https://opendev.org/openstack/rally-openstack <https://opendev.org/openstack/rally-openstack>`__
openstack/sahara `https://opendev.org/openstack/sahara <https://opendev.org/openstack/sahara>`__
openstack/sahara-dashboard `https://opendev.org/openstack/sahara-dashboard <https://opendev.org/openstack/sahara-dashboard>`__
openstack/senlin `https://opendev.org/openstack/senlin <https://opendev.org/openstack/senlin>`__
openstack/shade `https://opendev.org/openstack/shade <https://opendev.org/openstack/shade>`__
openstack/skyline-apiserver `https://opendev.org/openstack/skyline-apiserver <https://opendev.org/openstack/skyline-apiserver>`__
openstack/solum `https://opendev.org/openstack/solum <https://opendev.org/openstack/solum>`__
openstack/storlets `https://opendev.org/openstack/storlets <https://opendev.org/openstack/storlets>`__
openstack/tacker `https://opendev.org/openstack/tacker <https://opendev.org/openstack/tacker>`__
openstack/tap-as-a-service `https://opendev.org/openstack/tap-as-a-service <https://opendev.org/openstack/tap-as-a-service>`__
openstack/telemetry-tempest-plugin `https://opendev.org/openstack/telemetry-tempest-plugin <https://opendev.org/openstack/telemetry-tempest-plugin>`__
openstack/trove `https://opendev.org/openstack/trove <https://opendev.org/openstack/trove>`__
openstack/trove-dashboard `https://opendev.org/openstack/trove-dashboard <https://opendev.org/openstack/trove-dashboard>`__
openstack/venus `https://opendev.org/openstack/venus <https://opendev.org/openstack/venus>`__
openstack/venus-dashboard `https://opendev.org/openstack/venus-dashboard <https://opendev.org/openstack/venus-dashboard>`__
openstack/vitrage `https://opendev.org/openstack/vitrage <https://opendev.org/openstack/vitrage>`__
openstack/vitrage-dashboard `https://opendev.org/openstack/vitrage-dashboard <https://opendev.org/openstack/vitrage-dashboard>`__
openstack/vitrage-tempest-plugin `https://opendev.org/openstack/vitrage-tempest-plugin <https://opendev.org/openstack/vitrage-tempest-plugin>`__
openstack/watcher `https://opendev.org/openstack/watcher <https://opendev.org/openstack/watcher>`__
openstack/watcher-dashboard `https://opendev.org/openstack/watcher-dashboard <https://opendev.org/openstack/watcher-dashboard>`__
openstack/whitebox-tempest-plugin `https://opendev.org/openstack/whitebox-tempest-plugin <https://opendev.org/openstack/whitebox-tempest-plugin>`__
openstack/zaqar `https://opendev.org/openstack/zaqar <https://opendev.org/openstack/zaqar>`__
openstack/zaqar-ui `https://opendev.org/openstack/zaqar-ui <https://opendev.org/openstack/zaqar-ui>`__
openstack/zun `https://opendev.org/openstack/zun <https://opendev.org/openstack/zun>`__
openstack/zun-ui `https://opendev.org/openstack/zun-ui <https://opendev.org/openstack/zun-ui>`__
performa/os-faults `https://opendev.org/performa/os-faults <https://opendev.org/performa/os-faults>`__
starlingx/config `https://opendev.org/starlingx/config <https://opendev.org/starlingx/config>`__
starlingx/fault `https://opendev.org/starlingx/fault <https://opendev.org/starlingx/fault>`__
starlingx/ha `https://opendev.org/starlingx/ha <https://opendev.org/starlingx/ha>`__
starlingx/integ `https://opendev.org/starlingx/integ <https://opendev.org/starlingx/integ>`__
starlingx/metal `https://opendev.org/starlingx/metal <https://opendev.org/starlingx/metal>`__
starlingx/nfv `https://opendev.org/starlingx/nfv <https://opendev.org/starlingx/nfv>`__
starlingx/update `https://opendev.org/starlingx/update <https://opendev.org/starlingx/update>`__
vexxhost/openstack-operator `https://opendev.org/vexxhost/openstack-operator <https://opendev.org/vexxhost/openstack-operator>`__
x/almanach `https://opendev.org/x/almanach <https://opendev.org/x/almanach>`__
x/apmec `https://opendev.org/x/apmec <https://opendev.org/x/apmec>`__
x/bilean `https://opendev.org/x/bilean <https://opendev.org/x/bilean>`__
x/broadview-collector `https://opendev.org/x/broadview-collector <https://opendev.org/x/broadview-collector>`__
x/collectd-openstack-plugins `https://opendev.org/x/collectd-openstack-plugins <https://opendev.org/x/collectd-openstack-plugins>`__
x/devstack-plugin-additional-pkg-repos `https://opendev.org/x/devstack-plugin-additional-pkg-repos <https://opendev.org/x/devstack-plugin-additional-pkg-repos>`__
x/devstack-plugin-glusterfs `https://opendev.org/x/devstack-plugin-glusterfs <https://opendev.org/x/devstack-plugin-glusterfs>`__
x/devstack-plugin-hdfs `https://opendev.org/x/devstack-plugin-hdfs <https://opendev.org/x/devstack-plugin-hdfs>`__
x/devstack-plugin-libvirt-qemu `https://opendev.org/x/devstack-plugin-libvirt-qemu <https://opendev.org/x/devstack-plugin-libvirt-qemu>`__
x/devstack-plugin-mariadb `https://opendev.org/x/devstack-plugin-mariadb <https://opendev.org/x/devstack-plugin-mariadb>`__
x/devstack-plugin-tobiko `https://opendev.org/x/devstack-plugin-tobiko <https://opendev.org/x/devstack-plugin-tobiko>`__
x/devstack-plugin-vmax `https://opendev.org/x/devstack-plugin-vmax <https://opendev.org/x/devstack-plugin-vmax>`__
x/drbd-devstack `https://opendev.org/x/drbd-devstack <https://opendev.org/x/drbd-devstack>`__
x/fenix `https://opendev.org/x/fenix <https://opendev.org/x/fenix>`__
x/gce-api `https://opendev.org/x/gce-api <https://opendev.org/x/gce-api>`__
x/glare `https://opendev.org/x/glare <https://opendev.org/x/glare>`__
x/group-based-policy `https://opendev.org/x/group-based-policy <https://opendev.org/x/group-based-policy>`__
x/gyan `https://opendev.org/x/gyan <https://opendev.org/x/gyan>`__
x/horizon-mellanox `https://opendev.org/x/horizon-mellanox <https://opendev.org/x/horizon-mellanox>`__
x/ironic-staging-drivers `https://opendev.org/x/ironic-staging-drivers <https://opendev.org/x/ironic-staging-drivers>`__
x/kingbird `https://opendev.org/x/kingbird <https://opendev.org/x/kingbird>`__
x/meteos `https://opendev.org/x/meteos <https://opendev.org/x/meteos>`__
x/meteos-ui `https://opendev.org/x/meteos-ui <https://opendev.org/x/meteos-ui>`__
x/mixmatch `https://opendev.org/x/mixmatch <https://opendev.org/x/mixmatch>`__
x/mogan `https://opendev.org/x/mogan <https://opendev.org/x/mogan>`__
x/mogan-ui `https://opendev.org/x/mogan-ui <https://opendev.org/x/mogan-ui>`__
x/networking-6wind `https://opendev.org/x/networking-6wind <https://opendev.org/x/networking-6wind>`__
x/networking-ansible `https://opendev.org/x/networking-ansible <https://opendev.org/x/networking-ansible>`__
x/networking-arista `https://opendev.org/x/networking-arista <https://opendev.org/x/networking-arista>`__
x/networking-brocade `https://opendev.org/x/networking-brocade <https://opendev.org/x/networking-brocade>`__
x/networking-cisco `https://opendev.org/x/networking-cisco <https://opendev.org/x/networking-cisco>`__
x/networking-cumulus `https://opendev.org/x/networking-cumulus <https://opendev.org/x/networking-cumulus>`__
x/networking-dpm `https://opendev.org/x/networking-dpm <https://opendev.org/x/networking-dpm>`__
x/networking-fortinet `https://opendev.org/x/networking-fortinet <https://opendev.org/x/networking-fortinet>`__
x/networking-hpe `https://opendev.org/x/networking-hpe <https://opendev.org/x/networking-hpe>`__
x/networking-huawei `https://opendev.org/x/networking-huawei <https://opendev.org/x/networking-huawei>`__
x/networking-infoblox `https://opendev.org/x/networking-infoblox <https://opendev.org/x/networking-infoblox>`__
x/networking-l2gw `https://opendev.org/x/networking-l2gw <https://opendev.org/x/networking-l2gw>`__
x/networking-lagopus `https://opendev.org/x/networking-lagopus <https://opendev.org/x/networking-lagopus>`__
x/networking-mlnx `https://opendev.org/x/networking-mlnx <https://opendev.org/x/networking-mlnx>`__
x/networking-nec `https://opendev.org/x/networking-nec <https://opendev.org/x/networking-nec>`__
x/networking-omnipath `https://opendev.org/x/networking-omnipath <https://opendev.org/x/networking-omnipath>`__
x/networking-opencontrail `https://opendev.org/x/networking-opencontrail <https://opendev.org/x/networking-opencontrail>`__
x/networking-ovs-dpdk `https://opendev.org/x/networking-ovs-dpdk <https://opendev.org/x/networking-ovs-dpdk>`__
x/networking-plumgrid `https://opendev.org/x/networking-plumgrid <https://opendev.org/x/networking-plumgrid>`__
x/networking-spp `https://opendev.org/x/networking-spp <https://opendev.org/x/networking-spp>`__
x/networking-vpp `https://opendev.org/x/networking-vpp <https://opendev.org/x/networking-vpp>`__
x/networking-vsphere `https://opendev.org/x/networking-vsphere <https://opendev.org/x/networking-vsphere>`__
x/neutron-classifier `https://opendev.org/x/neutron-classifier <https://opendev.org/x/neutron-classifier>`__
x/nova-dpm `https://opendev.org/x/nova-dpm <https://opendev.org/x/nova-dpm>`__
x/nova-mksproxy `https://opendev.org/x/nova-mksproxy <https://opendev.org/x/nova-mksproxy>`__
x/oaktree `https://opendev.org/x/oaktree <https://opendev.org/x/oaktree>`__
x/omni `https://opendev.org/x/omni <https://opendev.org/x/omni>`__
x/os-xenapi `https://opendev.org/x/os-xenapi <https://opendev.org/x/os-xenapi>`__
x/picasso `https://opendev.org/x/picasso <https://opendev.org/x/picasso>`__
x/rsd-virt-for-nova `https://opendev.org/x/rsd-virt-for-nova <https://opendev.org/x/rsd-virt-for-nova>`__
x/scalpels `https://opendev.org/x/scalpels <https://opendev.org/x/scalpels>`__
x/slogging `https://opendev.org/x/slogging <https://opendev.org/x/slogging>`__
x/stackube `https://opendev.org/x/stackube <https://opendev.org/x/stackube>`__
x/tap-as-a-service-dashboard `https://opendev.org/x/tap-as-a-service-dashboard <https://opendev.org/x/tap-as-a-service-dashboard>`__
x/tatu `https://opendev.org/x/tatu <https://opendev.org/x/tatu>`__
x/trio2o `https://opendev.org/x/trio2o <https://opendev.org/x/trio2o>`__
x/valet `https://opendev.org/x/valet <https://opendev.org/x/valet>`__
x/vmware-nsx `https://opendev.org/x/vmware-nsx <https://opendev.org/x/vmware-nsx>`__
x/vmware-vspc `https://opendev.org/x/vmware-vspc <https://opendev.org/x/vmware-vspc>`__
======================================== ===
+63 -14
View File
@@ -99,7 +99,7 @@ They are added in the following format::
An example would be as follows::
enable_plugin ec2-api https://git.openstack.org/openstack/ec2-api
enable_plugin ec2-api https://opendev.org/openstack/ec2-api
plugin.sh contract
==================
@@ -222,24 +222,66 @@ dependency mechanism is beyond the scope of the current work.
System Packages
===============
Devstack provides a framework for getting packages installed at an early
phase of its execution. These packages may be defined in a plugin as files
that contain new-line separated lists of packages required by the plugin
Supported packaging systems include apt and yum across multiple distributions.
To enable a plugin to hook into this and install package dependencies, packages
may be listed at the following locations in the top-level of the plugin
repository:
Devstack based
--------------
Devstack provides a custom framework for getting packages installed at
an early phase of its execution. These packages may be defined in a
plugin as files that contain new-line separated lists of packages
required by the plugin
Supported packaging systems include apt and yum across multiple
distributions. To enable a plugin to hook into this and install
package dependencies, packages may be listed at the following
locations in the top-level of the plugin repository:
- ``./devstack/files/debs/$plugin_name`` - Packages to install when running
on Ubuntu, Debian or Linux Mint.
on Ubuntu or Debian.
- ``./devstack/files/rpms/$plugin_name`` - Packages to install when running
on Red Hat, Fedora, CentOS or XenServer.
on Red Hat, Fedora, or CentOS.
- ``./devstack/files/rpms-suse/$plugin_name`` - Packages to install when
running on SUSE Linux or openSUSE.
Although there a no plans to remove this method of installing
packages, plugins should consider it deprecated for ``bindep`` support
described below.
bindep
------
The `bindep <https://docs.openstack.org/infra/bindep>`__ project has
become the defacto standard for OpenStack projects to specify binary
dependencies.
A plugin may provide a ``./devstack/files/bindep.txt`` file, which
will be called with the *default* profile to install packages. For
details on the syntax, etc. see the bindep documentation.
It is also possible to use the ``bindep.txt`` of projects that are
being installed from source with the ``-bindep`` flag available in
install functions. For example
.. code-block:: bash
if use_library_from_git "diskimage-builder"; then
GITREPO["diskimage-builder"]=$DISKIMAGE_BUILDER_REPO_URL
GITDIR["diskimage-builder"]=$DEST/diskimage-builder
GITBRANCH["diskimage-builder"]=$DISKIMAGE_BUILDER_REPO_REF
git_clone_by_name "diskimage-builder"
setup_dev_lib -bindep "diskimage-builder"
fi
will result in any packages required by the ``bindep.txt`` of the
``diskimage-builder`` project being installed. Note however that jobs
that switch projects between source and released/pypi installs
(e.g. with a ``foo-dsvm`` and a ``foo-dsvm-src`` test to cover both
released dependencies and master versions) will have to deal with
``bindep.txt`` being unavailable without the source directory.
Using Plugins in the OpenStack Gate
===================================
@@ -264,10 +306,12 @@ integration of alternate RPC systems (e.g. zmq, qpid). In these cases
the best practice is to build a dedicated
``openstack/devstack-plugin-FOO`` project.
Legacy project-config jobs
--------------------------
To enable a plugin to be used in a gate job, the following lines will
be needed in your ``jenkins/jobs/<project>.yaml`` definition in
`project-config
<http://git.openstack.org/cgit/openstack-infra/project-config/>`_::
`project-config <https://opendev.org/openstack/project-config/>`_::
# Because we are testing a non standard project, add the
# our project repository. This makes zuul do the right
@@ -277,12 +321,17 @@ be needed in your ``jenkins/jobs/<project>.yaml`` definition in
# note the actual url here is somewhat irrelevant because it
# caches in nodepool, however make it a valid url for
# documentation purposes.
export DEVSTACK_LOCAL_CONFIG="enable_plugin ec2-api https://git.openstack.org/openstack/ec2-api"
export DEVSTACK_LOCAL_CONFIG="enable_plugin ec2-api https://opendev.org/openstack/ec2-api"
Zuul v3 jobs
------------
See the ``devstack_plugins`` example in :doc:`zuul_ci_jobs_migration`.
See Also
========
For additional inspiration on devstack plugins you can check out the
`Plugin Registry <plugin-registry.html>`_.
:doc:`Plugin Registry <plugin-registry>`.
.. _service types authority: https://specs.openstack.org/openstack/service-types-authority/
+1 -25
View File
@@ -194,31 +194,7 @@ Telnet to that port to enter the pdb session::
See the `remote-pdb`_ home page for more options.
.. _`remote-pdb`: https://pypi.python.org/pypi/remote-pdb
Known Issues
============
Be careful about systemd python libraries. There are 3 of them on
pypi, and they are all very different. They unfortunately all install
into the ``systemd`` namespace, which can cause some issues.
- ``systemd-python`` - this is the upstream maintained library, it has
a version number like systemd itself (currently ``234``). This is
the one you want.
- ``systemd`` - a python 3 only library, not what you want.
- ``python-systemd`` - another library you don't want. Installing it
on a system will break ansible's ability to run.
If we were using user units, the ``[Service]`` - ``Group=`` parameter
doesn't seem to work with user units, even though the documentation
says that it should. This means that we will need to do an explicit
``/usr/bin/sg``. This has the downside of making the SYSLOG_IDENTIFIER
be ``sg``. We can explicitly set that with ``SyslogIdentifier=``, but
it's really unfortunate that we're going to need this work
around. This is currently not a problem because we're only using
system units.
.. _`remote-pdb`: https://pypi.org/project/remote-pdb/
Future Work
===========
+139 -121
View File
@@ -28,7 +28,7 @@ sahara Tempest plugin repo:
.. code:: yaml
# In http://git.openstack.org/cgit/openstack/sahara-tests/tree/.zuul.yaml:
# In https://opendev.org/openstack/sahara-tests/src/branch/master/.zuul.yaml:
- job:
name: sahara-tests-tempest
description: |
@@ -86,7 +86,7 @@ job.parent.
.. code:: yaml
# https://git.openstack.org/cgit/openstack/kuryr-kubernetes/tree/.zuul.yaml:
# https://opendev.org/openstack/kuryr-kubernetes/src/branch/master/.zuul.d/base.yaml:
- job:
name: kuryr-kubernetes-tempest-base
parent: devstack-tempest
@@ -110,9 +110,9 @@ job.parent.
kuryr-kubernetes: true
(...)
devstack_plugins:
kuryr-kubernetes: https://git.openstack.org/openstack/kuryr
devstack-plugin-container: https://git.openstack.org/openstack/devstack-plugin-container
neutron-lbaas: https://git.openstack.org/openstack/neutron-lbaas
kuryr-kubernetes: https://opendev.org/openstack/kuryr
devstack-plugin-container: https://opendev.org/openstack/devstack-plugin-container
neutron-lbaas: https://opendev.org/openstack/neutron-lbaas
tempest_plugins:
- kuryr-tempest-plugin
(...)
@@ -180,123 +180,141 @@ the same or a similar behaviour in Zuul v3 jobs. For localrc settings,
devstack-gate defined a default value. In ansible jobs the default is either the
value defined in the parent job, or the default from DevStack, if any.
============================================== ============= ==================
DevStack gate flag Repo New implementation
============================================== ============= ==================
OVERRIDE_ZUUL_BRANCH zuul override-checkout:
[branch]
in the job definition.
DEVSTACK_GATE_NET_OVERLAY zuul-jobs A bridge called
br-infra is set up for
all jobs that inherit
from multinode with
a dedicated `bridge role <https://docs.openstack.org/infra/zuul-jobs/roles.html#role-multi-node-bridge>`_.
DEVSTACK_GATE_FEATURE_MATRIX devstack-gate ``test_matrix_features``
variable of the
test-matrix role in
devstack-gate. This
is a temporary
solution, feature
matrix will go away.
In the future services
will be defined in
jobs only.
DEVSTACK_CINDER_VOLUME_CLEAR devstack *CINDER_VOLUME_CLEAR: true/false*
in devstack_localrc
in the job vars.
DEVSTACK_GATE_NEUTRON devstack True by default. To
disable, disable all
neutron services in
devstack_services in
the job definition.
DEVSTACK_GATE_CONFIGDRIVE devstack *FORCE_CONFIG_DRIVE: true/false*
in devstack_localrc
in the job vars.
DEVSTACK_GATE_INSTALL_TESTONLY devstack *INSTALL_TESTONLY_PACKAGES: true/false*
in devstack_localrc
in the job vars.
DEVSTACK_GATE_VIRT_DRIVER devstack *VIRT_DRIVER: [virt driver]*
in devstack_localrc
in the job vars.
DEVSTACK_GATE_LIBVIRT_TYPE devstack *LIBVIRT_TYPE: [libvirt type]*
in devstack_localrc
in the job vars.
DEVSTACK_GATE_TEMPEST devstack Defined by the job
tempest that is used. The
``devstack`` job only
runs devstack.
The ``devstack-tempest``
one triggers a Tempest
run as well.
DEVSTACK_GATE_TEMPEST_FULL tempest *tox_envlist: full*
in the job vars.
DEVSTACK_GATE_TEMPEST_ALL tempest *tox_envlist: all*
in the job vars.
DEVSTACK_GATE_TEMPEST_ALL_PLUGINS tempest *tox_envlist: all-plugin*
in the job vars.
DEVSTACK_GATE_TEMPEST_SCENARIOS tempest *tox_envlist: scenario*
in the job vars.
TEMPEST_CONCURRENCY tempest *tempest_concurrency: [value]*
in the job vars. This
is available only on
jobs that inherit from
``devstack-tempest``
down.
DEVSTACK_GATE_TEMPEST_NOTESTS tempest *tox_envlist: venv-tempest*
in the job vars. This
will create Tempest
virtual environment
but run no tests.
DEVSTACK_GATE_SMOKE_SERIAL tempest *tox_envlist: smoke-serial*
in the job vars.
DEVSTACK_GATE_TEMPEST_DISABLE_TENANT_ISOLATION tempest *tox_envlist: full-serial*
in the job vars.
*TEMPEST_ALLOW_TENANT_ISOLATION: false*
in devstack_localrc in
the job vars.
============================================== ============= ==================
.. list-table:: **DevStack Gate Flags**
:widths: 20 10 60
:header-rows: 1
* - DevStack gate flag
- Repo
- New implementation
* - OVERRIDE_ZUUL_BRANCH
- zuul
- override-checkout: [branch] in the job definition.
* - DEVSTACK_GATE_NET_OVERLAY
- zuul-jobs
- A bridge called br-infra is set up for all jobs that inherit
from multinode with a dedicated `bridge role
<https://zuul-ci.org/docs/zuul-jobs/general-roles.html#role-multi-node-bridge>`_.
* - DEVSTACK_CINDER_VOLUME_CLEAR
- devstack
- *CINDER_VOLUME_CLEAR: true/false* in devstack_localrc in the
job vars.
* - DEVSTACK_GATE_NEUTRON
- devstack
- True by default. To disable, disable all neutron services in
devstack_services in the job definition.
* - DEVSTACK_GATE_CONFIGDRIVE
- devstack
- *FORCE_CONFIG_DRIVE: true/false* in devstack_localrc in the job
vars.
* - DEVSTACK_GATE_INSTALL_TESTONLY
- devstack
- *INSTALL_TESTONLY_PACKAGES: true/false* in devstack_localrc in
the job vars.
* - DEVSTACK_GATE_VIRT_DRIVER
- devstack
- *VIRT_DRIVER: [virt driver]* in devstack_localrc in the job
vars.
* - DEVSTACK_GATE_LIBVIRT_TYPE
- devstack
- *LIBVIRT_TYPE: [libvirt type]* in devstack_localrc in the job
vars.
* - DEVSTACK_GATE_TEMPEST
- devstack and tempest
- Defined by the job that is used. The ``devstack`` job only runs
devstack. The ``devstack-tempest`` one triggers a Tempest run
as well.
* - DEVSTACK_GATE_TEMPEST_FULL
- tempest
- *tox_envlist: full* in the job vars.
* - DEVSTACK_GATE_TEMPEST_ALL
- tempest
- *tox_envlist: all* in the job vars.
* - DEVSTACK_GATE_TEMPEST_ALL_PLUGINS
- tempest
- *tox_envlist: all-plugin* in the job vars.
* - DEVSTACK_GATE_TEMPEST_SCENARIOS
- tempest
- *tox_envlist: scenario* in the job vars.
* - TEMPEST_CONCURRENCY
- tempest
- *tempest_concurrency: [value]* in the job vars. This is
available only on jobs that inherit from ``devstack-tempest``
down.
* - DEVSTACK_GATE_TEMPEST_NOTESTS
- tempest
- *tox_envlist: venv-tempest* in the job vars. This will create
Tempest virtual environment but run no tests.
* - DEVSTACK_GATE_SMOKE_SERIAL
- tempest
- *tox_envlist: smoke-serial* in the job vars.
* - DEVSTACK_GATE_TEMPEST_DISABLE_TENANT_ISOLATION
- tempest
- *tox_envlist: full-serial* in the job vars.
*TEMPEST_ALLOW_TENANT_ISOLATION: false* in devstack_localrc in
the job vars.
The following flags have not been migrated yet or are legacy and won't be
migrated at all.
===================================== ====== ==========================
DevStack gate flag Status Details
===================================== ====== ==========================
DEVSTACK_GATE_TOPOLOGY WIP The topology depends on the base
job that is used and more
specifically on the nodeset
attached to it. The new job
format allows project to define
the variables to be passed to
every node/node-group that exists
in the topology. Named topologies
that include the nodeset and the
matching variables can be defined
in the form of base jobs.
DEVSTACK_GATE_GRENADE TBD Grenade Zuul V3 jobs will be
hosted in the grenade repo.
GRENADE_BASE_BRANCH TBD Grenade Zuul V3 jobs will be
hosted in the grenade repo.
DEVSTACK_GATE_NEUTRON_DVR TBD Depends on multinode support.
DEVSTACK_GATE_EXERCISES TBD Can be done on request.
DEVSTACK_GATE_IRONIC TBD This will probably be implemented
on ironic side.
DEVSTACK_GATE_IRONIC_DRIVER TBD This will probably be implemented
on ironic side.
DEVSTACK_GATE_IRONIC_BUILD_RAMDISK TBD This will probably be implemented
on ironic side.
DEVSTACK_GATE_POSTGRES Legacy This flag exists in d-g but the
only thing that it does is
capture postgres logs. This is
already supported by the roles in
post, so the flag is useless in
the new jobs. postgres itself can
be enabled via the
devstack_service job variable.
DEVSTACK_GATE_ZEROMQ Legacy This has no effect in d-g.
DEVSTACK_GATE_MQ_DRIVER Legacy This has no effect in d-g.
DEVSTACK_GATE_TEMPEST_STRESS_ARGS Legacy Stress is not in Tempest anymore.
DEVSTACK_GATE_TEMPEST_HEAT_SLOW Legacy This is not used anywhere.
DEVSTACK_GATE_CELLS Legacy This has no effect in d-g.
DEVSTACK_GATE_NOVA_API_METADATA_SPLIT Legacy This has no effect in d-g.
===================================== ====== ==========================
.. list-table:: **Not Migrated DevStack Gate Flags**
:widths: 20 10 60
:header-rows: 1
* - DevStack gate flag
- Status
- Details
* - DEVSTACK_GATE_TOPOLOGY
- WIP
- The topology depends on the base job that is used and more
specifically on the nodeset attached to it. The new job format
allows project to define the variables to be passed to every
node/node-group that exists in the topology. Named topologies
that include the nodeset and the matching variables can be
defined in the form of base jobs.
* - DEVSTACK_GATE_GRENADE
- TBD
- Grenade Zuul V3 jobs will be hosted in the grenade repo.
* - GRENADE_BASE_BRANCH
- TBD
- Grenade Zuul V3 jobs will be hosted in the grenade repo.
* - DEVSTACK_GATE_NEUTRON_DVR
- TBD
- Depends on multinode support.
* - DEVSTACK_GATE_EXERCISES
- TBD
- Can be done on request.
* - DEVSTACK_GATE_IRONIC
- TBD
- This will probably be implemented on ironic side.
* - DEVSTACK_GATE_IRONIC_DRIVER
- TBD
- This will probably be implemented on ironic side.
* - DEVSTACK_GATE_IRONIC_BUILD_RAMDISK
- TBD
- This will probably be implemented on ironic side.
* - DEVSTACK_GATE_POSTGRES
- Legacy
- This flag exists in d-g but the only thing that it does is
capture postgres logs. This is already supported by the roles
in post, so the flag is useless in the new jobs. postgres
itself can be enabled via the devstack_service job variable.
* - DEVSTACK_GATE_ZEROMQ
- Legacy
- This has no effect in d-g.
* - DEVSTACK_GATE_MQ_DRIVER
- Legacy
- This has no effect in d-g.
* - DEVSTACK_GATE_TEMPEST_STRESS_ARGS
- Legacy
- Stress is not in Tempest anymore.
* - DEVSTACK_GATE_TEMPEST_HEAT_SLOW
- Legacy
- This is not used anywhere.
* - DEVSTACK_GATE_CELLS
- Legacy
- This has no effect in d-g.
* - DEVSTACK_GATE_NOVA_API_METADATA_SPLIT
- Legacy
- This has no effect in d-g.
+2 -1
View File
@@ -6,7 +6,7 @@ if is_service_enabled tempest; then
source $TOP_DIR/lib/tempest
elif [[ "$1" == "stack" && "$2" == "install" ]]; then
echo_summary "Installing Tempest"
install_tempest
async_runfunc install_tempest
elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then
# Tempest config must come after layer 2 services are running
:
@@ -17,6 +17,7 @@ if is_service_enabled tempest; then
# local.conf Tempest option overrides
:
elif [[ "$1" == "stack" && "$2" == "test-config" ]]; then
async_wait install_tempest
echo_summary "Initializing Tempest"
configure_tempest
echo_summary "Installing Tempest Plugins"
-25
View File
@@ -1,5 +1,4 @@
Listen %PUBLICPORT%
Listen %ADMINPORT%
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\" %D(us)" keystone_combined
<Directory %KEYSTONE_BIN%>
@@ -20,20 +19,6 @@ LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\" %D(us)"
%SSLKEYFILE%
</VirtualHost>
<VirtualHost *:%ADMINPORT%>
WSGIDaemonProcess keystone-admin processes=3 threads=1 user=%USER% display-name=%{GROUP} %VIRTUALENV%
WSGIProcessGroup keystone-admin
WSGIScriptAlias / %KEYSTONE_BIN%/keystone-wsgi-admin
WSGIApplicationGroup %{GLOBAL}
WSGIPassAuthorization On
ErrorLogFormat "%M"
ErrorLog /var/log/%APACHE_NAME%/keystone.log
CustomLog /var/log/%APACHE_NAME%/keystone_access.log keystone_combined
%SSLENGINE%
%SSLCERTFILE%
%SSLKEYFILE%
</VirtualHost>
%SSLLISTEN%<VirtualHost *:443>
%SSLLISTEN% %SSLENGINE%
%SSLLISTEN% %SSLCERTFILE%
@@ -49,13 +34,3 @@ Alias /identity %KEYSTONE_BIN%/keystone-wsgi-public
WSGIApplicationGroup %{GLOBAL}
WSGIPassAuthorization On
</Location>
Alias /identity_admin %KEYSTONE_BIN%/keystone-wsgi-admin
<Location /identity_admin>
SetHandler wsgi-script
Options +ExecCGI
WSGIProcessGroup keystone-admin
WSGIApplicationGroup %{GLOBAL}
WSGIPassAuthorization On
</Location>
-1
View File
@@ -1 +0,0 @@
debs/
-2
View File
@@ -1,6 +1,4 @@
lvm2
open-iscsi
open-iscsi-utils # Deprecated since quantal dist:precise
qemu-utils
tgt # NOPRIME
thin-provisioning-tools
+2 -2
View File
@@ -1,2 +1,2 @@
dstat
python-psutil
dstat # dist:bionic
pcp
+5 -5
View File
@@ -1,11 +1,11 @@
apache2
apache2-dev
bc
bridge-utils
bsdmainutils
curl
default-jre-headless # NOPRIME
g++
gawk
gcc
gettext # used for compiling message catalogs
git
@@ -14,7 +14,6 @@ iputils-ping
libapache2-mod-proxy-uwsgi
libffi-dev # for pyOpenSSL
libjpeg-dev # Pillow 3.0.0
libmysqlclient-dev # MySQL-python
libpcre3-dev # for python-pcre
libpq-dev # psycopg2
libssl-dev # for pyOpenSSL
@@ -27,9 +26,10 @@ openssh-server
openssl
pkg-config
psmisc
python2.7
python-dev
python-gdbm # needed for testr
python3-dev
python3-pip
python3-systemd
python3-venv
tar
tcpdump
unzip
+1 -1
View File
@@ -2,5 +2,5 @@ libkrb5-dev
libldap2-dev
libsasl2-dev
memcached
python-mysqldb
python3-mysqldb
sqlite3
+1 -1
View File
@@ -1,3 +1,3 @@
ldap-utils
python-ldap
python3-ldap
slapd
+1 -1
View File
@@ -5,7 +5,7 @@ gir1.2-libosinfo-1.0
lvm2 # NOPRIME
netcat-openbsd
open-iscsi
python-guestfs # NOPRIME
python3-guestfs # NOPRIME
qemu-utils
sg3-utils
sysfsutils
+2 -3
View File
@@ -1,15 +1,14 @@
acl
dnsmasq-base
dnsmasq-utils # for dhcp_release only available in dist:precise
dnsmasq-utils # for dhcp_release
ebtables
haproxy # to serve as metadata proxy inside router/dhcp namespaces
iptables
iputils-arping
iputils-ping
libmysqlclient-dev
mysql-server #NOPRIME
postgresql-server-dev-all
python-mysqldb
python3-mysqldb
rabbitmq-server # NOPRIME
radvd # NOPRIME
sqlite3
+3 -9
View File
@@ -1,24 +1,18 @@
conntrack
curl
dnsmasq-base
dnsmasq-utils # for dhcp_release
ebtables
gawk
genisoimage # required for config_drive
iptables
iputils-arping
kpartx
libjs-jquery-tablesorter # Needed for coverage html reports
libmysqlclient-dev
libvirt-bin # dist:xenial NOPRIME
libvirt-clients # not:xenial NOPRIME
libvirt-daemon-system # not:xenial NOPRIME
libvirt-clients # NOPRIME
libvirt-daemon-system # NOPRIME
libvirt-dev # NOPRIME
mysql-server # NOPRIME
parted
pm-utils
python-mysqldb
qemu # dist:wheezy,jessie NOPRIME
python3-mysqldb
qemu-kvm # NOPRIME
rabbitmq-server # NOPRIME
socat # used by ajaxterm
+3
View File
@@ -0,0 +1,3 @@
lsscsi
open-iscsi
open-iscsi-utils # Deprecated since quantal dist:precise
+3
View File
@@ -0,0 +1,3 @@
ovn-central
ovn-controller-vtep
ovn-host
+1
View File
@@ -2,5 +2,6 @@ curl
liberasurecode-dev
make
memcached
rsync
sqlite3
xfsprogs
+1 -1
View File
@@ -1,4 +1,4 @@
dn: olcDatabase={${LDAP_OLCDB_NUMBER}}hdb,cn=config
dn: olcDatabase={${LDAP_OLCDB_NUMBER}}${LDAP_OLCDB_TYPE},cn=config
changetype: modify
replace: olcSuffix
olcSuffix: ${BASE_DN}
+16
View File
@@ -0,0 +1,16 @@
[Unit]
Description=Activate LVM backing file %BACKING_FILE%
DefaultDependencies=no
After=systemd-udev-settle.service
Before=lvm2-activation-early.service
Wants=systemd-udev-settle.service
[Service]
ExecStart=/sbin/losetup --find --show %DIRECTIO% %BACKING_FILE%
ExecStop=/bin/sh -c '/sbin/losetup -d $$(/sbin/losetup --associated %BACKING_FILE% -O NAME -n)'
RemainAfterExit=yes
Type=oneshot
[Install]
WantedBy=local-fs.target
Also=systemd-udev-settle.service
-1
View File
@@ -1,4 +1,3 @@
lvm2
open-iscsi
qemu-tools
tgt # NOPRIME
-1
View File
@@ -1,2 +1 @@
dstat
python-psutil
+2 -2
View File
@@ -1,9 +1,9 @@
apache2
apache2-devel
bc
bridge-utils
ca-certificates-mozilla
curl
gawk
gcc
gcc-c++
git-core
@@ -21,10 +21,10 @@ openssl
pcre-devel # python-pcre
postgresql-devel # psycopg2
psmisc
python3-systemd
python-cmd2 # dist:opensuse-12.3
python-devel # pyOpenSSL
python-xml
systemd-devel # for systemd-python
tar
tcpdump
unzip
-1
View File
@@ -1 +0,0 @@
python-numpy
-1
View File
@@ -1 +0,0 @@
python-numpy
-1
View File
@@ -5,7 +5,6 @@ ebtables
haproxy # to serve as metadata proxy inside router/dhcp namespaces
iptables
iputils
mariadb # NOPRIME
rabbitmq-server # NOPRIME
radvd # NOPRIME
sqlite3
-4
View File
@@ -1,17 +1,13 @@
cdrkit-cdrtools-compat # dist:sle12
conntrack-tools
curl
dnsmasq
dnsmasq-utils # dist:opensuse-12.3,opensuse-13.1
ebtables
gawk
iptables
iputils
kpartx
kvm # NOPRIME
libvirt # NOPRIME
libvirt-python # NOPRIME
mariadb # NOPRIME
# mkisofs is required for config_drive
mkisofs # not:sle12
parted
+2
View File
@@ -0,0 +1,2 @@
lsscsi
open-iscsi
+1 -1
View File
@@ -1,3 +1,3 @@
ceph # NOPRIME
redhat-lsb-core
redhat-lsb-core # not:rhel9
xfsprogs
+1 -3
View File
@@ -1,5 +1,3 @@
iscsi-initiator-utils
lvm2
qemu-img
scsi-target-utils # not:rhel7,f25,f26,f27,f28 NOPRIME
targetcli # dist:rhel7,f25,f26,f27,f28 NOPRIME
targetcli
+1 -2
View File
@@ -1,2 +1 @@
dstat
python-psutil
pcp-system-tools
+7 -8
View File
@@ -1,7 +1,7 @@
bc
bridge-utils
curl
dbus
gawk
gcc
gcc-c++
gettext # used for compiling message catalogs
@@ -9,15 +9,14 @@ git-core
graphviz # needed only for docs
httpd
httpd-devel
iptables-services # NOPRIME f25,f26,f27,f28
java-1.7.0-openjdk-headless # NOPRIME rhel7
java-1.8.0-openjdk-headless # NOPRIME f25,f26,f27,f28
iptables-services
java-1.8.0-openjdk-headless
libffi-devel
libjpeg-turbo-devel # Pillow 3.0.0
libxml2-devel # lxml
libxslt-devel # lxml
libyaml-devel
mariadb-devel # MySQL-python
mod_ssl # required for tls-proxy on centos 9 stream computes
net-tools
openssh-server
openssl
@@ -26,10 +25,10 @@ pcre-devel # for python-pcre
pkgconfig
postgresql-devel # psycopg2
psmisc
pyOpenSSL # version in pip uses too much memory
python-devel
python3-devel
python3-pip
python3-systemd
redhat-rpm-config # missing dep for gcc hardening flags, see rhbz#1217376
systemd-devel # for systemd-python
tar
tcpdump
unzip
+2 -1
View File
@@ -1,9 +1,10 @@
cryptsetup
dosfstools
genisoimage
genisoimage # not:rhel9
iscsi-initiator-utils
libosinfo
lvm2
sg3_utils
# Stuff for diablo volumes
sysfsutils
xorriso # not:rhel8
-1
View File
@@ -1 +0,0 @@
numpy
-1
View File
@@ -1 +0,0 @@
numpy
-2
View File
@@ -5,8 +5,6 @@ ebtables
haproxy # to serve as metadata proxy inside router/dhcp namespaces
iptables
iputils
mysql-devel
mysql-server # NOPRIME
openvswitch # NOPRIME
rabbitmq-server # NOPRIME
radvd # NOPRIME
+3 -10
View File
@@ -1,21 +1,14 @@
conntrack-tools
curl
dnsmasq # for nova-network
dnsmasq-utils # for dhcp_release
ebtables
gawk
genisoimage # required for config_drive
genisoimage # not:rhel9 required for config_drive
iptables
iputils
kernel-modules # dist:f25,f26,f27,f28
kernel-modules
kpartx
libxml2-python
m2crypto
mysql-devel
mysql-server # NOPRIME
numpy # needed by websockify for spice console
parted
polkit
rabbitmq-server # NOPRIME
sqlite
sudo
xorriso # not:rhel8
+2
View File
@@ -0,0 +1,2 @@
iscsi-initiator-utils
lsscsi
+3
View File
@@ -0,0 +1,3 @@
ovn-central
ovn-host
ovn-vtep
+2 -3
View File
@@ -1,8 +1,7 @@
curl
liberasurecode-devel
memcached
pyxattr
rsync-daemon # dist:f25,f26,f27,f28
rsync-daemon
sqlite
xfsprogs
xinetd
xinetd # not:f35,rhel9
+130 -95
View File
@@ -18,8 +18,10 @@ declare -r -g _DEVSTACK_FUNCTIONS=1
FUNC_DIR=$(cd $(dirname "${BASH_SOURCE:-$0}") && pwd)
source ${FUNC_DIR}/functions-common
source ${FUNC_DIR}/inc/ini-config
source ${FUNC_DIR}/inc/meta-config
source ${FUNC_DIR}/inc/python
source ${FUNC_DIR}/inc/rootwrap
source ${FUNC_DIR}/inc/async
# Save trace setting
_XTRACE_FUNCTIONS=$(set +o | grep xtrace)
@@ -76,6 +78,48 @@ function get_extra_file {
fi
}
# Generate image property arguments for OSC
#
# Arguments: properties, one per, like propname=value
#
# Result is --property propname1=value1 --property propname2=value2
function _image_properties_to_arg {
local result=""
for property in $*; do
result+=" --property $property"
done
echo $result
}
# Upload an image to glance using the configured mechanism
#
# Arguments:
# image name
# container format
# disk format
# path to image file
# optional properties (format of propname=value)
#
function _upload_image {
local image_name="$1"
shift
local container="$1"
shift
local disk="$1"
shift
local image="$1"
shift
local properties
local useimport
properties=$(_image_properties_to_arg $*)
if [[ "$GLANCE_USE_IMPORT_WORKFLOW" == "True" ]]; then
useimport="--import"
fi
openstack --os-cloud=devstack-admin --os-region-name="$REGION_NAME" image create "$image_name" --public --container-format "$container" --disk-format "$disk" $useimport $properties < "${image}"
}
# Retrieve an image from a URL and upload into Glance.
# Uses the following variables:
@@ -117,7 +161,7 @@ function upload_image {
# OpenVZ-format images are provided as .tar.gz, but not decompressed prior to loading
if [[ "$image_url" =~ 'openvz' ]]; then
image_name="${image_fname%.tar.gz}"
openstack --os-cloud=devstack-admin --os-region-name="$REGION_NAME" image create "$image_name" --public --container-format ami --disk-format ami < "${image}"
_upload_image "$image_name" ami ami "$image"
return
fi
@@ -231,42 +275,8 @@ function upload_image {
vmdk_adapter_type="${props[1]:-$vmdk_adapter_type}"
vmdk_net_adapter="${props[2]:-$vmdk_net_adapter}"
openstack --os-cloud=devstack-admin --os-region-name="$REGION_NAME" image create "$image_name" --public --container-format bare --disk-format vmdk --property vmware_disktype="$vmdk_disktype" --property vmware_adaptertype="$vmdk_adapter_type" --property hw_vif_model="$vmdk_net_adapter" < "${image}"
return
fi
_upload_image "$image_name" bare vmdk "$image" vmware_disktype="$vmdk_disktype" vmware_adaptertype="$vmdk_adapter_type" hw_vif_model="$vmdk_net_adapter"
# XenServer-vhd-ovf-format images are provided as .vhd.tgz
# and should not be decompressed prior to loading
if [[ "$image_url" =~ '.vhd.tgz' ]]; then
image_name="${image_fname%.vhd.tgz}"
local force_vm_mode=""
if [[ "$image_name" =~ 'cirros' ]]; then
# Cirros VHD image currently only boots in PV mode.
# Nova defaults to PV for all VHD images, but
# the glance setting is needed for booting
# directly from volume.
force_vm_mode="--property vm_mode=xen"
fi
openstack \
--os-cloud=devstack-admin --os-region-name="$REGION_NAME" \
image create \
"$image_name" --public \
--container-format=ovf --disk-format=vhd \
$force_vm_mode < "${image}"
return
fi
# .xen-raw.tgz suggests a Xen capable raw image inside a tgz.
# and should not be decompressed prior to loading.
# Setting metadata, so PV mode is used.
if [[ "$image_url" =~ '.xen-raw.tgz' ]]; then
image_name="${image_fname%.xen-raw.tgz}"
openstack \
--os-cloud=devstack-admin --os-region-name="$REGION_NAME" \
image create \
"$image_name" --public \
--container-format=tgz --disk-format=raw \
--property vm_mode=xen < "${image}"
return
fi
@@ -277,12 +287,7 @@ function upload_image {
die $LINENO "Unknown vm_mode=${vm_mode} for Virtuozzo image"
fi
openstack \
--os-cloud=devstack-admin --os-region-name="$REGION_NAME" \
image create \
"$image_name" --public \
--container-format=bare --disk-format=ploop \
--property vm_mode=$vm_mode < "${image}"
_upload_image "$image_name" bare ploop "$image" vm_mode=$vm_mode
return
fi
@@ -292,6 +297,15 @@ function upload_image {
local container_format=""
local unpack=""
local img_property=""
# NOTE(danms): If we're on libvirt/qemu or libvirt/kvm, set the hw_rng_model
# to libvirt in the image properties.
if [[ "$VIRT_DRIVER" == "libvirt" ]]; then
if [[ "$LIBVIRT_TYPE" == "qemu" || "$LIBVIRT_TYPE" == "kvm" ]]; then
img_property="hw_rng_model=virtio"
fi
fi
case "$image_fname" in
*.tar.gz|*.tgz)
# Extract ami and aki files
@@ -340,6 +354,12 @@ function upload_image {
disk_format=qcow2
container_format=bare
;;
*.qcow2.xz)
image_name=$(basename "$image" ".qcow2.xz")
disk_format=qcow2
container_format=bare
unpack=unxz
;;
*.raw)
image_name=$(basename "$image" ".raw")
disk_format=raw
@@ -363,20 +383,30 @@ function upload_image {
esac
if is_arch "ppc64le" || is_arch "ppc64" || is_arch "ppc"; then
img_property="--property hw_cdrom_bus=scsi --property os_command_line=console=hvc0"
img_property="$img_property hw_cdrom_bus=scsi os_command_line=console=hvc0"
fi
if is_arch "aarch64"; then
img_property="--property hw_machine_type=virt --property hw_cdrom_bus=scsi --property hw_scsi_model=virtio-scsi --property os_command_line='console=ttyAMA0'"
img_property="$img_property hw_machine_type=virt hw_cdrom_bus=scsi hw_scsi_model=virtio-scsi os_command_line='console=ttyAMA0'"
fi
if [ "$container_format" = "bare" ]; then
if [ "$unpack" = "zcat" ]; then
openstack --os-cloud=devstack-admin --os-region-name="$REGION_NAME" image create "$image_name" $img_property --public --container-format=$container_format --disk-format $disk_format < <(zcat --force "${image}")
_upload_image "$image_name" $container_format $disk_format <(zcat --force "$image") $img_property
elif [ "$unpack" = "bunzip2" ]; then
openstack --os-cloud=devstack-admin --os-region-name="$REGION_NAME" image create "$image_name" $img_property --public --container-format=$container_format --disk-format $disk_format < <(bunzip2 -cdk "${image}")
_upload_image "$image_name" $container_format $disk_format <(bunzip2 -cdk "$image") $img_property
elif [ "$unpack" = "unxz" ]; then
# NOTE(brtknr): unxz the file first and cleanup afterwards to
# prevent timeout while Glance tries to upload image (e.g. to Swift).
local tmp_dir
local image_path
tmp_dir=$(mktemp -d)
image_path="$tmp_dir/$image_name"
unxz -cv "${image}" > "$image_path"
_upload_image "$image_name" $container_format $disk_format "$image_path" $img_property
rm -rf $tmp_dir
else
openstack --os-cloud=devstack-admin --os-region-name="$REGION_NAME" image create "$image_name" $img_property --public --container-format=$container_format --disk-format $disk_format < "${image}"
_upload_image "$image_name" $container_format $disk_format "$image" $img_property
fi
else
# Use glance client to add the kernel the root filesystem.
@@ -384,12 +414,12 @@ function upload_image {
# kernel for use when uploading the root filesystem.
local kernel_id="" ramdisk_id="";
if [ -n "$kernel" ]; then
kernel_id=$(openstack --os-cloud=devstack-admin --os-region-name="$REGION_NAME" image create "$image_name-kernel" $img_property --public --container-format aki --disk-format aki < "$kernel" | grep ' id ' | get_field 2)
kernel_id=$(openstack --os-cloud=devstack-admin --os-region-name="$REGION_NAME" image create "$image_name-kernel" $(_image_properties_to_arg $img_property) --public --container-format aki --disk-format aki < "$kernel" -f value -c id)
fi
if [ -n "$ramdisk" ]; then
ramdisk_id=$(openstack --os-cloud=devstack-admin --os-region-name="$REGION_NAME" image create "$image_name-ramdisk" $img_property --public --container-format ari --disk-format ari < "$ramdisk" | grep ' id ' | get_field 2)
ramdisk_id=$(openstack --os-cloud=devstack-admin --os-region-name="$REGION_NAME" image create "$image_name-ramdisk" $(_image_properties_to_arg $img_property) --public --container-format ari --disk-format ari < "$ramdisk" -f value -c id)
fi
openstack --os-cloud=devstack-admin --os-region-name="$REGION_NAME" image create "${image_name%.img}" $img_property --public --container-format ami --disk-format ami ${kernel_id:+--property kernel_id=$kernel_id} ${ramdisk_id:+--property ramdisk_id=$ramdisk_id} < "${image}"
_upload_image "${image_name%.img}" ami ami "$image" ${kernel_id:+ kernel_id=$kernel_id} ${ramdisk_id:+ ramdisk_id=$ramdisk_id} $img_property
fi
}
@@ -469,7 +499,7 @@ EOF
# ping check
# Uses globals ``ENABLED_SERVICES``, ``TOP_DIR``, ``MULTI_HOST``, ``PRIVATE_NETWORK``
# Uses globals ``ENABLED_SERVICES``, ``TOP_DIR``, ``PRIVATE_NETWORK``
# ping_check <ip> [boot-timeout] [from_net] [expected]
function ping_check {
local ip=$1
@@ -483,12 +513,9 @@ function ping_check {
# if we don't specify a from_net we're expecting things to work
# fine from our local box.
if [[ -n "$from_net" ]]; then
# TODO(stephenfin): Is there any way neutron could be disabled now?
if is_service_enabled neutron; then
ping_cmd="$TOP_DIR/tools/ping_neutron.sh $from_net"
elif [[ "$MULTI_HOST" = "True" && "$from_net" = "$PRIVATE_NETWORK_NAME" ]]; then
# there is no way to address the multihost / private case, bail here for compatibility.
# TODO: remove this cruft and redo code to handle this at the caller level.
return
fi
fi
@@ -637,40 +664,29 @@ function vercmp {
# This sets up defaults we like in devstack for logging for tracking
# down issues, and makes sure everything is done the same between
# projects.
# NOTE(jh): Historically this function switched between three different
# functions: setup_systemd_logging, setup_colorized_logging and
# setup_standard_logging_identity. Since we always run with systemd now,
# this could be cleaned up, but the other functions may still be in use
# by plugins. Since deprecations haven't worked in the past, we'll just
# leave them in place.
function setup_logging {
local conf_file=$1
local other_cond=${2:-"False"}
if [[ "$USE_SYSTEMD" == "True" ]]; then
setup_systemd_logging $conf_file
elif [ "$LOG_COLOR" == "True" ] && [ "$SYSLOG" == "False" ] && [ "$other_cond" == "False" ]; then
setup_colorized_logging $conf_file
else
setup_standard_logging_identity $conf_file
fi
setup_systemd_logging $1
}
# This function sets log formatting options for colorizing log
# output to stdout. It is meant to be called by lib modules.
# The last two parameters are optional and can be used to specify
# non-default value for project and user format variables.
# Defaults are respectively 'project_name' and 'user_name'
#
# setup_colorized_logging something.conf SOMESECTION
function setup_colorized_logging {
local conf_file=$1
local conf_section="DEFAULT"
local project_var="project_name"
local user_var="user_name"
# Add color to logging output
iniset $conf_file $conf_section logging_context_format_string "%(asctime)s.%(msecs)03d %(color)s%(levelname)s %(name)s [%(request_id)s %("$project_var")s %("$user_var")s%(color)s] %(instance)s%(color)s%(message)s"
iniset $conf_file $conf_section logging_default_format_string "%(asctime)s.%(msecs)03d %(color)s%(levelname)s %(name)s [-%(color)s] %(instance)s%(color)s%(message)s"
iniset $conf_file $conf_section logging_debug_format_suffix "from (pid=%(process)d) %(funcName)s %(pathname)s:%(lineno)d"
iniset $conf_file $conf_section logging_exception_prefix "%(color)s%(asctime)s.%(msecs)03d TRACE %(name)s %(instance)s"
iniset $conf_file DEFAULT logging_context_format_string "%(asctime)s.%(msecs)03d %(color)s%(levelname)s %(name)s [%(request_id)s %(project_name)s %(user_name)s%(color)s] %(instance)s%(color)s%(message)s"
iniset $conf_file DEFAULT logging_default_format_string "%(asctime)s.%(msecs)03d %(color)s%(levelname)s %(name)s [-%(color)s] %(instance)s%(color)s%(message)s"
iniset $conf_file DEFAULT logging_debug_format_suffix "from (pid=%(process)d) %(funcName)s %(pathname)s:%(lineno)d"
iniset $conf_file DEFAULT logging_exception_prefix "%(color)s%(asctime)s.%(msecs)03d TRACE %(name)s %(instance)s"
}
function setup_systemd_logging {
local conf_file=$1
local conf_section="DEFAULT"
# NOTE(sdague): this is a nice to have, and means we're using the
# native systemd path, which provides for things like search on
# request-id. However, there may be an eventlet interaction here,
@@ -678,16 +694,16 @@ function setup_systemd_logging {
USE_JOURNAL=$(trueorfalse False USE_JOURNAL)
local pidstr=""
if [[ "$USE_JOURNAL" == "True" ]]; then
iniset $conf_file $conf_section use_journal "True"
iniset $conf_file DEFAULT use_journal "True"
# if we are using the journal directly, our process id is already correct
else
pidstr="(pid=%(process)d) "
fi
iniset $conf_file $conf_section logging_debug_format_suffix "{{${pidstr}%(funcName)s %(pathname)s:%(lineno)d}}"
iniset $conf_file DEFAULT logging_debug_format_suffix "{{${pidstr}%(funcName)s %(pathname)s:%(lineno)d}}"
iniset $conf_file $conf_section logging_context_format_string "%(color)s%(levelname)s %(name)s [%(global_request_id)s %(request_id)s %(project_name)s %(user_name)s%(color)s] %(instance)s%(color)s%(message)s"
iniset $conf_file $conf_section logging_default_format_string "%(color)s%(levelname)s %(name)s [-%(color)s] %(instance)s%(color)s%(message)s"
iniset $conf_file $conf_section logging_exception_prefix "ERROR %(name)s %(instance)s"
iniset $conf_file DEFAULT logging_context_format_string "%(color)s%(levelname)s %(name)s [%(global_request_id)s %(request_id)s %(project_name)s %(user_name)s%(color)s] %(instance)s%(color)s%(message)s"
iniset $conf_file DEFAULT logging_default_format_string "%(color)s%(levelname)s %(name)s [-%(color)s] %(instance)s%(color)s%(message)s"
iniset $conf_file DEFAULT logging_exception_prefix "ERROR %(name)s %(instance)s"
}
function setup_standard_logging_identity {
@@ -711,23 +727,22 @@ if ! function_exists echo_nolog; then
fi
# create_disk - Create backing disk
# create_disk - Create, configure, and mount a backing disk
function create_disk {
local node_number
local disk_image=${1}
local storage_data_dir=${2}
local loopback_disk_size=${3}
local key
# Create a loopback disk and format it to XFS.
if [[ -e ${disk_image} ]]; then
if egrep -q ${storage_data_dir} /proc/mounts; then
sudo umount ${storage_data_dir}
sudo rm -f ${disk_image}
fi
fi
key=$(echo $disk_image | sed 's#/.##')
key="devstack-$key"
sudo mkdir -p ${storage_data_dir}/drives/images
destroy_disk $disk_image $storage_data_dir
# Create an empty file of the correct size (and ensure the
# directory structure up to that path exists)
sudo mkdir -p $(dirname ${disk_image})
sudo truncate -s ${loopback_disk_size} ${disk_image}
# Make a fresh XFS filesystem. Use bigger inodes so xattr can fit in
@@ -737,11 +752,31 @@ function create_disk {
# Swift and Ceph.
sudo mkfs.xfs -f -i size=1024 ${disk_image}
# Mount the disk with mount options to make it as efficient as possible
if ! egrep -q ${storage_data_dir} /proc/mounts; then
sudo mount -t xfs -o loop,noatime,nodiratime,logbufs=8 \
${disk_image} ${storage_data_dir}
# Install a new loopback fstab entry for this disk image, and mount it
echo "$disk_image $storage_data_dir xfs loop,noatime,nodiratime,logbufs=8,comment=$key 0 0" | sudo tee -a /etc/fstab
sudo mkdir -p $storage_data_dir
sudo mount -v $storage_data_dir
}
# Unmount, de-configure, and destroy a backing disk
function destroy_disk {
local disk_image=$1
local storage_data_dir=$2
local key
key=$(echo $disk_image | sed 's#/.##')
key="devstack-$key"
# Unmount the target, if mounted
if egrep -q $storage_data_dir /proc/mounts; then
sudo umount $storage_data_dir
fi
# Clear any fstab rules
sudo sed -i '/.*comment=$key.*/ d' /etc/fstab
# Delete the file
sudo rm -f $disk_image
}
+255 -119
View File
@@ -27,7 +27,6 @@
# - ``RECLONE``
# - ``REQUIREMENTS_DIR``
# - ``STACK_USER``
# - ``TRACK_DEPENDS``
# - ``http_proxy``, ``https_proxy``, ``no_proxy``
#
@@ -44,14 +43,13 @@ declare -A -g GITREPO
declare -A -g GITBRANCH
declare -A -g GITDIR
TRACK_DEPENDS=${TRACK_DEPENDS:-False}
KILL_PATH="$(which kill)"
# Save these variables to .stackenv
STACK_ENV_VARS="BASE_SQL_CONN DATA_DIR DEST ENABLED_SERVICES HOST_IP \
KEYSTONE_AUTH_URI KEYSTONE_SERVICE_URI \
KEYSTONE_SERVICE_URI \
LOGFILE OS_CACERT SERVICE_HOST STACK_USER TLS_IP \
HOST_IPV6 SERVICE_IP_VERSION"
HOST_IPV6 SERVICE_IP_VERSION TUNNEL_ENDPOINT_IP TUNNEL_IP_VERSION"
# Saves significant environment variables to .stackenv for later use
@@ -87,7 +85,7 @@ function write_clouds_yaml {
if [ -f "$SSL_BUNDLE_FILE" ]; then
CA_CERT_ARG="--os-cacert $SSL_BUNDLE_FILE"
fi
# demo -> devstack
# devstack: user with the member role on demo project
$PYTHON $TOP_DIR/tools/update_clouds_yaml.py \
--file $CLOUDS_YAML \
--os-cloud devstack \
@@ -98,18 +96,7 @@ function write_clouds_yaml {
--os-password $ADMIN_PASSWORD \
--os-project-name demo
# alt_demo -> devstack-alt
$PYTHON $TOP_DIR/tools/update_clouds_yaml.py \
--file $CLOUDS_YAML \
--os-cloud devstack-alt \
--os-region-name $REGION_NAME \
$CA_CERT_ARG \
--os-auth-url $KEYSTONE_SERVICE_URI \
--os-username alt_demo \
--os-password $ADMIN_PASSWORD \
--os-project-name alt_demo
# admin -> devstack-admin
# devstack-admin: user with the admin role on the admin project
$PYTHON $TOP_DIR/tools/update_clouds_yaml.py \
--file $CLOUDS_YAML \
--os-cloud devstack-admin \
@@ -120,7 +107,62 @@ function write_clouds_yaml {
--os-password $ADMIN_PASSWORD \
--os-project-name admin
# admin with a system-scoped token -> devstack-system
# devstack-admin-demo: user with the admin role on the demo project
$PYTHON $TOP_DIR/tools/update_clouds_yaml.py \
--file $CLOUDS_YAML \
--os-cloud devstack-admin-demo \
--os-region-name $REGION_NAME \
$CA_CERT_ARG \
--os-auth-url $KEYSTONE_SERVICE_URI \
--os-username admin \
--os-password $ADMIN_PASSWORD \
--os-project-name demo
# devstack-alt: user with the member role on alt_demo project
$PYTHON $TOP_DIR/tools/update_clouds_yaml.py \
--file $CLOUDS_YAML \
--os-cloud devstack-alt \
--os-region-name $REGION_NAME \
$CA_CERT_ARG \
--os-auth-url $KEYSTONE_SERVICE_URI \
--os-username alt_demo \
--os-password $ADMIN_PASSWORD \
--os-project-name alt_demo
# devstack-alt-member: user with the member role on alt_demo project
$PYTHON $TOP_DIR/tools/update_clouds_yaml.py \
--file $CLOUDS_YAML \
--os-cloud devstack-alt-member \
--os-region-name $REGION_NAME \
$CA_CERT_ARG \
--os-auth-url $KEYSTONE_SERVICE_URI \
--os-username alt_demo_member \
--os-password $ADMIN_PASSWORD \
--os-project-name alt_demo
# devstack-alt-reader: user with the reader role on alt_demo project
$PYTHON $TOP_DIR/tools/update_clouds_yaml.py \
--file $CLOUDS_YAML \
--os-cloud devstack-alt-reader \
--os-region-name $REGION_NAME \
$CA_CERT_ARG \
--os-auth-url $KEYSTONE_SERVICE_URI \
--os-username alt_demo_reader \
--os-password $ADMIN_PASSWORD \
--os-project-name alt_demo
# devstack-reader: user with the reader role on demo project
$PYTHON $TOP_DIR/tools/update_clouds_yaml.py \
--file $CLOUDS_YAML \
--os-cloud devstack-reader \
--os-region-name $REGION_NAME \
$CA_CERT_ARG \
--os-auth-url $KEYSTONE_SERVICE_URI \
--os-username demo_reader \
--os-password $ADMIN_PASSWORD \
--os-project-name demo
# devstack-system-admin: user with the admin role on the system
$PYTHON $TOP_DIR/tools/update_clouds_yaml.py \
--file $CLOUDS_YAML \
--os-cloud devstack-system-admin \
@@ -131,6 +173,33 @@ function write_clouds_yaml {
--os-password $ADMIN_PASSWORD \
--os-system-scope all
# devstack-system-member: user with the member role on the system
$PYTHON $TOP_DIR/tools/update_clouds_yaml.py \
--file $CLOUDS_YAML \
--os-cloud devstack-system-member \
--os-region-name $REGION_NAME \
$CA_CERT_ARG \
--os-auth-url $KEYSTONE_SERVICE_URI \
--os-username system_member \
--os-password $ADMIN_PASSWORD \
--os-system-scope all
# devstack-system-reader: user with the reader role on the system
$PYTHON $TOP_DIR/tools/update_clouds_yaml.py \
--file $CLOUDS_YAML \
--os-cloud devstack-system-reader \
--os-region-name $REGION_NAME \
$CA_CERT_ARG \
--os-auth-url $KEYSTONE_SERVICE_URI \
--os-username system_reader \
--os-password $ADMIN_PASSWORD \
--os-system-scope all
cat >> $CLOUDS_YAML <<EOF
functional:
image_name: $DEFAULT_IMAGE_NAME
EOF
# CLean up any old clouds.yaml files we had laying around
rm -f $(eval echo ~"$STACK_USER")/.config/openstack/clouds.yaml
}
@@ -331,9 +400,6 @@ function _ensure_lsb_release {
sudo zypper -n install lsb-release
elif [[ -x $(command -v dnf 2>/dev/null) ]]; then
sudo dnf install -y redhat-lsb-core
elif [[ -x $(command -v yum 2>/dev/null) ]]; then
# all rh patforms (fedora, centos, rhel) have this pkg
sudo yum install -y redhat-lsb-core
else
die $LINENO "Unable to find or auto-install lsb_release"
fi
@@ -346,14 +412,21 @@ function _ensure_lsb_release {
# - os_VENDOR
# - os_PACKAGE
function GetOSVersion {
# We only support distros that provide a sane lsb_release
_ensure_lsb_release
# CentOS Stream 9 does not provide lsb_release
source /etc/os-release
if [[ "${ID}${VERSION}" == "centos9" ]]; then
os_RELEASE=${VERSION_ID}
os_CODENAME="n/a"
os_VENDOR=$(echo $NAME | tr -d '[:space:]')
else
_ensure_lsb_release
os_RELEASE=$(lsb_release -r -s)
os_CODENAME=$(lsb_release -c -s)
os_VENDOR=$(lsb_release -i -s)
os_RELEASE=$(lsb_release -r -s)
os_CODENAME=$(lsb_release -c -s)
os_VENDOR=$(lsb_release -i -s)
fi
if [[ $os_VENDOR =~ (Debian|Ubuntu|LinuxMint) ]]; then
if [[ $os_VENDOR =~ (Debian|Ubuntu) ]]; then
os_PACKAGE="deb"
else
os_PACKAGE="rpm"
@@ -371,9 +444,8 @@ declare -g DISTRO
function GetDistro {
GetOSVersion
if [[ "$os_VENDOR" =~ (Ubuntu) || "$os_VENDOR" =~ (Debian) || \
"$os_VENDOR" =~ (LinuxMint) ]]; then
# 'Everyone' refers to Ubuntu / Debian / Mint releases by
if [[ "$os_VENDOR" =~ (Ubuntu) || "$os_VENDOR" =~ (Debian) ]]; then
# 'Everyone' refers to Ubuntu / Debian releases by
# the code name adjective
DISTRO=$os_CODENAME
elif [[ "$os_VENDOR" =~ (Fedora) ]]; then
@@ -391,14 +463,13 @@ function GetDistro {
DISTRO="sle${os_RELEASE%.*}"
elif [[ "$os_VENDOR" =~ (Red.*Hat) || \
"$os_VENDOR" =~ (CentOS) || \
"$os_VENDOR" =~ (AlmaLinux) || \
"$os_VENDOR" =~ (Scientific) || \
"$os_VENDOR" =~ (OracleServer) || \
"$os_VENDOR" =~ (Virtuozzo) ]]; then
# Drop the . release as we assume it's compatible
# XXX re-evaluate when we get RHEL10
DISTRO="rhel${os_RELEASE::1}"
elif [[ "$os_VENDOR" =~ (XenServer) ]]; then
DISTRO="xs${os_RELEASE%.*}"
else
# We can't make a good choice here. Setting a sensible DISTRO
# is part of the problem, but not the major issue -- we really
@@ -451,8 +522,10 @@ function is_fedora {
[ "$os_VENDOR" = "Fedora" ] || [ "$os_VENDOR" = "Red Hat" ] || \
[ "$os_VENDOR" = "RedHatEnterpriseServer" ] || \
[ "$os_VENDOR" = "CentOS" ] || [ "$os_VENDOR" = "OracleServer" ] || \
[ "$os_VENDOR" = "Virtuozzo" ]
[ "$os_VENDOR" = "RedHatEnterprise" ] || \
[ "$os_VENDOR" = "CentOS" ] || [ "$os_VENDOR" = "CentOSStream" ] || \
[ "$os_VENDOR" = "AlmaLinux" ] || \
[ "$os_VENDOR" = "OracleServer" ] || [ "$os_VENDOR" = "Virtuozzo" ]
}
@@ -497,7 +570,6 @@ function is_ubuntu {
[ "$os_PACKAGE" = "deb" ]
}
# Git Functions
# =============
@@ -548,7 +620,7 @@ function git_clone {
if [[ "$ERROR_ON_CLONE" = "True" ]]; then
echo "The $git_dest project was not found; if this is a gate job, add"
echo "the project to 'required-projects' in the job definition."
die $LINENO "Cloning not allowed in this configuration"
die $LINENO "ERROR_ON_CLONE is set to True so cloning not allowed in this configuration"
fi
git_timed clone $git_clone_flags $git_remote $git_dest
fi
@@ -560,10 +632,12 @@ function git_clone {
if [[ "$ERROR_ON_CLONE" = "True" ]]; then
echo "The $git_dest project was not found; if this is a gate job, add"
echo "the project to the \$PROJECTS variable in the job definition."
die $LINENO "Cloning not allowed in this configuration"
die $LINENO "ERROR_ON_CLONE is set to True so cloning not allowed in this configuration"
fi
# '--branch' can also take tags
git_timed clone $git_clone_flags $git_remote $git_dest --branch $git_ref
git_timed clone --no-checkout $git_clone_flags $git_remote $git_dest
cd $git_dest
git_timed fetch $git_clone_flags origin $git_ref
git_timed checkout FETCH_HEAD
elif [[ "$RECLONE" = "True" ]]; then
# if it does exist then simulate what clone does if asked to RECLONE
cd $git_dest
@@ -573,7 +647,7 @@ function git_clone {
# remove the existing ignored files (like pyc) as they cause breakage
# (due to the py files having older timestamps than our pyc, so python
# thinks the pyc files are correct using them)
find $git_dest -name '*.pyc' -delete
sudo find $git_dest -name '*.pyc' -delete
# handle git_ref accordingly to type (tag, branch)
if [[ -n "`git show-ref refs/tags/$git_ref`" ]]; then
@@ -589,6 +663,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
@@ -794,10 +880,10 @@ function get_or_create_domain {
# Gets domain id
domain_id=$(
# Gets domain id
openstack domain show $1 \
openstack --os-cloud devstack-system-admin domain show $1 \
-f value -c id 2>/dev/null ||
# Creates new domain
openstack domain create $1 \
openstack --os-cloud devstack-system-admin domain create $1 \
--description "$2" \
-f value -c id
)
@@ -812,7 +898,7 @@ function get_or_create_group {
# Gets group id
group_id=$(
# Creates new group with --or-show
openstack group create $1 \
openstack --os-cloud devstack-system-admin group create $1 \
--domain $2 --description "$desc" --or-show \
-f value -c id
)
@@ -831,7 +917,7 @@ function get_or_create_user {
# Gets user id
user_id=$(
# Creates new user with --or-show
openstack user create \
openstack --os-cloud devstack-system-admin user create \
$1 \
--password "$2" \
--domain=$3 \
@@ -848,7 +934,7 @@ function get_or_create_project {
local project_id
project_id=$(
# Creates new project with --or-show
openstack project create $1 \
openstack --os-cloud devstack-system-admin project create $1 \
--domain=$2 \
--or-show -f value -c id
)
@@ -861,7 +947,7 @@ function get_or_create_role {
local role_id
role_id=$(
# Creates role with --or-show
openstack role create $1 \
openstack --os-cloud devstack-system-admin role create $1 \
--or-show -f value -c id
)
echo $role_id
@@ -891,7 +977,7 @@ function get_or_add_user_project_role {
domain_args=$(_get_domain_args $4 $5)
# Gets user role id
user_role_id=$(openstack role assignment list \
user_role_id=$(openstack --os-cloud devstack-system-admin role assignment list \
--role $1 \
--user $2 \
--project $3 \
@@ -899,11 +985,11 @@ function get_or_add_user_project_role {
| grep '^|\s[a-f0-9]\+' | get_field 1)
if [[ -z "$user_role_id" ]]; then
# Adds role to user and get it
openstack role add $1 \
openstack --os-cloud devstack-system-admin role add $1 \
--user $2 \
--project $3 \
$domain_args
user_role_id=$(openstack role assignment list \
user_role_id=$(openstack --os-cloud devstack-system-admin role assignment list \
--role $1 \
--user $2 \
--project $3 \
@@ -918,17 +1004,17 @@ function get_or_add_user_project_role {
function get_or_add_user_domain_role {
local user_role_id
# Gets user role id
user_role_id=$(openstack role assignment list \
user_role_id=$(openstack --os-cloud devstack-system-admin role assignment list \
--role $1 \
--user $2 \
--domain $3 \
| grep '^|\s[a-f0-9]\+' | get_field 1)
if [[ -z "$user_role_id" ]]; then
# Adds role to user and get it
openstack role add $1 \
openstack --os-cloud devstack-system-admin role add $1 \
--user $2 \
--domain $3
user_role_id=$(openstack role assignment list \
user_role_id=$(openstack --os-cloud devstack-system-admin role assignment list \
--role $1 \
--user $2 \
--domain $3 \
@@ -937,22 +1023,53 @@ function get_or_add_user_domain_role {
echo $user_role_id
}
# Gets or adds user role to system
# Usage: get_or_add_user_system_role <role> <user> <system> [<user_domain>]
function get_or_add_user_system_role {
local user_role_id
local domain_args
domain_args=$(_get_domain_args $4)
# Gets user role id
user_role_id=$(openstack --os-cloud devstack-system-admin role assignment list \
--role $1 \
--user $2 \
--system $3 \
$domain_args \
-f value -c Role)
if [[ -z "$user_role_id" ]]; then
# Adds role to user and get it
openstack --os-cloud devstack-system-admin role add $1 \
--user $2 \
--system $3 \
$domain_args
user_role_id=$(openstack --os-cloud devstack-system-admin role assignment list \
--role $1 \
--user $2 \
--system $3 \
$domain_args \
-f value -c Role)
fi
echo $user_role_id
}
# Gets or adds group role to project
# Usage: get_or_add_group_project_role <role> <group> <project>
function get_or_add_group_project_role {
local group_role_id
# Gets group role id
group_role_id=$(openstack role assignment list \
group_role_id=$(openstack --os-cloud devstack-system-admin role assignment list \
--role $1 \
--group $2 \
--project $3 \
-f value)
if [[ -z "$group_role_id" ]]; then
# Adds role to group and get it
openstack role add $1 \
openstack --os-cloud devstack-system-admin role add $1 \
--group $2 \
--project $3
group_role_id=$(openstack role assignment list \
group_role_id=$(openstack --os-cloud devstack-system-admin role assignment list \
--role $1 \
--group $2 \
--project $3 \
@@ -968,9 +1085,9 @@ function get_or_create_service {
# Gets service id
service_id=$(
# Gets service id
openstack service show $2 -f value -c id 2>/dev/null ||
openstack --os-cloud devstack-system-admin service show $2 -f value -c id 2>/dev/null ||
# Creates new service if not exists
openstack service create \
openstack --os-cloud devstack-system-admin service create \
$2 \
--name $1 \
--description="$3" \
@@ -983,14 +1100,14 @@ function get_or_create_service {
# Usage: _get_or_create_endpoint_with_interface <service> <interface> <url> <region>
function _get_or_create_endpoint_with_interface {
local endpoint_id
endpoint_id=$(openstack endpoint list \
endpoint_id=$(openstack --os-cloud devstack-system-admin endpoint list \
--service $1 \
--interface $2 \
--region $4 \
-c ID -f value)
if [[ -z "$endpoint_id" ]]; then
# Creates new endpoint
endpoint_id=$(openstack endpoint create \
endpoint_id=$(openstack --os-cloud devstack-system-admin endpoint create \
$1 $2 $3 --region $4 -f value -c id)
fi
@@ -1024,7 +1141,7 @@ function get_or_create_endpoint {
# Get a URL from the identity service
# Usage: get_endpoint_url <service> <interface>
function get_endpoint_url {
echo $(openstack endpoint list \
echo $(openstack --os-cloud devstack-system-admin endpoint list \
--service $1 --interface $2 \
-c URL -f value)
}
@@ -1038,6 +1155,11 @@ function is_ironic_hardware {
return 1
}
function is_ironic_enforce_scope {
is_service_enabled ironic && [[ "$IRONIC_ENFORCE_SCOPE" == "True" || "$ENFORCE_SCOPE" == "True" ]] && return 0
return 1
}
# Package Functions
# =================
@@ -1219,10 +1341,16 @@ function get_packages {
if [[ ! $file_to_parse =~ $package_dir/glance ]]; then
file_to_parse="${file_to_parse} ${package_dir}/glance"
fi
if [[ ! $file_to_parse =~ $package_dir/os-brick ]]; then
file_to_parse="${file_to_parse} ${package_dir}/os-brick"
fi
elif [[ $service == c-* ]]; then
if [[ ! $file_to_parse =~ $package_dir/cinder ]]; then
file_to_parse="${file_to_parse} ${package_dir}/cinder"
fi
if [[ ! $file_to_parse =~ $package_dir/os-brick ]]; then
file_to_parse="${file_to_parse} ${package_dir}/os-brick"
fi
elif [[ $service == s-* ]]; then
if [[ ! $file_to_parse =~ $package_dir/swift ]]; then
file_to_parse="${file_to_parse} ${package_dir}/swift"
@@ -1231,6 +1359,9 @@ function get_packages {
if [[ ! $file_to_parse =~ $package_dir/nova ]]; then
file_to_parse="${file_to_parse} ${package_dir}/nova"
fi
if [[ ! $file_to_parse =~ $package_dir/os-brick ]]; then
file_to_parse="${file_to_parse} ${package_dir}/os-brick"
fi
elif [[ $service == g-* ]]; then
if [[ ! $file_to_parse =~ $package_dir/glance ]]; then
file_to_parse="${file_to_parse} ${package_dir}/glance"
@@ -1275,6 +1406,30 @@ function get_plugin_packages {
$xtrace
}
# Search plugins for a bindep.txt file
#
# Uses globals ``BINDEP_CMD``, ``GITDIR``, ``DEVSTACK_PLUGINS``
#
# Note this is only valid after BINDEP_CMD is setup in stack.sh, and
# is thus not really intended to be called externally.
function _get_plugin_bindep_packages {
local xtrace
xtrace=$(set +o | grep xtrace)
set +o xtrace
local bindep_file
local packages
for plugin in ${DEVSTACK_PLUGINS//,/ }; do
bindep_file=${GITDIR[$plugin]}/devstack/files/bindep.txt
if [[ -f ${bindep_file} ]]; then
packages+=$($BINDEP_CMD -b --file ${bindep_file} || true)
fi
done
echo "${packages}"
$xtrace
}
# Distro-agnostic package installer
# Uses globals ``NO_UPDATE_REPOS``, ``REPOS_UPDATED``, ``RETRY_UPDATE``
# install_package package [package ...]
@@ -1339,7 +1494,7 @@ function uninstall_package {
if is_ubuntu; then
apt_get purge "$@"
elif is_fedora; then
sudo ${YUM:-yum} remove -y "$@" ||:
sudo dnf remove -y "$@" ||:
elif is_suse; then
sudo zypper remove -y "$@" ||:
else
@@ -1347,8 +1502,11 @@ function uninstall_package {
fi
}
# Wrapper for ``yum`` to set proxy environment variables
# Uses globals ``OFFLINE``, ``*_proxy``, ``YUM``
# Wrapper for ``dnf`` to set proxy environment variables
# Uses globals ``OFFLINE``, ``*_proxy``
# The name is kept for backwards compatability with external
# callers, despite none of our supported platforms using yum
# any more.
# yum_install package [package ...]
function yum_install {
local result parse_yum_result
@@ -1356,44 +1514,8 @@ function yum_install {
[[ "$OFFLINE" = "True" ]] && return
time_start "yum_install"
# This is a bit tricky, because yum -y assumes missing or failed
# packages are OK (see [1]). We want devstack to stop if we are
# installing missing packages.
#
# Thus we manually match on the output (stack.sh runs in a fixed
# locale, so lang shouldn't change).
#
# If yum returns !0, we echo the result as "YUM_FAILED" and return
# that from the awk (we're subverting -e with this trick).
# Otherwise we use awk to look for failure strings and return "2"
# to indicate a terminal failure.
#
# [1] https://bugzilla.redhat.com/show_bug.cgi?id=965567
parse_yum_result=' \
BEGIN { result=0 } \
/^YUM_FAILED/ { result=$2 } \
/^No package/ { result=2 } \
/^Failed:/ { result=2 } \
//{ print } \
END { exit result }'
(sudo_with_proxies "${YUM:-yum}" install -y "$@" 2>&1 || echo YUM_FAILED $?) \
| awk "$parse_yum_result" && result=$? || result=$?
sudo_with_proxies dnf install -y "$@"
time_stop "yum_install"
# if we return 1, then the wrapper functions will run an update
# and try installing the package again as a defense against bad
# mirrors. This can hide failures, especially when we have
# packages that are in the "Failed:" section because their rpm
# install scripts failed to run correctly (in this case, the
# package looks installed, so when the retry happens we just think
# the package is OK, and incorrectly continue on).
if [ "$result" == 2 ]; then
die "Detected fatal package install failure"
fi
return "$result"
}
# zypper wrapper to set arguments correctly
@@ -1421,7 +1543,8 @@ function install_bindep {
local pkgs
if [[ ! -f $file ]]; then
die $LINENO "Can not find bindep file: $file"
warn $LINENO "Can not find bindep file: $file"
return
fi
# converting here makes it much easier to work with passing
@@ -1442,6 +1565,7 @@ function write_user_unit_file {
local command="$2"
local group=$3
local user=$4
local env_vars="$5"
local extra=""
if [[ -n "$group" ]]; then
extra="Group=$group"
@@ -1455,6 +1579,9 @@ function write_user_unit_file {
iniset -sudo $unitfile "Service" "KillMode" "process"
iniset -sudo $unitfile "Service" "TimeoutStopSec" "300"
iniset -sudo $unitfile "Service" "ExecReload" "$KILL_PATH -HUP \$MAINPID"
if [[ -n "$env_vars" ]] ; then
iniset -sudo $unitfile "Service" "Environment" "$env_vars"
fi
if [[ -n "$group" ]]; then
iniset -sudo $unitfile "Service" "Group" "$group"
fi
@@ -1469,6 +1596,7 @@ function write_uwsgi_user_unit_file {
local command="$2"
local group=$3
local user=$4
local env_vars="$5"
local unitfile="$SYSTEMD_DIR/$service"
mkdir -p $SYSTEMD_DIR
@@ -1483,6 +1611,9 @@ function write_uwsgi_user_unit_file {
iniset -sudo $unitfile "Service" "NotifyAccess" "all"
iniset -sudo $unitfile "Service" "RestartForceExitStatus" "100"
if [[ -n "$env_vars" ]] ; then
iniset -sudo $unitfile "Service" "Environment" "$env_vars"
fi
if [[ -n "$group" ]]; then
iniset -sudo $unitfile "Service" "Group" "$group"
fi
@@ -1530,10 +1661,14 @@ function _run_under_systemd {
local systemd_service="devstack@$service.service"
local group=$3
local user=${4:-$STACK_USER}
if [[ -z "$user" ]]; then
user=$STACK_USER
fi
local env_vars="$5"
if [[ "$command" =~ "uwsgi" ]] ; then
write_uwsgi_user_unit_file $systemd_service "$cmd" "$group" "$user"
write_uwsgi_user_unit_file $systemd_service "$cmd" "$group" "$user" "$env_vars"
else
write_user_unit_file $systemd_service "$cmd" "$group" "$user"
write_user_unit_file $systemd_service "$cmd" "$group" "$user" "$env_vars"
fi
$SYSTEMCTL enable $systemd_service
@@ -1554,18 +1689,20 @@ function is_running {
# If the command includes shell metachatacters (;<>*) it must be run using a shell
# If an optional group is provided sg will be used to run the
# command as that group.
# run_process service "command-line" [group] [user]
# run_process service "command-line" [group] [user] [env_vars]
# env_vars must be a space separated list of variable assigments, ie: "A=1 B=2"
function run_process {
local service=$1
local command="$2"
local group=$3
local user=$4
local env_vars="$5"
local name=$service
time_start "run_process"
if is_service_enabled $service; then
_run_under_systemd "$name" "$command" "$group" "$user"
_run_under_systemd "$name" "$command" "$group" "$user" "$env_vars"
fi
time_stop "run_process"
}
@@ -1607,10 +1744,6 @@ function service_check {
}
function tail_log {
deprecated "With the removal of screen support, tail_log is deprecated and will be removed after Queens"
}
# Plugin Functions
# =================
@@ -1929,10 +2062,6 @@ function enable_service {
# For backward compatibility if we have **swift** in ENABLED_SERVICES all the
# **s-** services will be enabled. This will be deprecated in the future.
#
# Cells within nova is enabled if **n-cell** is in ``ENABLED_SERVICES``.
# We also need to make sure to treat **n-cell-region** and **n-cell-child**
# as enabled in this case.
#
# Uses global ``ENABLED_SERVICES``
# is_service_enabled service [service ...]
function is_service_enabled {
@@ -1955,7 +2084,6 @@ function is_service_enabled {
# TODO(dtroyer): Remove these legacy special-cases after the is_XXX_enabled()
# are implemented
[[ ${service} == n-cell-* && ,${ENABLED_SERVICES} =~ ,"n-cell" ]] && enabled=0
[[ ${service} == n-cpu-* && ,${ENABLED_SERVICES} =~ ,"n-cpu" ]] && enabled=0
[[ ${service} == "nova" && ,${ENABLED_SERVICES} =~ ,"n-" ]] && enabled=0
[[ ${service} == "glance" && ,${ENABLED_SERVICES} =~ ,"g-" ]] && enabled=0
@@ -2056,11 +2184,7 @@ function _safe_permission_operation {
return 0
fi
if [[ $TRACK_DEPENDS = True ]]; then
sudo_cmd="env"
else
sudo_cmd="sudo"
fi
sudo_cmd="sudo"
$xtrace
$sudo_cmd $@
@@ -2335,6 +2459,10 @@ function time_stop {
}
function oscwrap {
local xtrace
xtrace=$(set +o | grep xtrace)
set +o xtrace
local out
local rc
local start
@@ -2349,6 +2477,7 @@ function oscwrap {
echo $((end - start)) >> $OSCWRAP_TIMER_FILE
echo "$out"
$xtrace
return $rc
}
@@ -2417,6 +2546,13 @@ function time_totals {
$xtrace
}
function clean_pyc_files {
# Clean up all *.pyc files
if [[ -n "$DEST" ]] && [[ -d "$DEST" ]]; then
sudo find $DEST -name "*.pyc" -delete
fi
}
# Restore xtrace
$_XTRACE_FUNCTIONS_COMMON
+256
View File
@@ -0,0 +1,256 @@
#!/bin/bash
#
# Symbolic asynchronous tasks for devstack
#
# Usage:
#
# async_runfunc my_shell_func foo bar baz
#
# ... do other stuff ...
#
# async_wait my_shell_func
#
DEVSTACK_PARALLEL=$(trueorfalse True DEVSTACK_PARALLEL)
_ASYNC_BG_TIME=0
# Keep track of how much total time was spent in background tasks
# Takes a job runtime in ms.
function _async_incr_bg_time {
local elapsed_ms="$1"
_ASYNC_BG_TIME=$(($_ASYNC_BG_TIME + $elapsed_ms))
}
# Get the PID of a named future to wait on
function async_pidof {
local name="$1"
local inifile="${DEST}/async/${name}.ini"
if [ -f "$inifile" ]; then
iniget $inifile job pid
else
echo 'UNKNOWN'
return 1
fi
}
# Log a message about a job. If the message contains "%command" then the
# full command line of the job will be substituted in the output
function async_log {
local name="$1"
shift
local message="$*"
local inifile=${DEST}/async/${name}.ini
local pid
local command
pid=$(iniget $inifile job pid)
command=$(iniget $inifile job command | tr '#' '-')
message=$(echo "$message" | sed "s#%command#$command#g")
echo "[$BASHPID Async ${name}:${pid}]: $message"
}
# Inner function that actually runs the requested task. We wrap it like this
# just so we can emit a finish message as soon as the work is done, to make
# it easier to find the tracking just before an error.
function async_inner {
local name="$1"
local rc
local fifo="${DEST}/async/${name}.fifo"
shift
set -o xtrace
if $* >${DEST}/async/${name}.log 2>&1; then
rc=0
set +o xtrace
async_log "$name" "finished successfully"
else
rc=$?
set +o xtrace
async_log "$name" "FAILED with rc $rc"
fi
iniset ${DEST}/async/${name}.ini job end_time $(date "+%s%3N")
# Block on the fifo until we are signaled to exit by the main process
cat $fifo
return $rc
}
# Run something async. Takes a symbolic name and a list of arguments of
# what to run. Ideally this would be rarely used and async_runfunc() would
# be used everywhere for readability.
#
# This spawns the work in a background worker, records a "future" to be
# collected by a later call to async_wait()
function async_run {
local xtrace
xtrace=$(set +o | grep xtrace)
set +o xtrace
local name="$1"
shift
local inifile=${DEST}/async/${name}.ini
local fifo=${DEST}/async/${name}.fifo
touch $inifile
iniset $inifile job command "$*"
iniset $inifile job start_time $(date +%s%3N)
if [[ "$DEVSTACK_PARALLEL" = "True" ]]; then
mkfifo $fifo
async_inner $name $* &
iniset $inifile job pid $!
async_log "$name" "running: %command"
$xtrace
else
iniset $inifile job pid "self"
async_log "$name" "Running synchronously: %command"
$xtrace
$*
return $?
fi
}
# Shortcut for running a shell function async. Uses the function name as the
# async name.
function async_runfunc {
async_run $1 $*
}
# Dump some information to help debug a failed wait
function async_wait_dump {
local failpid=$1
echo "=== Wait failure dump from $BASHPID ==="
echo "Processes:"
ps -f
echo "Waiting jobs:"
for name in $(ls ${DEST}/async/*.ini); do
echo "Job $name :"
cat "$name"
done
echo "Failed PID status:"
sudo cat /proc/$failpid/status
sudo cat /proc/$failpid/cmdline
echo "=== End wait failure dump ==="
}
# Wait for an async future to complete. May return immediately if already
# complete, or of the future has already been waited on (avoid this). May
# block until the future completes.
function async_wait {
local xtrace
xtrace=$(set +o | grep xtrace)
set +o xtrace
local pid rc running inifile runtime fifo
rc=0
for name in $*; do
running=$(ls ${DEST}/async/*.ini 2>/dev/null | wc -l)
inifile="${DEST}/async/${name}.ini"
fifo="${DEST}/async/${name}.fifo"
if pid=$(async_pidof "$name"); then
async_log "$name" "Waiting for completion of %command" \
"running on PID $pid ($running other jobs running)"
time_start async_wait
if [[ "$pid" != "self" ]]; then
# Signal the child to go ahead and exit since we are about to
# wait for it to collect its status.
async_log "$name" "Signaling child to exit"
echo WAKEUP > $fifo
async_log "$name" "Signaled"
# Do not actually call wait if we ran synchronously
if wait $pid; then
rc=0
else
rc=$?
fi
cat ${DEST}/async/${name}.log
rm -f $fifo
fi
time_stop async_wait
local start_time
local end_time
start_time=$(iniget $inifile job start_time)
end_time=$(iniget $inifile job end_time)
_async_incr_bg_time $(($end_time - $start_time))
runtime=$((($end_time - $start_time) / 1000))
async_log "$name" "finished %command with result" \
"$rc in $runtime seconds"
rm -f $inifile
if [ $rc -ne 0 ]; then
async_wait_dump $pid
echo Stopping async wait due to error: $*
break
fi
else
# This could probably be removed - it is really just here
# to help notice if you wait for something by the wrong
# name, but it also shows up for things we didn't start
# because they were not enabled.
echo Not waiting for async task $name that we never started or \
has already been waited for
fi
done
$xtrace
return $rc
}
# Check for uncollected futures and wait on them
function async_cleanup {
local name
if [[ "$DEVSTACK_PARALLEL" != "True" ]]; then
return 0
fi
for inifile in $(find ${DEST}/async -name '*.ini'); do
name=$(basename $pidfile .ini)
echo "WARNING: uncollected async future $name"
async_wait $name || true
done
}
# Make sure our async dir is created and clean
function async_init {
local async_dir=${DEST}/async
# Clean any residue if present from previous runs
rm -Rf $async_dir
# Make sure we have a state directory
mkdir -p $async_dir
}
function async_print_timing {
local bg_time_minus_wait
local elapsed_time
local serial_time
local speedup
if [[ "$DEVSTACK_PARALLEL" != "True" ]]; then
return 0
fi
# The logic here is: All the background task time would be
# serialized if we did not do them in the background. So we can
# add that to the elapsed time for the whole run. However, time we
# spend waiting for async things to finish adds to the elapsed
# time, but is time where we're not doing anything useful. Thus,
# we substract that from the would-be-serialized time.
bg_time_minus_wait=$((\
($_ASYNC_BG_TIME - ${_TIME_TOTAL[async_wait]}) / 1000))
elapsed_time=$(($(date "+%s") - $_TIME_BEGIN))
serial_time=$(($elapsed_time + $bg_time_minus_wait))
echo
echo "================="
echo " Async summary"
echo "================="
echo " Time spent in the background minus waits: $bg_time_minus_wait sec"
echo " Elapsed time: $elapsed_time sec"
echo " Time if we did everything serially: $serial_time sec"
echo " Speedup: " $(echo | awk "{print $serial_time / $elapsed_time}")
}
+3
View File
@@ -189,6 +189,9 @@ function iniset {
local option=$3
local value=$4
# Escape the ampersand character (&)
value=$(echo $value | sed -e 's/&/\\&/g')
if [[ -z $section || -z $option ]]; then
$xtrace
return
+70 -215
View File
@@ -21,6 +21,14 @@ set +o xtrace
# project. A null value installs to the system Python directories.
declare -A -g PROJECT_VENV
# Utility Functions
# =================
# Joins bash array of extras with commas as expected by other functions
function join_extras {
local IFS=","
echo "$*"
}
# Python Functions
# ================
@@ -29,6 +37,10 @@ declare -A -g PROJECT_VENV
# get_pip_command
function get_pip_command {
local version="$1"
if [ -z "$version" ]; then
die $LINENO "pip python version is not set."
fi
# NOTE(dhellmann): I don't know if we actually get a pip3.4-python
# under any circumstances.
which pip${version} || which pip${version}-python
@@ -49,16 +61,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_suse && PYTHON_PATH=/usr/bin
echo $PYTHON_PATH
}
# Wrapper for ``pip install`` that only installs versions of libraries
@@ -83,93 +88,13 @@ function pip_install_gr {
function pip_install_gr_extras {
local name=$1
local extras=$2
local clean_name
clean_name=$(get_from_global_requirements $name)
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().
#
# Multiple services specified as arguments are ``OR``'ed together; the test
# is a short-circuit boolean, i.e it returns on the first match.
#
# python3_enabled_for dir [dir ...]
function python3_enabled_for {
local xtrace
xtrace=$(set +o | grep xtrace)
set +o xtrace
local enabled=1
local dirs=$@
local dir
for dir in ${dirs}; do
if ! python3_disabled_for "${dir}"; then
enabled=0
fi
done
$xtrace
return $enabled
}
# python3_disabled_for() checks if the service(s) specified as arguments are
# disabled by the user in ``DISABLED_PYTHON3_PACKAGES``.
#
# Multiple services specified as arguments are ``OR``'ed together; the test
# is a short-circuit boolean, i.e it returns on the first match.
#
# Uses global ``DISABLED_PYTHON3_PACKAGES``
# python3_disabled_for dir [dir ...]
function python3_disabled_for {
local xtrace
xtrace=$(set +o | grep xtrace)
set +o xtrace
local enabled=1
local dirs=$@
local dir
for dir in ${dirs}; do
[[ ,${DISABLED_PYTHON3_PACKAGES}, =~ ,${dir}, ]] && enabled=0
done
$xtrace
return $enabled
local version_constraints
version_constraints=$(get_version_constraints_from_global_requirements $name)
pip_install $name[$extras]$version_constraints
}
# enable_python3_package() -- no-op for backwards compatibility
#
# For example:
# enable_python3_package nova
#
# enable_python3_package dir [dir ...]
function enable_python3_package {
local xtrace
@@ -181,32 +106,22 @@ function enable_python3_package {
$xtrace
}
# disable_python3_package() adds the services passed as argument to
# the ``DISABLED_PYTHON3_PACKAGES`` list.
# disable_python3_package() -- no-op for backwards compatibility
#
# For example:
# disable_python3_package swift
#
# Uses global ``DISABLED_PYTHON3_PACKAGES``
# disable_python3_package dir [dir ...]
function disable_python3_package {
local xtrace
xtrace=$(set +o | grep xtrace)
set +o xtrace
local disabled_svcs="${DISABLED_PYTHON3_PACKAGES}"
local dir
for dir in $@; do
disabled_svcs+=",$dir"
done
DISABLED_PYTHON3_PACKAGES=$(_cleanup_service_list "$disabled_svcs")
echo "It is no longer possible to call disable_python3_package()."
$xtrace
}
# Wrapper for ``pip install`` to set cache and proxy environment variables
# Uses globals ``OFFLINE``, ``PIP_VIRTUAL_ENV``,
# ``PIP_UPGRADE``, ``TRACK_DEPENDS``, ``*_proxy``,
# ``PIP_UPGRADE``, ``*_proxy``,
# Usage:
# pip_install pip_arguments
function pip_install {
@@ -250,106 +165,33 @@ function pip_install {
# this works (for now...)
local package_dir=${!#%\[*\]}
if [[ $TRACK_DEPENDS = True && ! "$@" =~ virtualenv ]]; then
# TRACK_DEPENDS=True installation creates a circular dependency when
# we attempt to install virtualenv into a virtualenv, so we must global
# that installation.
source $DEST/.venv/bin/activate
local cmd_pip=$DEST/.venv/bin/pip
if [[ -n ${PIP_VIRTUAL_ENV:=} && -d ${PIP_VIRTUAL_ENV} ]]; then
local cmd_pip=$PIP_VIRTUAL_ENV/bin/pip
local sudo_pip="env"
else
if [[ -n ${PIP_VIRTUAL_ENV:=} && -d ${PIP_VIRTUAL_ENV} ]]; then
local cmd_pip=$PIP_VIRTUAL_ENV/bin/pip
local sudo_pip="env"
else
local cmd_pip
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
fi
fi
fi
local cmd_pip="python$PYTHON3_VERSION -m pip"
# 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
local sudo_pip="sudo -H LC_ALL=en_US.UTF-8 SETUPTOOLS_USE_DISTUTILS=stdlib "
echo "Using python $PYTHON3_VERSION to install $package_dir"
fi
cmd_pip="$cmd_pip install"
# Always apply constraints
cmd_pip="$cmd_pip -c $REQUIREMENTS_DIR/upper-constraints.txt"
# FIXME(dhellmann): Need to force multiple versions of pip for
# packages like setuptools?
local pip_version
pip_version=$(python -c "import pip; \
print(pip.__version__.split('.')[0])")
if (( pip_version<6 )); then
die $LINENO "Currently installed pip version ${pip_version} does not" \
"meet minimum requirements (>=6)."
fi
$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
$sudo_pip \
http_proxy="${http_proxy:-}" \
https_proxy="${https_proxy:-}" \
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=$?
@@ -366,9 +208,8 @@ function pip_uninstall {
local cmd_pip=$PIP_VIRTUAL_ENV/bin/pip
local sudo_pip="env"
else
local cmd_pip
cmd_pip=$(get_pip_command $PYTHON2_VERSION)
local sudo_pip="sudo -H"
local cmd_pip="python$PYTHON3_VERSION -m pip"
local sudo_pip="sudo -H LC_ALL=en_US.UTF-8"
fi
# don't error if we can't uninstall, it might not be there
$sudo_pip $cmd_pip uninstall -y $name || /bin/true
@@ -386,6 +227,19 @@ function get_from_global_requirements {
echo $required_pkg
}
# get only version constraints of a package from global requirements file
# get_version_constraints_from_global_requirements <package>
function get_version_constraints_from_global_requirements {
local package=$1
local required_pkg_version_constraint
# drop the package name from output (\K)
required_pkg_version_constraint=$(grep -i -h -o -P "^${package}\K.*" $REQUIREMENTS_DIR/global-requirements.txt | cut -d\# -f1)
if [[ $required_pkg_version_constraint == "" ]]; then
die $LINENO "Can't find package $package in requirements"
fi
echo $required_pkg_version_constraint
}
# should we use this library from their git repo, or should we let it
# get pulled in via pip dependencies.
function use_library_from_git {
@@ -409,7 +263,7 @@ function lib_installed_from_git {
# The best option seems to be to use "pip list" which will tell
# you the path an editable install was installed from; for example
# in response to something like
# pip install -e 'git+http://git.openstack.org/openstack-dev/bashate#egg=bashate'
# pip install -e 'git+https://opendev.org/openstack/bashate#egg=bashate'
# pip list --format columns shows
# bashate 0.5.2.dev19 /tmp/env/src/bashate
# Thus we check the third column to see if we're installed from
@@ -434,7 +288,7 @@ function setup_lib {
#
# use this for non namespaced libraries
#
# setup_dev_lib [-bindep] <name>
# setup_dev_lib [-bindep] <name> [<extras>]
function setup_dev_lib {
local bindep
if [[ $1 == -bindep* ]]; then
@@ -443,17 +297,8 @@ function setup_dev_lib {
fi
local name=$1
local dir=${GITDIR[$name]}
if python3_enabled; then
# Turn off Python 3 mode and install the package again,
# forcing a Python 2 installation. This ensures that all libs
# being used for development are installed under both versions
# of Python.
echo "Installing $name again without Python 3 enabled"
USE_PYTHON3=False
setup_develop $bindep $dir
USE_PYTHON3=True
fi
setup_develop $bindep $dir
local extras=$2
setup_develop $bindep $dir $extras
}
# this should be used if you want to install globally, all libraries should
@@ -529,12 +374,13 @@ function _setup_package_with_constraints_edit {
project_dir=$(cd $project_dir && pwd)
if [ -n "$REQUIREMENTS_DIR" ]; then
# Constrain this package to this project directory from here on out.
# Remove this package from constraints before we install it.
# That way, later installs won't "downgrade" the install from
# source we are about to do.
local name
name=$(awk '/^name.*=/ {print $3}' $project_dir/setup.cfg)
$REQUIREMENTS_DIR/.venv/bin/edit-constraints \
$REQUIREMENTS_DIR/upper-constraints.txt -- $name \
"$flags file://$project_dir#egg=$name"
$REQUIREMENTS_DIR/upper-constraints.txt -- $name
fi
setup_package $bindep $project_dir "$flags" $extras
@@ -601,12 +447,15 @@ function setup_package {
}
# Report whether python 3 should be used
# TODO(frickler): drop this once all legacy uses are removed
function python3_enabled {
if [[ $USE_PYTHON3 == "True" ]]; then
return 0
else
return 1
fi
return 0
}
# Provide requested python version and sets PYTHON variable
function install_python {
install_python3
export PYTHON=$(which python${PYTHON3_VERSION} 2>/dev/null)
}
# Install python3 packages
@@ -615,6 +464,12 @@ function install_python3 {
apt_get install python${PYTHON3_VERSION} python${PYTHON3_VERSION}-dev
elif is_suse; then
install_package python3-devel python3-dbm
elif is_fedora; then
if [ "$os_VENDOR" = "Fedora" ]; then
install_package python${PYTHON3_VERSION//.}
else
install_package python${PYTHON3_VERSION//.} python${PYTHON3_VERSION//.}-devel
fi
fi
}
+70 -33
View File
@@ -27,6 +27,11 @@ set +o xtrace
APACHE_USER=${APACHE_USER:-$STACK_USER}
APACHE_GROUP=${APACHE_GROUP:-$(id -gn $APACHE_USER)}
APACHE_LOCAL_HOST=$SERVICE_LOCAL_HOST
if [[ "$SERVICE_IP_VERSION" == 6 ]]; then
APACHE_LOCAL_HOST=[$APACHE_LOCAL_HOST]
fi
# Set up apache name and configuration directory
# Note that APACHE_CONF_DIR is really more accurately apache's vhost
@@ -82,26 +87,43 @@ 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.
#
# 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.
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
local pkg_list="uwsgi uwsgi-plugin-python3 libapache2-mod-proxy-uwsgi"
install_package ${pkg_list}
# NOTE(ianw) 2022-02-03 : Fedora 35 needs to skip this and fall
# into the install-from-source because the upstream packages
# didn't fix Python 3.10 compatibility before release. Should be
# fixed in uwsgi 4.9.0; can remove this when packages available
# or we drop this release
elif is_fedora && ! [[ $DISTRO =~ f35 ]]; 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
elif [[ $os_VENDOR =~ openSUSE ]]; then
install_package uwsgi \
uwsgi-python3 \
apache2-mod_uwsgi
else
# Compile uwsgi from source.
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
fi
if is_ubuntu || is_suse ; then
# we've got to enable proxy and proxy_uwsgi for this to work
@@ -121,17 +143,13 @@ function install_apache_wsgi {
if is_ubuntu; then
# Install apache2, which is NOPRIME'd
install_package apache2
if python3_enabled; then
if is_package_installed libapache2-mod-wsgi; then
uninstall_package libapache2-mod-wsgi
fi
install_package libapache2-mod-wsgi-py3
else
install_package libapache2-mod-wsgi
if is_package_installed libapache2-mod-wsgi; then
uninstall_package libapache2-mod-wsgi
fi
install_package libapache2-mod-wsgi-py3
elif is_fedora; then
sudo rm -f /etc/httpd/conf.d/000-*
install_package httpd mod_wsgi
install_package httpd python3-mod_wsgi
# For consistency with Ubuntu, switch to the worker mpm, as
# the default is event
sudo sed -i '/mod_mpm_prefork.so/s/^/#/g' /etc/httpd/conf.modules.d/00-mpm.conf
@@ -265,7 +283,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,python3
# uwsgi recommends this to prevent thundering herd on accept.
iniset "$file" uwsgi thunder-lock true
# Set hook to trigger graceful shutdown on SIGTERM
@@ -285,7 +303,7 @@ function write_uwsgi_config {
apache_conf=$(apache_site_config_for $name)
iniset "$file" uwsgi socket "$socket"
iniset "$file" uwsgi chmod-socket 666
echo "ProxyPass \"${url}\" \"unix:${socket}|uwsgi://uwsgi-uds-${name}/\" retry=0 " | sudo tee -a $apache_conf
echo "ProxyPass \"${url}\" \"unix:${socket}|uwsgi://uwsgi-uds-${name}\" retry=0 " | sudo tee -a $apache_conf
enable_apache_site $name
restart_apache_server
fi
@@ -310,7 +328,7 @@ function write_local_uwsgi_http_config {
rm -rf $file
iniset "$file" uwsgi wsgi-file "$wsgi"
port=$(get_random_port)
iniset "$file" uwsgi http-socket "127.0.0.1:$port"
iniset "$file" uwsgi http-socket "$APACHE_LOCAL_HOST:$port"
iniset "$file" uwsgi processes $API_WORKERS
# This is running standalone
iniset "$file" uwsgi master true
@@ -318,7 +336,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,python3
# uwsgi recommends this to prevent thundering herd on accept.
iniset "$file" uwsgi thunder-lock true
# Set hook to trigger graceful shutdown on SIGTERM
@@ -346,7 +364,26 @@ function write_local_uwsgi_http_config {
apache_conf=$(apache_site_config_for $name)
echo "KeepAlive Off" | sudo tee $apache_conf
echo "SetEnv proxy-sendchunked 1" | sudo tee -a $apache_conf
echo "ProxyPass \"${url}\" \"http://127.0.0.1:$port\" retry=0 " | sudo tee -a $apache_conf
echo "ProxyPass \"${url}\" \"http://$APACHE_LOCAL_HOST:$port\" retry=0 " | sudo tee -a $apache_conf
enable_apache_site $name
restart_apache_server
}
# Write a straight-through proxy for a service that runs locally and just needs
# to be reachable via the main http proxy at $loc
function write_local_proxy_http_config {
local name=$1
local url=$2
local loc=$3
local apache_conf
apache_conf=$(apache_site_config_for $name)
enable_apache_mod proxy
enable_apache_mod proxy_http
echo "KeepAlive Off" | sudo tee $apache_conf
echo "SetEnv proxy-sendchunked 1" | sudo tee -a $apache_conf
echo "ProxyPass \"${loc}\" \"$url\" retry=0 " | sudo tee -a $apache_conf
enable_apache_site $name
restart_apache_server
}
+143 -75
View File
@@ -31,6 +31,7 @@ set +o xtrace
CINDER_DRIVER=${CINDER_DRIVER:-default}
CINDER_PLUGINS=$TOP_DIR/lib/cinder_plugins
CINDER_BACKENDS=$TOP_DIR/lib/cinder_backends
CINDER_BACKUPS=$TOP_DIR/lib/cinder_backups
# grab plugin config if specified via cinder_driver
if [[ -r $CINDER_PLUGINS/$CINDER_DRIVER ]]; then
@@ -51,7 +52,6 @@ else
fi
CINDER_STATE_PATH=${CINDER_STATE_PATH:=$DATA_DIR/cinder}
CINDER_AUTH_CACHE_DIR=${CINDER_AUTH_CACHE_DIR:-/var/cache/cinder}
CINDER_CONF_DIR=/etc/cinder
CINDER_CONF=$CINDER_CONF_DIR/cinder.conf
@@ -88,25 +88,44 @@ CINDER_ENABLED_BACKENDS=${CINDER_ENABLED_BACKENDS:-lvm:lvmdriver-1}
CINDER_VOLUME_CLEAR=${CINDER_VOLUME_CLEAR:-${CINDER_VOLUME_CLEAR_DEFAULT:-zero}}
CINDER_VOLUME_CLEAR=$(echo ${CINDER_VOLUME_CLEAR} | tr '[:upper:]' '[:lower:]')
# Cinder reports allocations back to the scheduler on periodic intervals
# it turns out we can get an "out of space" issue when we run tests too
# quickly just because cinder didn't realize we'd freed up resources.
# Make this configurable so that devstack-gate/tempest can set it to
# less than the 60 second default
# https://bugs.launchpad.net/cinder/+bug/1180976
CINDER_PERIODIC_INTERVAL=${CINDER_PERIODIC_INTERVAL:-60}
# Default to lioadm
CINDER_ISCSI_HELPER=${CINDER_ISCSI_HELPER:-lioadm}
# Centos7 and OpenSUSE switched to using LIO and that's all that's supported,
# although the tgt bits are in EPEL and OpenSUSE we don't want that for CI
VOLUME_TYPE_MULTIATTACH=${VOLUME_TYPE_MULTIATTACH:-multiattach}
# EL and SUSE should only use lioadm
if is_fedora || is_suse; then
CINDER_ISCSI_HELPER=${CINDER_ISCSI_HELPER:-lioadm}
if [[ ${CINDER_ISCSI_HELPER} != "lioadm" ]]; then
die "lioadm is the only valid Cinder target_helper config on this platform"
fi
else
CINDER_ISCSI_HELPER=${CINDER_ISCSI_HELPER:-tgtadm}
fi
# When Cinder is used as a backend for Glance, it can be configured to clone
# the volume containing image data directly in the backend instead of
# transferring data from volume to volume. Value is a comma separated list of
# schemes (currently only 'file' and 'cinder' are supported). The default
# configuration in Cinder is empty (that is, do not use this feature). NOTE:
# to use this feature you must also enable GLANCE_SHOW_DIRECT_URL and/or
# GLANCE_SHOW_MULTIPLE_LOCATIONS for glance-api.conf.
CINDER_ALLOWED_DIRECT_URL_SCHEMES=${CINDER_ALLOWED_DIRECT_URL_SCHEMES:-}
if [[ -n "$CINDER_ALLOWED_DIRECT_URL_SCHEMES" ]]; then
if [[ "${GLANCE_SHOW_DIRECT_URL:-False}" != "True" \
&& "${GLANCE_SHOW_MULTIPLE_LOCATIONS:-False}" != "True" ]]; then
warn $LINENO "CINDER_ALLOWED_DIRECT_URL_SCHEMES is set, but neither \
GLANCE_SHOW_DIRECT_URL nor GLANCE_SHOW_MULTIPLE_LOCATIONS is True"
fi
fi
# For backward compatibility
# Before CINDER_BACKUP_DRIVER was introduced, ceph backup driver was configured
# along with ceph backend driver.
if [[ -z "${CINDER_BACKUP_DRIVER}" && "$CINDER_ENABLED_BACKENDS" =~ "ceph" ]]; then
CINDER_BACKUP_DRIVER=ceph
fi
# Supported backup drivers are in lib/cinder_backups
CINDER_BACKUP_DRIVER=${CINDER_BACKUP_DRIVER:-swift}
# Toggle for deploying Cinder under a wsgi server. Legacy mod_wsgi
# reference should be cleaned up to more accurately refer to uwsgi.
CINDER_USE_MOD_WSGI=${CINDER_USE_MOD_WSGI:-True}
@@ -122,6 +141,15 @@ if is_service_enabled c-vol && [[ -n "$CINDER_ENABLED_BACKENDS" ]]; then
done
fi
# Source the backup driver
if is_service_enabled c-bak && [[ -n "$CINDER_BACKUP_DRIVER" ]]; then
if [[ -r $CINDER_BACKUPS/$CINDER_BACKUP_DRIVER ]]; then
source $CINDER_BACKUPS/$CINDER_BACKUP_DRIVER
else
die "cinder backup driver $CINDER_BACKUP_DRIVER is not supported"
fi
fi
# Environment variables to configure the image-volume cache
CINDER_IMG_CACHE_ENABLED=${CINDER_IMG_CACHE_ENABLED:-True}
@@ -134,6 +162,12 @@ CINDER_IMG_CACHE_SIZE_COUNT=${CINDER_IMG_CACHE_SIZE_COUNT:-}
# enable the cache for all cinder backends.
CINDER_CACHE_ENABLED_FOR_BACKENDS=${CINDER_CACHE_ENABLED_FOR_BACKENDS:-$CINDER_ENABLED_BACKENDS}
# Flag to set the oslo_policy.enforce_scope. This is used to switch
# the Volume API policies to start checking the scope of token. by default,
# this flag is False.
# For more detail: https://docs.openstack.org/oslo.policy/latest/configuration/index.html#oslo_policy.enforce_scope
CINDER_ENFORCE_SCOPE=$(trueorfalse False CINDER_ENFORCE_SCOPE)
# Functions
# ---------
@@ -198,6 +232,12 @@ function cleanup_cinder {
done
fi
if is_service_enabled c-bak && [[ -n "$CINDER_BACKUP_DRIVER" ]]; then
if type cleanup_cinder_backup_$CINDER_BACKUP_DRIVER >/dev/null 2>&1; then
cleanup_cinder_backup_$CINDER_BACKUP_DRIVER
fi
fi
stop_process "c-api"
remove_uwsgi_config "$CINDER_UWSGI_CONF" "$CINDER_UWSGI"
}
@@ -225,7 +265,7 @@ function configure_cinder {
inicomment $CINDER_API_PASTE_INI filter:authtoken admin_password
inicomment $CINDER_API_PASTE_INI filter:authtoken signing_dir
configure_auth_token_middleware $CINDER_CONF cinder $CINDER_AUTH_CACHE_DIR
configure_keystone_authtoken_middleware $CINDER_CONF cinder
iniset $CINDER_CONF DEFAULT debug $ENABLE_DEBUG_LOG_LEVEL
@@ -237,11 +277,26 @@ function configure_cinder {
iniset $CINDER_CONF DEFAULT osapi_volume_listen $CINDER_SERVICE_LISTEN_ADDRESS
iniset $CINDER_CONF DEFAULT state_path $CINDER_STATE_PATH
iniset $CINDER_CONF oslo_concurrency lock_path $CINDER_STATE_PATH
iniset $CINDER_CONF DEFAULT periodic_interval $CINDER_PERIODIC_INTERVAL
iniset $CINDER_CONF DEFAULT my_ip "$HOST_IP"
if [[ $SERVICE_IP_VERSION == 6 ]]; then
iniset $CINDER_CONF DEFAULT my_ip "$HOST_IPV6"
else
iniset $CINDER_CONF DEFAULT my_ip "$HOST_IP"
fi
iniset $CINDER_CONF key_manager backend cinder.keymgr.conf_key_mgr.ConfKeyManager
iniset $CINDER_CONF key_manager fixed_key $(openssl rand -hex 16)
if [[ -n "$CINDER_ALLOWED_DIRECT_URL_SCHEMES" ]]; then
iniset $CINDER_CONF DEFAULT allowed_direct_url_schemes $CINDER_ALLOWED_DIRECT_URL_SCHEMES
fi
# set default quotas
iniset $CINDER_CONF DEFAULT quota_volumes ${CINDER_QUOTA_VOLUMES:-10}
iniset $CINDER_CONF DEFAULT quota_backups ${CINDER_QUOTA_BACKUPS:-10}
iniset $CINDER_CONF DEFAULT quota_snapshots ${CINDER_QUOTA_SNAPSHOTS:-10}
# Avoid RPC timeouts in slow CI and test environments by doubling the
# default response timeout set by RPC clients. See bug #1873234 for more
# details and example failures.
iniset $CINDER_CONF DEFAULT rpc_response_timeout 120
if is_service_enabled c-vol && [[ -n "$CINDER_ENABLED_BACKENDS" ]]; then
local enabled_backends=""
@@ -257,9 +312,6 @@ function configure_cinder {
default_name=$be_name
fi
enabled_backends+=$be_name,
iniset $CINDER_CONF $be_name volume_clear $CINDER_VOLUME_CLEAR
done
iniset $CINDER_CONF DEFAULT enabled_backends ${enabled_backends%,*}
if [[ -n "$default_name" ]]; then
@@ -268,13 +320,12 @@ function configure_cinder {
configure_cinder_image_volume_cache
fi
if is_service_enabled c-bak; then
# NOTE(mriedem): The default backup driver uses swift and if we're
# on a subnode we might not know if swift is enabled, but chances are
# good that it is on the controller so configure the backup service
# to use it. If we want to configure the backup service to use
# a non-swift driver, we'll likely need environment variables.
iniset $CINDER_CONF DEFAULT backup_swift_url "$SWIFT_SERVICE_PROTOCOL://$SERVICE_HOST:$SWIFT_DEFAULT_BIND_PORT/v1/AUTH_"
if is_service_enabled c-bak && [[ -n "$CINDER_BACKUP_DRIVER" ]]; then
if type configure_cinder_backup_$CINDER_BACKUP_DRIVER >/dev/null 2>&1; then
configure_cinder_backup_$CINDER_BACKUP_DRIVER
else
die "configure_cinder_backup_$CINDER_BACKUP_DRIVER doesn't exist in $CINDER_BACKUPS/$CINDER_BACKUP_DRIVER"
fi
fi
if is_service_enabled ceilometer; then
@@ -304,7 +355,9 @@ function configure_cinder {
# Format logging
setup_logging $CINDER_CONF $CINDER_USE_MOD_WSGI
write_uwsgi_config "$CINDER_UWSGI_CONF" "$CINDER_UWSGI" "/volume"
if is_service_enabled c-api; then
write_uwsgi_config "$CINDER_UWSGI_CONF" "$CINDER_UWSGI" "/volume"
fi
if [[ -r $CINDER_PLUGINS/$CINDER_DRIVER ]]; then
configure_cinder_driver
@@ -318,12 +371,8 @@ function configure_cinder {
iniset $CINDER_CONF DEFAULT glance_ca_certificates_file $SSL_BUNDLE_FILE
fi
if [ "$GLANCE_V1_ENABLED" != "True" ]; then
iniset $CINDER_CONF DEFAULT glance_api_version 2
fi
# Set nova credentials (used for os-assisted-snapshots)
configure_auth_token_middleware $CINDER_CONF nova $CINDER_AUTH_CACHE_DIR nova
configure_keystone_authtoken_middleware $CINDER_CONF nova nova
iniset $CINDER_CONF nova region_name "$REGION_NAME"
iniset $CINDER_CONF DEFAULT graceful_shutdown_timeout "$SERVICE_GRACEFUL_SHUTDOWN_TIMEOUT"
@@ -332,20 +381,33 @@ function configure_cinder {
elif is_service_enabled etcd3; then
iniset $CINDER_CONF coordination backend_url "etcd3+http://${SERVICE_HOST}:$ETCD_PORT"
fi
if [[ "$CINDER_ENFORCE_SCOPE" == True || "$ENFORCE_SCOPE" == True ]] ; then
iniset $CINDER_CONF oslo_policy enforce_scope true
iniset $CINDER_CONF oslo_policy enforce_new_defaults true
fi
}
# create_cinder_accounts() - Set up common required cinder accounts
# Tenant User Roles
# Project User Roles
# ------------------------------------------------------------------
# service cinder admin # if enabled
# SERVICE_PROJECT_NAME cinder service
# SERVICE_PROJECT_NAME cinder creator (if Barbican is enabled)
# Migrated from keystone_data.sh
function create_cinder_accounts {
# Cinder
if [[ "$ENABLED_SERVICES" =~ "c-api" ]]; then
create_service_user "cinder"
local extra_role=""
# cinder needs the "creator" role in order to interact with barbican
if is_service_enabled barbican; then
extra_role=$(get_or_create_role "creator")
fi
create_service_user "cinder" $extra_role
# block-storage is the official service type
get_or_create_service "cinder" "block-storage" "Cinder Volume Service"
@@ -355,12 +417,6 @@ function create_cinder_accounts {
"$REGION_NAME" \
"$CINDER_SERVICE_PROTOCOL://$CINDER_SERVICE_HOST:$CINDER_SERVICE_PORT/v3/\$(project_id)s"
get_or_create_service "cinderv2" "volumev2" "Cinder Volume Service V2"
get_or_create_endpoint \
"volumev2" \
"$REGION_NAME" \
"$CINDER_SERVICE_PROTOCOL://$CINDER_SERVICE_HOST:$CINDER_SERVICE_PORT/v2/\$(project_id)s"
get_or_create_service "cinderv3" "volumev3" "Cinder Volume Service V3"
get_or_create_endpoint \
"volumev3" \
@@ -372,12 +428,6 @@ function create_cinder_accounts {
"$REGION_NAME" \
"$CINDER_SERVICE_PROTOCOL://$CINDER_SERVICE_HOST/volume/v3/\$(project_id)s"
get_or_create_service "cinderv2" "volumev2" "Cinder Volume Service V2"
get_or_create_endpoint \
"volumev2" \
"$REGION_NAME" \
"$CINDER_SERVICE_PROTOCOL://$CINDER_SERVICE_HOST/volume/v2/\$(project_id)s"
get_or_create_service "cinderv3" "volumev3" "Cinder Volume Service V3"
get_or_create_endpoint \
"volumev3" \
@@ -389,13 +439,6 @@ function create_cinder_accounts {
fi
}
# create_cinder_cache_dir() - Part of the init_cinder() process
function create_cinder_cache_dir {
# Create cache dir
sudo install -d -o $STACK_USER $CINDER_AUTH_CACHE_DIR
rm -f $CINDER_AUTH_CACHE_DIR/*
}
# init_cinder() - Initialize database and volume group
function init_cinder {
if is_service_enabled $DATABASE_BACKENDS; then
@@ -414,17 +457,18 @@ function init_cinder {
be_type=${be%%:*}
be_name=${be##*:}
if type init_cinder_backend_${be_type} >/dev/null 2>&1; then
# Always init the default volume group for lvm.
if [[ "$be_type" == "lvm" ]]; then
init_default_lvm_volume_group
fi
init_cinder_backend_${be_type} ${be_name}
fi
done
fi
if is_service_enabled c-bak && [[ -n "$CINDER_BACKUP_DRIVER" ]]; then
if type init_cinder_backup_$CINDER_BACKUP_DRIVER >/dev/null 2>&1; then
init_cinder_backup_$CINDER_BACKUP_DRIVER
fi
fi
mkdir -p $CINDER_STATE_PATH/volumes
create_cinder_cache_dir
}
# install_cinder() - Collect source and prepare
@@ -434,7 +478,7 @@ function install_cinder {
if [[ "$CINDER_ISCSI_HELPER" == "tgtadm" ]]; then
install_package tgt
elif [[ "$CINDER_ISCSI_HELPER" == "lioadm" ]]; then
if [[ ${DISTRO} == "bionic" ]]; then
if is_ubuntu; then
# TODO(frickler): Workaround for https://launchpad.net/bugs/1819819
sudo mkdir -p /etc/target
@@ -507,7 +551,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
@@ -518,8 +562,13 @@ function start_cinder {
fi
run_process c-sch "$CINDER_BIN_DIR/cinder-scheduler --config-file $CINDER_CONF"
run_process c-bak "$CINDER_BIN_DIR/cinder-backup --config-file $CINDER_CONF"
run_process c-vol "$CINDER_BIN_DIR/cinder-volume --config-file $CINDER_CONF"
# Tune glibc for Python Services using single malloc arena for all threads
# and disabling dynamic thresholds to reduce memory usage when using native
# threads directly or via eventlet.tpool
# https://www.gnu.org/software/libc/manual/html_node/Memory-Allocation-Tunables.html
malloc_tuning="MALLOC_ARENA_MAX=1 MALLOC_MMAP_THRESHOLD_=131072 MALLOC_TRIM_THRESHOLD_=262144"
run_process c-bak "$CINDER_BIN_DIR/cinder-backup --config-file $CINDER_CONF" "" "" "$malloc_tuning"
run_process c-vol "$CINDER_BIN_DIR/cinder-volume --config-file $CINDER_CONF" "" "" "$malloc_tuning"
# NOTE(jdg): For cinder, startup order matters. To ensure that repor_capabilities is received
# by the scheduler start the cinder-volume service last (or restart it) after the scheduler
@@ -534,6 +583,23 @@ function stop_cinder {
stop_process c-vol
}
function create_one_type {
type_name=$1
property_key=$2
property_value=$3
# NOTE (e0ne): openstack client doesn't work with cinder in noauth mode
if is_service_enabled keystone; then
openstack --os-region-name="$REGION_NAME" volume type create --property $property_key="$property_value" $type_name
else
# TODO (e0ne): use openstack client once it will support cinder in noauth mode:
# https://bugs.launchpad.net/python-cinderclient/+bug/1755279
local cinder_url
cinder_url=$CINDER_SERVICE_PROTOCOL://$SERVICE_HOST:$CINDER_SERVICE_PORT/v3
OS_USER_ID=$OS_USERNAME OS_PROJECT_ID=$OS_PROJECT_NAME cinder --os-auth-type noauth --os-endpoint=$cinder_url type-create $type_name
OS_USER_ID=$OS_USERNAME OS_PROJECT_ID=$OS_PROJECT_NAME cinder --os-auth-type noauth --os-endpoint=$cinder_url type-key $type_name set $property_key="$property_value"
fi
}
# create_volume_types() - Create Cinder's configured volume types
function create_volume_types {
# Create volume types
@@ -541,18 +607,20 @@ function create_volume_types {
local be be_name
for be in ${CINDER_ENABLED_BACKENDS//,/ }; do
be_name=${be##*:}
# NOTE (e0ne): openstack client doesn't work with cinder in noauth mode
if is_service_enabled keystone; then
openstack --os-region-name="$REGION_NAME" volume type create --property volume_backend_name="${be_name}" ${be_name}
else
# TODO (e0ne): use openstack client once it will support cinder in noauth mode:
# https://bugs.launchpad.net/python-cinderclient/+bug/1755279
local cinder_url
cinder_url=$CINDER_SERVICE_PROTOCOL://$SERVICE_HOST:$CINDER_SERVICE_PORT/v3
OS_USER_ID=$OS_USERNAME OS_PROJECT_ID=$OS_PROJECT_NAME cinder --os-auth-type noauth --os-endpoint=$cinder_url type-create ${be_name}
OS_USER_ID=$OS_USERNAME OS_PROJECT_ID=$OS_PROJECT_NAME cinder --os-auth-type noauth --os-endpoint=$cinder_url type-key ${be_name} set volume_backend_name=${be_name}
fi
create_one_type $be_name "volume_backend_name" $be_name
done
if [[ $ENABLE_VOLUME_MULTIATTACH == "True" ]]; then
create_one_type $VOLUME_TYPE_MULTIATTACH $VOLUME_TYPE_MULTIATTACH "<is> True"
fi
# Increase quota for the service project if glance is using cinder,
# since it's likely to occasionally go above the default 10 in parallel
# test execution.
if [[ "$USE_CINDER_FOR_GLANCE" == "True" ]]; then
openstack --os-region-name="$REGION_NAME" \
quota set --volumes 50 "$SERVICE_PROJECT_NAME"
fi
fi
}
-32
View File
@@ -6,12 +6,6 @@
# Enable with:
#
# CINDER_ENABLED_BACKENDS+=,ceph:ceph
#
# Optional parameters:
# CINDER_BAK_CEPH_POOL=<pool-name>
# CINDER_BAK_CEPH_USER=<user>
# CINDER_BAK_CEPH_POOL_PG=<pg-num>
# CINDER_BAK_CEPH_POOL_PGP=<pgp-num>
# Dependencies:
#
@@ -29,11 +23,6 @@ set +o xtrace
# Defaults
# --------
CINDER_BAK_CEPH_POOL=${CINDER_BAK_CEPH_POOL:-backups}
CINDER_BAK_CEPH_POOL_PG=${CINDER_BAK_CEPH_POOL_PG:-8}
CINDER_BAK_CEPH_POOL_PGP=${CINDER_BAK_CEPH_POOL_PGP:-8}
CINDER_BAK_CEPH_USER=${CINDER_BAK_CEPH_USER:-cinder-bak}
# Entry Points
# ------------
@@ -52,27 +41,6 @@ function configure_cinder_backend_ceph {
iniset $CINDER_CONF $be_name rbd_flatten_volume_from_snapshot False
iniset $CINDER_CONF $be_name rbd_max_clone_depth 5
iniset $CINDER_CONF DEFAULT glance_api_version 2
if is_service_enabled c-bak; then
sudo ceph -c ${CEPH_CONF_FILE} osd pool create ${CINDER_BAK_CEPH_POOL} ${CINDER_BAK_CEPH_POOL_PG} ${CINDER_BAK_CEPH_POOL_PGP}
if [ "$REMOTE_CEPH" = "False" ]; then
# Configure Cinder backup service options, ceph pool, ceph user and ceph key
sudo ceph -c ${CEPH_CONF_FILE} osd pool set ${CINDER_BAK_CEPH_POOL} size ${CEPH_REPLICAS}
if [[ $CEPH_REPLICAS -ne 1 ]]; then
sudo ceph -c ${CEPH_CONF_FILE} osd pool set ${CINDER_BAK_CEPH_POOL} crush_ruleset ${RULE_ID}
fi
fi
sudo ceph -c ${CEPH_CONF_FILE} auth get-or-create client.${CINDER_BAK_CEPH_USER} mon "allow r" osd "allow class-read object_prefix rbd_children, allow rwx pool=${CINDER_BAK_CEPH_POOL}, allow rwx pool=${CINDER_CEPH_POOL}" | sudo tee ${CEPH_CONF_DIR}/ceph.client.${CINDER_BAK_CEPH_USER}.keyring
sudo chown $(whoami):$(whoami) ${CEPH_CONF_DIR}/ceph.client.${CINDER_BAK_CEPH_USER}.keyring
iniset $CINDER_CONF DEFAULT backup_driver "cinder.backup.drivers.ceph.CephBackupDriver"
iniset $CINDER_CONF DEFAULT backup_ceph_conf "$CEPH_CONF_FILE"
iniset $CINDER_CONF DEFAULT backup_ceph_pool "$CINDER_BAK_CEPH_POOL"
iniset $CINDER_CONF DEFAULT backup_ceph_user "$CINDER_BAK_CEPH_USER"
iniset $CINDER_CONF DEFAULT backup_ceph_stripe_unit 0
iniset $CINDER_CONF DEFAULT backup_ceph_stripe_count 0
iniset $CINDER_CONF DEFAULT restore_discard_excess_bytes True
fi
}
# Restore xtrace
+56
View File
@@ -0,0 +1,56 @@
#!/bin/bash
#
# lib/cinder_backends/ceph_iscsi
# Configure the ceph_iscsi backend
# Enable with:
#
# CINDER_ENABLED_BACKENDS+=,ceph_iscsi:ceph_iscsi
#
# Optional paramteters:
# CEPH_ISCSI_API_URL=<url to the rbd-target-api service>
#
# Dependencies:
#
# - ``functions`` file
# - ``cinder`` configurations
# configure_ceph_backend_ceph_iscsi - called from configure_cinder()
# Save trace setting
_XTRACE_CINDER_CEPH_ISCSI=$(set +o | grep xtrace)
set +o xtrace
# Entry Points
# ------------
# configure_cinder_backend_ceph_iscsi - Set config files, create data dirs, etc
# configure_cinder_backend_ceph_iscsi $name
function configure_cinder_backend_ceph_iscsi {
local be_name=$1
CEPH_ISCSI_API_URL=${CEPH_ISCSI_API_URL:-http://$CEPH_ISCSI_API_HOST:$CEPH_ISCSI_API_PORT}
iniset $CINDER_CONF $be_name volume_backend_name $be_name
iniset $CINDER_CONF $be_name volume_driver "cinder.volume.drivers.ceph.rbd_iscsi.RBDISCSIDriver"
iniset $CINDER_CONF $be_name rbd_ceph_conf "$CEPH_CONF_FILE"
iniset $CINDER_CONF $be_name rbd_pool "$CINDER_CEPH_POOL"
iniset $CINDER_CONF $be_name rbd_user "$CINDER_CEPH_USER"
iniset $CINDER_CONF $be_name rbd_iscsi_api_user "$CEPH_ISCSI_API_USER"
iniset $CINDER_CONF $be_name rbd_iscsi_api_password "$CEPH_ISCSI_API_PASSWORD"
iniset $CINDER_CONF $be_name rbd_iscsi_api_url "$CEPH_ISCSI_API_URL"
iniset $CINDER_CONF $be_name rbd_iscsi_target_iqn "$CEPH_ISCSI_TARGET_IQN"
iniset $CINDER_CONF $be_name rbd_flatten_volume_from_snapshot False
iniset $CINDER_CONF $be_name rbd_max_clone_depth 5
iniset $CINDER_CONF DEFAULT glance_api_version 2
pip_install rbd-iscsi-client
}
# Restore xtrace
$_XTRACE_CINDER_CEPH_ISCSI
# Local variables:
# mode: shell-script
# End:
+1 -1
View File
@@ -52,7 +52,7 @@ function configure_cinder_backend_lvm {
iniset $CINDER_CONF $be_name volume_group $VOLUME_GROUP_NAME-$be_name
iniset $CINDER_CONF $be_name target_helper "$CINDER_ISCSI_HELPER"
iniset $CINDER_CONF $be_name lvm_type "$CINDER_LVM_TYPE"
iniset $CINDER_CONF $be_name volume_clear "$CINDER_VOLUME_CLEAR"
}
# init_cinder_backend_lvm - Initialize volume group
+56
View File
@@ -0,0 +1,56 @@
#!/bin/bash
#
# lib/cinder_backups/ceph
# Configure the ceph backup driver
# Enable with:
#
# CINDER_BACKUP_DRIVER=ceph
# Dependencies:
#
# - ``functions`` file
# - ``cinder`` configurations
# Save trace setting
_XTRACE_CINDER_CEPH=$(set +o | grep xtrace)
set +o xtrace
# Defaults
# --------
CINDER_BAK_CEPH_POOL=${CINDER_BAK_CEPH_POOL:-backups}
CINDER_BAK_CEPH_POOL_PG=${CINDER_BAK_CEPH_POOL_PG:-8}
CINDER_BAK_CEPH_POOL_PGP=${CINDER_BAK_CEPH_POOL_PGP:-8}
CINDER_BAK_CEPH_USER=${CINDER_BAK_CEPH_USER:-cinder-bak}
function configure_cinder_backup_ceph {
# Execute this part only when cephadm is not used
if [[ "$CEPHADM_DEPLOY" = "False" ]]; then
sudo ceph -c ${CEPH_CONF_FILE} osd pool create ${CINDER_BAK_CEPH_POOL} ${CINDER_BAK_CEPH_POOL_PG} ${CINDER_BAK_CEPH_POOL_PGP}
if [[ "$REMOTE_CEPH" = "False" && "$CEPH_REPLICAS" -ne 1 ]]; then
sudo ceph -c ${CEPH_CONF_FILE} osd pool set ${CINDER_BAK_CEPH_POOL} crush_ruleset ${RULE_ID}
fi
sudo ceph -c ${CEPH_CONF_FILE} auth get-or-create client.${CINDER_BAK_CEPH_USER} mon "allow r" osd "allow class-read object_prefix rbd_children, allow rwx pool=${CINDER_BAK_CEPH_POOL}, allow rwx pool=${CINDER_CEPH_POOL}" | sudo tee ${CEPH_CONF_DIR}/ceph.client.${CINDER_BAK_CEPH_USER}.keyring
sudo chown $(whoami):$(whoami) ${CEPH_CONF_DIR}/ceph.client.${CINDER_BAK_CEPH_USER}.keyring
fi
iniset $CINDER_CONF DEFAULT backup_driver "cinder.backup.drivers.ceph.CephBackupDriver"
iniset $CINDER_CONF DEFAULT backup_ceph_conf "$CEPH_CONF_FILE"
iniset $CINDER_CONF DEFAULT backup_ceph_pool "$CINDER_BAK_CEPH_POOL"
iniset $CINDER_CONF DEFAULT backup_ceph_user "$CINDER_BAK_CEPH_USER"
iniset $CINDER_CONF DEFAULT backup_ceph_stripe_unit 0
iniset $CINDER_CONF DEFAULT backup_ceph_stripe_count 0
iniset $CINDER_CONF DEFAULT restore_discard_excess_bytes True
}
# init_cinder_backup_ceph: nothing to do
# cleanup_cinder_backup_ceph: nothing to do
# Restore xtrace
$_XTRACE_CINDER_CEPH
# Local variables:
# mode: shell-script
# End:
+45
View File
@@ -0,0 +1,45 @@
#!/bin/bash
#
# lib/cinder_backups/s3_swift
# Configure the s3 backup driver with swift s3api
#
# TODO: create lib/cinder_backup/s3 for external s3 compatible storage
# Enable with:
#
# CINDER_BACKUP_DRIVER=s3_swift
# enable_service s3api s-proxy s-object s-container s-account
# Dependencies:
#
# - ``functions`` file
# - ``cinder`` configurations
# Save trace setting
_XTRACE_CINDER_S3_SWIFT=$(set +o | grep xtrace)
set +o xtrace
function configure_cinder_backup_s3_swift {
# This configuration requires swift and s3api. If we're
# on a subnode we might not know if they are enabled
iniset $CINDER_CONF DEFAULT backup_driver "cinder.backup.drivers.s3.S3BackupDriver"
iniset $CINDER_CONF DEFAULT backup_s3_endpoint_url "$SWIFT_SERVICE_PROTOCOL://$SERVICE_HOST:$S3_SERVICE_PORT"
}
function init_cinder_backup_s3_swift {
openstack ec2 credential create
iniset $CINDER_CONF DEFAULT backup_s3_store_access_key "$(openstack ec2 credential list -c Access -f value)"
iniset $CINDER_CONF DEFAULT backup_s3_store_secret_key "$(openstack ec2 credential list -c Secret -f value)"
if is_service_enabled tls-proxy; then
iniset $CINDER_CONF DEFAULT backup_s3_ca_cert_file "$SSL_BUNDLE_FILE"
fi
}
# cleanup_cinder_backup_s3_swift: nothing to do
# Restore xtrace
$_XTRACE_CINDER_S3_SWIFT
# Local variables:
# mode: shell-script
# End:
+41
View File
@@ -0,0 +1,41 @@
#!/bin/bash
#
# lib/cinder_backups/swift
# Configure the swift backup driver
# Enable with:
#
# CINDER_BACKUP_DRIVER=swift
# Dependencies:
#
# - ``functions`` file
# - ``cinder`` configurations
# Save trace setting
_XTRACE_CINDER_SWIFT=$(set +o | grep xtrace)
set +o xtrace
function configure_cinder_backup_swift {
# NOTE(mriedem): The default backup driver uses swift and if we're
# on a subnode we might not know if swift is enabled, but chances are
# good that it is on the controller so configure the backup service
# to use it.
iniset $CINDER_CONF DEFAULT backup_driver "cinder.backup.drivers.swift.SwiftBackupDriver"
iniset $CINDER_CONF DEFAULT backup_swift_url "$SWIFT_SERVICE_PROTOCOL://$SERVICE_HOST:$SWIFT_DEFAULT_BIND_PORT/v1/AUTH_"
if is_service_enabled tls-proxy; then
iniset $CINDER_CONF DEFAULT backup_swift_ca_cert_file $SSL_BUNDLE_FILE
fi
}
# init_cinder_backup_swift: nothing to do
# cleanup_cinder_backup_swift: nothing to do
# Restore xtrace
$_XTRACE_CINDER_SWIFT
# Local variables:
# mode: shell-script
# End:
-46
View File
@@ -1,46 +0,0 @@
#!/bin/bash
#
# lib/cinder_plugins/XenAPINFS
# Configure the XenAPINFS driver
# Enable with:
#
# CINDER_DRIVER=XenAPINFS
# Dependencies:
#
# - ``functions`` file
# - ``cinder`` configurations
# configure_cinder_driver - make configuration changes, including those to other services
# Save trace setting
_XTRACE_CINDER_XENAPINFS=$(set +o | grep xtrace)
set +o xtrace
# Defaults
# --------
# Set up default directories
# Entry Points
# ------------
# configure_cinder_driver - Set config files, create data dirs, etc
function configure_cinder_driver {
iniset $CINDER_CONF DEFAULT volume_driver "cinder.volume.drivers.xenapi.sm.XenAPINFSDriver"
iniset $CINDER_CONF DEFAULT xenapi_connection_url "$CINDER_XENAPI_CONNECTION_URL"
iniset $CINDER_CONF DEFAULT xenapi_connection_username "$CINDER_XENAPI_CONNECTION_USERNAME"
iniset $CINDER_CONF DEFAULT xenapi_connection_password "$CINDER_XENAPI_CONNECTION_PASSWORD"
iniset $CINDER_CONF DEFAULT xenapi_nfs_server "$CINDER_XENAPI_NFS_SERVER"
iniset $CINDER_CONF DEFAULT xenapi_nfs_serverpath "$CINDER_XENAPI_NFS_SERVERPATH"
}
# Restore xtrace
$_XTRACE_CINDER_XENAPINFS
# Local variables:
# mode: shell-script
# End:
-41
View File
@@ -1,41 +0,0 @@
#!/bin/bash
#
# lib/cinder_plugins/sheepdog
# Configure the sheepdog driver
# Enable with:
#
# CINDER_DRIVER=sheepdog
# Dependencies:
#
# - ``functions`` file
# - ``cinder`` configurations
# configure_cinder_driver - make configuration changes, including those to other services
# Save trace setting
_XTRACE_CINDER_SHEEPDOG=$(set +o | grep xtrace)
set +o xtrace
# Defaults
# --------
# Set up default directories
# Entry Points
# ------------
# configure_cinder_driver - Set config files, create data dirs, etc
function configure_cinder_driver {
iniset $CINDER_CONF DEFAULT volume_driver "cinder.volume.drivers.sheepdog.SheepdogDriver"
}
# Restore xtrace
$_XTRACE_CINDER_SHEEPDOG
# Local variables:
# mode: shell-script
# End:
+4 -4
View File
@@ -87,10 +87,12 @@ function initialize_database_backends {
if [ -n "$MYSQL_PASSWORD" ]; then
DATABASE_PASSWORD=$MYSQL_PASSWORD
else
read_password DATABASE_PASSWORD "ENTER A PASSWORD TO USE FOR THE DATABASE."
fi
return 0
}
function define_database_baseurl {
# We configure Nova, Horizon, Glance and Keystone to use MySQL as their
# database server. While they share a single server, each has their own
# database and tables.
@@ -102,8 +104,6 @@ function initialize_database_backends {
# NOTE: Don't specify ``/db`` in this string so we can use it for multiple services
BASE_SQL_CONN=${BASE_SQL_CONN:-$(get_database_type_$DATABASE_TYPE)://$DATABASE_USER:$DATABASE_PASSWORD@$DATABASE_HOST}
return 0
}
# Recreate a given database
+92 -27
View File
@@ -12,18 +12,23 @@ _XTRACE_DB_MYSQL=$(set +o | grep xtrace)
set +o xtrace
MYSQL_DRIVER=${MYSQL_DRIVER:-PyMySQL}
INSTALL_DATABASE_SERVER_PACKAGES=$(trueorfalse True INSTALL_DATABASE_SERVER_PACKAGES)
register_database mysql
MYSQL_SERVICE_NAME=mysql
if is_fedora && ! is_oraclelinux; then
MYSQL_SERVICE_NAME=mariadb
elif is_suse && systemctl list-unit-files | grep -q 'mariadb\.service'; then
# Older mariadb packages on SLES 12 provided mysql.service. The
# newer ones on SLES 12 and 15 use mariadb.service; they also
# provide a mysql.service symlink for backwards-compatibility, but
# let's not rely on that.
MYSQL_SERVICE_NAME=mariadb
if [[ -z "$MYSQL_SERVICE_NAME" ]]; then
MYSQL_SERVICE_NAME=mysql
if is_fedora && ! is_oraclelinux; then
MYSQL_SERVICE_NAME=mariadb
elif is_suse && systemctl list-unit-files | grep -q 'mariadb\.service'; then
# Older mariadb packages on SLES 12 provided mysql.service. The
# newer ones on SLES 12 and 15 use mariadb.service; they also
# provide a mysql.service symlink for backwards-compatibility, but
# let's not rely on that.
MYSQL_SERVICE_NAME=mariadb
elif [[ "$DISTRO" == "bullseye" ]]; then
MYSQL_SERVICE_NAME=mariadb
fi
fi
# Functions
@@ -81,10 +86,16 @@ function configure_database_mysql {
exit_distro_not_supported "mysql configuration"
fi
# Start mysql-server
# Change bind-address from localhost (127.0.0.1) to any (::)
iniset -sudo $my_conf mysqld bind-address "$(ipv6_unquote $SERVICE_LISTEN_ADDRESS)"
# (Re)Start mysql-server
if is_fedora || is_suse; then
# service is not started by default
start_service $MYSQL_SERVICE_NAME
elif is_ubuntu; then
# required since bind-address could have changed above
restart_service $MYSQL_SERVICE_NAME
fi
# Set the root password - only works the first time. For Ubuntu, we already
@@ -92,19 +103,32 @@ function configure_database_mysql {
# because the package might have been installed already.
sudo mysqladmin -u root password $DATABASE_PASSWORD || true
# In case of Mariadb, giving hostname in arguments causes permission
# problems as it expects connection through socket
if is_ubuntu && [ "$MYSQL_SERVICE_NAME" == "mariadb" ]; then
local cmd_args="-uroot -p$DATABASE_PASSWORD "
else
local cmd_args="-uroot -p$DATABASE_PASSWORD -h$SERVICE_LOCAL_HOST "
fi
# In mariadb e.g. on Ubuntu socket plugin is used for authentication
# as root so it works only as sudo. To restore old "mysql like" behaviour,
# we need to change auth plugin for root user
if is_ubuntu && [[ "$DISTRO" != "bullseye" ]] && [ "$MYSQL_SERVICE_NAME" == "mariadb" ]; then
sudo mysql $cmd_args -e "UPDATE mysql.user SET plugin='' WHERE user='$DATABASE_USER' AND host='localhost';"
sudo mysql $cmd_args -e "FLUSH PRIVILEGES;"
fi
# Create DB user if it does not already exist
sudo mysql $cmd_args -e "CREATE USER IF NOT EXISTS '$DATABASE_USER'@'%' identified by '$DATABASE_PASSWORD';"
# Update the DB to give user '$DATABASE_USER'@'%' full control of the all databases:
sudo mysql -uroot -p$DATABASE_PASSWORD -h127.0.0.1 -e "GRANT ALL PRIVILEGES ON *.* TO '$DATABASE_USER'@'%' identified by '$DATABASE_PASSWORD';"
sudo mysql $cmd_args -e "GRANT ALL PRIVILEGES ON *.* TO '$DATABASE_USER'@'%';"
# Now update ``my.cnf`` for some local needs and restart the mysql service
# Change bind-address from localhost (127.0.0.1) to any (::) and
# set default db type to InnoDB
iniset -sudo $my_conf mysqld bind-address "$(ipv6_unquote $SERVICE_LISTEN_ADDRESS)"
# Set default db type to InnoDB
iniset -sudo $my_conf mysqld sql_mode TRADITIONAL
iniset -sudo $my_conf mysqld default-storage-engine InnoDB
iniset -sudo $my_conf mysqld max_connections 1024
iniset -sudo $my_conf mysqld query_cache_type OFF
iniset -sudo $my_conf mysqld query_cache_size 0
if [[ "$DATABASE_QUERY_LOGGING" == "True" ]]; then
echo_summary "Enabling MySQL query logging"
@@ -126,6 +150,29 @@ function configure_database_mysql {
iniset -sudo $my_conf mysqld log-queries-not-using-indexes 1
fi
if [[ "$MYSQL_GATHER_PERFORMANCE" == "True" ]]; then
echo "enabling MySQL performance counting"
# Install our sqlalchemy plugin
pip_install ${TOP_DIR}/tools/dbcounter
# Create our stats database for accounting
recreate_database stats
mysql -u $DATABASE_USER -p$DATABASE_PASSWORD -h $MYSQL_HOST -e \
"CREATE TABLE queries (db VARCHAR(32), op VARCHAR(32),
count INT, PRIMARY KEY (db, op)) ENGINE MEMORY" stats
fi
if [[ "$MYSQL_REDUCE_MEMORY" == "True" ]]; then
iniset -sudo $my_conf mysqld read_buffer_size 64K
iniset -sudo $my_conf mysqld innodb_buffer_pool_size 16M
iniset -sudo $my_conf mysqld thread_stack 192K
iniset -sudo $my_conf mysqld thread_cache_size 8
iniset -sudo $my_conf mysqld tmp_table_size 8M
iniset -sudo $my_conf mysqld sort_buffer_size 8M
iniset -sudo $my_conf mysqld max_allowed_packet 8M
fi
restart_service $MYSQL_SERVICE_NAME
}
@@ -148,20 +195,28 @@ MYSQL_PRESEED
[client]
user=$DATABASE_USER
password=$DATABASE_PASSWORD
host=$MYSQL_HOST
EOF
if ! is_ubuntu || [ "$MYSQL_SERVICE_NAME" != "mariadb" ]; then
echo "host=$MYSQL_HOST" >> $HOME/.my.cnf
fi
chmod 0600 $HOME/.my.cnf
fi
# Install mysql-server
if is_oraclelinux; then
install_package mysql-community-server
elif is_fedora || is_suse; then
install_package mariadb-server
sudo systemctl enable $MYSQL_SERVICE_NAME
elif is_ubuntu; then
install_package mysql-server
else
exit_distro_not_supported "mysql installation"
if [[ "$INSTALL_DATABASE_SERVER_PACKAGES" == "True" ]]; then
if is_oraclelinux; then
install_package mysql-community-server
elif is_fedora; then
install_package mariadb-server mariadb-devel mariadb
sudo systemctl enable $MYSQL_SERVICE_NAME
elif is_suse; then
install_package mariadb-server
sudo systemctl enable $MYSQL_SERVICE_NAME
elif is_ubuntu; then
install_package $MYSQL_SERVICE_NAME-server
else
exit_distro_not_supported "mysql installation"
fi
fi
}
@@ -177,7 +232,17 @@ function install_database_python_mysql {
function database_connection_url_mysql {
local db=$1
echo "$BASE_SQL_CONN/$db?charset=utf8"
local plugin
# NOTE(danms): We don't enable perf on subnodes yet because the
# plugin is not installed there
if [[ "$MYSQL_GATHER_PERFORMANCE" == "True" ]]; then
if is_service_enabled mysql; then
plugin="&plugin=dbcounter"
fi
fi
echo "$BASE_SQL_CONN/$db?charset=utf8$plugin"
}
+13 -11
View File
@@ -13,7 +13,7 @@ set +o xtrace
MAX_DB_CONNECTIONS=${MAX_DB_CONNECTIONS:-200}
INSTALL_DATABASE_SERVER_PACKAGES=$(trueorfalse True INSTALL_DATABASE_SERVER_PACKAGES)
register_database postgresql
@@ -53,7 +53,8 @@ function configure_database_postgresql {
pg_hba=/var/lib/pgsql/data/pg_hba.conf
pg_conf=/var/lib/pgsql/data/postgresql.conf
if ! sudo [ -e $pg_hba ]; then
sudo postgresql-setup initdb
localectl set-locale LANG=en_US.UTF-8
sudo -E postgresql-setup initdb
fi
elif is_ubuntu; then
version=`psql --version | cut -d ' ' -f3 | cut -d. -f1-2`
@@ -95,7 +96,6 @@ function configure_database_postgresql {
function install_database_postgresql {
echo_summary "Installing postgresql"
deprecated "Use of postgresql in devstack is deprecated, and will be removed during the Pike cycle"
local pgpass=$HOME/.pgpass
if [[ ! -e $pgpass ]]; then
cat <<EOF > $pgpass
@@ -105,15 +105,17 @@ EOF
else
sed -i "s/:root:\w\+/:root:$DATABASE_PASSWORD/" $pgpass
fi
if is_ubuntu; then
install_package postgresql
elif is_fedora || is_suse; then
install_package postgresql-server
if is_fedora; then
sudo systemctl enable postgresql
if [[ "$INSTALL_DATABASE_SERVER_PACKAGES" == "True" ]]; then
if is_ubuntu; then
install_package postgresql
elif is_fedora || is_suse; then
install_package postgresql-server langpacks-en glibc-langpack-en
if is_fedora; then
sudo systemctl enable postgresql
fi
else
exit_distro_not_supported "postgresql installation"
fi
else
exit_distro_not_supported "postgresql installation"
fi
}
+12 -3
View File
@@ -9,6 +9,7 @@
# ``stack.sh`` calls the entry points in this order:
#
# - install_dstat
# - start_dstat
# - stop_dstat
@@ -16,6 +17,14 @@
_XTRACE_DSTAT=$(set +o | grep xtrace)
set +o xtrace
# install_dstat() - Install prerequisites for dstat services
function install_dstat {
if is_service_enabled memory_tracker; then
# Install python libraries required by tools/mlock_report.py
pip_install_gr psutil
fi
}
# start_dstat() - Start running processes
function start_dstat {
# A better kind of sysstat, with the top process per time slice
@@ -26,10 +35,10 @@ function start_dstat {
# to your localrc
run_process memory_tracker "$TOP_DIR/tools/memory_tracker.sh" "" "root"
# remove support for the old name when it's no longer used (sometime in Queens)
# TODO(jh): Fail when using the old service name otherwise consumers might
# never notice that is has been removed.
if is_service_enabled peakmem_tracker; then
deprecated "Use of peakmem_tracker in devstack is deprecated, use memory_tracker instead"
run_process peakmem_tracker "$TOP_DIR/tools/memory_tracker.sh" "" "root"
die $LINENO "The peakmem_tracker service has been removed, use memory_tracker instead"
fi
}
+361 -92
View File
@@ -41,23 +41,77 @@ else
GLANCE_BIN_DIR=$(get_python_exec_prefix)
fi
# Cinder for Glance
USE_CINDER_FOR_GLANCE=$(trueorfalse False USE_CINDER_FOR_GLANCE)
# GLANCE_CINDER_DEFAULT_BACKEND should be one of the values
# from CINDER_ENABLED_BACKENDS
GLANCE_CINDER_DEFAULT_BACKEND=${GLANCE_CINDER_DEFAULT_BACKEND:-lvmdriver-1}
GLANCE_STORE_ROOTWRAP_BASE_DIR=/usr/local/etc/glance
# NOTE (abhishekk): For opensuse data files are stored in different directory
if is_opensuse; then
GLANCE_STORE_ROOTWRAP_BASE_DIR=/usr/etc/glance
fi
# When Cinder is used as a glance store, you can optionally configure cinder to
# optimize bootable volume creation by allowing volumes to be cloned directly
# in the backend instead of transferring data via Glance. To use this feature,
# set CINDER_ALLOWED_DIRECT_URL_SCHEMES for cinder.conf and enable
# GLANCE_SHOW_DIRECT_URL and/or GLANCE_SHOW_MULTIPLE_LOCATIONS for Glance. The
# default value for both of these is False, because for some backends they
# present a grave security risk (though not for Cinder, because all that's
# exposed is the volume_id where the image data is stored.) See OSSN-0065 for
# more information: https://wiki.openstack.org/wiki/OSSN/OSSN-0065
GLANCE_SHOW_DIRECT_URL=$(trueorfalse False GLANCE_SHOW_DIRECT_URL)
GLANCE_SHOW_MULTIPLE_LOCATIONS=$(trueorfalse False GLANCE_SHOW_MULTIPLE_LOCATIONS)
# Glance multi-store configuration
# Boolean flag to enable multiple store configuration for glance
GLANCE_ENABLE_MULTIPLE_STORES=$(trueorfalse False GLANCE_ENABLE_MULTIPLE_STORES)
# Comma separated list for configuring multiple file stores of glance,
# for example; GLANCE_MULTIPLE_FILE_STORES = fast,cheap,slow
GLANCE_MULTIPLE_FILE_STORES=${GLANCE_MULTIPLE_FILE_STORES:-fast}
# Default store/backend for glance, must be one of the store specified
# in GLANCE_MULTIPLE_FILE_STORES option.
GLANCE_DEFAULT_BACKEND=${GLANCE_DEFAULT_BACKEND:-fast}
GLANCE_CACHE_DIR=${GLANCE_CACHE_DIR:=$DATA_DIR/glance/cache}
# Full Glance functionality requires running in standalone mode. If we are
# not in uwsgi mode, then we are standalone, otherwise allow separate control.
if [[ "$WSGI_MODE" != "uwsgi" ]]; then
GLANCE_STANDALONE=True
fi
GLANCE_STANDALONE=${GLANCE_STANDALONE:-False}
# File path for each store specified in GLANCE_MULTIPLE_FILE_STORES, the store
# identifier will be appended to this path at runtime. If GLANCE_MULTIPLE_FILE_STORES
# has fast,cheap specified then filepath will be generated like $DATA_DIR/glance/fast
# and $DATA_DIR/glance/cheap.
GLANCE_MULTISTORE_FILE_IMAGE_DIR=${GLANCE_MULTISTORE_FILE_IMAGE_DIR:=$DATA_DIR/glance}
GLANCE_IMAGE_DIR=${GLANCE_IMAGE_DIR:=$DATA_DIR/glance/images}
GLANCE_NFS_MOUNTPOINT=$GLANCE_IMAGE_DIR/mnt
GLANCE_LOCK_DIR=${GLANCE_LOCK_DIR:=$DATA_DIR/glance/locks}
GLANCE_AUTH_CACHE_DIR=${GLANCE_AUTH_CACHE_DIR:-/var/cache/glance}
GLANCE_STAGING_DIR=${GLANCE_MULTISTORE_FILE_IMAGE_DIR:=$DATA_DIR/os_glance_staging_store}
GLANCE_TASKS_DIR=${GLANCE_MULTISTORE_FILE_IMAGE_DIR:=$DATA_DIR/os_glance_tasks_store}
GLANCE_USE_IMPORT_WORKFLOW=$(trueorfalse False GLANCE_USE_IMPORT_WORKFLOW)
GLANCE_ENABLE_QUOTAS=$(trueorfalse True GLANCE_ENABLE_QUOTAS)
# Flag to set the oslo_policy.enforce_scope. This is used to switch
# the Image API policies to start checking the scope of token. By Default,
# this flag is False.
# For more detail: https://docs.openstack.org/oslo.policy/latest/configuration/index.html#oslo_policy.enforce_scope
GLANCE_ENFORCE_SCOPE=$(trueorfalse False GLANCE_ENFORCE_SCOPE)
GLANCE_CONF_DIR=${GLANCE_CONF_DIR:-/etc/glance}
GLANCE_METADEF_DIR=$GLANCE_CONF_DIR/metadefs
GLANCE_REGISTRY_CONF=$GLANCE_CONF_DIR/glance-registry.conf
GLANCE_API_CONF=$GLANCE_CONF_DIR/glance-api.conf
GLANCE_REGISTRY_PASTE_INI=$GLANCE_CONF_DIR/glance-registry-paste.ini
GLANCE_API_PASTE_INI=$GLANCE_CONF_DIR/glance-api-paste.ini
GLANCE_CACHE_CONF=$GLANCE_CONF_DIR/glance-cache.conf
GLANCE_POLICY_JSON=$GLANCE_CONF_DIR/policy.json
GLANCE_SCHEMA_JSON=$GLANCE_CONF_DIR/schema-image.json
GLANCE_SWIFT_STORE_CONF=$GLANCE_CONF_DIR/glance-swift-store.conf
GLANCE_IMAGE_IMPORT_CONF=$GLANCE_CONF_DIR/glance-image-import.conf
GLANCE_V1_ENABLED=${GLANCE_V1_ENABLED:-False}
if is_service_enabled tls-proxy; then
GLANCE_SERVICE_PROTOCOL="https"
@@ -70,10 +124,12 @@ GLANCE_SERVICE_PORT=${GLANCE_SERVICE_PORT:-9292}
GLANCE_SERVICE_PORT_INT=${GLANCE_SERVICE_PORT_INT:-19292}
GLANCE_HOSTPORT=${GLANCE_HOSTPORT:-$GLANCE_SERVICE_HOST:$GLANCE_SERVICE_PORT}
GLANCE_SERVICE_PROTOCOL=${GLANCE_SERVICE_PROTOCOL:-$SERVICE_PROTOCOL}
GLANCE_REGISTRY_PORT=${GLANCE_REGISTRY_PORT:-9191}
GLANCE_REGISTRY_PORT_INT=${GLANCE_REGISTRY_PORT_INT:-19191}
GLANCE_UWSGI=$GLANCE_BIN_DIR/glance-wsgi-api
GLANCE_UWSGI_CONF=$GLANCE_CONF_DIR/glance-uwsgi.ini
# Glance default limit for Devstack
GLANCE_LIMIT_IMAGE_SIZE_TOTAL=${GLANCE_LIMIT_IMAGE_SIZE_TOTAL:-1000}
# If wsgi mode is uwsgi run glance under uwsgi, else default to eventlet
# TODO(mtreinish): Remove the eventlet path here and in all the similar
# conditionals below after the Pike release
@@ -97,61 +153,197 @@ function is_glance_enabled {
# cleanup_glance() - Remove residual data files, anything left over from previous
# runs that a clean run would need to clean up
function cleanup_glance {
# kill instances (nova)
# delete image files (glance)
sudo rm -rf $GLANCE_CACHE_DIR $GLANCE_IMAGE_DIR $GLANCE_AUTH_CACHE_DIR
# delete image files (glance) and all of the glance-remote temporary
# storage
sudo rm -rf $GLANCE_CACHE_DIR $GLANCE_IMAGE_DIR "${DATA_DIR}/glance-remote"
# Cleanup multiple stores directories
if [[ "$GLANCE_ENABLE_MULTIPLE_STORES" == "True" ]]; then
local store file_dir
for store in $(echo $GLANCE_MULTIPLE_FILE_STORES | tr "," "\n"); do
file_dir="${GLANCE_MULTISTORE_FILE_IMAGE_DIR}/${store}/"
sudo rm -rf $file_dir
done
# Cleanup reserved stores directories
sudo rm -rf $GLANCE_STAGING_DIR $GLANCE_TASKS_DIR
fi
}
# Set multiple cinder store related config options for each of the cinder store
#
function configure_multiple_cinder_stores {
local be be_name be_type enabled_backends
for be in ${CINDER_ENABLED_BACKENDS//,/ }; do
be_type=${be%%:*}
be_name=${be##*:}
enabled_backends+="${be_name}:cinder,"
set_common_cinder_store_params $be_name
iniset $GLANCE_API_CONF $be_name cinder_volume_type ${be_name}
if [[ "$be_type" == "nfs" ]]; then
mkdir -p "$GLANCE_NFS_MOUNTPOINT"
iniset $GLANCE_API_CONF $be_name cinder_mount_point_base "$GLANCE_NFS_MOUNTPOINT"
fi
done
iniset $GLANCE_API_CONF DEFAULT enabled_backends ${enabled_backends::-1}
iniset $GLANCE_API_CONF glance_store default_backend $GLANCE_CINDER_DEFAULT_BACKEND
}
# Set common cinder store options to given config section
#
# Arguments:
# config_section
#
function set_common_cinder_store_params {
local config_section="$1"
iniset $GLANCE_API_CONF $config_section cinder_store_auth_address $KEYSTONE_SERVICE_URI_V3
iniset $GLANCE_API_CONF $config_section cinder_store_user_name glance
iniset $GLANCE_API_CONF $config_section cinder_store_password $SERVICE_PASSWORD
iniset $GLANCE_API_CONF $config_section cinder_store_project_name $SERVICE_PROJECT_NAME
}
# Configure multiple file stores options for each file store
#
# Arguments:
#
function configure_multiple_file_stores {
local store enabled_backends
enabled_backends=""
for store in $(echo $GLANCE_MULTIPLE_FILE_STORES | tr "," "\n"); do
enabled_backends+="${store}:file,"
done
iniset $GLANCE_API_CONF DEFAULT enabled_backends ${enabled_backends::-1}
# Glance multiple store Store specific configs
iniset $GLANCE_API_CONF glance_store default_backend $GLANCE_DEFAULT_BACKEND
local store
for store in $(echo $glance_multiple_file_stores | tr "," "\n"); do
iniset $GLANCE_API_CONF $store filesystem_store_datadir "${GLANCE_MULTISTORE_FILE_IMAGE_DIR}/${store}/"
done
}
# Set reserved stores for glance
function configure_reserved_stores {
iniset $GLANCE_API_CONF os_glance_staging_store filesystem_store_datadir "${GLANCE_MULTISTORE_FILE_IMAGE_DIR}/os_glance_staging_store/"
iniset $GLANCE_API_CONF os_glance_tasks_store filesystem_store_datadir "${GLANCE_MULTISTORE_FILE_IMAGE_DIR}/os_glance_tasks_store/"
}
# Copy rootwrap file from glance_store/etc/glance to /etc/glance
#
# Arguments:
# source_path Source path to copy rootwrap files from
#
function copy_rootwrap {
local source_path="$1"
# Make glance configuration directory if it is not exists
sudo install -d -o $STACK_USER $GLANCE_CONF_DIR
cp -r $source_path/rootwrap.* $GLANCE_CONF_DIR/
}
# Set glance_store related config options
#
# Arguments:
# USE_CINDER_FOR_GLANCE
# GLANCE_ENABLE_MULTIPLE_STORES
#
function configure_glance_store {
local use_cinder_for_glance="$1"
local glance_enable_multiple_stores="$2"
local be
if [[ "$glance_enable_multiple_stores" == "False" ]]; then
# Configure traditional glance_store
if [[ "$use_cinder_for_glance" == "True" ]]; then
# set common glance_store parameters
iniset $GLANCE_API_CONF glance_store stores "cinder,file,http"
iniset $GLANCE_API_CONF glance_store default_store cinder
# set cinder related store parameters
set_common_cinder_store_params glance_store
# set nfs mount_point dir
for be in ${CINDER_ENABLED_BACKENDS//,/ }; do
local be_name=${be##*:}
if [[ "$be_name" == "nfs" ]]; then
mkdir -p $GLANCE_NFS_MOUNTPOINT
iniset $GLANCE_API_CONF glance_store cinder_mount_point_base $GLANCE_NFS_MOUNTPOINT
fi
done
fi
# Store specific configs
iniset $GLANCE_API_CONF glance_store filesystem_store_datadir $GLANCE_IMAGE_DIR/
else
if [[ "$use_cinder_for_glance" == "True" ]]; then
# Configure multiple cinder stores for glance
configure_multiple_cinder_stores
else
# Configure multiple file stores for glance
configure_multiple_file_stores
fi
# Configure reserved stores
configure_reserved_stores
fi
}
function configure_glance_quotas {
# Registered limit resources in keystone are system-specific resources.
# Make sure we use a system-scoped token to interact with this API.
openstack --os-cloud devstack-system-admin registered limit create --service glance \
--default-limit $GLANCE_LIMIT_IMAGE_SIZE_TOTAL --region $REGION_NAME image_size_total
openstack --os-cloud devstack-system-admin registered limit create --service glance \
--default-limit $GLANCE_LIMIT_IMAGE_SIZE_TOTAL --region $REGION_NAME image_stage_total
openstack --os-cloud devstack-system-admin registered limit create --service glance \
--default-limit 100 --region $REGION_NAME image_count_total
openstack --os-cloud devstack-system-admin registered limit create --service glance \
--default-limit 100 --region $REGION_NAME image_count_uploading
# Tell glance to use these limits
iniset $GLANCE_API_CONF DEFAULT use_keystone_limits True
# Configure oslo_limit so it can talk to keystone
iniset $GLANCE_API_CONF oslo_limit user_domain_name $SERVICE_DOMAIN_NAME
iniset $GLANCE_API_CONF oslo_limit password $SERVICE_PASSWORD
iniset $GLANCE_API_CONF oslo_limit username glance
iniset $GLANCE_API_CONF oslo_limit auth_type password
iniset $GLANCE_API_CONF oslo_limit auth_url $KEYSTONE_SERVICE_URI
iniset $GLANCE_API_CONF oslo_limit system_scope all
iniset $GLANCE_API_CONF oslo_limit endpoint_id \
$(openstack --os-cloud devstack-system-admin endpoint list --service glance -f value -c ID)
# Allow the glance service user to read quotas
openstack --os-cloud devstack-system-admin role add --user glance \
--user-domain $SERVICE_DOMAIN_NAME --system all reader
}
# configure_glance() - Set config files, create data dirs, etc
function configure_glance {
sudo install -d -o $STACK_USER $GLANCE_CONF_DIR $GLANCE_METADEF_DIR
# We run this here as this configures cache dirs for the auth middleware
# which is used in the api server and not in the registry. The api
# Server is configured through this function and not init_glance.
create_glance_cache_dir
# Set non-default configuration options for registry
iniset $GLANCE_REGISTRY_CONF DEFAULT debug $ENABLE_DEBUG_LOG_LEVEL
iniset $GLANCE_REGISTRY_CONF DEFAULT bind_host $GLANCE_SERVICE_LISTEN_ADDRESS
iniset $GLANCE_REGISTRY_CONF DEFAULT workers $API_WORKERS
# Set non-default configuration options for the API server
local dburl
dburl=`database_connection_url glance`
iniset $GLANCE_REGISTRY_CONF database connection $dburl
iniset $GLANCE_REGISTRY_CONF DEFAULT use_syslog $SYSLOG
iniset $GLANCE_REGISTRY_CONF paste_deploy flavor keystone
configure_auth_token_middleware $GLANCE_REGISTRY_CONF glance $GLANCE_AUTH_CACHE_DIR/registry
iniset $GLANCE_REGISTRY_CONF oslo_messaging_notifications driver messagingv2
iniset_rpc_backend glance $GLANCE_REGISTRY_CONF
iniset $GLANCE_REGISTRY_CONF DEFAULT graceful_shutdown_timeout "$SERVICE_GRACEFUL_SHUTDOWN_TIMEOUT"
# Set non-default configuration options for the API server
iniset $GLANCE_API_CONF DEFAULT debug $ENABLE_DEBUG_LOG_LEVEL
iniset $GLANCE_API_CONF database connection $dburl
iniset $GLANCE_API_CONF DEFAULT use_syslog $SYSLOG
iniset $GLANCE_API_CONF DEFAULT image_cache_dir $GLANCE_CACHE_DIR/
iniset $GLANCE_API_CONF DEFAULT lock_path $GLANCE_LOCK_DIR
iniset $GLANCE_API_CONF oslo_concurrency lock_path $GLANCE_LOCK_DIR
iniset $GLANCE_API_CONF paste_deploy flavor keystone+cachemanagement
configure_auth_token_middleware $GLANCE_API_CONF glance $GLANCE_AUTH_CACHE_DIR/api
configure_keystone_authtoken_middleware $GLANCE_API_CONF glance
iniset $GLANCE_API_CONF oslo_messaging_notifications driver messagingv2
iniset_rpc_backend glance $GLANCE_API_CONF
if [ "$VIRT_DRIVER" = 'xenserver' ]; then
iniset $GLANCE_API_CONF DEFAULT container_formats "ami,ari,aki,bare,ovf,tgz"
iniset $GLANCE_API_CONF DEFAULT disk_formats "ami,ari,aki,vhd,raw,iso"
fi
if [ "$VIRT_DRIVER" = 'libvirt' ] && [ "$LIBVIRT_TYPE" = 'parallels' ]; then
iniset $GLANCE_API_CONF DEFAULT disk_formats "ami,ari,aki,vhd,vmdk,raw,qcow2,vdi,iso,ploop"
fi
# Only use these if you know what you are doing! See OSSN-0065
iniset $GLANCE_API_CONF DEFAULT show_image_direct_url $GLANCE_SHOW_DIRECT_URL
iniset $GLANCE_API_CONF DEFAULT show_multiple_locations $GLANCE_SHOW_MULTIPLE_LOCATIONS
# NOTE(flaper87): To uncomment as soon as all services consuming Glance are
# able to consume V2 entirely.
if [ "$GLANCE_V1_ENABLED" != "True" ]; then
iniset $GLANCE_API_CONF DEFAULT enable_v1_api False
fi
# Store specific configs
iniset $GLANCE_API_CONF glance_store filesystem_store_datadir $GLANCE_IMAGE_DIR/
iniset $GLANCE_API_CONF DEFAULT registry_host $(ipv6_unquote $GLANCE_SERVICE_HOST)
# Configure glance_store
configure_glance_store $USE_CINDER_FOR_GLANCE $GLANCE_ENABLE_MULTIPLE_STORES
# CORS feature support - to allow calls from Horizon by default
if [ -n "$GLANCE_CORS_ALLOWED_ORIGIN" ]; then
@@ -160,30 +352,27 @@ function configure_glance {
iniset $GLANCE_API_CONF cors allowed_origin "http://$SERVICE_HOST"
fi
# Store the images in swift if enabled.
if is_service_enabled s-proxy; then
iniset $GLANCE_API_CONF glance_store default_store swift
iniset $GLANCE_API_CONF glance_store swift_store_create_container_on_put True
if python3_enabled; then
iniset $GLANCE_API_CONF glance_store swift_store_auth_insecure True
fi
# No multiple stores for swift yet
if [[ "$GLANCE_ENABLE_MULTIPLE_STORES" == "False" ]]; then
# Store the images in swift if enabled.
if is_service_enabled s-proxy; then
iniset $GLANCE_API_CONF glance_store default_store swift
iniset $GLANCE_API_CONF glance_store swift_store_create_container_on_put True
iniset $GLANCE_API_CONF glance_store swift_store_config_file $GLANCE_SWIFT_STORE_CONF
iniset $GLANCE_API_CONF glance_store default_swift_reference ref1
iniset $GLANCE_API_CONF glance_store stores "file, http, swift"
iniset $GLANCE_API_CONF DEFAULT graceful_shutdown_timeout "$SERVICE_GRACEFUL_SHUTDOWN_TIMEOUT"
iniset $GLANCE_API_CONF glance_store swift_store_config_file $GLANCE_SWIFT_STORE_CONF
iniset $GLANCE_API_CONF glance_store default_swift_reference ref1
iniset $GLANCE_API_CONF glance_store stores "file, http, swift"
if is_service_enabled tls-proxy; then
iniset $GLANCE_API_CONF glance_store swift_store_cacert $SSL_BUNDLE_FILE
fi
iniset $GLANCE_API_CONF DEFAULT graceful_shutdown_timeout "$SERVICE_GRACEFUL_SHUTDOWN_TIMEOUT"
iniset $GLANCE_SWIFT_STORE_CONF ref1 user $SERVICE_PROJECT_NAME:glance-swift
iniset $GLANCE_SWIFT_STORE_CONF ref1 user $SERVICE_PROJECT_NAME:glance-swift
iniset $GLANCE_SWIFT_STORE_CONF ref1 key $SERVICE_PASSWORD
if python3_enabled; then
# NOTE(dims): Currently the glance_store+swift does not support either an insecure flag
# or ability to specify the CACERT. So fallback to http:// url
iniset $GLANCE_SWIFT_STORE_CONF ref1 auth_address ${KEYSTONE_SERVICE_URI/https/http}/v3
else
iniset $GLANCE_SWIFT_STORE_CONF ref1 key $SERVICE_PASSWORD
iniset $GLANCE_SWIFT_STORE_CONF ref1 auth_address $KEYSTONE_SERVICE_URI/v3
iniset $GLANCE_SWIFT_STORE_CONF ref1 auth_version 3
fi
iniset $GLANCE_SWIFT_STORE_CONF ref1 auth_version 3
fi
# We need to tell glance what it's public endpoint is so that the version
@@ -192,32 +381,22 @@ function configure_glance {
if is_service_enabled tls-proxy; then
iniset $GLANCE_API_CONF DEFAULT bind_port $GLANCE_SERVICE_PORT_INT
iniset $GLANCE_REGISTRY_CONF DEFAULT bind_port $GLANCE_REGISTRY_PORT_INT
iniset $GLANCE_API_CONF keystone_authtoken identity_uri $KEYSTONE_AUTH_URI
iniset $GLANCE_REGISTRY_CONF keystone_authtoken identity_uri $KEYSTONE_AUTH_URI
fi
if is_service_enabled tls-proxy; then
iniset $GLANCE_API_CONF DEFAULT registry_client_protocol https
iniset $GLANCE_API_CONF keystone_authtoken identity_uri $KEYSTONE_SERVICE_URI
fi
# Format logging
setup_logging $GLANCE_API_CONF
setup_logging $GLANCE_REGISTRY_CONF
cp -p $GLANCE_DIR/etc/glance-registry-paste.ini $GLANCE_REGISTRY_PASTE_INI
cp -p $GLANCE_DIR/etc/glance-api-paste.ini $GLANCE_API_PASTE_INI
# Set non-default configuration options for the glance-cache
iniset $GLANCE_CACHE_CONF DEFAULT debug $ENABLE_DEBUG_LOG_LEVEL
iniset $GLANCE_CACHE_CONF DEFAULT use_syslog $SYSLOG
iniset $GLANCE_CACHE_CONF DEFAULT image_cache_dir $GLANCE_CACHE_DIR/
iniset $GLANCE_CACHE_CONF DEFAULT auth_url $KEYSTONE_AUTH_URI
iniset $GLANCE_CACHE_CONF DEFAULT auth_url $KEYSTONE_SERVICE_URI
iniset $GLANCE_CACHE_CONF DEFAULT admin_tenant_name $SERVICE_PROJECT_NAME
iniset $GLANCE_CACHE_CONF DEFAULT admin_user glance
iniset $GLANCE_CACHE_CONF DEFAULT admin_password $SERVICE_PASSWORD
iniset $GLANCE_CACHE_CONF DEFAULT registry_host $(ipv6_unquote $GLANCE_SERVICE_HOST)
# Store specific confs
iniset $GLANCE_CACHE_CONF glance_store filesystem_store_datadir $GLANCE_IMAGE_DIR/
@@ -227,7 +406,6 @@ function configure_glance {
iniset $GLANCE_IMAGE_IMPORT_CONF inject_metadata_properties ignore_user_roles admin
iniset $GLANCE_IMAGE_IMPORT_CONF inject_metadata_properties inject
cp -p $GLANCE_DIR/etc/policy.json $GLANCE_POLICY_JSON
cp -p $GLANCE_DIR/etc/schema-image.json $GLANCE_SCHEMA_JSON
cp -p $GLANCE_DIR/etc/metadefs/*.json $GLANCE_METADEF_DIR
@@ -240,12 +418,25 @@ function configure_glance {
iniset $GLANCE_CACHE_CONF DEFAULT cinder_endpoint_template "https://$CINDER_SERVICE_HOST:$CINDER_SERVICE_PORT/v3/%(project_id)s"
fi
if [[ "$WSGI_MODE" == "uwsgi" ]]; then
if [[ "$GLANCE_STANDALONE" == False ]]; then
write_local_uwsgi_http_config "$GLANCE_UWSGI_CONF" "$GLANCE_UWSGI" "/image"
# Grab our uwsgi listen address and use that to fill out our
# worker_self_reference_url config
iniset $GLANCE_API_CONF DEFAULT worker_self_reference_url \
$(awk '-F= ' '/^http-socket/ { print "http://"$2}' \
$GLANCE_UWSGI_CONF)
else
write_local_proxy_http_config glance "http://$GLANCE_SERVICE_HOST:$GLANCE_SERVICE_PORT_INT" "/image"
iniset $GLANCE_API_CONF DEFAULT bind_host $GLANCE_SERVICE_LISTEN_ADDRESS
iniset $GLANCE_API_CONF DEFAULT bind_port $GLANCE_SERVICE_PORT_INT
iniset $GLANCE_API_CONF DEFAULT workers "$API_WORKERS"
fi
if [[ "$GLANCE_ENFORCE_SCOPE" == True || "$ENFORCE_SCOPE" == True ]] ; then
iniset $GLANCE_API_CONF oslo_policy enforce_scope true
iniset $GLANCE_API_CONF oslo_policy enforce_new_defaults true
iniset $GLANCE_API_CONF DEFAULT enforce_secure_rbac true
fi
}
# create_glance_accounts() - Set up common required glance accounts
@@ -276,14 +467,12 @@ function create_glance_accounts {
service_domain_id=$(get_or_create_domain $SERVICE_DOMAIN_NAME)
iniset $GLANCE_SWIFT_STORE_CONF ref1 project_domain_id $service_domain_id
iniset $GLANCE_SWIFT_STORE_CONF ref1 user_domain_id $service_domain_id
fi
}
# create_glance_cache_dir() - Part of the configure_glance() process
function create_glance_cache_dir {
# Create cache dir
sudo install -d -o $STACK_USER $GLANCE_AUTH_CACHE_DIR/api $GLANCE_AUTH_CACHE_DIR/registry $GLANCE_AUTH_CACHE_DIR/search $GLANCE_AUTH_CACHE_DIR/artifact
rm -f $GLANCE_AUTH_CACHE_DIR/api/* $GLANCE_AUTH_CACHE_DIR/registry/* $GLANCE_AUTH_CACHE_DIR/search/* $GLANCE_AUTH_CACHE_DIR/artifact/*
if [[ "$GLANCE_ENABLE_QUOTAS" = True ]]; then
configure_glance_quotas
fi
fi
}
# init_glance() - Initialize databases, etc.
@@ -292,10 +481,6 @@ function init_glance {
rm -rf $GLANCE_IMAGE_DIR
mkdir -p $GLANCE_IMAGE_DIR
# Delete existing cache
rm -rf $GLANCE_CACHE_DIR
mkdir -p $GLANCE_CACHE_DIR
# (Re)create glance database
recreate_database glance
@@ -319,11 +504,26 @@ function install_glanceclient {
# install_glance() - Collect source and prepare
function install_glance {
local glance_store_extras=()
if is_service_enabled cinder; then
glance_store_extras=("cinder" "${glance_store_extras[@]}")
fi
if is_service_enabled swift; then
glance_store_extras=("swift" "${glance_store_extras[@]}")
fi
# Install glance_store from git so we make sure we're testing
# the latest code.
if use_library_from_git "glance_store"; then
git_clone_by_name "glance_store"
setup_dev_lib "glance_store"
setup_dev_lib "glance_store" $(join_extras "${glance_store_extras[@]}")
copy_rootwrap ${DEST}/glance_store/etc/glance
else
# we still need to pass extras
pip_install_gr_extras glance-store $(join_extras "${glance_store_extras[@]}")
copy_rootwrap $GLANCE_STORE_ROOTWRAP_BASE_DIR
fi
git_clone $GLANCE_REPO $GLANCE_DIR $GLANCE_BRANCH
@@ -331,6 +531,72 @@ function install_glance {
setup_develop $GLANCE_DIR
}
# glance_remote_conf() - Return the path to an alternate config file for
# the remote glance clone
function glance_remote_conf {
echo $(dirname "${GLANCE_CONF_DIR}")/glance-remote/$(basename "$1")
}
# start_glance_remote_clone() - Clone the regular glance api worker
function start_glance_remote_clone {
local glance_remote_conf_dir glance_remote_port remote_data
local glance_remote_uwsgi
glance_remote_conf_dir="$(glance_remote_conf "")"
glance_remote_port=$(get_random_port)
glance_remote_uwsgi="$(glance_remote_conf $GLANCE_UWSGI_CONF)"
# Clone the existing ready-to-go glance-api setup
sudo rm -Rf "$glance_remote_conf_dir"
sudo cp -r "$GLANCE_CONF_DIR" "$glance_remote_conf_dir"
sudo chown $STACK_USER -R "$glance_remote_conf_dir"
# Point this worker at different data dirs
remote_data="${DATA_DIR}/glance-remote"
mkdir -p $remote_data/os_glance_tasks_store \
"${remote_data}/os_glance_staging_store"
iniset $(glance_remote_conf "$GLANCE_API_CONF") os_glance_staging_store \
filesystem_store_datadir "${remote_data}/os_glance_staging_store"
iniset $(glance_remote_conf "$GLANCE_API_CONF") os_glance_tasks_store \
filesystem_store_datadir "${remote_data}/os_glance_tasks_store"
# Point this worker to use different cache dir
mkdir -p "$remote_data/cache"
iniset $(glance_remote_conf "$GLANCE_API_CONF") DEFAULT \
image_cache_dir "${remote_data}/cache"
# Change our uwsgi to our new port
sed -ri "s/^(http-socket.*):[0-9]+/\1:$glance_remote_port/" \
"$glance_remote_uwsgi"
# Update the self-reference url with our new port
iniset $(glance_remote_conf $GLANCE_API_CONF) DEFAULT \
worker_self_reference_url \
$(awk '-F= ' '/^http-socket/ { print "http://"$2 }' \
"$glance_remote_uwsgi")
# We need to create the systemd service for the clone, but then
# change it to include an Environment line to point the WSGI app
# at the alternate config directory.
write_uwsgi_user_unit_file devstack@g-api-r.service "$(which uwsgi) \
--procname-prefix \
glance-api-remote \
--ini $glance_remote_uwsgi" \
"" "$STACK_USER"
iniset -sudo ${SYSTEMD_DIR}/devstack@g-api-r.service \
"Service" "Environment" \
"OS_GLANCE_CONFIG_DIR=$glance_remote_conf_dir"
# Reload and restart with the new config
$SYSTEMCTL daemon-reload
$SYSTEMCTL restart devstack@g-api-r
get_or_create_service glance_remote image_remote "Alternate glance"
get_or_create_endpoint image_remote $REGION_NAME \
$(awk '-F= ' '/^http-socket/ { print "http://"$2 }' \
$glance_remote_uwsgi)
}
# start_glance() - Start running processes
function start_glance {
local service_protocol=$GLANCE_SERVICE_PROTOCOL
@@ -338,16 +604,19 @@ function start_glance {
if [[ "$WSGI_MODE" != "uwsgi" ]]; then
start_tls_proxy glance-service '*' $GLANCE_SERVICE_PORT $GLANCE_SERVICE_HOST $GLANCE_SERVICE_PORT_INT
fi
start_tls_proxy glance-registry '*' $GLANCE_REGISTRY_PORT $GLANCE_SERVICE_HOST $GLANCE_REGISTRY_PORT_INT
fi
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"
if [[ "$GLANCE_STANDALONE" == False ]]; then
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
if is_service_enabled g-api-r; then
echo "Starting the g-api-r clone service..."
start_glance_remote_clone
fi
echo "Waiting for g-api ($GLANCE_SERVICE_HOST) to start..."
if ! wait_for_service $SERVICE_TIMEOUT $GLANCE_URL; then
die $LINENO "g-api did not start"
@@ -357,7 +626,7 @@ function start_glance {
# stop_glance() - Stop running processes
function stop_glance {
stop_process g-api
stop_process g-reg
stop_process g-api-r
}
# Restore xtrace
+5 -3
View File
@@ -43,8 +43,8 @@ function _horizon_config_set {
local value=$4
if [ -z "$section" ]; then
sed -e "/^$option/d" -i $local_settings
echo -e "\n$option=$value" >> $file
sed -e "/^$option/d" -i $file
echo "$option = $value" >> $file
elif grep -q "^$section" $file; then
local line
line=$(sed -ne "/^$section/,/^}/ { /^ *'$option':/ p; }" $file)
@@ -84,6 +84,9 @@ function configure_horizon {
local local_settings=$HORIZON_DIR/openstack_dashboard/local/local_settings.py
cp $HORIZON_SETTINGS $local_settings
# Ensure local_setting.py file ends with EOL (newline)
echo >> $local_settings
_horizon_config_set $local_settings "" WEBROOT \"$HORIZON_APACHE_ROOT/\"
_horizon_config_set $local_settings "" COMPRESS_OFFLINE True
@@ -91,7 +94,6 @@ function configure_horizon {
_horizon_config_set $local_settings "" OPENSTACK_HOST \"${KEYSTONE_SERVICE_HOST}\"
_horizon_config_set $local_settings "" OPENSTACK_API_VERSIONS {\"identity\":3}
_horizon_config_set $local_settings "" OPENSTACK_KEYSTONE_URL "\"${KEYSTONE_SERVICE_URI}/v3\""
# note(trebskit): if HOST_IP points at non-localhost ip address, horizon cannot be accessed
+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
+117 -71
View File
@@ -9,7 +9,6 @@
# - ``tls`` file
# - ``DEST``, ``STACK_USER``
# - ``FILES``
# - ``IDENTITY_API_VERSION``
# - ``BASE_SQL_CONN``
# - ``SERVICE_HOST``, ``SERVICE_PROTOCOL``
# - ``S3_SERVICE_PORT`` (template backend only)
@@ -50,9 +49,7 @@ fi
KEYSTONE_CONF_DIR=${KEYSTONE_CONF_DIR:-/etc/keystone}
KEYSTONE_CONF=$KEYSTONE_CONF_DIR/keystone.conf
KEYSTONE_PUBLIC_UWSGI_CONF=$KEYSTONE_CONF_DIR/keystone-uwsgi-public.ini
KEYSTONE_ADMIN_UWSGI_CONF=$KEYSTONE_CONF_DIR/keystone-uwsgi-admin.ini
KEYSTONE_PUBLIC_UWSGI=$KEYSTONE_BIN_DIR/keystone-wsgi-public
KEYSTONE_ADMIN_UWSGI=$KEYSTONE_BIN_DIR/keystone-wsgi-admin
# KEYSTONE_DEPLOY defines how keystone is deployed, allowed values:
# - mod_wsgi : Run keystone under Apache HTTPd mod_wsgi
@@ -81,21 +78,12 @@ KEYSTONE_RESOURCE_BACKEND=${KEYSTONE_RESOURCE_BACKEND:-sql}
KEYSTONE_TOKEN_FORMAT=${KEYSTONE_TOKEN_FORMAT:-fernet}
KEYSTONE_TOKEN_FORMAT=$(echo ${KEYSTONE_TOKEN_FORMAT} | tr '[:upper:]' '[:lower:]')
# Set Keystone interface configuration
KEYSTONE_AUTH_HOST=${KEYSTONE_AUTH_HOST:-$SERVICE_HOST}
KEYSTONE_AUTH_PORT=${KEYSTONE_AUTH_PORT:-35357}
KEYSTONE_AUTH_PORT_INT=${KEYSTONE_AUTH_PORT_INT:-35358}
KEYSTONE_AUTH_PROTOCOL=${KEYSTONE_AUTH_PROTOCOL:-$SERVICE_PROTOCOL}
# Public facing bits
KEYSTONE_SERVICE_HOST=${KEYSTONE_SERVICE_HOST:-$SERVICE_HOST}
KEYSTONE_SERVICE_PORT=${KEYSTONE_SERVICE_PORT:-5000}
KEYSTONE_SERVICE_PORT_INT=${KEYSTONE_SERVICE_PORT_INT:-5001}
KEYSTONE_SERVICE_PROTOCOL=${KEYSTONE_SERVICE_PROTOCOL:-$SERVICE_PROTOCOL}
# Bind hosts
KEYSTONE_ADMIN_BIND_HOST=${KEYSTONE_ADMIN_BIND_HOST:-$KEYSTONE_SERVICE_HOST}
# Set the project for service accounts in Keystone
SERVICE_DOMAIN_NAME=${SERVICE_DOMAIN_NAME:-Default}
SERVICE_PROJECT_NAME=${SERVICE_PROJECT_NAME:-service}
@@ -106,7 +94,6 @@ SERVICE_TENANT_NAME=${SERVICE_PROJECT_NAME:-service}
# if we are running with SSL use https protocols
if is_service_enabled tls-proxy; then
KEYSTONE_AUTH_PROTOCOL="https"
KEYSTONE_SERVICE_PROTOCOL="https"
fi
@@ -115,7 +102,7 @@ KEYSTONE_SERVICE_URI=${KEYSTONE_SERVICE_PROTOCOL}://${KEYSTONE_SERVICE_HOST}/ide
KEYSTONE_AUTH_URI=$KEYSTONE_SERVICE_URI
# V3 URIs
KEYSTONE_AUTH_URI_V3=$KEYSTONE_AUTH_URI/v3
KEYSTONE_AUTH_URI_V3=$KEYSTONE_SERVICE_URI/v3
KEYSTONE_SERVICE_URI_V3=$KEYSTONE_SERVICE_URI/v3
# Security compliance
@@ -131,6 +118,18 @@ 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}
# Whether to create a keystone admin endpoint for legacy applications
KEYSTONE_ADMIN_ENDPOINT=$(trueorfalse False KEYSTONE_ADMIN_ENDPOINT)
# Flag to set the oslo_policy.enforce_scope. This is used to switch
# the Identity API policies to start checking the scope of token. By Default,
# this flag is False.
# For more detail: https://docs.openstack.org/oslo.policy/latest/configuration/index.html#oslo_policy.enforce_scope
KEYSTONE_ENFORCE_SCOPE=$(trueorfalse False KEYSTONE_ENFORCE_SCOPE)
# Functions
# ---------
@@ -151,11 +150,8 @@ function cleanup_keystone {
sudo rm -f $(apache_site_config_for keystone)
else
stop_process "keystone"
# TODO: remove admin at pike-2
remove_uwsgi_config "$KEYSTONE_PUBLIC_UWSGI_CONF" "$KEYSTONE_PUBLIC_UWSGI"
remove_uwsgi_config "$KEYSTONE_ADMIN_UWSGI_CONF" "$KEYSTONE_ADMIN_UWSGI"
sudo rm -f $(apache_site_config_for keystone-wsgi-public)
sudo rm -f $(apache_site_config_for keystone-wsgi-admin)
fi
}
@@ -168,12 +164,10 @@ function _config_keystone_apache_wsgi {
local keystone_certfile=""
local keystone_keyfile=""
local keystone_service_port=$KEYSTONE_SERVICE_PORT
local keystone_auth_port=$KEYSTONE_AUTH_PORT
local venv_path=""
if is_service_enabled tls-proxy; then
keystone_service_port=$KEYSTONE_SERVICE_PORT_INT
keystone_auth_port=$KEYSTONE_AUTH_PORT_INT
fi
if [[ ${USE_VENV} = True ]]; then
venv_path="python-path=${PROJECT_VENV["keystone"]}/lib/$(python_version)/site-packages"
@@ -182,7 +176,6 @@ function _config_keystone_apache_wsgi {
sudo cp $FILES/apache-keystone.template $keystone_apache_conf
sudo sed -e "
s|%PUBLICPORT%|$keystone_service_port|g;
s|%ADMINPORT%|$keystone_auth_port|g;
s|%APACHE_NAME%|$APACHE_NAME|g;
s|%SSLLISTEN%|$keystone_ssl_listen|g;
s|%SSLENGINE%|$keystone_ssl|g;
@@ -213,29 +206,24 @@ 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
local service_port=$KEYSTONE_SERVICE_PORT
local auth_port=$KEYSTONE_AUTH_PORT
if is_service_enabled tls-proxy; then
# Set the service ports for a proxy to take the originals
service_port=$KEYSTONE_SERVICE_PORT_INT
auth_port=$KEYSTONE_AUTH_PORT_INT
fi
# Override the endpoints advertised by keystone (the public_endpoint and
# admin_endpoint) so that clients use the correct endpoint. By default, the
# keystone server uses the public_port and admin_port which isn't going to
# work when you want to use a different port (in the case of proxy), or you
# don't want the port (in the case of putting keystone on a path in
# apache).
# Override the endpoints advertised by keystone so that clients use the correct
# endpoint. By default, the keystone server uses the public_port which isn't
# going to work when you want to use a different port (in the case of proxy),
# or you don't want the port (in the case of putting keystone on a path in apache).
iniset $KEYSTONE_CONF DEFAULT public_endpoint $KEYSTONE_SERVICE_URI
iniset $KEYSTONE_CONF DEFAULT admin_endpoint $KEYSTONE_AUTH_URI
if [[ "$KEYSTONE_TOKEN_FORMAT" != "" ]]; then
iniset $KEYSTONE_CONF token provider $KEYSTONE_TOKEN_FORMAT
@@ -258,7 +246,6 @@ function configure_keystone {
_config_keystone_apache_wsgi
else # uwsgi
write_uwsgi_config "$KEYSTONE_PUBLIC_UWSGI_CONF" "$KEYSTONE_PUBLIC_UWSGI" "/identity"
write_uwsgi_config "$KEYSTONE_ADMIN_UWSGI_CONF" "$KEYSTONE_ADMIN_UWSGI" "/identity_admin"
fi
iniset $KEYSTONE_CONF DEFAULT max_token_size 16384
@@ -278,6 +265,11 @@ function configure_keystone {
iniset $KEYSTONE_CONF security_compliance lockout_duration $KEYSTONE_LOCKOUT_DURATION
iniset $KEYSTONE_CONF security_compliance unique_last_password_count $KEYSTONE_UNIQUE_LAST_PASSWORD_COUNT
fi
if [[ "$KEYSTONE_ENFORCE_SCOPE" == True || "$ENFORCE_SCOPE" == True ]] ; then
iniset $KEYSTONE_CONF oslo_policy enforce_scope true
iniset $KEYSTONE_CONF oslo_policy enforce_new_defaults true
iniset $KEYSTONE_CONF oslo_policy policy_file policy.yaml
fi
}
# create_keystone_accounts() - Sets up common required keystone accounts
@@ -300,40 +292,48 @@ function configure_keystone {
# admins admin admin admin
# nonadmins demo, alt_demo member, anotherrole demo, alt_demo
# System User Roles
# ------------------------------------------------------------------
# all admin admin
# all system_reader reader
# all system_member member
# Migrated from keystone_data.sh
function create_keystone_accounts {
# The keystone bootstrapping process (performed via keystone-manage
# bootstrap) creates an admin user, admin role, member role, and admin
# bootstrap) creates an admin user and an admin
# project. As a sanity check we exercise the CLI to retrieve the IDs for
# these values.
local admin_project
admin_project=$(openstack project show "admin" -f value -c id)
local admin_user
admin_user=$(openstack user show "admin" -f value -c id)
# These roles are also created during bootstrap but we don't need their IDs
local admin_role="admin"
local member_role="member"
local reader_role="reader"
get_or_add_user_domain_role $admin_role $admin_user default
async_run ks-domain-role get_or_add_user_domain_role $admin_role $admin_user default
# Create service project/role
get_or_create_domain "$SERVICE_DOMAIN_NAME"
get_or_create_project "$SERVICE_PROJECT_NAME" "$SERVICE_DOMAIN_NAME"
async_run ks-project get_or_create_project "$SERVICE_PROJECT_NAME" "$SERVICE_DOMAIN_NAME"
# Service role, so service users do not have to be admins
get_or_create_role service
async_run ks-service get_or_create_role service
# The ResellerAdmin role is used by Nova and Ceilometer so we need to keep it.
# The admin role in swift allows a user to act as an admin for their project,
# but ResellerAdmin is needed for a user to act as any project. The name of this
# role is also configurable in swift-proxy.conf
get_or_create_role ResellerAdmin
async_run ks-reseller get_or_create_role ResellerAdmin
# another_role demonstrates that an arbitrary role may be created and used
# TODO(sleepsonthefloor): show how this can be used for rbac in the future!
local another_role="anotherrole"
get_or_create_role $another_role
async_run ks-anotherrole get_or_create_role $another_role
# invisible project - admin can't see this one
local invis_project
@@ -346,21 +346,55 @@ function create_keystone_accounts {
demo_user=$(get_or_create_user "demo" \
"$ADMIN_PASSWORD" "default" "demo@example.com")
get_or_add_user_project_role $member_role $demo_user $demo_project
get_or_add_user_project_role $admin_role $admin_user $demo_project
get_or_add_user_project_role $another_role $demo_user $demo_project
get_or_add_user_project_role $member_role $demo_user $invis_project
async_wait ks-{domain-role,domain,project,service,reseller,anotherrole}
# alt_demo
async_run ks-demo-member get_or_add_user_project_role $member_role $demo_user $demo_project
async_run ks-demo-admin get_or_add_user_project_role $admin_role $admin_user $demo_project
async_run ks-demo-another get_or_add_user_project_role $another_role $demo_user $demo_project
async_run ks-demo-invis get_or_add_user_project_role $member_role $demo_user $invis_project
# Create a user to act as a reader on project demo
local demo_reader
demo_reader=$(get_or_create_user "demo_reader" \
"$ADMIN_PASSWORD" "default" "demo_reader@example.com")
async_run ks-demo-reader get_or_add_user_project_role $reader_role $demo_reader $demo_project
# Create a different project called alt_demo
local alt_demo_project
alt_demo_project=$(get_or_create_project "alt_demo" default)
# Create a user to act as member, admin and anotherrole on project alt_demo
local alt_demo_user
alt_demo_user=$(get_or_create_user "alt_demo" \
"$ADMIN_PASSWORD" "default" "alt_demo@example.com")
get_or_add_user_project_role $member_role $alt_demo_user $alt_demo_project
get_or_add_user_project_role $admin_role $admin_user $alt_demo_project
get_or_add_user_project_role $another_role $alt_demo_user $alt_demo_project
async_run ks-alt-admin get_or_add_user_project_role $admin_role $alt_demo_user $alt_demo_project
async_run ks-alt-another get_or_add_user_project_role $another_role $alt_demo_user $alt_demo_project
# Create another user to act as a member on project alt_demo
local alt_demo_member
alt_demo_member=$(get_or_create_user "alt_demo_member" \
"$ADMIN_PASSWORD" "default" "alt_demo_member@example.com")
async_run ks-alt-member-user get_or_add_user_project_role $member_role $alt_demo_member $alt_demo_project
# Create another user to act as a reader on project alt_demo
local alt_demo_reader
alt_demo_reader=$(get_or_create_user "alt_demo_reader" \
"$ADMIN_PASSWORD" "default" "alt_demo_reader@example.com")
async_run ks-alt-reader-user get_or_add_user_project_role $reader_role $alt_demo_reader $alt_demo_project
# Create two users, give one the member role on the system and the other the
# reader role on the system. These two users model system-member and
# system-reader personas. The admin user already has the admin role on the
# system and we can re-use this user as a system-admin.
system_member_user=$(get_or_create_user "system_member" \
"$ADMIN_PASSWORD" "default" "system_member@example.com")
async_run ks-system-member get_or_add_user_system_role $member_role $system_member_user "all"
system_reader_user=$(get_or_create_user "system_reader" \
"$ADMIN_PASSWORD" "default" "system_reader@example.com")
async_run ks-system-reader get_or_add_user_system_role $reader_role $system_reader_user "all"
# groups
local admin_group
@@ -370,11 +404,16 @@ function create_keystone_accounts {
non_admin_group=$(get_or_create_group "nonadmins" \
"default" "non-admin group")
get_or_add_group_project_role $member_role $non_admin_group $demo_project
get_or_add_group_project_role $another_role $non_admin_group $demo_project
get_or_add_group_project_role $member_role $non_admin_group $alt_demo_project
get_or_add_group_project_role $another_role $non_admin_group $alt_demo_project
get_or_add_group_project_role $admin_role $admin_group $admin_project
async_run ks-group-memberdemo get_or_add_group_project_role $member_role $non_admin_group $demo_project
async_run ks-group-anotherdemo get_or_add_group_project_role $another_role $non_admin_group $demo_project
async_run ks-group-memberalt get_or_add_group_project_role $member_role $non_admin_group $alt_demo_project
async_run ks-group-anotheralt get_or_add_group_project_role $another_role $non_admin_group $alt_demo_project
async_run ks-group-admin get_or_add_group_project_role $admin_role $admin_group $admin_project
async_wait ks-demo-{member,admin,another,invis,reader}
async_wait ks-alt-{admin,another,member-user,reader-user}
async_wait ks-system-{member,reader}
async_wait ks-group-{memberdemo,anotherdemo,memberalt,anotheralt,admin}
if is_service_enabled ldap; then
create_ldap_domain
@@ -397,20 +436,20 @@ function create_service_user {
fi
}
# Configure the service to use the auth token middleware.
# Configure a service to use the auth token middleware.
#
# configure_auth_token_middleware conf_file admin_user signing_dir [section]
# configure_keystone_authtoken_middleware conf_file admin_user IGNORED [section]
#
# section defaults to keystone_authtoken, which is where auth_token looks in
# the .conf file. If the paste config file is used (api-paste.ini) then
# provide the section name for the auth_token filter.
function configure_auth_token_middleware {
function configure_keystone_authtoken_middleware {
local conf_file=$1
local admin_user=$2
local signing_dir=$3
local section=${4:-keystone_authtoken}
local section=${3:-keystone_authtoken}
iniset $conf_file $section auth_type password
iniset $conf_file $section interface public
iniset $conf_file $section auth_url $KEYSTONE_SERVICE_URI
iniset $conf_file $section username $admin_user
iniset $conf_file $section password $SERVICE_PASSWORD
@@ -419,8 +458,14 @@ function configure_auth_token_middleware {
iniset $conf_file $section project_domain_name "$SERVICE_DOMAIN_NAME"
iniset $conf_file $section cafile $SSL_BUNDLE_FILE
iniset $conf_file $section signing_dir $signing_dir
iniset $conf_file $section memcached_servers localhost:11211
iniset $conf_file $section memcached_servers $MEMCACHE_SERVERS
}
# configure_auth_token_middleware conf_file admin_user IGNORED [section]
# TODO(frickler): old function for backwards compatibility, remove in U cycle
function configure_auth_token_middleware {
echo "WARNING: configure_auth_token_middleware is deprecated, use configure_keystone_authtoken_middleware instead"
configure_keystone_authtoken_middleware $1 $2 $4
}
# init_keystone() - Initialize databases, etc.
@@ -496,8 +541,6 @@ function install_keystone {
if [ "$KEYSTONE_DEPLOY" == "mod_wsgi" ]; then
install_apache_wsgi
elif [ "$KEYSTONE_DEPLOY" == "uwsgi" ]; then
pip_install uwsgi
fi
}
@@ -505,7 +548,7 @@ function install_keystone {
function start_keystone {
# Get right service port for testing
local service_port=$KEYSTONE_SERVICE_PORT
local auth_protocol=$KEYSTONE_AUTH_PROTOCOL
local auth_protocol=$KEYSTONE_SERVICE_PROTOCOL
if is_service_enabled tls-proxy; then
service_port=$KEYSTONE_SERVICE_PORT_INT
auth_protocol="http"
@@ -515,7 +558,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..."
@@ -524,7 +567,7 @@ function start_keystone {
# unencryted traffic at this point.
# If running in Apache, use the path rather than port.
local service_uri=$auth_protocol://$KEYSTONE_SERVICE_HOST/identity/v$IDENTITY_API_VERSION/
local service_uri=$auth_protocol://$KEYSTONE_SERVICE_HOST/identity/v3/
if ! wait_for_service $SERVICE_TIMEOUT $service_uri; then
die $LINENO "keystone did not start"
@@ -533,7 +576,6 @@ function start_keystone {
# Start proxies if enabled
if is_service_enabled tls-proxy; then
start_tls_proxy keystone-service '*' $KEYSTONE_SERVICE_PORT $KEYSTONE_SERVICE_HOST $KEYSTONE_SERVICE_PORT_INT
start_tls_proxy keystone-auth '*' $KEYSTONE_AUTH_PORT $KEYSTONE_AUTH_HOST $KEYSTONE_AUTH_PORT_INT
fi
# (re)start memcached to make sure we have a clean memcache.
@@ -554,12 +596,8 @@ function stop_keystone {
# This function uses the following GLOBAL variables:
# - ``KEYSTONE_BIN_DIR``
# - ``ADMIN_PASSWORD``
# - ``IDENTITY_API_VERSION``
# - ``KEYSTONE_AUTH_URI``
# - ``REGION_NAME``
# - ``KEYSTONE_SERVICE_PROTOCOL``
# - ``KEYSTONE_SERVICE_HOST``
# - ``KEYSTONE_SERVICE_PORT``
# - ``KEYSTONE_SERVICE_URI``
function bootstrap_keystone {
$KEYSTONE_BIN_DIR/keystone-manage bootstrap \
--bootstrap-username admin \
@@ -568,8 +606,16 @@ function bootstrap_keystone {
--bootstrap-role-name admin \
--bootstrap-service-name keystone \
--bootstrap-region-id "$REGION_NAME" \
--bootstrap-admin-url "$KEYSTONE_AUTH_URI" \
--bootstrap-public-url "$KEYSTONE_SERVICE_URI"
if [ "$KEYSTONE_ADMIN_ENDPOINT" == "True" ]; then
openstack endpoint create --region "$REGION_NAME" \
--os-username admin \
--os-user-domain-id default \
--os-password "$ADMIN_PASSWORD" \
--os-project-name admin \
--os-project-domain-id default \
keystone admin "$KEYSTONE_SERVICE_URI"
fi
}
# create_ldap_domain() - Create domain file and initialize domain with a user
+5 -1
View File
@@ -33,14 +33,17 @@ LDAP_SERVICE_NAME=slapd
if is_ubuntu; then
LDAP_OLCDB_NUMBER=1
LDAP_OLCDB_TYPE=mdb
LDAP_ROOTPW_COMMAND=replace
elif is_fedora; then
LDAP_OLCDB_NUMBER=2
LDAP_OLCDB_TYPE=hdb
LDAP_ROOTPW_COMMAND=add
elif is_suse; then
# SUSE has slappasswd in /usr/sbin/
PATH=$PATH:/usr/sbin/
LDAP_OLCDB_NUMBER=1
LDAP_OLCDB_TYPE=hdb
LDAP_ROOTPW_COMMAND=add
LDAP_SERVICE_NAME=ldap
fi
@@ -56,6 +59,7 @@ function _ldap_varsubst {
local slappass=$2
sed -e "
s|\${LDAP_OLCDB_NUMBER}|$LDAP_OLCDB_NUMBER|
s|\${LDAP_OLCDB_TYPE}|$LDAP_OLCDB_TYPE|
s|\${SLAPPASS}|$slappass|
s|\${LDAP_ROOTPW_COMMAND}|$LDAP_ROOTPW_COMMAND|
s|\${BASE_DC}|$LDAP_BASE_DC|
@@ -157,7 +161,7 @@ function configure_ldap {
slapd slapd/dump_database_destdir string /var/backups/slapd-VERSION
slapd slapd/domain string Users
slapd shared/organization string $LDAP_DOMAIN
slapd slapd/backend string HDB
slapd slapd/backend string ${LDAP_OLCDB_TYPE^^}
slapd slapd/purge_database boolean true
slapd slapd/move_old_database boolean true
slapd slapd/allow_ldap_v2 boolean false
Regular → Executable
+5 -1
View File
@@ -38,6 +38,7 @@ GITDIR["oslo.config"]=$DEST/oslo.config
GITDIR["oslo.context"]=$DEST/oslo.context
GITDIR["oslo.db"]=$DEST/oslo.db
GITDIR["oslo.i18n"]=$DEST/oslo.i18n
GITDIR["oslo.limit"]=$DEST/oslo.limit
GITDIR["oslo.log"]=$DEST/oslo.log
GITDIR["oslo.messaging"]=$DEST/oslo.messaging
GITDIR["oslo.middleware"]=$DEST/oslo.middleware
@@ -59,6 +60,7 @@ GITDIR["tooz"]=$DEST/tooz
# Non oslo libraries are welcomed below as well, this prevents
# duplication of this code.
GITDIR["os-brick"]=$DEST/os-brick
GITDIR["os-resource-classes"]=$DEST/os-resource-classes
GITDIR["os-traits"]=$DEST/os-traits
# Support entry points installation of console scripts
@@ -72,7 +74,7 @@ function _install_lib_from_source {
local name=$1
if use_library_from_git "$name"; then
git_clone_by_name "$name"
setup_dev_lib "$name"
setup_dev_lib -bindep "$name"
fi
}
@@ -101,6 +103,7 @@ function install_libs {
_install_lib_from_source "oslo.context"
_install_lib_from_source "oslo.db"
_install_lib_from_source "oslo.i18n"
_install_lib_from_source "oslo.limit"
_install_lib_from_source "oslo.log"
_install_lib_from_source "oslo.messaging"
_install_lib_from_source "oslo.middleware"
@@ -122,6 +125,7 @@ function install_libs {
#
# os-traits for nova
_install_lib_from_source "os-brick"
_install_lib_from_source "os-resource-classes"
_install_lib_from_source "os-traits"
#
# python client libraries we might need from git can go here
+30 -29
View File
@@ -53,28 +53,10 @@ function _remove_lvm_volume_group {
sudo vgremove -f $vg
}
# _clean_lvm_backing_file() removes the backing file of the
# volume group
#
# Usage: _clean_lvm_backing_file() $backing_file
function _clean_lvm_backing_file {
local backing_file=$1
# If the backing physical device is a loop device, it was probably setup by DevStack
if [[ -n "$backing_file" ]] && [[ -e "$backing_file" ]]; then
local vg_dev
vg_dev=$(sudo losetup -j $backing_file | awk -F':' '/'$BACKING_FILE_SUFFIX'/ { print $1}')
if [[ -n "$vg_dev" ]]; then
sudo losetup -d $vg_dev
fi
rm -f $backing_file
fi
}
# clean_lvm_volume_group() cleans up the volume group and removes the
# backing file
#
# Usage: clean_lvm_volume_group $vg
# Usage: clean_lvm_volume_group() $vg
function clean_lvm_volume_group {
local vg=$1
@@ -83,11 +65,22 @@ function clean_lvm_volume_group {
# if there is no logical volume left, it's safe to attempt a cleanup
# of the backing file
if [[ -z "$(sudo lvs --noheadings -o lv_name $vg 2>/dev/null)" ]]; then
_clean_lvm_backing_file $DATA_DIR/$vg$BACKING_FILE_SUFFIX
local backing_file=$DATA_DIR/$vg$BACKING_FILE_SUFFIX
if [[ -n "$vg$BACKING_FILE_SUFFIX" ]] && \
[[ -e "/etc/systemd/system/$vg$BACKING_FILE_SUFFIX.service" ]]; then
sudo systemctl disable --now $vg$BACKING_FILE_SUFFIX.service
sudo rm -f /etc/systemd/system/$vg$BACKING_FILE_SUFFIX.service
sudo systemctl daemon-reload
fi
# If the backing physical device is a loop device, it was probably setup by DevStack
if [[ -n "$backing_file" ]] && [[ -e "$backing_file" ]]; then
rm -f $backing_file
fi
fi
}
# _create_lvm_volume_group creates default volume group
#
# Usage: _create_lvm_volume_group() $vg $size
@@ -106,8 +99,20 @@ function _create_lvm_volume_group {
directio="--direct-io=on"
fi
# Only create systemd service if it doesn't already exists
if [[ ! -e "/etc/systemd/system/$vg$BACKING_FILE_SUFFIX.service" ]]; then
sed -e "
s|%DIRECTIO%|${directio}|g;
s|%BACKING_FILE%|${backing_file}|g;
" $FILES/lvm-backing-file.template | sudo tee \
/etc/systemd/system/$vg$BACKING_FILE_SUFFIX.service
sudo systemctl daemon-reload
sudo systemctl enable --now $vg$BACKING_FILE_SUFFIX.service
fi
local vg_dev
vg_dev=$(sudo losetup -f --show $directio $backing_file)
vg_dev=$(sudo losetup --associated $backing_file -O NAME -n)
# Only create volume group if it doesn't already exist
if ! sudo vgs $vg; then
@@ -124,13 +129,9 @@ 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_service lvm2-lvmetad
if [ "$CINDER_ISCSI_HELPER" = "tgtadm" ]; then
start_service tgtd
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
+79 -31
View File
@@ -36,7 +36,11 @@ GITDIR["python-neutronclient"]=$DEST/python-neutronclient
NEUTRON_DEPLOY_MOD_WSGI=$(trueorfalse False NEUTRON_DEPLOY_MOD_WSGI)
NEUTRON_AGENT=${NEUTRON_AGENT:-openvswitch}
NEUTRON_DIR=$DEST/neutron
NEUTRON_AUTH_CACHE_DIR=${NEUTRON_AUTH_CACHE_DIR:-/var/cache/neutron}
# If NEUTRON_ENFORCE_SCOPE == True, it will set "enforce_scope"
# and "enforce_new_defaults" to True in the Neutron's config to enforce usage
# of the new RBAC policies and scopes.
NEUTRON_ENFORCE_SCOPE=$(trueorfalse False NEUTRON_ENFORCE_SCOPE)
NEUTRON_DISTRIBUTED_ROUTING=$(trueorfalse False NEUTRON_DISTRIBUTED_ROUTING)
# Distributed Virtual Router (DVR) configuration
@@ -55,6 +59,7 @@ NEUTRON_DHCP_BINARY="neutron-dhcp-agent"
NEUTRON_CONF_DIR=/etc/neutron
NEUTRON_CONF=$NEUTRON_CONF_DIR/neutron.conf
NEUTRON_META_CONF=$NEUTRON_CONF_DIR/metadata_agent.ini
NEUTRON_META_DATA_HOST=${NEUTRON_META_DATA_HOST:-$(ipv6_unquote $SERVICE_HOST)}
NEUTRON_DHCP_CONF=$NEUTRON_CONF_DIR/dhcp_agent.ini
NEUTRON_L3_CONF=$NEUTRON_CONF_DIR/l3_agent.ini
@@ -62,7 +67,6 @@ NEUTRON_AGENT_CONF=$NEUTRON_CONF_DIR/
NEUTRON_CREATE_INITIAL_NETWORKS=${NEUTRON_CREATE_INITIAL_NETWORKS:-True}
NEUTRON_STATE_PATH=${NEUTRON_STATE_PATH:=$DATA_DIR/neutron}
NEUTRON_AUTH_CACHE_DIR=${NEUTRON_AUTH_CACHE_DIR:-/var/cache/neutron}
NEUTRON_UWSGI_CONF=$NEUTRON_CONF_DIR/neutron-api-uwsgi.ini
@@ -100,6 +104,23 @@ NEUTRON_ROOTWRAP_DAEMON_CMD="$NEUTRON_ROOTWRAP-daemon $NEUTRON_ROOTWRAP_CONF_FIL
PUBLIC_BRIDGE=${PUBLIC_BRIDGE:-br-ex}
PUBLIC_BRIDGE_MTU=${PUBLIC_BRIDGE_MTU:-1500}
# Network type - default vxlan, however enables vlan based jobs to override
# using the legacy environment variable as well as a new variable in greater
# alignment with the naming scheme of this plugin.
NEUTRON_TENANT_NETWORK_TYPE=${NEUTRON_TENANT_NETWORK_TYPE:-vxlan}
NEUTRON_TENANT_VLAN_RANGE=${NEUTRON_TENANT_VLAN_RANGE:-${TENANT_VLAN_RANGE:-100:150}}
# Physical network for VLAN network usage.
NEUTRON_PHYSICAL_NETWORK=${NEUTRON_PHYSICAL_NETWORK:-}
# The name of the service in the endpoint URL
NEUTRON_ENDPOINT_SERVICE_NAME=${NEUTRON_ENDPOINT_SERVICE_NAME-"networking"}
if [[ "$NEUTRON_DEPLOY_MOD_WSGI" == "True" && -z "$NEUTRON_ENDPOINT_SERVICE_NAME" ]]; then
NEUTRON_ENDPOINT_SERVICE_NAME="networking"
fi
# Additional neutron api config files
declare -a -g _NEUTRON_SERVER_EXTRA_CONF_FILES_ABS
@@ -117,7 +138,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
}
@@ -129,6 +152,7 @@ fi
# cleanup_neutron() - Remove residual data files, anything left over from previous
# runs that a clean run would need to clean up
function cleanup_neutron_new {
deprecated "Using lib/neutron is deprecated, and it will be removed in AA release!"
source $TOP_DIR/lib/neutron_plugins/${NEUTRON_AGENT}_agent
if is_neutron_ovs_base_plugin; then
neutron_ovs_base_cleanup
@@ -152,6 +176,7 @@ function configure_root_helper_options {
# configure_neutron() - Set config files, create data dirs, etc
function configure_neutron_new {
deprecated "Using lib/neutron is deprecated, and it will be removed in AA release!"
sudo install -d -o $STACK_USER $NEUTRON_CONF_DIR
(cd $NEUTRON_DIR && exec ./tools/generate_config_file_samples.sh)
@@ -194,16 +219,14 @@ function configure_neutron_new {
iniset $NEUTRON_CONF DEFAULT core_plugin $NEUTRON_CORE_PLUGIN
iniset $NEUTRON_CONF DEFAULT policy_file $policy_file
iniset $NEUTRON_CONF DEFAULT allow_overlapping_ips True
iniset $NEUTRON_CONF DEFAULT router_distributed $NEUTRON_DISTRIBUTED_ROUTING
iniset $NEUTRON_CONF DEFAULT auth_strategy $NEUTRON_AUTH_STRATEGY
configure_auth_token_middleware $NEUTRON_CONF neutron $NEUTRON_AUTH_CACHE_DIR keystone_authtoken
configure_auth_token_middleware $NEUTRON_CONF nova $NEUTRON_AUTH_CACHE_DIR nova
configure_keystone_authtoken_middleware $NEUTRON_CONF neutron
configure_keystone_authtoken_middleware $NEUTRON_CONF nova nova
# Configure VXLAN
# TODO(sc68cal) not hardcode?
iniset $NEUTRON_CORE_PLUGIN_CONF ml2 tenant_network_types vxlan
# Configure tenant network type
iniset $NEUTRON_CORE_PLUGIN_CONF ml2 tenant_network_types $NEUTRON_TENANT_NETWORK_TYPE
local mech_drivers="openvswitch"
if [[ "$NEUTRON_DISTRIBUTED_ROUTING" = "True" ]]; then
@@ -211,13 +234,22 @@ function configure_neutron_new {
else
mech_drivers+=",linuxbridge"
fi
if [[ "$mech_drivers" == *"linuxbridge"* ]]; then
iniset $NEUTRON_CONF experimental linuxbridge True
fi
iniset $NEUTRON_CORE_PLUGIN_CONF ml2 mechanism_drivers $mech_drivers
iniset $NEUTRON_CORE_PLUGIN_CONF ml2 overlay_ip_version $TUNNEL_IP_VERSION
iniset $NEUTRON_CORE_PLUGIN_CONF ml2_type_vxlan vni_ranges 1001:2000
iniset $NEUTRON_CORE_PLUGIN_CONF ml2_type_flat flat_networks public
iniset $NEUTRON_CORE_PLUGIN_CONF ml2_type_flat flat_networks $PUBLIC_NETWORK_NAME
if [[ "$NEUTRON_TENANT_NETWORK_TYPE" =~ "vlan" ]] && [[ "$NEUTRON_PHYSICAL_NETWORK" != "" ]]; then
iniset $NEUTRON_CORE_PLUGIN_CONF ml2_type_vlan network_vlan_ranges ${NEUTRON_PHYSICAL_NETWORK}:${NEUTRON_TENANT_VLAN_RANGE}
fi
if [[ "$NEUTRON_PORT_SECURITY" = "True" ]]; then
neutron_ml2_extension_driver_add port_security
fi
configure_rbac_policies
fi
# Neutron OVS or LB agent
@@ -229,14 +261,15 @@ function configure_neutron_new {
# Configure the neutron agent
if [[ $NEUTRON_AGENT == "linuxbridge" ]]; then
iniset $NEUTRON_CORE_PLUGIN_CONF securitygroup firewall_driver iptables
iniset $NEUTRON_CORE_PLUGIN_CONF vxlan local_ip $HOST_IP
iniset $NEUTRON_CORE_PLUGIN_CONF vxlan local_ip $TUNNEL_ENDPOINT_IP
elif [[ $NEUTRON_AGENT == "openvswitch" ]]; then
iniset $NEUTRON_CORE_PLUGIN_CONF securitygroup firewall_driver openvswitch
iniset $NEUTRON_CORE_PLUGIN_CONF ovs local_ip $HOST_IP
iniset $NEUTRON_CORE_PLUGIN_CONF ovs local_ip $TUNNEL_ENDPOINT_IP
if [[ "$NEUTRON_DISTRIBUTED_ROUTING" = "True" ]]; then
iniset $NEUTRON_CORE_PLUGIN_CONF agent l2_population True
iniset $NEUTRON_CORE_PLUGIN_CONF agent enable_distributed_routing True
iniset $NEUTRON_CORE_PLUGIN_CONF agent arp_responder True
fi
fi
@@ -283,14 +316,14 @@ function configure_neutron_new {
cp $NEUTRON_DIR/etc/metadata_agent.ini.sample $NEUTRON_META_CONF
iniset $NEUTRON_META_CONF DEFAULT debug $ENABLE_DEBUG_LOG_LEVEL
iniset $NEUTRON_META_CONF DEFAULT nova_metadata_host $SERVICE_HOST
iniset $NEUTRON_META_CONF DEFAULT nova_metadata_host $NEUTRON_META_DATA_HOST
iniset $NEUTRON_META_CONF DEFAULT metadata_workers $API_WORKERS
# TODO(ihrachys) do we really need to set rootwrap for metadata agent?
configure_root_helper_options $NEUTRON_META_CONF
# TODO(dtroyer): remove the v2.0 hard code below
iniset $NEUTRON_META_CONF DEFAULT auth_url $KEYSTONE_SERVICE_URI
configure_auth_token_middleware $NEUTRON_META_CONF neutron $NEUTRON_AUTH_CACHE_DIR DEFAULT
configure_keystone_authtoken_middleware $NEUTRON_META_CONF neutron DEFAULT
fi
# Format logging
@@ -338,8 +371,8 @@ function configure_neutron_rootwrap {
# Takes a single optional argument which is the config file to update,
# if not passed $NOVA_CONF is used.
function configure_neutron_nova_new {
deprecated "Using lib/neutron is deprecated, and it will be removed in AA release!"
local conf=${1:-$NOVA_CONF}
iniset $conf DEFAULT use_neutron True
iniset $conf neutron auth_type "password"
iniset $conf neutron auth_url "$KEYSTONE_SERVICE_URI"
iniset $conf neutron username neutron
@@ -350,8 +383,6 @@ function configure_neutron_nova_new {
iniset $conf neutron auth_strategy $NEUTRON_AUTH_STRATEGY
iniset $conf neutron region_name "$REGION_NAME"
iniset $conf DEFAULT firewall_driver nova.virt.firewall.NoopFirewallDriver
# optionally set options in nova_conf
neutron_plugin_create_nova_conf $conf
@@ -367,13 +398,17 @@ function configure_neutron_nova_new {
# create_neutron_accounts() - Create required service accounts
function create_neutron_accounts_new {
deprecated "Using lib/neutron is deprecated, and it will be removed in AA release!"
local neutron_url
if [ "$NEUTRON_DEPLOY_MOD_WSGI" == "True" ]; then
neutron_url=$NEUTRON_SERVICE_PROTOCOL://$NEUTRON_SERVICE_HOST/networking/
neutron_url=$NEUTRON_SERVICE_PROTOCOL://$NEUTRON_SERVICE_HOST/
else
neutron_url=$NEUTRON_SERVICE_PROTOCOL://$NEUTRON_SERVICE_HOST:$NEUTRON_SERVICE_PORT/
fi
if [ ! -z "$NEUTRON_ENDPOINT_SERVICE_NAME" ]; then
neutron_url=$neutron_url$NEUTRON_ENDPOINT_SERVICE_NAME
fi
if [[ "$ENABLED_SERVICES" =~ "neutron-api" ]]; then
@@ -387,28 +422,21 @@ function create_neutron_accounts_new {
fi
}
# create_neutron_cache_dir() - Part of the init_neutron() process
function create_neutron_cache_dir {
# Create cache dir
sudo install -d -o $STACK_USER $NEUTRON_AUTH_CACHE_DIR
rm -f $NEUTRON_AUTH_CACHE_DIR/*
}
# init_neutron() - Initialize databases, etc.
function init_neutron_new {
deprecated "Using lib/neutron is deprecated, and it will be removed in AA release!"
recreate_database neutron
time_start "dbsync"
# Run Neutron db migrations
$NEUTRON_BIN_DIR/neutron-db-manage upgrade heads
time_stop "dbsync"
create_neutron_cache_dir
}
# install_neutron() - Collect source and prepare
function install_neutron_new {
deprecated "Using lib/neutron is deprecated, and it will be removed in AA release!"
git_clone $NEUTRON_REPO $NEUTRON_DIR $NEUTRON_BRANCH
setup_develop $NEUTRON_DIR
@@ -460,20 +488,23 @@ 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"
neutron_url=$service_protocol://$NEUTRON_SERVICE_HOST/networking/
run_process neutron-api "$(which uwsgi) --procname-prefix neutron-api --ini $NEUTRON_UWSGI_CONF"
neutron_url=$service_protocol://$NEUTRON_SERVICE_HOST/
enable_service neutron-rpc-server
run_process neutron-rpc-server "$NEUTRON_BIN_DIR/neutron-rpc-server $opts"
else
# Start the Neutron service
# TODO(sc68cal) Stop hard coding this
run_process neutron-api "$NEUTRON_BIN_DIR/neutron-server $opts"
neutron_url=$service_protocol://$NEUTRON_SERVICE_HOST:$service_port
neutron_url=$service_protocol://$NEUTRON_SERVICE_HOST:$service_port/
# Start proxy if enabled
if is_service_enabled tls-proxy; then
start_tls_proxy neutron '*' $NEUTRON_SERVICE_PORT $NEUTRON_SERVICE_HOST $NEUTRON_SERVICE_PORT_INT
fi
fi
if [ ! -z "$NEUTRON_ENDPOINT_SERVICE_NAME" ]; then
neutron_url=$neutron_url$NEUTRON_ENDPOINT_SERVICE_NAME
fi
if ! wait_for_service $SERVICE_TIMEOUT $neutron_url; then
die $LINENO "neutron-api did not start"
@@ -482,6 +513,7 @@ function start_neutron_api {
# start_neutron() - Start running processes
function start_neutron_new {
deprecated "Using lib/neutron is deprecated, and it will be removed in AA release!"
# Start up the neutron agents if enabled
# TODO(sc68cal) Make this pluggable so different DevStack plugins for different Neutron plugins
# can resolve the $NEUTRON_AGENT_BINARY
@@ -519,6 +551,7 @@ function start_neutron_new {
# stop_neutron() - Stop running processes
function stop_neutron_new {
deprecated "Using lib/neutron is deprecated, and it will be removed in AA release!"
for serv in neutron-api neutron-agent neutron-l3; do
stop_process $serv
done
@@ -534,13 +567,13 @@ function stop_neutron_new {
fi
if is_service_enabled neutron-metadata-agent; then
sudo pkill -9 -f neutron-ns-metadata-proxy || :
stop_process neutron-metadata-agent
fi
}
# neutron_service_plugin_class_add() - add service plugin class
function neutron_service_plugin_class_add_new {
deprecated "Using lib/neutron is deprecated, and it will be removed in AA release!"
local service_plugin_class=$1
local plugins=""
@@ -565,11 +598,13 @@ function _neutron_ml2_extension_driver_add {
}
function neutron_server_config_add_new {
deprecated "Using lib/neutron is deprecated, and it will be removed in AA release!"
_NEUTRON_SERVER_EXTRA_CONF_FILES_ABS+=($1)
}
# neutron_deploy_rootwrap_filters() - deploy rootwrap filters
function neutron_deploy_rootwrap_filters_new {
deprecated "Using lib/neutron is deprecated, and it will be removed in AA release!"
local srcdir=$1
sudo install -d -o root -g root -m 755 $NEUTRON_CONF_DIR/rootwrap.d
sudo install -o root -g root -m 644 $srcdir/etc/neutron/rootwrap.d/*.filters $NEUTRON_CONF_DIR/rootwrap.d
@@ -609,6 +644,19 @@ function configure_neutron {
fi
}
# configure_rbac_policies() - Configure Neutron to enforce new RBAC
# policies and scopes if NEUTRON_ENFORCE_SCOPE == True
function configure_rbac_policies {
if [[ "$NEUTRON_ENFORCE_SCOPE" == "True" || "$ENFORCE_SCOPE" == "True" ]]; then
iniset $NEUTRON_CONF oslo_policy enforce_new_defaults True
iniset $NEUTRON_CONF oslo_policy enforce_scope True
else
iniset $NEUTRON_CONF oslo_policy enforce_new_defaults False
iniset $NEUTRON_CONF oslo_policy enforce_scope False
fi
}
function configure_neutron_nova {
if is_neutron_legacy_enabled; then
# Call back to old function
+147 -45
View File
@@ -50,8 +50,6 @@
# See "Neutron Network Configuration" below for additional variables
# that must be set in localrc for connectivity across hosts with
# Neutron.
#
# With Neutron networking the NETWORK_MANAGER variable is ignored.
# Settings
# --------
@@ -60,8 +58,6 @@
# Neutron Network Configuration
# -----------------------------
deprecated "Using lib/neutron-legacy is deprecated, and it will be removed in the future"
if is_service_enabled tls-proxy; then
Q_PROTOCOL="https"
fi
@@ -73,7 +69,6 @@ GITDIR["python-neutronclient"]=$DEST/python-neutronclient
NEUTRON_DIR=$DEST/neutron
NEUTRON_FWAAS_DIR=$DEST/neutron-fwaas
NEUTRON_AUTH_CACHE_DIR=${NEUTRON_AUTH_CACHE_DIR:-/var/cache/neutron}
# Support entry points installation of console scripts
if [[ -d $NEUTRON_DIR/bin/neutron-server ]]; then
@@ -95,6 +90,11 @@ NEUTRON_DEPLOY_MOD_WSGI=$(trueorfalse False NEUTRON_DEPLOY_MOD_WSGI)
NEUTRON_UWSGI_CONF=$NEUTRON_CONF_DIR/neutron-api-uwsgi.ini
# If NEUTRON_ENFORCE_SCOPE == True, it will set "enforce_scope"
# and "enforce_new_defaults" to True in the Neutron's config to enforce usage
# of the new RBAC policies and scopes.
NEUTRON_ENFORCE_SCOPE=$(trueorfalse False NEUTRON_ENFORCE_SCOPE)
# Agent binaries. Note, binary paths for other agents are set in per-service
# scripts in lib/neutron_plugins/services/
AGENT_DHCP_BINARY="$NEUTRON_BIN_DIR/neutron-dhcp-agent"
@@ -138,10 +138,19 @@ Q_NOTIFY_NOVA_PORT_DATA_CHANGES=${Q_NOTIFY_NOVA_PORT_DATA_CHANGES:-True}
VIF_PLUGGING_IS_FATAL=${VIF_PLUGGING_IS_FATAL:-True}
VIF_PLUGGING_TIMEOUT=${VIF_PLUGGING_TIMEOUT:-300}
# Allow to skip stopping of OVN services
SKIP_STOP_OVN=${SKIP_STOP_OVN:-False}
# The directory which contains files for Q_PLUGIN_EXTRA_CONF_FILES.
# /etc/neutron is assumed by many of devstack plugins. Do not change.
_Q_PLUGIN_EXTRA_CONF_PATH=/etc/neutron
# The name of the service in the endpoint URL
NEUTRON_ENDPOINT_SERVICE_NAME=${NEUTRON_ENDPOINT_SERVICE_NAME-"networking"}
if [[ "$NEUTRON_DEPLOY_MOD_WSGI" == "True" && -z "$NEUTRON_ENDPOINT_SERVICE_NAME" ]]; then
NEUTRON_ENDPOINT_SERVICE_NAME="networking"
fi
# List of config file names in addition to the main plugin config file
# To add additional plugin config files, use ``neutron_server_config_add``
# utility function. For example:
@@ -231,22 +240,17 @@ PHYSICAL_NETWORK=${PHYSICAL_NETWORK:-public}
# Example: ``OVS_PHYSICAL_BRIDGE=br-eth1``
OVS_PHYSICAL_BRIDGE=${OVS_PHYSICAL_BRIDGE:-br-ex}
default_route_dev=$(ip route | grep ^default | awk '{print $5}')
die_if_not_set $LINENO default_route_dev "Failure retrieving default route device"
# With the linuxbridge agent, if using VLANs for tenant networks,
# or if using flat or VLAN provider networks, set in ``localrc`` to
# the name of the network interface to use for the physical
# network.
#
# Example: ``LB_PHYSICAL_INTERFACE=eth1``
LB_PHYSICAL_INTERFACE=${LB_PHYSICAL_INTERFACE:-$default_route_dev}
# When Neutron tunnels are enabled it is needed to specify the
# IP address of the end point in the local server. This IP is set
# by default to the same IP address that the HOST IP.
# This variable can be used to specify a different end point IP address
# Example: ``TUNNEL_ENDPOINT_IP=1.1.1.1``
TUNNEL_ENDPOINT_IP=${TUNNEL_ENDPOINT_IP:-$HOST_IP}
if [[ $Q_AGENT == "linuxbridge" && -z ${LB_PHYSICAL_INTERFACE} ]]; then
default_route_dev=$( (ip route; ip -6 route) | grep ^default | head -n 1 | awk '{print $5}')
die_if_not_set $LINENO default_route_dev "Failure retrieving default route device"
LB_PHYSICAL_INTERFACE=$default_route_dev
fi
# With the openvswitch plugin, set to True in ``localrc`` to enable
# provider GRE tunnels when ``ENABLE_TENANT_TUNNELS`` is False.
@@ -278,6 +282,12 @@ source $TOP_DIR/lib/neutron_plugins/services/metering
# L3 Service functions
source $TOP_DIR/lib/neutron_plugins/services/l3
# Additional Neutron service plugins
source $TOP_DIR/lib/neutron_plugins/services/placement
source $TOP_DIR/lib/neutron_plugins/services/trunk
source $TOP_DIR/lib/neutron_plugins/services/qos
# Use security group or not
if has_neutron_plugin_security_group; then
Q_USE_SECGROUP=${Q_USE_SECGROUP:-True}
@@ -367,6 +377,26 @@ function configure_mutnauq {
_configure_neutron_ceilometer_notifications
fi
if [[ $Q_AGENT == "ovn" ]]; then
configure_ovn
configure_ovn_plugin
fi
# Configure Neutron's advanced services
if is_service_enabled q-placement neutron-placement; then
configure_placement_extension
fi
if is_service_enabled q-trunk neutron-trunk; then
configure_trunk_extension
fi
if is_service_enabled q-qos neutron-qos; then
configure_qos
if is_service_enabled q-l3 neutron-l3; then
configure_l3_agent_extension_fip_qos
configure_l3_agent_extension_gateway_ip_qos
fi
fi
iniset $NEUTRON_CONF DEFAULT api_workers "$API_WORKERS"
# devstack is not a tool for running uber scale OpenStack
# clouds, therefore running without a dedicated RPC worker
@@ -376,9 +406,8 @@ function configure_mutnauq {
function create_nova_conf_neutron {
local conf=${1:-$NOVA_CONF}
iniset $conf DEFAULT use_neutron True
iniset $conf neutron auth_type "password"
iniset $conf neutron auth_url "$KEYSTONE_AUTH_URI"
iniset $conf neutron auth_url "$KEYSTONE_SERVICE_URI"
iniset $conf neutron username "$Q_ADMIN_USERNAME"
iniset $conf neutron password "$SERVICE_PASSWORD"
iniset $conf neutron user_domain_name "$SERVICE_DOMAIN_NAME"
@@ -387,11 +416,6 @@ function create_nova_conf_neutron {
iniset $conf neutron auth_strategy "$Q_AUTH_STRATEGY"
iniset $conf neutron region_name "$REGION_NAME"
if [[ "$Q_USE_SECGROUP" == "True" ]]; then
LIBVIRT_FIREWALL_DRIVER=nova.virt.firewall.NoopFirewallDriver
iniset $conf DEFAULT firewall_driver $LIBVIRT_FIREWALL_DRIVER
fi
# optionally set options in nova_conf
neutron_plugin_create_nova_conf $conf
@@ -413,10 +437,13 @@ function create_nova_conf_neutron {
function create_mutnauq_accounts {
local neutron_url
if [ "$NEUTRON_DEPLOY_MOD_WSGI" == "True" ]; then
neutron_url=$Q_PROTOCOL://$SERVICE_HOST/networking/
neutron_url=$Q_PROTOCOL://$SERVICE_HOST/
else
neutron_url=$Q_PROTOCOL://$SERVICE_HOST:$Q_PORT/
fi
if [ ! -z "$NEUTRON_ENDPOINT_SERVICE_NAME" ]; then
neutron_url=$neutron_url$NEUTRON_ENDPOINT_SERVICE_NAME
fi
if [[ "$ENABLED_SERVICES" =~ "q-svc" ]]; then
@@ -449,6 +476,10 @@ function install_mutnauq {
git_clone $NEUTRON_REPO $NEUTRON_DIR $NEUTRON_BRANCH
setup_develop $NEUTRON_DIR
if [[ $Q_AGENT == "ovn" ]]; then
install_ovn
fi
}
# install_neutron_agent_packages() - Collect source and prepare
@@ -468,6 +499,35 @@ function configure_neutron_after_post_config {
if [[ $Q_SERVICE_PLUGIN_CLASSES != '' ]]; then
iniset $NEUTRON_CONF DEFAULT service_plugins $Q_SERVICE_PLUGIN_CLASSES
fi
configure_rbac_policies
}
# configure_rbac_policies() - Configure Neutron to enforce new RBAC
# policies and scopes if NEUTRON_ENFORCE_SCOPE == True
function configure_rbac_policies {
if [[ "$NEUTRON_ENFORCE_SCOPE" == "True" || "$ENFORCE_SCOPE" == True ]]; then
iniset $NEUTRON_CONF oslo_policy enforce_new_defaults True
iniset $NEUTRON_CONF oslo_policy enforce_scope True
else
iniset $NEUTRON_CONF oslo_policy enforce_new_defaults False
iniset $NEUTRON_CONF oslo_policy enforce_scope False
fi
}
# Start running OVN processes
function start_ovn_services {
if [[ $Q_AGENT == "ovn" ]]; then
init_ovn
start_ovn
if [[ "$OVN_L3_CREATE_PUBLIC_NETWORK" == "True" ]]; then
if [[ "$NEUTRON_CREATE_INITIAL_NETWORKS" != "True" ]]; then
echo "OVN_L3_CREATE_PUBLIC_NETWORK=True is being ignored "
echo "because NEUTRON_CREATE_INITIAL_NETWORKS is set to False"
else
create_public_bridge
fi
fi
fi
}
# Start running processes
@@ -486,18 +546,21 @@ 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"
neutron_url=$Q_PROTOCOL://$Q_HOST/networking/
run_process neutron-api "$(which uwsgi) --procname-prefix neutron-api --ini $NEUTRON_UWSGI_CONF"
neutron_url=$Q_PROTOCOL://$Q_HOST/
enable_service neutron-rpc-server
run_process neutron-rpc-server "$NEUTRON_BIN_DIR/neutron-rpc-server $cfg_file_options"
else
run_process q-svc "$NEUTRON_BIN_DIR/neutron-server $cfg_file_options"
neutron_url=$service_protocol://$Q_HOST:$service_port
neutron_url=$service_protocol://$Q_HOST:$service_port/
# Start proxy if enabled
if is_service_enabled tls-proxy; then
start_tls_proxy neutron '*' $Q_PORT $Q_HOST $Q_PORT_INT
fi
fi
if [ ! -z "$NEUTRON_ENDPOINT_SERVICE_NAME" ]; then
neutron_url=$neutron_url$NEUTRON_ENDPOINT_SERVICE_NAME
fi
echo "Waiting for Neutron to start..."
local testcmd="wget ${ssl_ca} --no-proxy -q -O- $neutron_url"
@@ -527,11 +590,7 @@ function start_mutnauq_l2_agent {
function start_mutnauq_other_agents {
run_process q-dhcp "$AGENT_DHCP_BINARY --config-file $NEUTRON_CONF --config-file $Q_DHCP_CONF_FILE"
if is_service_enabled neutron-vpnaas; then
: # Started by plugin
else
run_process q-l3 "$AGENT_L3_BINARY $(determine_config_files neutron-l3-agent)"
fi
run_process q-l3 "$AGENT_L3_BINARY $(determine_config_files neutron-l3-agent)"
run_process q-meta "$AGENT_META_BINARY --config-file $NEUTRON_CONF --config-file $Q_META_CONF_FILE"
run_process q-metering "$AGENT_METERING_BINARY --config-file $NEUTRON_CONF --config-file $METERING_AGENT_CONF_FILENAME"
@@ -569,7 +628,6 @@ function stop_mutnauq_other {
fi
if is_service_enabled q-meta; then
sudo pkill -9 -f neutron-ns-metadata-proxy || :
stop_process q-meta
fi
@@ -586,6 +644,10 @@ function stop_mutnauq_other {
function stop_mutnauq {
stop_mutnauq_other
stop_mutnauq_l2_agent
if [[ $Q_AGENT == "ovn" && $SKIP_STOP_OVN != "True" ]]; then
stop_ovn
fi
}
# _move_neutron_addresses_route() - Move the primary IP to the OVS bridge
@@ -633,7 +695,7 @@ function _move_neutron_addresses_route {
IP_UP="sudo ip link set $to_intf up"
if [[ "$af" == "inet" ]]; then
IP=$(echo $IP_BRD | awk '{ print $1; exit }' | grep -o -E '(.*)/' | cut -d "/" -f1)
ARP_CMD="sudo arping -A -c 3 -w 4.5 -I $to_intf $IP "
ARP_CMD="sudo arping -A -c 3 -w 5 -I $to_intf $IP "
fi
fi
@@ -643,6 +705,27 @@ function _move_neutron_addresses_route {
fi
}
# _configure_public_network_connectivity() - Configures connectivity to the
# external network using $PUBLIC_INTERFACE or NAT on the single interface
# machines
function _configure_public_network_connectivity {
# If we've given a PUBLIC_INTERFACE to take over, then we assume
# that we can own the whole thing, and privot it into the OVS
# bridge. If we are not, we're probably on a single interface
# machine, and we just setup NAT so that fixed guests can get out.
if [[ -n "$PUBLIC_INTERFACE" ]]; then
_move_neutron_addresses_route "$PUBLIC_INTERFACE" "$OVS_PHYSICAL_BRIDGE" True False "inet"
if [[ $(ip -f inet6 a s dev "$PUBLIC_INTERFACE" | grep -c 'global') != 0 ]]; then
_move_neutron_addresses_route "$PUBLIC_INTERFACE" "$OVS_PHYSICAL_BRIDGE" False False "inet6"
fi
else
for d in $default_v4_route_devs; do
sudo iptables -t nat -A POSTROUTING -o $d -s $FLOATING_RANGE -j MASQUERADE
done
fi
}
# cleanup_mutnauq() - Remove residual data files, anything left over from previous
# runs that a clean run would need to clean up
function cleanup_mutnauq {
@@ -679,6 +762,10 @@ function cleanup_mutnauq {
for ns in $(sudo ip netns list | grep -o -E '(qdhcp|qrouter|fip|snat)-[0-9a-f-]*'); do
sudo ip netns delete ${ns}
done
if [[ $Q_AGENT == "ovn" ]]; then
cleanup_ovn
fi
}
@@ -829,27 +916,42 @@ function _configure_neutron_plugin_agent {
neutron_plugin_configure_plugin_agent
}
function _replace_api_paste_composite {
local sep
sep=$(echo -ne "\x01")
# Replace it
$sudo sed -i -e "s/\/\: neutronversions_composite/\/"${NEUTRON_ENDPOINT_SERVICE_NAME}"\/\: neutronversions_composite/" "$Q_API_PASTE_FILE"
$sudo sed -i -e "s/\/healthcheck\: healthcheck/\/"${NEUTRON_ENDPOINT_SERVICE_NAME}"\/healthcheck\: healthcheck/" "$Q_API_PASTE_FILE"
$sudo sed -i -e "s/\/v2.0\: neutronapi_v2_0/\/"${NEUTRON_ENDPOINT_SERVICE_NAME}"\/v2.0\: neutronapi_v2_0/" "$Q_API_PASTE_FILE"
}
# _configure_neutron_service() - Set config files for neutron service
# It is called when q-svc is enabled.
function _configure_neutron_service {
Q_API_PASTE_FILE=$NEUTRON_CONF_DIR/api-paste.ini
cp $NEUTRON_DIR/etc/api-paste.ini $Q_API_PASTE_FILE
if [[ -n "$NEUTRON_ENDPOINT_SERVICE_NAME" ]]; then
_replace_api_paste_composite
fi
# Update either configuration file with plugin
iniset $NEUTRON_CONF DEFAULT core_plugin $Q_PLUGIN_CLASS
iniset $NEUTRON_CONF DEFAULT debug $ENABLE_DEBUG_LOG_LEVEL
iniset $NEUTRON_CONF oslo_policy policy_file $Q_POLICY_FILE
iniset $NEUTRON_CONF DEFAULT allow_overlapping_ips $Q_ALLOW_OVERLAPPING_IP
iniset $NEUTRON_CONF DEFAULT auth_strategy $Q_AUTH_STRATEGY
_neutron_setup_keystone $NEUTRON_CONF keystone_authtoken
configure_keystone_authtoken_middleware $NEUTRON_CONF $Q_ADMIN_USERNAME
# Configuration for neutron notifications to nova.
iniset $NEUTRON_CONF DEFAULT notify_nova_on_port_status_changes $Q_NOTIFY_NOVA_PORT_STATUS_CHANGES
iniset $NEUTRON_CONF DEFAULT notify_nova_on_port_data_changes $Q_NOTIFY_NOVA_PORT_DATA_CHANGES
configure_auth_token_middleware $NEUTRON_CONF nova $NEUTRON_AUTH_CACHE_DIR nova
configure_keystone_authtoken_middleware $NEUTRON_CONF nova nova
# Configuration for placement client
configure_keystone_authtoken_middleware $NEUTRON_CONF placement placement
# Configure plugin
neutron_plugin_configure_service
@@ -935,15 +1037,6 @@ function _neutron_setup_rootwrap {
fi
}
# Configures keystone integration for neutron service
function _neutron_setup_keystone {
local conf_file=$1
local section=$2
create_neutron_cache_dir
configure_auth_token_middleware $conf_file $Q_ADMIN_USERNAME $NEUTRON_AUTH_CACHE_DIR $section
}
function _neutron_setup_interface_driver {
# ovs_use_veth needs to be set before the plugin configuration
@@ -986,6 +1079,15 @@ function _ssh_check_neutron {
test_with_retry "$testcmd" "server $ip didn't become ssh-able" $timeout_sec
}
function plugin_agent_add_l2_agent_extension {
local l2_agent_extension=$1
if [[ -z "$L2_AGENT_EXTENSIONS" ]]; then
L2_AGENT_EXTENSIONS=$l2_agent_extension
elif [[ ! ,${L2_AGENT_EXTENSIONS}, =~ ,${l2_agent_extension}, ]]; then
L2_AGENT_EXTENSIONS+=",$l2_agent_extension"
fi
}
# Restore xtrace
$_XTRACE_NEUTRON
+2 -2
View File
@@ -38,7 +38,7 @@ function neutron_plugin_create_nova_conf {
}
function neutron_plugin_install_agent_packages {
install_package bridge-utils
:
}
function neutron_plugin_configure_dhcp_agent {
@@ -48,7 +48,7 @@ function neutron_plugin_configure_dhcp_agent {
function neutron_plugin_configure_l3_agent {
local conf_file=$1
sudo brctl addbr $PUBLIC_BRIDGE
sudo ip link add $PUBLIC_BRIDGE type bridge
set_mtu $PUBLIC_BRIDGE $PUBLIC_BRIDGE_MTU
}
+20 -10
View File
@@ -7,9 +7,16 @@
_XTRACE_NEUTRON_ML2=$(set +o | grep xtrace)
set +o xtrace
# Default OVN L2 agent
Q_AGENT=${Q_AGENT:-ovn}
if [ -f $TOP_DIR/lib/neutron_plugins/${Q_AGENT}_agent ]; then
source $TOP_DIR/lib/neutron_plugins/${Q_AGENT}_agent
fi
# Enable this to simply and quickly enable tunneling with ML2.
# Select either 'gre', 'vxlan', or 'gre,vxlan'
Q_ML2_TENANT_NETWORK_TYPE=${Q_ML2_TENANT_NETWORK_TYPE:-"vxlan"}
# For ML2/OVS select either 'gre', 'vxlan', or 'gre,vxlan'.
# For ML2/OVN use 'geneve'.
Q_ML2_TENANT_NETWORK_TYPE=${Q_ML2_TENANT_NETWORK_TYPE:-"geneve"}
# This has to be set here since the agent will set this in the config file
if [[ "$Q_ML2_TENANT_NETWORK_TYPE" == "gre" || "$Q_ML2_TENANT_NETWORK_TYPE" == "vxlan" ]]; then
Q_TUNNEL_TYPES=$Q_ML2_TENANT_NETWORK_TYPE
@@ -17,14 +24,8 @@ elif [[ "$ENABLE_TENANT_TUNNELS" == "True" ]]; then
Q_TUNNEL_TYPES=gre
fi
# Default openvswitch L2 agent
Q_AGENT=${Q_AGENT:-openvswitch}
if [ -f $TOP_DIR/lib/neutron_plugins/${Q_AGENT}_agent ]; then
source $TOP_DIR/lib/neutron_plugins/${Q_AGENT}_agent
fi
# List of MechanismDrivers to load
Q_ML2_PLUGIN_MECHANISM_DRIVERS=${Q_ML2_PLUGIN_MECHANISM_DRIVERS:-openvswitch,linuxbridge}
Q_ML2_PLUGIN_MECHANISM_DRIVERS=${Q_ML2_PLUGIN_MECHANISM_DRIVERS:-ovn}
# Default GRE TypeDriver options
Q_ML2_PLUGIN_GRE_TYPE_OPTIONS=${Q_ML2_PLUGIN_GRE_TYPE_OPTIONS:-tunnel_id_ranges=$TENANT_TUNNEL_RANGES}
# Default VXLAN TypeDriver options
@@ -44,7 +45,7 @@ fi
# L3 Plugin to load for ML2
# For some flat network environment, they not want to extend L3 plugin.
# Make sure it is able to set empty to ML2_L3_PLUGIN.
ML2_L3_PLUGIN=${ML2_L3_PLUGIN-neutron.services.l3_router.l3_router_plugin.L3RouterPlugin}
ML2_L3_PLUGIN=${ML2_L3_PLUGIN-router}
function populate_ml2_config {
CONF=$1
@@ -124,6 +125,10 @@ function neutron_plugin_configure_service {
fi
populate_ml2_config /$Q_PLUGIN_CONF_FILE ml2 mechanism_drivers=$Q_ML2_PLUGIN_MECHANISM_DRIVERS
if [[ "$Q_ML2_PLUGIN_MECHANISM_DRIVERS" == *"linuxbridge"* ]]; then
iniset $NEUTRON_CONF experimental linuxbridge True
fi
populate_ml2_config /$Q_PLUGIN_CONF_FILE ml2 overlay_ip_version=$TUNNEL_IP_VERSION
if [[ -n "$Q_ML2_PLUGIN_TYPE_DRIVERS" ]]; then
populate_ml2_config /$Q_PLUGIN_CONF_FILE ml2 type_drivers=$Q_ML2_PLUGIN_TYPE_DRIVERS
@@ -147,6 +152,7 @@ function neutron_plugin_configure_service {
populate_ml2_config /$Q_PLUGIN_CONF_FILE agent l2_population=True
populate_ml2_config /$Q_PLUGIN_CONF_FILE agent tunnel_types=vxlan
populate_ml2_config /$Q_PLUGIN_CONF_FILE agent enable_distributed_routing=True
populate_ml2_config /$Q_PLUGIN_CONF_FILE agent arp_responder=True
fi
}
@@ -154,5 +160,9 @@ function has_neutron_plugin_security_group {
return 0
}
function configure_qos_ml2 {
neutron_ml2_extension_driver_add "qos"
}
# Restore xtrace
$_XTRACE_NEUTRON_ML2
-2
View File
@@ -11,8 +11,6 @@ function neutron_plugin_create_nova_conf {
local conf="$1"
NOVA_OVS_BRIDGE=${NOVA_OVS_BRIDGE:-"br-int"}
iniset $conf neutron ovs_bridge $NOVA_OVS_BRIDGE
LIBVIRT_FIREWALL_DRIVER=nova.virt.firewall.NoopFirewallDriver
iniset $conf DEFAULT firewall_driver $LIBVIRT_FIREWALL_DRIVER
}
function neutron_plugin_install_agent_packages {
+8 -2
View File
@@ -15,6 +15,10 @@ function neutron_plugin_create_nova_conf {
function neutron_plugin_install_agent_packages {
_neutron_ovs_base_install_agent_packages
if use_library_from_git "os-ken"; then
git_clone_by_name "os-ken"
setup_dev_lib "os-ken"
fi
}
function neutron_plugin_configure_dhcp_agent {
@@ -41,8 +45,10 @@ function neutron_plugin_configure_plugin_agent {
# Setup physical network bridge mappings. Override
# ``OVS_VLAN_RANGES`` and ``OVS_BRIDGE_MAPPINGS`` in ``localrc`` for more
# complex physical network configurations.
if [[ "$OVS_BRIDGE_MAPPINGS" == "" ]] && [[ "$PHYSICAL_NETWORK" != "" ]] && [[ "$OVS_PHYSICAL_BRIDGE" != "" ]]; then
OVS_BRIDGE_MAPPINGS=$PHYSICAL_NETWORK:$OVS_PHYSICAL_BRIDGE
if [[ "$PHYSICAL_NETWORK" != "" ]] && [[ "$OVS_PHYSICAL_BRIDGE" != "" ]]; then
if [[ "$OVS_BRIDGE_MAPPINGS" == "" ]]; then
OVS_BRIDGE_MAPPINGS=$PHYSICAL_NETWORK:$OVS_PHYSICAL_BRIDGE
fi
# Configure bridge manually with physical interface as port for multi-node
_neutron_ovs_base_add_bridge $OVS_PHYSICAL_BRIDGE
+821
View File
@@ -0,0 +1,821 @@
#!/bin/bash
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# Global Sources
# --------------
# There are some ovs functions OVN depends on that must be sourced from
# the ovs neutron plugins.
source ${TOP_DIR}/lib/neutron_plugins/ovs_base
source ${TOP_DIR}/lib/neutron_plugins/openvswitch_agent
# Load devstack ovs compliation and loading functions
source ${TOP_DIR}/lib/neutron_plugins/ovs_source
# Set variables for building OVN from source
OVN_REPO=${OVN_REPO:-https://github.com/ovn-org/ovn.git}
OVN_REPO_NAME=$(basename ${OVN_REPO} | cut -f1 -d'.')
OVN_REPO_NAME=${OVN_REPO_NAME:-ovn}
OVN_BRANCH=${OVN_BRANCH:-v20.06.1}
# The commit removing OVN bits from the OVS tree, it is the commit that is not
# present in OVN tree and is used to distinguish if OVN is part of OVS or not.
# https://github.com/openvswitch/ovs/commit/05bf1dbb98b0635a51f75e268ef8aed27601401d
OVN_SPLIT_HASH=05bf1dbb98b0635a51f75e268ef8aed27601401d
if is_service_enabled tls-proxy; then
OVN_PROTO=ssl
else
OVN_PROTO=tcp
fi
# How to connect to ovsdb-server hosting the OVN SB database.
OVN_SB_REMOTE=${OVN_SB_REMOTE:-$OVN_PROTO:$SERVICE_HOST:6642}
# How to connect to ovsdb-server hosting the OVN NB database
OVN_NB_REMOTE=${OVN_NB_REMOTE:-$OVN_PROTO:$SERVICE_HOST:6641}
# ml2/config for neutron_sync_mode
OVN_NEUTRON_SYNC_MODE=${OVN_NEUTRON_SYNC_MODE:-log}
# Configured DNS servers to be used with internal_dns extension, only
# if the subnet DNS is not configured.
OVN_DNS_SERVERS=${OVN_DNS_SERVERS:-8.8.8.8}
# The type of OVN L3 Scheduler to use. The OVN L3 Scheduler determines the
# hypervisor/chassis where a routers gateway should be hosted in OVN. The
# default OVN L3 scheduler is leastloaded
OVN_L3_SCHEDULER=${OVN_L3_SCHEDULER:-leastloaded}
# A UUID to uniquely identify this system. If one is not specified, a random
# one will be generated. A randomly generated UUID will be saved in a file
# $OVS_SYSCONFDIR/system-id.conf (typically /etc/openvswitch/system-id.conf)
# so that the same one will be re-used if you re-run DevStack or restart
# Open vSwitch service.
OVN_UUID=${OVN_UUID:-}
# Whether or not to build the openvswitch kernel module from ovs. This is required
# unless the distro kernel includes ovs+conntrack support.
OVN_BUILD_MODULES=$(trueorfalse False OVN_BUILD_MODULES)
OVN_BUILD_FROM_SOURCE=$(trueorfalse False OVN_BUILD_FROM_SOURCE)
if [[ "$OVN_BUILD_FROM_SOURCE" == "True" ]]; then
Q_BUILD_OVS_FROM_GIT=True
fi
# Whether or not to install the ovs python module from ovs source. This can be
# used to test and validate new ovs python features. This should only be used
# for development purposes since the ovs python version is controlled by OpenStack
# requirements.
OVN_INSTALL_OVS_PYTHON_MODULE=$(trueorfalse False OVN_INSTALL_OVS_PYTHON_MODULE)
# GENEVE overlay protocol overhead. Defaults to 38 bytes plus the IP version
# overhead (20 bytes for IPv4 (default) or 40 bytes for IPv6) which is determined
# based on the ML2 overlay_ip_version option. The ML2 framework will use this to
# configure the MTU DHCP option.
OVN_GENEVE_OVERHEAD=${OVN_GENEVE_OVERHEAD:-38}
# The log level of the OVN databases (north and south).
# Supported log levels are: off, emer, err, warn, info or dbg.
# More information about log levels can be found at
# http://www.openvswitch.org/support/dist-docs/ovs-appctl.8.txt
OVN_DBS_LOG_LEVEL=${OVN_DBS_LOG_LEVEL:-info}
OVN_META_CONF=$NEUTRON_CONF_DIR/neutron_ovn_metadata_agent.ini
OVN_META_DATA_HOST=${OVN_META_DATA_HOST:-$(ipv6_unquote $SERVICE_HOST)}
# If True (default) the node will be considered a gateway node.
ENABLE_CHASSIS_AS_GW=$(trueorfalse True ENABLE_CHASSIS_AS_GW)
OVN_L3_CREATE_PUBLIC_NETWORK=$(trueorfalse True OVN_L3_CREATE_PUBLIC_NETWORK)
export OVSDB_SERVER_LOCAL_HOST=$SERVICE_LOCAL_HOST
TUNNEL_IP=$TUNNEL_ENDPOINT_IP
if [[ "$SERVICE_IP_VERSION" == 6 ]]; then
OVSDB_SERVER_LOCAL_HOST=[$OVSDB_SERVER_LOCAL_HOST]
TUNNEL_IP=[$TUNNEL_IP]
fi
OVN_IGMP_SNOOPING_ENABLE=$(trueorfalse False OVN_IGMP_SNOOPING_ENABLE)
OVS_PREFIX=
if [[ "$OVN_BUILD_FROM_SOURCE" == "True" ]]; then
OVS_PREFIX=/usr/local
fi
OVS_SBINDIR=$OVS_PREFIX/sbin
OVS_BINDIR=$OVS_PREFIX/bin
OVS_RUNDIR=$OVS_PREFIX/var/run/openvswitch
OVS_SHAREDIR=$OVS_PREFIX/share/openvswitch
OVS_SCRIPTDIR=$OVS_SHAREDIR/scripts
OVS_DATADIR=$DATA_DIR/ovs
OVS_SYSCONFDIR=${OVS_SYSCONFDIR:-$OVS_PREFIX/etc/openvswitch}
if [[ "$OVN_BUILD_FROM_SOURCE" == "True" ]]; then
OVN_DATADIR=$DATA_DIR/ovn
else
# When using OVN from packages, the data dir for OVN DBs is
# /var/lib/ovn
OVN_DATADIR=/var/lib/ovn
fi
OVN_SHAREDIR=$OVS_PREFIX/share/ovn
OVN_SCRIPTDIR=$OVN_SHAREDIR/scripts
OVN_RUNDIR=$OVS_PREFIX/var/run/ovn
NEUTRON_OVN_BIN_DIR=$(get_python_exec_prefix)
NEUTRON_OVN_METADATA_BINARY="neutron-ovn-metadata-agent"
STACK_GROUP="$( id --group --name "$STACK_USER" )"
OVN_NORTHD_SERVICE=ovn-northd.service
if is_ubuntu; then
# The ovn-central.service file on Ubuntu is responsible for starting
# ovn-northd and the OVN DBs (on CentOS this is done by ovn-northd.service)
OVN_NORTHD_SERVICE=ovn-central.service
fi
OVSDB_SERVER_SERVICE=ovsdb-server.service
OVS_VSWITCHD_SERVICE=ovs-vswitchd.service
OVN_CONTROLLER_SERVICE=ovn-controller.service
OVN_CONTROLLER_VTEP_SERVICE=ovn-controller-vtep.service
if [[ "$OVN_BUILD_FROM_SOURCE" == "True" ]]; then
OVSDB_SERVER_SERVICE=devstack@ovsdb-server.service
OVS_VSWITCHD_SERVICE=devstack@ovs-vswitchd.service
OVN_NORTHD_SERVICE=devstack@ovn-northd.service
OVN_CONTROLLER_SERVICE=devstack@ovn-controller.service
OVN_CONTROLLER_VTEP_SERVICE=devstack@ovn-controller-vtep.service
fi
# Defaults Overwrite
# ------------------
Q_ML2_PLUGIN_MECHANISM_DRIVERS=${Q_ML2_PLUGIN_MECHANISM_DRIVERS:-ovn,logger}
Q_ML2_PLUGIN_TYPE_DRIVERS=${Q_ML2_PLUGIN_TYPE_DRIVERS:-local,flat,vlan,geneve}
Q_ML2_TENANT_NETWORK_TYPE=${Q_ML2_TENANT_NETWORK_TYPE:-"geneve"}
Q_ML2_PLUGIN_GENEVE_TYPE_OPTIONS=${Q_ML2_PLUGIN_GENEVE_TYPE_OPTIONS:-"vni_ranges=1:65536"}
Q_ML2_PLUGIN_EXT_DRIVERS=${Q_ML2_PLUGIN_EXT_DRIVERS:-port_security,qos}
# this one allows empty:
ML2_L3_PLUGIN=${ML2_L3_PLUGIN-"ovn-router"}
Q_LOG_DRIVER_RATE_LIMIT=${Q_LOG_DRIVER_RATE_LIMIT:-100}
Q_LOG_DRIVER_BURST_LIMIT=${Q_LOG_DRIVER_BURST_LIMIT:-25}
Q_LOG_DRIVER_LOG_BASE=${Q_LOG_DRIVER_LOG_BASE:-acl_log_meter}
# Utility Functions
# -----------------
function wait_for_db_file {
local count=0
while [ ! -f $1 ]; do
sleep 1
count=$((count+1))
if [ "$count" -gt 40 ]; then
die $LINENO "DB File $1 not found"
fi
done
}
function wait_for_sock_file {
local count=0
while [ ! -S $1 ]; do
sleep 1
count=$((count+1))
if [ "$count" -gt 40 ]; then
die $LINENO "Socket $1 not found"
fi
done
}
function use_new_ovn_repository {
if [[ "$OVN_BUILD_FROM_SOURCE" == "False" ]]; then
return 0
fi
if [ -z "$is_new_ovn" ]; then
local ovs_repo_dir=$DEST/$OVS_REPO_NAME
if [ ! -d $ovs_repo_dir ]; then
git_timed clone $OVS_REPO $ovs_repo_dir
pushd $ovs_repo_dir
git checkout $OVS_BRANCH
popd
else
clone_repository $OVS_REPO $ovs_repo_dir $OVS_BRANCH
fi
# Check the split commit exists in the current branch
pushd $ovs_repo_dir
git log $OVS_BRANCH --pretty=format:"%H" | grep -q $OVN_SPLIT_HASH
is_new_ovn=$?
popd
fi
return $is_new_ovn
}
# NOTE(rtheis): Function copied from DevStack _neutron_ovs_base_setup_bridge
# and _neutron_ovs_base_add_bridge with the call to neutron-ovs-cleanup
# removed. The call is not relevant for OVN, as it is specific to the use
# of Neutron's OVS agent and hangs when running stack.sh because
# neutron-ovs-cleanup uses the OVSDB native interface.
function ovn_base_setup_bridge {
local bridge=$1
local addbr_cmd="sudo ovs-vsctl --no-wait -- --may-exist add-br $bridge -- set bridge $bridge protocols=OpenFlow13,OpenFlow15"
if [ "$OVS_DATAPATH_TYPE" != "system" ] ; then
addbr_cmd="$addbr_cmd -- set Bridge $bridge datapath_type=${OVS_DATAPATH_TYPE}"
fi
$addbr_cmd
sudo ovs-vsctl --no-wait br-set-external-id $bridge bridge-id $bridge
}
function _start_process {
$SYSTEMCTL daemon-reload
$SYSTEMCTL enable $1
$SYSTEMCTL restart $1
}
function _run_process {
local service=$1
local cmd="$2"
local stop_cmd="$3"
local group=$4
local user=${5:-$STACK_USER}
local systemd_service="devstack@$service.service"
local unit_file="$SYSTEMD_DIR/$systemd_service"
local environment="OVN_RUNDIR=$OVS_RUNDIR OVN_DBDIR=$OVN_DATADIR OVN_LOGDIR=$LOGDIR OVS_RUNDIR=$OVS_RUNDIR OVS_DBDIR=$OVS_DATADIR OVS_LOGDIR=$LOGDIR"
echo "Starting $service executed command": $cmd
write_user_unit_file $systemd_service "$cmd" "$group" "$user"
iniset -sudo $unit_file "Service" "Type" "forking"
iniset -sudo $unit_file "Service" "RemainAfterExit" "yes"
iniset -sudo $unit_file "Service" "KillMode" "mixed"
iniset -sudo $unit_file "Service" "LimitNOFILE" "65536"
iniset -sudo $unit_file "Service" "Environment" "$environment"
if [ -n "$stop_cmd" ]; then
iniset -sudo $unit_file "Service" "ExecStop" "$stop_cmd"
fi
_start_process $systemd_service
local testcmd="test -e $OVS_RUNDIR/$service.pid"
test_with_retry "$testcmd" "$service did not start" $SERVICE_TIMEOUT 1
local service_ctl_file
service_ctl_file=$(ls $OVS_RUNDIR | grep $service | grep ctl)
if [ -z "$service_ctl_file" ]; then
die $LINENO "ctl file for service $service is not present."
fi
sudo ovs-appctl -t $OVS_RUNDIR/$service_ctl_file vlog/set console:off syslog:info file:info
}
function clone_repository {
local repo=$1
local dir=$2
local branch=$3
# Set ERROR_ON_CLONE to false to avoid the need of having the
# repositories like OVN and OVS in the required_projects of the job
# definition.
ERROR_ON_CLONE=false git_clone $repo $dir $branch
}
function create_public_bridge {
# Create the public bridge that OVN will use
sudo ovs-vsctl --may-exist add-br $PUBLIC_BRIDGE -- set bridge $PUBLIC_BRIDGE protocols=OpenFlow13,OpenFlow15
sudo ovs-vsctl set open . external-ids:ovn-bridge-mappings=$PHYSICAL_NETWORK:$PUBLIC_BRIDGE
_configure_public_network_connectivity
}
function _disable_libvirt_apparmor {
if ! sudo aa-status --enabled ; then
return 0
fi
# NOTE(arosen): This is used as a work around to allow newer versions
# of libvirt to work with ovs configured ports. See LP#1466631.
# requires the apparmor-utils
install_package apparmor-utils
# disables apparmor for libvirtd
sudo aa-complain /etc/apparmor.d/usr.sbin.libvirtd
}
# OVN compilation functions
# -------------------------
# compile_ovn() - Compile OVN from source and load needed modules
# Accepts three parameters:
# - first optional parameter defines prefix for
# ovn compilation
# - second optional parameter defines localstatedir for
# ovn single machine runtime
function compile_ovn {
local prefix=$1
local localstatedir=$2
if [ -n "$prefix" ]; then
prefix="--prefix=$prefix"
fi
if [ -n "$localstatedir" ]; then
localstatedir="--localstatedir=$localstatedir"
fi
clone_repository $OVN_REPO $DEST/$OVN_REPO_NAME $OVN_BRANCH
pushd $DEST/$OVN_REPO_NAME
if [ ! -f configure ] ; then
./boot.sh
fi
if [ ! -f config.status ] || [ configure -nt config.status ] ; then
./configure --with-ovs-source=$DEST/$OVS_REPO_NAME $prefix $localstatedir
fi
make -j$(($(nproc) + 1))
sudo make install
popd
}
# OVN Neutron driver functions
# ----------------------------
# OVN service sanity check
function ovn_sanity_check {
if is_service_enabled q-agt neutron-agt; then
die $LINENO "The q-agt/neutron-agt service must be disabled with OVN."
elif is_service_enabled q-l3 neutron-l3; then
die $LINENO "The q-l3/neutron-l3 service must be disabled with OVN."
elif is_service_enabled q-svc neutron-api && [[ ! $Q_ML2_PLUGIN_MECHANISM_DRIVERS =~ "ovn" ]]; then
die $LINENO "OVN needs to be enabled in \$Q_ML2_PLUGIN_MECHANISM_DRIVERS"
elif is_service_enabled q-svc neutron-api && [[ ! $Q_ML2_PLUGIN_TYPE_DRIVERS =~ "geneve" ]]; then
die $LINENO "Geneve needs to be enabled in \$Q_ML2_PLUGIN_TYPE_DRIVERS to be used with OVN"
fi
}
# install_ovn() - Collect source and prepare
function install_ovn {
echo "Installing OVN and dependent packages"
# Check the OVN configuration
ovn_sanity_check
# Install tox, used to generate the config (see devstack/override-defaults)
pip_install tox
sudo mkdir -p $OVS_RUNDIR
sudo chown $(whoami) $OVS_RUNDIR
# NOTE(lucasagomes): To keep things simpler, let's reuse the same
# RUNDIR for both OVS and OVN. This way we avoid having to specify the
# --db option in the ovn-{n,s}bctl commands while playing with DevStack
sudo ln -s $OVS_RUNDIR $OVN_RUNDIR
if [[ "$OVN_BUILD_FROM_SOURCE" == "True" ]]; then
# If OVS is already installed, remove it, because we're about to
# re-install it from source.
for package in openvswitch openvswitch-switch openvswitch-common; do
if is_package_installed $package ; then
uninstall_package $package
fi
done
remove_ovs_packages
sudo rm -f $OVS_RUNDIR/*
compile_ovs $OVN_BUILD_MODULES
if use_new_ovn_repository; then
compile_ovn
fi
sudo mkdir -p $OVS_PREFIX/var/log/openvswitch
sudo chown $(whoami) $OVS_PREFIX/var/log/openvswitch
sudo mkdir -p $OVS_PREFIX/var/log/ovn
sudo chown $(whoami) $OVS_PREFIX/var/log/ovn
else
# Load fixup_ovn_centos
source ${TOP_DIR}/tools/fixup_stuff.sh
fixup_ovn_centos
install_package $(get_packages openvswitch)
install_package $(get_packages ovn)
fi
# Ensure that the OVS commands are accessible in the PATH
export PATH=$OVS_BINDIR:$PATH
# Archive log files and create new
local log_archive_dir=$LOGDIR/archive
mkdir -p $log_archive_dir
for logfile in ovs-vswitchd.log ovn-northd.log ovn-controller.log ovn-controller-vtep.log ovs-vtep.log ovsdb-server.log ovsdb-server-nb.log ovsdb-server-sb.log; do
if [ -f "$LOGDIR/$logfile" ] ; then
mv "$LOGDIR/$logfile" "$log_archive_dir/$logfile.${CURRENT_LOG_TIME}"
fi
done
# Install ovsdbapp from source if requested
if use_library_from_git "ovsdbapp"; then
git_clone_by_name "ovsdbapp"
setup_dev_lib "ovsdbapp"
fi
# Install ovs python module from ovs source.
if [[ "$OVN_INSTALL_OVS_PYTHON_MODULE" == "True" ]]; then
sudo pip uninstall -y ovs
# Clone the OVS repository if it's not yet present
clone_repository $OVS_REPO $DEST/$OVS_REPO_NAME $OVS_BRANCH
sudo pip install -e $DEST/$OVS_REPO_NAME/python
fi
}
# filter_network_api_extensions() - Remove non-supported API extensions by
# the OVN driver from the list of enabled API extensions
function filter_network_api_extensions {
SUPPORTED_NETWORK_API_EXTENSIONS=$($PYTHON -c \
'from neutron.common.ovn import extensions ;\
print(",".join(extensions.ML2_SUPPORTED_API_EXTENSIONS))')
SUPPORTED_NETWORK_API_EXTENSIONS=$SUPPORTED_NETWORK_API_EXTENSIONS,$($PYTHON -c \
'from neutron.common.ovn import extensions ;\
print(",".join(extensions.ML2_SUPPORTED_API_EXTENSIONS_OVN_L3))')
if is_service_enabled q-qos neutron-qos ; then
SUPPORTED_NETWORK_API_EXTENSIONS="$SUPPORTED_NETWORK_API_EXTENSIONS,qos"
fi
NETWORK_API_EXTENSIONS=${NETWORK_API_EXTENSIONS:-$SUPPORTED_NETWORK_API_EXTENSIONS}
extensions=$(echo $NETWORK_API_EXTENSIONS | tr ', ' '\n' | sort -u)
supported_ext=$(echo $SUPPORTED_NETWORK_API_EXTENSIONS | tr ', ' '\n' | sort -u)
enabled_ext=$(comm -12 <(echo -e "$extensions") <(echo -e "$supported_ext"))
disabled_ext=$(comm -3 <(echo -e "$extensions") <(echo -e "$enabled_ext"))
# Log a message in case some extensions had to be disabled because
# they are not supported by the OVN driver
if [ ! -z "$disabled_ext" ]; then
_disabled=$(echo $disabled_ext | tr ' ' ',')
echo "The folling network API extensions have been disabled because they are not supported by OVN: $_disabled"
fi
# Export the final list of extensions that have been enabled and are
# supported by OVN
export NETWORK_API_EXTENSIONS=$(echo $enabled_ext | tr ' ' ',')
}
function configure_ovn_plugin {
echo "Configuring Neutron for OVN"
if is_service_enabled q-svc ; then
filter_network_api_extensions
populate_ml2_config /$Q_PLUGIN_CONF_FILE ml2_type_geneve max_header_size=$OVN_GENEVE_OVERHEAD
populate_ml2_config /$Q_PLUGIN_CONF_FILE ovn ovn_nb_connection="$OVN_NB_REMOTE"
populate_ml2_config /$Q_PLUGIN_CONF_FILE ovn ovn_sb_connection="$OVN_SB_REMOTE"
if is_service_enabled tls-proxy; then
populate_ml2_config /$Q_PLUGIN_CONF_FILE ovn ovn_sb_ca_cert="$INT_CA_DIR/ca-chain.pem"
populate_ml2_config /$Q_PLUGIN_CONF_FILE ovn ovn_sb_certificate="$INT_CA_DIR/$DEVSTACK_CERT_NAME.crt"
populate_ml2_config /$Q_PLUGIN_CONF_FILE ovn ovn_sb_private_key="$INT_CA_DIR/private/$DEVSTACK_CERT_NAME.key"
populate_ml2_config /$Q_PLUGIN_CONF_FILE ovn ovn_nb_ca_cert="$INT_CA_DIR/ca-chain.pem"
populate_ml2_config /$Q_PLUGIN_CONF_FILE ovn ovn_nb_certificate="$INT_CA_DIR/$DEVSTACK_CERT_NAME.crt"
populate_ml2_config /$Q_PLUGIN_CONF_FILE ovn ovn_nb_private_key="$INT_CA_DIR/private/$DEVSTACK_CERT_NAME.key"
fi
populate_ml2_config /$Q_PLUGIN_CONF_FILE ovn neutron_sync_mode="$OVN_NEUTRON_SYNC_MODE"
populate_ml2_config /$Q_PLUGIN_CONF_FILE ovn ovn_l3_scheduler="$OVN_L3_SCHEDULER"
populate_ml2_config /$Q_PLUGIN_CONF_FILE securitygroup enable_security_group="$Q_USE_SECGROUP"
inicomment /$Q_PLUGIN_CONF_FILE securitygroup firewall_driver
if is_service_enabled q-log neutron-log; then
populate_ml2_config /$Q_PLUGIN_CONF_FILE network_log rate_limit="$Q_LOG_DRIVER_RATE_LIMIT"
populate_ml2_config /$Q_PLUGIN_CONF_FILE network_log burst_limit="$Q_LOG_DRIVER_BURST_LIMIT"
inicomment /$Q_PLUGIN_CONF_FILE network_log local_output_log_base="$Q_LOG_DRIVER_LOG_BASE"
fi
if is_service_enabled q-ovn-metadata-agent; then
populate_ml2_config /$Q_PLUGIN_CONF_FILE ovn ovn_metadata_enabled=True
else
populate_ml2_config /$Q_PLUGIN_CONF_FILE ovn ovn_metadata_enabled=False
fi
if is_service_enabled q-dns neutron-dns ; then
iniset $NEUTRON_CONF DEFAULT dns_domain openstackgate.local
populate_ml2_config /$Q_PLUGIN_CONF_FILE ovn dns_servers="$OVN_DNS_SERVERS"
fi
iniset $NEUTRON_CONF ovs igmp_snooping_enable $OVN_IGMP_SNOOPING_ENABLE
fi
if is_service_enabled q-dhcp neutron-dhcp ; then
iniset $NEUTRON_CONF DEFAULT dhcp_agent_notification True
else
iniset $NEUTRON_CONF DEFAULT dhcp_agent_notification False
fi
if is_service_enabled n-api-meta ; then
if is_service_enabled q-ovn-metadata-agent ; then
iniset $NOVA_CONF neutron service_metadata_proxy True
fi
fi
}
function configure_ovn {
echo "Configuring OVN"
if [ -z "$OVN_UUID" ] ; then
if [ -f $OVS_SYSCONFDIR/system-id.conf ]; then
OVN_UUID=$(cat $OVS_SYSCONFDIR/system-id.conf)
else
OVN_UUID=$(uuidgen)
echo $OVN_UUID | sudo tee $OVS_SYSCONFDIR/system-id.conf
fi
else
local ovs_uuid
ovs_uuid=$(cat $OVS_SYSCONFDIR/system-id.conf)
if [ "$ovs_uuid" != $OVN_UUID ]; then
echo $OVN_UUID | sudo tee $OVS_SYSCONFDIR/system-id.conf
fi
fi
# Erase the pre-set configurations from packages. DevStack will
# configure OVS and OVN accordingly for its use.
if [[ "$OVN_BUILD_FROM_SOURCE" == "False" ]] && is_fedora; then
sudo truncate -s 0 /etc/openvswitch/default.conf
sudo truncate -s 0 /etc/sysconfig/openvswitch
sudo truncate -s 0 /etc/sysconfig/ovn
fi
# Metadata
if is_service_enabled q-ovn-metadata-agent && is_service_enabled ovn-controller; then
sudo install -d -o $STACK_USER $NEUTRON_CONF_DIR
mkdir -p $NEUTRON_DIR/etc/neutron/plugins/ml2
(cd $NEUTRON_DIR && exec ./tools/generate_config_file_samples.sh)
cp $NEUTRON_DIR/etc/neutron_ovn_metadata_agent.ini.sample $OVN_META_CONF
configure_root_helper_options $OVN_META_CONF
iniset $OVN_META_CONF DEFAULT debug $ENABLE_DEBUG_LOG_LEVEL
iniset $OVN_META_CONF DEFAULT nova_metadata_host $OVN_META_DATA_HOST
iniset $OVN_META_CONF DEFAULT metadata_workers $API_WORKERS
iniset $OVN_META_CONF DEFAULT state_path $NEUTRON_STATE_PATH
iniset $OVN_META_CONF ovs ovsdb_connection tcp:$OVSDB_SERVER_LOCAL_HOST:6640
iniset $OVN_META_CONF ovn ovn_sb_connection $OVN_SB_REMOTE
if is_service_enabled tls-proxy; then
iniset $OVN_META_CONF ovn \
ovn_sb_ca_cert $INT_CA_DIR/ca-chain.pem
iniset $OVN_META_CONF ovn \
ovn_sb_certificate $INT_CA_DIR/$DEVSTACK_CERT_NAME.crt
iniset $OVN_META_CONF ovn \
ovn_sb_private_key $INT_CA_DIR/private/$DEVSTACK_CERT_NAME.key
fi
fi
}
function init_ovn {
# clean up from previous (possibly aborted) runs
# create required data files
# Assumption: this is a dedicated test system and there is nothing important
# in the ovn, ovn-nb, or ovs databases. We're going to trash them and
# create new ones on each devstack run.
_disable_libvirt_apparmor
local mkdir_cmd="mkdir -p ${OVN_DATADIR}"
if [[ "$OVN_BUILD_FROM_SOURCE" == "False" ]]; then
mkdir_cmd="sudo ${mkdir_cmd}"
fi
$mkdir_cmd
mkdir -p $OVS_DATADIR
rm -f $OVS_DATADIR/*.db
rm -f $OVS_DATADIR/.*.db.~lock~
sudo rm -f $OVN_DATADIR/*.db
sudo rm -f $OVN_DATADIR/.*.db.~lock~
sudo rm -f $OVN_RUNDIR/*.sock
}
function _start_ovs {
echo "Starting OVS"
if is_service_enabled ovn-controller ovn-controller-vtep ovn-northd; then
# ovsdb-server and ovs-vswitchd are used privately in OVN as openvswitch service names.
enable_service ovsdb-server
enable_service ovs-vswitchd
if [[ "$OVN_BUILD_FROM_SOURCE" == "True" ]]; then
if [ ! -f $OVS_DATADIR/conf.db ]; then
ovsdb-tool create $OVS_DATADIR/conf.db $OVS_SHAREDIR/vswitch.ovsschema
fi
if is_service_enabled ovn-controller-vtep; then
if [ ! -f $OVS_DATADIR/vtep.db ]; then
ovsdb-tool create $OVS_DATADIR/vtep.db $OVS_SHAREDIR/vtep.ovsschema
fi
fi
local dbcmd="$OVS_SBINDIR/ovsdb-server --remote=punix:$OVS_RUNDIR/db.sock --remote=ptcp:6640:$OVSDB_SERVER_LOCAL_HOST --pidfile --detach --log-file"
dbcmd+=" --remote=db:Open_vSwitch,Open_vSwitch,manager_options"
if is_service_enabled ovn-controller-vtep; then
dbcmd+=" --remote=db:hardware_vtep,Global,managers $OVS_DATADIR/vtep.db"
fi
dbcmd+=" $OVS_DATADIR/conf.db"
_run_process ovsdb-server "$dbcmd" "" "$STACK_GROUP" "root"
# Note: ovn-controller will create and configure br-int once it is started.
# So, no need to create it now because nothing depends on that bridge here.
local ovscmd="$OVS_SBINDIR/ovs-vswitchd --log-file --pidfile --detach"
_run_process ovs-vswitchd "$ovscmd" "" "$STACK_GROUP" "root"
else
_start_process "$OVSDB_SERVER_SERVICE"
_start_process "$OVS_VSWITCHD_SERVICE"
fi
echo "Configuring OVSDB"
if is_service_enabled tls-proxy; then
sudo ovs-vsctl --no-wait set-ssl \
$INT_CA_DIR/private/$DEVSTACK_CERT_NAME.key \
$INT_CA_DIR/$DEVSTACK_CERT_NAME.crt \
$INT_CA_DIR/ca-chain.pem
fi
sudo ovs-vsctl --no-wait set-manager ptcp:6640:$OVSDB_SERVER_LOCAL_HOST
sudo ovs-vsctl --no-wait set open_vswitch . system-type="devstack"
sudo ovs-vsctl --no-wait set open_vswitch . external-ids:system-id="$OVN_UUID"
sudo ovs-vsctl --no-wait set open_vswitch . external-ids:ovn-remote="$OVN_SB_REMOTE"
sudo ovs-vsctl --no-wait set open_vswitch . external-ids:ovn-bridge="br-int"
sudo ovs-vsctl --no-wait set open_vswitch . external-ids:ovn-encap-type="geneve"
sudo ovs-vsctl --no-wait set open_vswitch . external-ids:ovn-encap-ip="$TUNNEL_IP"
sudo ovs-vsctl --no-wait set open_vswitch . external-ids:hostname=$(hostname)
# Select this chassis to host gateway routers
if [[ "$ENABLE_CHASSIS_AS_GW" == "True" ]]; then
sudo ovs-vsctl --no-wait set open_vswitch . external-ids:ovn-cms-options="enable-chassis-as-gw"
fi
if is_provider_network || [[ $Q_USE_PROVIDERNET_FOR_PUBLIC == "True" ]]; then
ovn_base_setup_bridge $OVS_PHYSICAL_BRIDGE
sudo ovs-vsctl set open . external-ids:ovn-bridge-mappings=${PHYSICAL_NETWORK}:${OVS_PHYSICAL_BRIDGE}
fi
if is_service_enabled ovn-controller-vtep ; then
ovn_base_setup_bridge br-v
vtep-ctl add-ps br-v
vtep-ctl set Physical_Switch br-v tunnel_ips=$TUNNEL_IP
enable_service ovs-vtep
local vtepcmd="$OVS_SCRIPTDIR/ovs-vtep --log-file --pidfile --detach br-v"
_run_process ovs-vtep "$vtepcmd" "" "$STACK_GROUP" "root"
vtep-ctl set-manager tcp:$HOST_IP:6640
fi
fi
}
function _start_ovn_services {
_start_process "$OVSDB_SERVER_SERVICE"
_start_process "$OVS_VSWITCHD_SERVICE"
if is_service_enabled ovn-northd ; then
_start_process "$OVN_NORTHD_SERVICE"
fi
if is_service_enabled ovn-controller ; then
_start_process "$OVN_CONTROLLER_SERVICE"
fi
if is_service_enabled ovn-controller-vtep ; then
_start_process "$OVN_CONTROLLER_VTEP_SERVICE"
fi
if is_service_enabled ovs-vtep ; then
_start_process "devstack@ovs-vtep.service"
fi
if is_service_enabled q-ovn-metadata-agent; then
_start_process "devstack@q-ovn-metadata-agent.service"
fi
}
# start_ovn() - Start running processes, including screen
function start_ovn {
echo "Starting OVN"
_start_ovs
local SCRIPTDIR=$OVN_SCRIPTDIR
if ! use_new_ovn_repository; then
SCRIPTDIR=$OVS_SCRIPTDIR
fi
if is_service_enabled ovn-northd ; then
if [[ "$OVN_BUILD_FROM_SOURCE" == "True" ]]; then
local cmd="/bin/bash $SCRIPTDIR/ovn-ctl --no-monitor start_northd"
local stop_cmd="/bin/bash $SCRIPTDIR/ovn-ctl stop_northd"
_run_process ovn-northd "$cmd" "$stop_cmd" "$STACK_GROUP" "root"
else
_start_process "$OVN_NORTHD_SERVICE"
fi
# Wait for the service to be ready
# Check for socket and db files for both OVN NB and SB
wait_for_sock_file $OVS_RUNDIR/ovnnb_db.sock
wait_for_sock_file $OVS_RUNDIR/ovnsb_db.sock
wait_for_db_file $OVN_DATADIR/ovnnb_db.db
wait_for_db_file $OVN_DATADIR/ovnsb_db.db
if is_service_enabled tls-proxy; then
sudo ovn-nbctl --db=unix:$OVS_RUNDIR/ovnnb_db.sock set-ssl $INT_CA_DIR/private/$DEVSTACK_CERT_NAME.key $INT_CA_DIR/$DEVSTACK_CERT_NAME.crt $INT_CA_DIR/ca-chain.pem
sudo ovn-sbctl --db=unix:$OVS_RUNDIR/ovnsb_db.sock set-ssl $INT_CA_DIR/private/$DEVSTACK_CERT_NAME.key $INT_CA_DIR/$DEVSTACK_CERT_NAME.crt $INT_CA_DIR/ca-chain.pem
fi
sudo ovn-nbctl --db=unix:$OVS_RUNDIR/ovnnb_db.sock set-connection p${OVN_PROTO}:6641:$SERVICE_LISTEN_ADDRESS -- set connection . inactivity_probe=60000
sudo ovn-sbctl --db=unix:$OVS_RUNDIR/ovnsb_db.sock set-connection p${OVN_PROTO}:6642:$SERVICE_LISTEN_ADDRESS -- set connection . inactivity_probe=60000
sudo ovs-appctl -t $OVS_RUNDIR/ovnnb_db.ctl vlog/set console:off syslog:$OVN_DBS_LOG_LEVEL file:$OVN_DBS_LOG_LEVEL
sudo ovs-appctl -t $OVS_RUNDIR/ovnsb_db.ctl vlog/set console:off syslog:$OVN_DBS_LOG_LEVEL file:$OVN_DBS_LOG_LEVEL
fi
if is_service_enabled ovn-controller ; then
if [[ "$OVN_BUILD_FROM_SOURCE" == "True" ]]; then
local cmd="/bin/bash $SCRIPTDIR/ovn-ctl --no-monitor start_controller"
local stop_cmd="/bin/bash $SCRIPTDIR/ovn-ctl stop_controller"
_run_process ovn-controller "$cmd" "$stop_cmd" "$STACK_GROUP" "root"
else
_start_process "$OVN_CONTROLLER_SERVICE"
fi
fi
if is_service_enabled ovn-controller-vtep ; then
if [[ "$OVN_BUILD_FROM_SOURCE" == "True" ]]; then
local cmd="$OVS_BINDIR/ovn-controller-vtep --log-file --pidfile --detach --ovnsb-db=$OVN_SB_REMOTE"
_run_process ovn-controller-vtep "$cmd" "" "$STACK_GROUP" "root"
else
_start_process "$OVN_CONTROLLER_VTEP_SERVICE"
fi
fi
if is_service_enabled q-ovn-metadata-agent; then
run_process q-ovn-metadata-agent "$NEUTRON_OVN_BIN_DIR/$NEUTRON_OVN_METADATA_BINARY --config-file $OVN_META_CONF"
# Format logging
setup_logging $OVN_META_CONF
fi
_start_ovn_services
}
function _stop_ovs_dp {
sudo ovs-dpctl dump-dps | sudo xargs -n1 ovs-dpctl del-dp
modprobe -q -r vport_geneve vport_vxlan openvswitch || true
}
function _stop_process {
local service=$1
echo "Stopping process $service"
if $SYSTEMCTL is-enabled $service; then
$SYSTEMCTL stop $service
$SYSTEMCTL disable $service
fi
}
function stop_ovn {
if is_service_enabled q-ovn-metadata-agent; then
sudo pkill -9 -f haproxy || :
_stop_process "devstack@q-ovn-metadata-agent.service"
fi
if is_service_enabled ovn-controller-vtep ; then
_stop_process "$OVN_CONTROLLER_VTEP_SERVICE"
fi
if is_service_enabled ovn-controller ; then
_stop_process "$OVN_CONTROLLER_SERVICE"
fi
if is_service_enabled ovn-northd ; then
_stop_process "$OVN_NORTHD_SERVICE"
fi
if is_service_enabled ovs-vtep ; then
_stop_process "devstack@ovs-vtep.service"
fi
_stop_process "$OVS_VSWITCHD_SERVICE"
_stop_process "$OVSDB_SERVER_SERVICE"
_stop_ovs_dp
}
function _cleanup {
local path=${1:-$DEST/$OVN_REPO_NAME}
pushd $path
cd $path
sudo make uninstall
sudo make distclean
popd
}
# cleanup_ovn() - Remove residual data files, anything left over from previous
# runs that a clean run would need to clean up
function cleanup_ovn {
local ovn_path=$DEST/$OVN_REPO_NAME
local ovs_path=$DEST/$OVS_REPO_NAME
if [ -d $ovn_path ]; then
_cleanup $ovn_path
fi
if [ -d $ovs_path ]; then
_cleanup $ovs_path
fi
sudo rm -f $OVN_RUNDIR
}
+31 -18
View File
@@ -7,6 +7,12 @@
_XTRACE_NEUTRON_OVS_BASE=$(set +o | grep xtrace)
set +o xtrace
# Load devstack ovs compliation and loading functions
source ${TOP_DIR}/lib/neutron_plugins/ovs_source
# Defaults
# --------
OVS_BRIDGE=${OVS_BRIDGE:-br-int}
# OVS recognize default 'system' datapath or 'netdev' for userspace datapath
OVS_DATAPATH_TYPE=${OVS_DATAPATH_TYPE:-system}
@@ -60,26 +66,33 @@ function _neutron_ovs_base_install_ubuntu_dkms {
}
function _neutron_ovs_base_install_agent_packages {
# Install deps
install_package $(get_packages "openvswitch")
if is_ubuntu; then
_neutron_ovs_base_install_ubuntu_dkms
restart_service openvswitch-switch
elif is_fedora; then
restart_service openvswitch
sudo systemctl enable openvswitch
elif is_suse; then
if [[ $DISTRO == "sle12" ]] && vercmp "$os_RELEASE" "<" "12.2" ; then
if [ "$Q_BUILD_OVS_FROM_GIT" == "True" ]; then
remove_ovs_packages
compile_ovs False /usr/local /var
load_conntrack_gre_module
start_new_ovs
else
# Install deps
install_package $(get_packages "openvswitch")
if is_ubuntu; then
_neutron_ovs_base_install_ubuntu_dkms
restart_service openvswitch-switch
else
# workaround for https://bugzilla.suse.com/show_bug.cgi?id=1085971
if [[ $DISTRO =~ "tumbleweed" ]]; then
sudo sed -i -e "s,^OVS_USER_ID=.*,OVS_USER_ID='root:root'," /etc/sysconfig/openvswitch
elif is_fedora; then
restart_service openvswitch
sudo systemctl enable openvswitch
elif is_suse; then
if [[ $DISTRO == "sle12" ]] && vercmp "$os_RELEASE" "<" "12.2" ; then
restart_service openvswitch-switch
else
# workaround for https://bugzilla.suse.com/show_bug.cgi?id=1085971
if [[ $DISTRO =~ "tumbleweed" ]]; then
sudo sed -i -e "s,^OVS_USER_ID=.*,OVS_USER_ID='root:root'," /etc/sysconfig/openvswitch
fi
restart_service openvswitch || {
journalctl -xe || :
systemctl status openvswitch
}
fi
restart_service openvswitch || {
journalctl -xe || :
systemctl status openvswitch
}
fi
fi
}
+220
View File
@@ -0,0 +1,220 @@
#!/bin/bash
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
# Defaults
# --------
Q_BUILD_OVS_FROM_GIT=$(trueorfalse False Q_BUILD_OVS_FROM_GIT)
# Set variables for building OVS from source
OVS_REPO=${OVS_REPO:-https://github.com/openvswitch/ovs.git}
OVS_REPO_NAME=$(basename ${OVS_REPO} | cut -f1 -d'.')
OVS_REPO_NAME=${OVS_REPO_NAME:-ovs}
OVS_BRANCH=${OVS_BRANCH:-0047ca3a0290f1ef954f2c76b31477cf4b9755f5}
# Functions
# load_module() - Load module using modprobe module given by argument and dies
# on failure
# - fatal argument is optional and says whether function should
# exit if module can't be loaded
function load_module {
local module=$1
local fatal=$2
if [ "$(trueorfalse True fatal)" == "True" ]; then
sudo modprobe $module || (dmesg && die $LINENO "FAILED TO LOAD $module")
else
sudo modprobe $module || (echo "FAILED TO LOAD $module" && dmesg)
fi
}
# prepare_for_compilation() - Fetch ovs git repository and install packages needed for
# compilation.
function prepare_for_ovs_compilation {
local build_modules=${1:-False}
OVS_DIR=$DEST/$OVS_REPO_NAME
if [ ! -d $OVS_DIR ] ; then
# We can't use git_clone here because we want to ignore ERROR_ON_CLONE
git_timed clone $OVS_REPO $OVS_DIR
cd $OVS_DIR
git checkout $OVS_BRANCH
else
# Even though the directory already exists, call git_clone to update it
# if needed based on the RECLONE option
git_clone $OVS_REPO $OVS_DIR $OVS_BRANCH
cd $OVS_DIR
fi
# TODO: Can you create package list files like you can inside devstack?
install_package autoconf automake libtool gcc patch make
# If build_modules is False, we don't need to install the kernel-*
# packages. Just return.
if [[ "$build_modules" == "False" ]]; then
return
fi
KERNEL_VERSION=`uname -r`
if is_fedora ; then
# is_fedora covers Fedora, RHEL, CentOS, etc...
if [[ "$os_VENDOR" == "Fedora" ]]; then
install_package elfutils-libelf-devel
KERNEL_VERSION=`echo $KERNEL_VERSION | cut --delimiter='-' --field 1`
elif [[ ${KERNEL_VERSION:0:2} != "3." ]]; then
# dash is illegal character in rpm version so replace
# them with underscore like it is done in the kernel
# https://github.com/torvalds/linux/blob/master/scripts/package/mkspec#L25
# but only for latest series of the kernel, not 3.x
KERNEL_VERSION=`echo $KERNEL_VERSION | tr - _`
fi
echo NOTE: if kernel-devel-$KERNEL_VERSION or kernel-headers-$KERNEL_VERSION installation
echo failed, please, provide a repository with the package, or yum update / reboot
echo your machine to get the latest kernel.
install_package kernel-devel-$KERNEL_VERSION
install_package kernel-headers-$KERNEL_VERSION
if is_service_enabled tls-proxy; then
install_package openssl-devel
fi
elif is_ubuntu ; then
install_package linux-headers-$KERNEL_VERSION
if is_service_enabled tls-proxy; then
install_package libssl-dev
fi
fi
}
# load_ovs_kernel_modules() - load openvswitch kernel module
function load_ovs_kernel_modules {
load_module openvswitch
load_module vport-geneve False
dmesg | tail
}
# reload_ovs_kernel_modules() - reload openvswitch kernel module
function reload_ovs_kernel_modules {
set +e
ovs_system=$(sudo ovs-dpctl dump-dps | grep ovs-system)
if [ -n "$ovs_system" ]; then
sudo ovs-dpctl del-dp ovs-system
fi
set -e
sudo modprobe -r vport_geneve
sudo modprobe -r openvswitch
load_ovs_kernel_modules
}
# compile_ovs() - Compile OVS from source and load needed modules.
# Accepts two parameters:
# - first one is False by default and means that modules are not built and installed.
# - second optional parameter defines prefix for ovs compilation
# - third optional parameter defines localstatedir for ovs single machine runtime
# Env variables OVS_REPO_NAME, OVS_REPO and OVS_BRANCH must be set
function compile_ovs {
local _pwd=$PWD
local build_modules=${1:-False}
local prefix=$2
local localstatedir=$3
if [ -n "$prefix" ]; then
prefix="--prefix=$prefix"
fi
if [ -n "$localstatedir" ]; then
localstatedir="--localstatedir=$localstatedir"
fi
prepare_for_ovs_compilation $build_modules
KERNEL_VERSION=$(uname -r)
major_version=$(echo "${KERNEL_VERSION}" | cut -d '.' -f1)
patch_level=$(echo "${KERNEL_VERSION}" | cut -d '.' -f2)
if [ "${major_version}" -gt 5 ] || [ "${major_version}" == 5 ] && [ "${patch_level}" -gt 5 ]; then
echo "NOTE: KERNEL VERSION is ${KERNEL_VERSION} and OVS doesn't support compiling "
echo "Kernel module for version higher than 5.5. Skipping module compilation..."
build_modules="False"
fi
if [ ! -f configure ] ; then
./boot.sh
fi
if [ ! -f config.status ] || [ configure -nt config.status ] ; then
if [[ "$build_modules" == "True" ]]; then
./configure $prefix $localstatedir --with-linux=/lib/modules/$(uname -r)/build
else
./configure $prefix $localstatedir
fi
fi
make -j$(($(nproc) + 1))
sudo make install
if [[ "$build_modules" == "True" ]]; then
sudo make INSTALL_MOD_DIR=kernel/net/openvswitch modules_install
fi
reload_ovs_kernel_modules
cd $_pwd
}
# action_service - call an action over openvswitch service
# Accepts one parameter that can be either
# 'start', 'restart' and 'stop'.
function action_openvswitch {
local action=$1
if is_ubuntu; then
${action}_service openvswitch-switch
elif is_fedora; then
${action}_service openvswitch
elif is_suse; then
if [[ $DISTRO == "sle12" ]] && [[ $os_RELEASE -lt 12.2 ]]; then
${action}_service openvswitch-switch
else
${action}_service openvswitch
fi
fi
}
# start_new_ovs() - removes old ovs database, creates a new one and starts ovs
function start_new_ovs {
sudo rm -f /etc/openvswitch/conf.db /etc/openvswitch/.conf.db~lock~
sudo /usr/local/share/openvswitch/scripts/ovs-ctl start
}
# stop_new_ovs() - stops ovs
function stop_new_ovs {
local ovs_ctl='/usr/local/share/openvswitch/scripts/ovs-ctl'
if [ -x $ovs_ctl ] ; then
sudo $ovs_ctl stop
fi
}
# remove_ovs_packages() - removes old ovs packages from the system
function remove_ovs_packages {
for package in openvswitch openvswitch-switch openvswitch-common; do
if is_package_installed $package; then
uninstall_package $package
fi
done
}
# load_conntrack_gre_module() - loads nf_conntrack_proto_gre kernel module
function load_conntrack_gre_module {
load_module nf_conntrack_proto_gre False
}
+59 -58
View File
@@ -101,7 +101,6 @@ SUBNETPOOL_SIZE_V4=${SUBNETPOOL_SIZE_V4:-26}
SUBNETPOOL_SIZE_V6=${SUBNETPOOL_SIZE_V6:-64}
default_v4_route_devs=$(ip -4 route | grep ^default | awk '{print $5}')
die_if_not_set $LINENO default_v4_route_devs "Failure retrieving default IPv4 route devices"
default_v6_route_devs=$(ip -6 route list match default table all | grep via | awk '{print $5}')
@@ -124,21 +123,7 @@ function _configure_neutron_l3_agent {
neutron_plugin_configure_l3_agent $Q_L3_CONF_FILE
# If we've given a PUBLIC_INTERFACE to take over, then we assume
# that we can own the whole thing, and privot it into the OVS
# bridge. If we are not, we're probably on a single interface
# machine, and we just setup NAT so that fixed guests can get out.
if [[ -n "$PUBLIC_INTERFACE" ]]; then
_move_neutron_addresses_route "$PUBLIC_INTERFACE" "$OVS_PHYSICAL_BRIDGE" True False "inet"
if [[ $(ip -f inet6 a s dev "$PUBLIC_INTERFACE" | grep -c 'global') != 0 ]]; then
_move_neutron_addresses_route "$PUBLIC_INTERFACE" "$OVS_PHYSICAL_BRIDGE" False False "inet6"
fi
else
for d in $default_v4_route_devs; do
sudo iptables -t nat -A POSTROUTING -o $d -s $FLOATING_RANGE -j MASQUERADE
done
fi
_configure_public_network_connectivity
}
# Explicitly set router id in l3 agent configuration
@@ -162,10 +147,6 @@ function _neutron_get_ext_gw_interface {
}
function create_neutron_initial_network {
local project_id
project_id=$(openstack project list | grep " demo " | get_field 1)
die_if_not_set $LINENO project_id "Failure retrieving project_id for demo"
# Allow drivers that need to create an initial network to do so here
if type -p neutron_plugin_create_initial_network_profile > /dev/null; then
neutron_plugin_create_initial_network_profile $PHYSICAL_NETWORK
@@ -185,15 +166,15 @@ function create_neutron_initial_network {
if is_provider_network; then
die_if_not_set $LINENO PHYSICAL_NETWORK "You must specify the PHYSICAL_NETWORK"
die_if_not_set $LINENO PROVIDER_NETWORK_TYPE "You must specify the PROVIDER_NETWORK_TYPE"
NET_ID=$(openstack --os-cloud devstack-admin --os-region "$REGION_NAME" network create $PHYSICAL_NETWORK --project $project_id --provider-network-type $PROVIDER_NETWORK_TYPE --provider-physical-network "$PHYSICAL_NETWORK" ${SEGMENTATION_ID:+--provider-segment $SEGMENTATION_ID} --share | grep ' id ' | get_field 2)
die_if_not_set $LINENO NET_ID "Failure creating NET_ID for $PHYSICAL_NETWORK $project_id"
NET_ID=$(openstack --os-cloud devstack-admin-demo --os-region "$REGION_NAME" network create $PHYSICAL_NETWORK --provider-network-type $PROVIDER_NETWORK_TYPE --provider-physical-network "$PHYSICAL_NETWORK" ${SEGMENTATION_ID:+--provider-segment $SEGMENTATION_ID} --share -f value -c id)
die_if_not_set $LINENO NET_ID "Failure creating NET_ID for $PHYSICAL_NETWORK"
if [[ "$IP_VERSION" =~ 4.* ]]; then
if [ -z $SUBNETPOOL_V4_ID ]; then
fixed_range_v4=$FIXED_RANGE
fi
SUBNET_ID=$(openstack --os-cloud devstack-admin --os-region "$REGION_NAME" subnet create --project $project_id --ip-version 4 ${ALLOCATION_POOL:+--allocation-pool $ALLOCATION_POOL} $PROVIDER_SUBNET_NAME --gateway $NETWORK_GATEWAY ${SUBNETPOOL_V4_ID:+--subnet-pool $SUBNETPOOL_V4_ID} --network $NET_ID ${fixed_range_v4:+--subnet-range $fixed_range_v4} | grep ' id ' | get_field 2)
die_if_not_set $LINENO SUBNET_ID "Failure creating SUBNET_ID for $PROVIDER_SUBNET_NAME $project_id"
SUBNET_ID=$(openstack --os-cloud devstack --os-region "$REGION_NAME" subnet create --ip-version 4 ${ALLOCATION_POOL:+--allocation-pool $ALLOCATION_POOL} $PROVIDER_SUBNET_NAME --gateway $NETWORK_GATEWAY ${SUBNETPOOL_V4_ID:+--subnet-pool $SUBNETPOOL_V4_ID} --network $NET_ID ${fixed_range_v4:+--subnet-range $fixed_range_v4} -f value -c id)
die_if_not_set $LINENO SUBNET_ID "Failure creating SUBNET_ID for $PROVIDER_SUBNET_NAME"
fi
if [[ "$IP_VERSION" =~ .*6 ]]; then
@@ -202,8 +183,8 @@ function create_neutron_initial_network {
if [ -z $SUBNETPOOL_V6_ID ]; then
fixed_range_v6=$IPV6_PROVIDER_FIXED_RANGE
fi
IPV6_SUBNET_ID=$(openstack --os-cloud devstack-admin --os-region "$REGION_NAME" subnet create --project $project_id --ip-version 6 --gateway $IPV6_PROVIDER_NETWORK_GATEWAY $IPV6_PROVIDER_SUBNET_NAME ${SUBNETPOOL_V6_ID:+--subnet-pool $SUBNETPOOL_V6_ID} --network $NET_ID ${fixed_range_v6:+--subnet-range $fixed_range_v6} | grep ' id ' | get_field 2)
die_if_not_set $LINENO IPV6_SUBNET_ID "Failure creating IPV6_SUBNET_ID for $IPV6_PROVIDER_SUBNET_NAME $project_id"
IPV6_SUBNET_ID=$(openstack --os-cloud devstack --os-region "$REGION_NAME" subnet create --ip-version 6 --gateway $IPV6_PROVIDER_NETWORK_GATEWAY $IPV6_PROVIDER_SUBNET_NAME ${SUBNETPOOL_V6_ID:+--subnet-pool $SUBNETPOOL_V6_ID} --network $NET_ID ${fixed_range_v6:+--subnet-range $fixed_range_v6} -f value -c id)
die_if_not_set $LINENO IPV6_SUBNET_ID "Failure creating IPV6_SUBNET_ID for $IPV6_PROVIDER_SUBNET_NAME"
fi
if [[ $Q_AGENT == "openvswitch" ]]; then
@@ -212,17 +193,17 @@ function create_neutron_initial_network {
sudo ip link set $PUBLIC_INTERFACE up
fi
else
NET_ID=$(openstack --os-cloud devstack-admin --os-region "$REGION_NAME" network create --project $project_id "$PRIVATE_NETWORK_NAME" | grep ' id ' | get_field 2)
die_if_not_set $LINENO NET_ID "Failure creating NET_ID for $PRIVATE_NETWORK_NAME $project_id"
NET_ID=$(openstack --os-cloud devstack --os-region "$REGION_NAME" network create "$PRIVATE_NETWORK_NAME" -f value -c id)
die_if_not_set $LINENO NET_ID "Failure creating NET_ID for $PRIVATE_NETWORK_NAME"
if [[ "$IP_VERSION" =~ 4.* ]]; then
# Create IPv4 private subnet
SUBNET_ID=$(_neutron_create_private_subnet_v4 $project_id)
SUBNET_ID=$(_neutron_create_private_subnet_v4)
fi
if [[ "$IP_VERSION" =~ .*6 ]]; then
# Create IPv6 private subnet
IPV6_SUBNET_ID=$(_neutron_create_private_subnet_v6 $project_id)
IPV6_SUBNET_ID=$(_neutron_create_private_subnet_v6)
fi
fi
@@ -230,12 +211,12 @@ function create_neutron_initial_network {
# Create a router, and add the private subnet as one of its interfaces
if [[ "$Q_L3_ROUTER_PER_TENANT" == "True" ]]; then
# create a tenant-owned router.
ROUTER_ID=$(openstack --os-cloud devstack-admin --os-region "$REGION_NAME" router create --project $project_id $Q_ROUTER_NAME | grep ' id ' | get_field 2)
die_if_not_set $LINENO ROUTER_ID "Failure creating ROUTER_ID for $project_id $Q_ROUTER_NAME"
ROUTER_ID=$(openstack --os-cloud devstack --os-region "$REGION_NAME" router create $Q_ROUTER_NAME -f value -c id)
die_if_not_set $LINENO ROUTER_ID "Failure creating router $Q_ROUTER_NAME"
else
# Plugin only supports creating a single router, which should be admin owned.
ROUTER_ID=$(openstack --os-cloud devstack-admin --os-region "$REGION_NAME" router create $Q_ROUTER_NAME | grep ' id ' | get_field 2)
die_if_not_set $LINENO ROUTER_ID "Failure creating ROUTER_ID for $Q_ROUTER_NAME"
ROUTER_ID=$(openstack --os-cloud devstack-admin --os-region "$REGION_NAME" router create $Q_ROUTER_NAME -f value -c id)
die_if_not_set $LINENO ROUTER_ID "Failure creating router $Q_ROUTER_NAME"
fi
EXTERNAL_NETWORK_FLAGS="--external"
@@ -244,9 +225,9 @@ function create_neutron_initial_network {
fi
# Create an external network, and a subnet. Configure the external network as router gw
if [ "$Q_USE_PROVIDERNET_FOR_PUBLIC" = "True" ]; then
EXT_NET_ID=$(openstack --os-cloud devstack-admin --os-region "$REGION_NAME" network create "$PUBLIC_NETWORK_NAME" $EXTERNAL_NETWORK_FLAGS --provider-network-type ${PUBLIC_PROVIDERNET_TYPE:-flat} ${PUBLIC_PROVIDERNET_SEGMENTATION_ID:+--provider-segment $PUBLIC_PROVIDERNET_SEGMENTATION_ID} --provider-physical-network ${PUBLIC_PHYSICAL_NETWORK} | grep ' id ' | get_field 2)
EXT_NET_ID=$(openstack --os-cloud devstack-admin --os-region "$REGION_NAME" network create "$PUBLIC_NETWORK_NAME" $EXTERNAL_NETWORK_FLAGS --provider-network-type ${PUBLIC_PROVIDERNET_TYPE:-flat} ${PUBLIC_PROVIDERNET_SEGMENTATION_ID:+--provider-segment $PUBLIC_PROVIDERNET_SEGMENTATION_ID} --provider-physical-network ${PUBLIC_PHYSICAL_NETWORK} -f value -c id)
else
EXT_NET_ID=$(openstack --os-cloud devstack-admin --os-region "$REGION_NAME" network create "$PUBLIC_NETWORK_NAME" $EXTERNAL_NETWORK_FLAGS | grep ' id ' | get_field 2)
EXT_NET_ID=$(openstack --os-cloud devstack-admin --os-region "$REGION_NAME" network create "$PUBLIC_NETWORK_NAME" $EXTERNAL_NETWORK_FLAGS -f value -c id)
fi
die_if_not_set $LINENO EXT_NET_ID "Failure creating EXT_NET_ID for $PUBLIC_NETWORK_NAME"
@@ -264,35 +245,32 @@ function create_neutron_initial_network {
# Create private IPv4 subnet
function _neutron_create_private_subnet_v4 {
local project_id=$1
if [ -z $SUBNETPOOL_V4_ID ]; then
fixed_range_v4=$FIXED_RANGE
fi
local subnet_params="--project $project_id "
subnet_params+="--ip-version 4 "
local subnet_params="--ip-version 4 "
if [[ -n "$NETWORK_GATEWAY" ]]; then
subnet_params+="--gateway $NETWORK_GATEWAY "
fi
subnet_params+="${SUBNETPOOL_V4_ID:+--subnet-pool $SUBNETPOOL_V4_ID} "
subnet_params+="${fixed_range_v4:+--subnet-range $fixed_range_v4} "
subnet_params+="--network $NET_ID $PRIVATE_SUBNET_NAME"
local subnet_id
subnet_id=$(openstack --os-cloud devstack-admin --os-region "$REGION_NAME" subnet create $subnet_params | grep ' id ' | get_field 2)
die_if_not_set $LINENO subnet_id "Failure creating private IPv4 subnet for $project_id"
subnet_id=$(openstack --os-cloud devstack-admin-demo --os-region "$REGION_NAME" subnet create $subnet_params -f value -c id)
die_if_not_set $LINENO subnet_id "Failure creating private IPv4 subnet"
echo $subnet_id
}
# Create private IPv6 subnet
function _neutron_create_private_subnet_v6 {
local project_id=$1
die_if_not_set $LINENO IPV6_RA_MODE "IPV6 RA Mode not set"
die_if_not_set $LINENO IPV6_ADDRESS_MODE "IPV6 Address Mode not set"
local ipv6_modes="--ipv6-ra-mode $IPV6_RA_MODE --ipv6-address-mode $IPV6_ADDRESS_MODE"
if [ -z $SUBNETPOOL_V6_ID ]; then
fixed_range_v6=$FIXED_RANGE_V6
fi
local subnet_params="--project $project_id "
subnet_params+="--ip-version 6 "
local subnet_params="--ip-version 6 "
if [[ -n "$IPV6_PRIVATE_NETWORK_GATEWAY" ]]; then
subnet_params+="--gateway $IPV6_PRIVATE_NETWORK_GATEWAY "
fi
@@ -300,8 +278,8 @@ function _neutron_create_private_subnet_v6 {
subnet_params+="${fixed_range_v6:+--subnet-range $fixed_range_v6} "
subnet_params+="$ipv6_modes --network $NET_ID $IPV6_PRIVATE_SUBNET_NAME "
local ipv6_subnet_id
ipv6_subnet_id=$(openstack --os-cloud devstack-admin --os-region "$REGION_NAME" subnet create $subnet_params | grep ' id ' | get_field 2)
die_if_not_set $LINENO ipv6_subnet_id "Failure creating private IPv6 subnet for $project_id"
ipv6_subnet_id=$(openstack --os-cloud devstack-admin-demo --os-region "$REGION_NAME" subnet create $subnet_params -f value -c id)
die_if_not_set $LINENO ipv6_subnet_id "Failure creating private IPv6 subnet"
echo $ipv6_subnet_id
}
@@ -334,7 +312,7 @@ function _neutron_create_public_subnet_v6 {
# Configure neutron router for IPv4 public access
function _neutron_configure_router_v4 {
openstack --os-cloud devstack-admin --os-region "$REGION_NAME" router add subnet $ROUTER_ID $SUBNET_ID
openstack --os-cloud devstack-admin-demo --os-region "$REGION_NAME" router add subnet $ROUTER_ID $SUBNET_ID
# Create a public subnet on the external network
local id_and_ext_gw_ip
id_and_ext_gw_ip=$(_neutron_create_public_subnet_v4 $EXT_NET_ID)
@@ -342,10 +320,10 @@ function _neutron_configure_router_v4 {
ext_gw_ip=$(echo $id_and_ext_gw_ip | get_field 2)
PUB_SUBNET_ID=$(echo $id_and_ext_gw_ip | get_field 5)
# Configure the external network as the default router gateway
openstack --os-cloud devstack-admin --os-region "$REGION_NAME" router set --external-gateway $EXT_NET_ID $ROUTER_ID
openstack --os-cloud devstack-admin-demo --os-region "$REGION_NAME" router set --external-gateway $EXT_NET_ID $ROUTER_ID
# This logic is specific to using the l3-agent for layer 3
if is_service_enabled q-l3 || is_service_enabled neutron-l3; then
# This logic is specific to using OVN or the l3-agent for layer 3
if ([[ $Q_AGENT == "ovn" ]] && [[ "$OVN_L3_CREATE_PUBLIC_NETWORK" == "True" ]] && is_service_enabled q-svc neutron-server) || is_service_enabled q-l3 neutron-l3; then
# Configure and enable public bridge
local ext_gw_interface="none"
if is_neutron_ovs_base_plugin; then
@@ -378,7 +356,7 @@ function _neutron_configure_router_v4 {
# Configure neutron router for IPv6 public access
function _neutron_configure_router_v6 {
openstack --os-cloud devstack-admin --os-region "$REGION_NAME" router add subnet $ROUTER_ID $IPV6_SUBNET_ID
openstack --os-cloud devstack-admin-demo --os-region "$REGION_NAME" router add subnet $ROUTER_ID $IPV6_SUBNET_ID
# Create a public subnet on the external network
local ipv6_id_and_ext_gw_ip
ipv6_id_and_ext_gw_ip=$(_neutron_create_public_subnet_v6 $EXT_NET_ID)
@@ -390,13 +368,11 @@ function _neutron_configure_router_v6 {
# If the external network has not already been set as the default router
# gateway when configuring an IPv4 public subnet, do so now
if [[ "$IP_VERSION" == "6" ]]; then
openstack --os-cloud devstack-admin --os-region "$REGION_NAME" router set --external-gateway $EXT_NET_ID $ROUTER_ID
openstack --os-cloud devstack-admin-demo --os-region "$REGION_NAME" router set --external-gateway $EXT_NET_ID $ROUTER_ID
fi
# 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
# This logic is specific to using OVN or the l3-agent for layer 3
if ([[ $Q_AGENT == "ovn" ]] && [[ "$OVN_L3_CREATE_PUBLIC_NETWORK" == "True" ]] && is_service_enabled q-svc neutron-server) || is_service_enabled q-l3 neutron-l3; then
# 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,9 +385,17 @@ 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' ' ')
# NOTE(slaweq): when enforce scopes is enabled in Neutron, router's
# gateway ports aren't visible in API because such ports don't belongs
# to any tenant. Because of that, at least temporary we need to find
# IPv6 address of the router's gateway in a bit different way.
# It can be reverted when bug
# https://bugs.launchpad.net/neutron/+bug/1959332 will be fixed
IPV6_ROUTER_GW_IP=$(openstack --os-cloud devstack-admin-demo --os-region "$REGION_NAME" router show $ROUTER_ID -c external_gateway_info -f json | grep -C 1 $ipv6_pub_subnet_id | grep ip_address | awk '{print $2}' | tr -d '"')
die_if_not_set $LINENO IPV6_ROUTER_GW_IP "Failure retrieving IPV6_ROUTER_GW_IP"
if is_neutron_ovs_base_plugin; then
@@ -419,8 +403,16 @@ function _neutron_configure_router_v6 {
ext_gw_interface=$(_neutron_get_ext_gw_interface)
local ipv6_cidr_len=${IPV6_PUBLIC_RANGE#*/}
# Configure interface for public bridge
# Configure interface for public bridge by setting the interface
# to "up" in case the job is running entirely private network based
# testing.
sudo ip link set $ext_gw_interface up
sudo ip -6 addr replace $ipv6_ext_gw_ip/$ipv6_cidr_len dev $ext_gw_interface
# Any IPv6 private subnet that uses the default IPV6 subnet pool
# and that is plugged into the default router (Q_ROUTER_NAME) will
# be reachable from the devstack node (ex: ipv6-private-subnet).
# Some scenario tests (such as octavia-tempest-plugin) rely heavily
# on this feature.
local replace_range=${SUBNETPOOL_PREFIX_V6}
if [[ -z "${SUBNETPOOL_V6_ID}" ]]; then
replace_range=${FIXED_RANGE_V6}
@@ -437,3 +429,12 @@ function is_networking_extension_supported {
EXT_LIST=$(openstack --os-cloud devstack-admin --os-region "$REGION_NAME" extension list --network -c Alias -f value)
[[ $EXT_LIST =~ $extension ]] && return 0
}
function plugin_agent_add_l3_agent_extension {
local l3_agent_extension=$1
if [[ -z "$L3_AGENT_EXTENSIONS" ]]; then
L3_AGENT_EXTENSIONS=$l3_agent_extension
elif [[ ! ,${L3_AGENT_EXTENSIONS}, =~ ,${l3_agent_extension}, ]]; then
L3_AGENT_EXTENSIONS+=",$l3_agent_extension"
fi
}
+21
View File
@@ -0,0 +1,21 @@
#!/bin/bash
function configure_placement_service_plugin {
neutron_service_plugin_class_add "placement"
}
function configure_placement_neutron {
iniset $NEUTRON_CONF placement auth_type "$NEUTRON_PLACEMENT_AUTH_TYPE"
iniset $NEUTRON_CONF placement auth_url "$KEYSTONE_SERVICE_URI"
iniset $NEUTRON_CONF placement username "$NEUTRON_PLACEMENT_USERNAME"
iniset $NEUTRON_CONF placement password "$SERVICE_PASSWORD"
iniset $NEUTRON_CONF placement user_domain_name "$SERVICE_DOMAIN_NAME"
iniset $NEUTRON_CONF placement project_name "$SERVICE_TENANT_NAME"
iniset $NEUTRON_CONF placement project_domain_name "$SERVICE_DOMAIN_NAME"
iniset $NEUTRON_CONF placement region_name "$REGION_NAME"
}
function configure_placement_extension {
configure_placement_service_plugin
configure_placement_neutron
}

Some files were not shown because too many files have changed in this diff Show More