From 9bde94cd69e73133ab3ef66d23d22f56dddceed5 Mon Sep 17 00:00:00 2001 From: OpenStack Release Bot Date: Fri, 25 Mar 2022 12:41:21 +0000 Subject: [PATCH 01/39] Update .gitreview for stable/yoga Change-Id: I317f97a4357db9cf8616a3a6addeac098c1f3b60 --- .gitreview | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitreview b/.gitreview index e1bf63ba7a..b77ae24baa 100644 --- a/.gitreview +++ b/.gitreview @@ -2,3 +2,4 @@ host=review.opendev.org port=29418 project=openstack/devstack.git +defaultbranch=stable/yoga From 461d09c78c087c26f006374924ab0879ec44ba8d Mon Sep 17 00:00:00 2001 From: OpenStack Release Bot Date: Fri, 25 Mar 2022 12:41:23 +0000 Subject: [PATCH 02/39] Update TOX_CONSTRAINTS_FILE for stable/yoga 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/yoga branch, tests will continue to use the upper-constraints list on master. Change-Id: I1b3bc813b52d2996e2a99bf4276a40781ae6a399 --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index ec764abc87..37531ea80b 100644 --- a/tox.ini +++ b/tox.ini @@ -35,7 +35,7 @@ commands = bash -c "find {toxinidir} \ [testenv:docs] deps = - -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master} + -c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/yoga} -r{toxinidir}/doc/requirements.txt allowlist_externals = bash setenv = From 89a9d75dba54133325d1b4f1bbb6799e46771a74 Mon Sep 17 00:00:00 2001 From: Martin Kopec Date: Fri, 25 Mar 2022 13:59:42 +0100 Subject: [PATCH 03/39] Remove the zuul pragma to match master and feature/r1 This yoga branch should not provide configs to master and feature/r1. Doing so causes devstack's pre-run playbook to run twice as we run both master's and yoga's pre-run playbooks. This then fails because the configure-swap role is not idempotent. We fix this by detaching yoga from master here and let master run master configs and yoga runs yoga configs. Change-Id: I958763a9329bd274415599a665b1295f59514bee --- .zuul.yaml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.zuul.yaml b/.zuul.yaml index 067d3f5b08..4701d9a262 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -1,11 +1,3 @@ -- pragma: - # NOTE(gtema): this is required for the changes in SDK feature/r1 branch to - # be using devstack - # TODO(gtema): delete this once r1 branch is merged into master - implied-branches: - - master - - feature/r1 - - nodeset: name: openstack-single-node nodes: From b4990ea74e6abd7f6e1a6e70ce8f6295e0ae30ab Mon Sep 17 00:00:00 2001 From: Martin Kopec Date: Fri, 25 Mar 2022 14:05:13 +0100 Subject: [PATCH 04/39] Update branches for stable/yoga Change-Id: I60581f8d6534005302440898fb893bf4a6b155af --- stackrc | 2 +- tests/test_libs_from_pypi.sh | 12 ------------ 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/stackrc b/stackrc index e48fd81d16..eec61eaf5a 100644 --- a/stackrc +++ b/stackrc @@ -15,7 +15,7 @@ source $RC_DIR/functions # Set the target branch. This is used so that stable branching # does not need to update each repo below. -TARGET_BRANCH=master +TARGET_BRANCH=stable/yoga # Cycle trailing projects need to branch later than the others. TRAILING_TARGET_BRANCH=master diff --git a/tests/test_libs_from_pypi.sh b/tests/test_libs_from_pypi.sh index 839e3a1328..c30ba728ba 100755 --- a/tests/test_libs_from_pypi.sh +++ b/tests/test_libs_from_pypi.sh @@ -96,19 +96,7 @@ function test_libs_exist { echo "test_libs_exist PASSED" } -function test_branch_master { - for lib in $ALL_LIBS; do - if [[ ${GITBRANCH[$lib]} != "master" ]]; then - echo "GITBRANCH for $lib not master (${GITBRANCH[$lib]})" - exit 1 - fi - done - - echo "test_branch_master PASSED" -} - set -o errexit test_libs_exist -test_branch_master test_all_libs_upto_date From 8ffd905c892f3ad62f642aab512ee7c61e75c958 Mon Sep 17 00:00:00 2001 From: Martin Kopec Date: Fri, 25 Mar 2022 14:14:41 +0100 Subject: [PATCH 05/39] Cap max microversions for stable/yoga This commit caps the max microversions for compute and volume API for stable/yoga. Compute - https://opendev.org/openstack/nova/src/commit/6a999d693e710b57c402e51258be7c5b85d4558f/nova/api/openstack/compute/rest_api_version_history.rst#microversion%202.90 Volume - https://opendev.org/openstack/cinder/src/commit/3d3b06179a4d955665fb167f7fd25947a0779e2a/cinder/api/openstack/rest_api_version_history.rst#maximum-in-yoga Placement - https://opendev.org/openstack/placement/src/commit/ffca1ebd9bcc10f59a2458ea6597d43cc0f608a1/placement/rest_api_version_history.rst#support-for-the-any-traits-syntax-in-the-required-parameter Change-Id: Iaf1e92600ecd97209da75fc90ef21afc6d6d2aef --- lib/tempest | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/tempest b/lib/tempest index 45046632b4..3cd65a1a15 100644 --- a/lib/tempest +++ b/lib/tempest @@ -394,7 +394,7 @@ function configure_tempest { # NOTE- To avoid microversion tests failure on stable branch, we need to change "tempest_compute_max_microversion" # for stable branch on each release which should be changed from "latest" to max supported version of that release. local tempest_compute_min_microversion=${TEMPEST_COMPUTE_MIN_MICROVERSION:-None} - local tempest_compute_max_microversion=${TEMPEST_COMPUTE_MAX_MICROVERSION:-"latest"} + local tempest_compute_max_microversion=${TEMPEST_COMPUTE_MAX_MICROVERSION:-"2.90"} # Reset microversions to None where v2.0 is running which does not support microversion. # Both "None" means no microversion testing. if [[ "$TEMPEST_COMPUTE_TYPE" == "compute_legacy" ]]; then @@ -487,7 +487,7 @@ function configure_tempest { fi iniset $TEMPEST_CONFIG volume-feature-enabled volume_revert $(trueorfalse False TEMPEST_VOLUME_REVERT_TO_SNAPSHOT) local tempest_volume_min_microversion=${TEMPEST_VOLUME_MIN_MICROVERSION:-None} - local tempest_volume_max_microversion=${TEMPEST_VOLUME_MAX_MICROVERSION:-"latest"} + local tempest_volume_max_microversion=${TEMPEST_VOLUME_MAX_MICROVERSION:-"3.68"} if [ "$tempest_volume_min_microversion" == "None" ]; then inicomment $TEMPEST_CONFIG volume min_microversion else @@ -542,7 +542,7 @@ function configure_tempest { # NOTE- To avoid microversion tests failure on stable branch, we need to change "tempest_placement_max_microversion" # for stable branch on each release which should be changed from "latest" to max supported version of that release. local tempest_placement_min_microversion=${TEMPEST_PLACEMENT_MIN_MICROVERSION:-None} - local tempest_placement_max_microversion=${TEMPEST_PLACEMENT_MAX_MICROVERSION:-"latest"} + local tempest_placement_max_microversion=${TEMPEST_PLACEMENT_MAX_MICROVERSION:-"1.39"} if [ "$tempest_placement_min_microversion" == "None" ]; then inicomment $TEMPEST_CONFIG placement min_microversion else From 491d533c9065397b370201106fee20ad43f1275a Mon Sep 17 00:00:00 2001 From: Martin Kopec Date: Fri, 25 Mar 2022 14:28:39 +0100 Subject: [PATCH 06/39] Cap stable/yoga 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: Iadb18e182bc91e898e292193cbc75c9c65c1812d --- lib/tempest | 40 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 37 insertions(+), 3 deletions(-) diff --git a/lib/tempest b/lib/tempest index 3cd65a1a15..3c50f992d6 100644 --- a/lib/tempest +++ b/lib/tempest @@ -672,7 +672,27 @@ function configure_tempest { DISABLE_NETWORK_API_EXTENSIONS+=", l3_agent_scheduler" fi - local network_api_extensions=${NETWORK_API_EXTENSIONS:-"all"} + DEFAULT_NET_EXT="address-scope,agent,allowed-address-pairs,auto-allocated-topology" + DEFAULT_NET_EXT+=",availability_zone,binding,default-subnetpools,dhcp_agent_scheduler" + DEFAULT_NET_EXT+=",dvr,ext-gw-mode,external-net,extra_dhcp_opt,extraroute,flavors" + DEFAULT_NET_EXT+=",l3-flavors,l3-ha,l3_agent_scheduler,multi-provider,net-mtu" + DEFAULT_NET_EXT+=",network-ip-availability,network_availability_zone,pagination" + DEFAULT_NET_EXT+=",port-security,project-id,provider,quotas,quota_details,rbac-policies" + DEFAULT_NET_EXT+=",revision-if-match,router,router_availability_zone,security-group,service-type,sorting" + DEFAULT_NET_EXT+=",standard-attr-description,standard-attr-revisions,standard-attr-tag,standard-attr-timestamp" + DEFAULT_NET_EXT+=",subnet-service-types,subnet_allocation,net-mtu-writable,ip-substring-filtering" + DEFAULT_NET_EXT+=",availability_zone_filter,filter-validation,empty-string-filtering,port-mac-address-regenerate" + DEFAULT_NET_EXT+=",port-security-groups-filtering,fip-port-details,binding-extended" + DEFAULT_NET_EXT+=",subnet_onboard,l3-port-ip-change-not-allowed,agent-resources-synced" + DEFAULT_NET_EXT+=",floatingip-pools,rbac-security-groups,subnetpool-prefix-ops,router-admin-state-down-before-update" + DEFAULT_NET_EXT+=",rbac-subnetpool,tag-ports-during-bulk-creation,stateful-security-group,address-group,extraroute-atomic" + DEFAULT_NET_EXT+=",port-numa-affinity-policy,rbac-address-scope,security-groups-remote-address-group,trunk,trunk-details" + DEFAULT_NET_EXT+=",rbac-address-group,port-device-profile" + DEFAULT_NET_EXT+=",multiple-external-gateways,qos-pps-minimum,l3-ext-ndp-proxy,rbac-bgpvpn" + DEFAULT_NET_EXT+=",qos-pps,ecmp_routes,bgp,floating-ip-port-forwarding-port-ranges" + #New in Yoga + DEFAULT_NET_EXT+=",security-groups-shared-filtering,security-groups-normalized-cidr,quota-check-limit" + local network_api_extensions=${NETWORK_API_EXTENSIONS:-$DEFAULT_NET_EXT} if [[ ! -z "$DISABLE_NETWORK_API_EXTENSIONS" ]]; then # Enabled extensions are either the ones explicitly specified or those available on the API endpoint network_api_extensions=${NETWORK_API_EXTENSIONS:-$(iniget $tmp_cfg_file network-feature-enabled api_extensions | tr -d " ")} @@ -684,7 +704,10 @@ function configure_tempest { fi iniset $TEMPEST_CONFIG network-feature-enabled api_extensions $network_api_extensions # Swift API Extensions - local object_storage_api_extensions=${OBJECT_STORAGE_API_EXTENSIONS:-"all"} + DEFAULT_SWIFT_OPT="account_quotas,bulk_delete,bulk_upload,container_quotas" + DEFAULT_SWIFT_OPT+=",container_sync,crossdomain,formpost,ratelimit,slo" + DEFAULT_SWIFT_OPT+=",staticweb,tempauth,tempurl,versioned_writes" + local object_storage_api_extensions=${OBJECT_STORAGE_API_EXTENSIONS:-$DEFAULT_SWIFT_OPT} if [[ ! -z "$DISABLE_OBJECT_STORAGE_API_EXTENSIONS" ]]; then # Enabled extensions are either the ones explicitly specified or those available on the API endpoint object_storage_api_extensions=${OBJECT_STORAGE_API_EXTENSIONS:-$(iniget $tmp_cfg_file object-storage-feature-enabled discoverable_apis | tr -d " ")} @@ -693,7 +716,18 @@ function configure_tempest { fi iniset $TEMPEST_CONFIG object-storage-feature-enabled discoverable_apis $object_storage_api_extensions # Cinder API Extensions - local volume_api_extensions=${VOLUME_API_EXTENSIONS:-"all"} + DEFAULT_VOL_EXT="OS-SCH-HNT,backups,capabilities,cgsnapshots,consistencygroups" + DEFAULT_VOL_EXT+=",encryption,os-admin-actions,os-availability-zone" + DEFAULT_VOL_EXT+=",os-extended-services,os-extended-snapshot-attributes" + DEFAULT_VOL_EXT+=",os-hosts,os-quota-class-sets,os-quota-sets" + DEFAULT_VOL_EXT+=",os-services,os-snapshot-actions,os-snapshot-manage" + DEFAULT_VOL_EXT+=",os-snapshot-unmanage,os-types-extra-specs,os-types-manage" + DEFAULT_VOL_EXT+=",os-used-limits,os-vol-host-attr,os-vol-image-meta" + DEFAULT_VOL_EXT+=",os-vol-mig-status-attr,os-vol-tenant-attr,os-volume-actions" + DEFAULT_VOL_EXT+=",os-volume-encryption-metadata,os-volume-manage" + DEFAULT_VOL_EXT+=",os-volume-transfer,os-volume-type-access" + DEFAULT_VOL_EXT+=",os-volume-unmanage,qos-specs,scheduler-stats" + local volume_api_extensions=${VOLUME_API_EXTENSIONS:-$DEFAULT_VOL_EXT} if [[ ! -z "$DISABLE_VOLUME_API_EXTENSIONS" ]]; then # Enabled extensions are either the ones explicitly specified or those available on the API endpoint volume_api_extensions=${VOLUME_API_EXTENSIONS:-$(iniget $tmp_cfg_file volume-feature-enabled api_extensions | tr -d " ")} From b14cd3b1f8de6ef15693c8a6b616fe4217b9d032 Mon Sep 17 00:00:00 2001 From: Martin Kopec Date: Fri, 25 Mar 2022 14:32:16 +0100 Subject: [PATCH 07/39] 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. https: //opendev.org/openstack/devstack/src/commit/14779fc992a7df41e6a1a093bf2aa4a7d248a6bd/lib/tempest#L58-L61 Change-Id: I077e6858090dcca8c9fef35030a2503ce2518d1a --- lib/tempest | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tempest b/lib/tempest index 3c50f992d6..3e34086cad 100644 --- a/lib/tempest +++ b/lib/tempest @@ -58,7 +58,7 @@ BUILD_TIMEOUT=${BUILD_TIMEOUT:-196} # This must be False on stable branches, as master tempest # deps do not match stable branch deps. Set this to True to # have tempest installed in DevStack by default. -INSTALL_TEMPEST=${INSTALL_TEMPEST:-"True"} +INSTALL_TEMPEST=${INSTALL_TEMPEST:-"False"} # This variable is passed directly to pip install inside the common tox venv # that is created From d7342945b820d0fb8d5b58ef3f0dd10d9a4a6897 Mon Sep 17 00:00:00 2001 From: elajkat Date: Tue, 5 Apr 2022 17:59:44 +0200 Subject: [PATCH 08/39] Add port-resource-request-groups to DEFAULT_NET_EXT Change-Id: I8c81c17c6b5414bb8988cfd6a0f1ae28587295b3 Closes-Bug: #1967893 --- lib/tempest | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/tempest b/lib/tempest index 3e34086cad..c731018bc9 100644 --- a/lib/tempest +++ b/lib/tempest @@ -692,6 +692,7 @@ function configure_tempest { DEFAULT_NET_EXT+=",qos-pps,ecmp_routes,bgp,floating-ip-port-forwarding-port-ranges" #New in Yoga DEFAULT_NET_EXT+=",security-groups-shared-filtering,security-groups-normalized-cidr,quota-check-limit" + DEFAULT_NET_EXT+=",port-resource-request-groups" local network_api_extensions=${NETWORK_API_EXTENSIONS:-$DEFAULT_NET_EXT} if [[ ! -z "$DISABLE_NETWORK_API_EXTENSIONS" ]]; then # Enabled extensions are either the ones explicitly specified or those available on the API endpoint From e05348fd3c3145ead06b3673e01a31dedda54734 Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Wed, 13 Apr 2022 15:04:46 +1000 Subject: [PATCH 09/39] 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 Depends-On: https://review.opendev.org/c/openstack/devstack/+/837747 Change-Id: Ib9896a99b6d6c4d359ee412743ce30512b3c4fb7 (cherry picked from commit 676dcaf94487665882be048cfe1f3206d6807e0f) --- functions-common | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/functions-common b/functions-common index b2cf9d99c6..ddef2e4980 100644 --- a/functions-common +++ b/functions-common @@ -673,6 +673,13 @@ 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. + # + # [1] https://github.com/git/git/commit/8959555cee7ec045958f9b6dd62e541affb7e7d9 + sudo git config --global --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 From 9616d22938305dd1a56067810484c15912b37d8d Mon Sep 17 00:00:00 2001 From: Dan Smith Date: Wed, 13 Apr 2022 13:44:07 -0700 Subject: [PATCH 10/39] 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 (cherry picked from commit 4baeb3b51fcb6196fa311f823ad3f0ac13ccf341) --- functions-common | 7 ++++++- unstack.sh | 5 +++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/functions-common b/functions-common index ddef2e4980..8651604b79 100644 --- a/functions-common +++ b/functions-common @@ -677,8 +677,13 @@ function git_clone { # 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 --global --add safe.directory ${git_dest} + 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 diff --git a/unstack.sh b/unstack.sh index 4b57b6e344..813f9a8117 100755 --- a/unstack.sh +++ b/unstack.sh @@ -181,3 +181,8 @@ fi clean_pyc_files rm -Rf $DEST/async + +# Clean any safe.directory items we wrote into the global +# gitconfig. We can identify the relevant ones by checking that they +# point to somewhere in our $DEST directory. +sudo sed -i "/directory=${DEST}/ d" /etc/gitconfig From e754b600f289fe0f943c9bac7898fd16fd2e1d8f Mon Sep 17 00:00:00 2001 From: Brian Rosmaita Date: Fri, 13 May 2022 20:53:26 -0400 Subject: [PATCH 11/39] 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 (cherry picked from commit 111a38b4d6e6f61c21570e0adba58f6c59c52900) --- lib/tempest | 73 ++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 67 insertions(+), 6 deletions(-) diff --git a/lib/tempest b/lib/tempest index c731018bc9..e60c208261 100644 --- a/lib/tempest +++ b/lib/tempest @@ -71,6 +71,17 @@ TEMPEST_VOLUME_VENDOR=${TEMPEST_VOLUME_VENDOR:-$TEMPEST_DEFAULT_VOLUME_VENDOR} TEMPEST_DEFAULT_STORAGE_PROTOCOL="iSCSI" TEMPEST_STORAGE_PROTOCOL=${TEMPEST_STORAGE_PROTOCOL:-$TEMPEST_DEFAULT_STORAGE_PROTOCOL} +# Glance/Image variables +# When Glance image import is enabled, image creation is asynchronous and images +# may not yet be active when tempest looks for them. In that case, we poll +# Glance every TEMPEST_GLANCE_IMPORT_POLL_INTERVAL seconds for the number of +# times specified by TEMPEST_GLANCE_IMPORT_POLL_LIMIT. If you are importing +# multiple images, set TEMPEST_GLANCE_IMAGE_COUNT so the poller does not quit +# too early (though it will not exceed the polling limit). +TEMPEST_GLANCE_IMPORT_POLL_INTERVAL=${TEMPEST_GLANCE_IMPORT_POLL_INTERVAL:-1} +TEMPEST_GLANCE_IMPORT_POLL_LIMIT=${TEMPEST_GLANCE_IMPORT_POLL_LIMIT:-12} +TEMPEST_GLANCE_IMAGE_COUNT=${TEMPEST_GLANCE_IMAGE_COUNT:-1} + # Neutron/Network variables IPV6_ENABLED=$(trueorfalse True IPV6_ENABLED) IPV6_SUBNET_ATTRIBUTES_ENABLED=$(trueorfalse True IPV6_SUBNET_ATTRIBUTES_ENABLED) @@ -127,6 +138,48 @@ function set_tempest_venv_constraints { fi } +# Makes a call to glance to get a list of active images, ignoring +# ramdisk and kernel images. Takes 3 arguments, an array and two +# variables. The array will contain the list of active image UUIDs; +# if an image with ``DEFAULT_IMAGE_NAME`` is found, its UUID will be +# set as the value of *both* other parameters. +function get_active_images { + declare -n img_array=$1 + declare -n img_id=$2 + declare -n img_id_alt=$3 + + # start with a fresh array in case we are called multiple times + img_array=() + + while read -r IMAGE_NAME IMAGE_UUID; do + if [ "$IMAGE_NAME" = "$DEFAULT_IMAGE_NAME" ]; then + img_id="$IMAGE_UUID" + img_id_alt="$IMAGE_UUID" + fi + img_array+=($IMAGE_UUID) + done < <(openstack --os-cloud devstack-admin image list --property status=active | awk -F'|' '!/^(+--)|ID|aki|ari/ { print $3,$2 }') +} + +function poll_glance_images { + declare -n image_array=$1 + declare -n image_id=$2 + declare -n image_id_alt=$3 + local -i poll_count + + poll_count=$TEMPEST_GLANCE_IMPORT_POLL_LIMIT + while (( poll_count-- > 0 )) ; do + sleep $TEMPEST_GLANCE_IMPORT_POLL_INTERVAL + get_active_images image_array image_id image_id_alt + if (( ${#image_array[*]} >= $TEMPEST_GLANCE_IMAGE_COUNT )) ; then + return + fi + done + local msg + msg="Polling limit of $TEMPEST_GLANCE_IMPORT_POLL_LIMIT exceeded; " + msg+="poll interval was $TEMPEST_GLANCE_IMPORT_POLL_INTERVAL sec" + warn $LINENO "$msg" +} + # configure_tempest() - Set config files, create data dirs, etc function configure_tempest { if [[ "$INSTALL_TEMPEST" == "True" ]]; then @@ -168,13 +221,21 @@ function configure_tempest { declare -a images if is_service_enabled glance; then - while read -r IMAGE_NAME IMAGE_UUID; do - if [ "$IMAGE_NAME" = "$DEFAULT_IMAGE_NAME" ]; then - image_uuid="$IMAGE_UUID" - image_uuid_alt="$IMAGE_UUID" + get_active_images images image_uuid image_uuid_alt + + if (( ${#images[*]} < $TEMPEST_GLANCE_IMAGE_COUNT )); then + # Glance image import is asynchronous and may be configured + # to do image conversion. If image import is being used, + # it's possible that this code is being executed before the + # import has completed and there may be no active images yet. + if [[ "$GLANCE_USE_IMPORT_WORKFLOW" == "True" ]]; then + poll_glance_images images image_uuid image_uuid_alt + if (( ${#images[*]} < $TEMPEST_GLANCE_IMAGE_COUNT )); then + echo "Only found ${#images[*]} image(s), was looking for $TEMPEST_GLANCE_IMAGE_COUNT" + exit 1 + fi fi - images+=($IMAGE_UUID) - done < <(openstack --os-cloud devstack-admin image list --property status=active | awk -F'|' '!/^(+--)|ID|aki|ari/ { print $3,$2 }') + fi case "${#images[*]}" in 0) From fa635127a342b75ce641ccb70abf9e29f0676b8c Mon Sep 17 00:00:00 2001 From: yatinkarel Date: Tue, 17 May 2022 20:10:48 +0530 Subject: [PATCH 12/39] 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 (cherry picked from commit 92a34dbe951f2ab31fb3432e61cf34db034b0145) --- lib/neutron-legacy | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/neutron-legacy b/lib/neutron-legacy index b906a1b2ff..6989db9b6a 100644 --- a/lib/neutron-legacy +++ b/lib/neutron-legacy @@ -931,6 +931,9 @@ function _configure_neutron_service { 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 } From 6f545e2567166ed9790601ccb589307df688d40d Mon Sep 17 00:00:00 2001 From: yatinkarel Date: Tue, 26 Apr 2022 16:37:07 +0530 Subject: [PATCH 13/39] 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 --- lib/neutron-legacy | 5 ++++- lib/neutron_plugins/ovn_agent | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/neutron-legacy b/lib/neutron-legacy index 6989db9b6a..016df43123 100644 --- a/lib/neutron-legacy +++ b/lib/neutron-legacy @@ -138,6 +138,9 @@ 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 @@ -638,7 +641,7 @@ function stop_mutnauq { stop_mutnauq_other stop_mutnauq_l2_agent - if [[ $Q_AGENT == "ovn" ]]; then + if [[ $Q_AGENT == "ovn" && $SKIP_STOP_OVN != "True" ]]; then stop_ovn fi } diff --git a/lib/neutron_plugins/ovn_agent b/lib/neutron_plugins/ovn_agent index 927896b70b..9f35568ba7 100644 --- a/lib/neutron_plugins/ovn_agent +++ b/lib/neutron_plugins/ovn_agent @@ -384,6 +384,8 @@ function install_ovn { 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) From 9507d43a28e7fe0b4eeb9efe97941c159684afaa Mon Sep 17 00:00:00 2001 From: Gorka Eguileor Date: Wed, 8 Jun 2022 10:19:50 +0200 Subject: [PATCH 14/39] 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 (cherry picked from commit d5af514ac9485009229f3b594bccc09e905782fb) --- functions-common | 22 ++++++++++++++++++---- lib/cinder | 9 +++++++-- 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/functions-common b/functions-common index 8651604b79..c5166ba4e9 100644 --- a/functions-common +++ b/functions-common @@ -1575,6 +1575,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" @@ -1588,6 +1589,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 @@ -1602,6 +1606,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 @@ -1616,6 +1621,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 @@ -1663,10 +1671,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 @@ -1687,18 +1699,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" } diff --git a/lib/cinder b/lib/cinder index b029fa0db4..6537807eab 100644 --- a/lib/cinder +++ b/lib/cinder @@ -552,8 +552,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 From 6f5860c258008993a644576829b529f0c376af23 Mon Sep 17 00:00:00 2001 From: June Yi Date: Sat, 2 Jul 2022 13:07:43 +0900 Subject: [PATCH 15/39] 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 Change-Id: I0cea282152fd363af8671cab1b5f733ebe2bd4df (cherry picked from commit b9b6d6b862ce69a875c152ad30da8f4717c75272) --- lib/tempest | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/tempest b/lib/tempest index e60c208261..b1c5805c12 100644 --- a/lib/tempest +++ b/lib/tempest @@ -690,13 +690,13 @@ function configure_tempest { local tmp_cfg_file tmp_cfg_file=$(mktemp) cd $TEMPEST_DIR - if [[ "$OFFLINE" != "True" ]]; then - tox -revenv-tempest --notest - fi local tmp_u_c_m tmp_u_c_m=$(mktemp -t tempest_u_c_m.XXXXXXXXXX) set_tempest_venv_constraints $tmp_u_c_m + if [[ "$OFFLINE" != "True" ]]; then + tox -revenv-tempest --notest + fi tox -evenv-tempest -- pip install -c $tmp_u_c_m -r requirements.txt rm -f $tmp_u_c_m From 3e3ae81928dc18724f3e5cbd42581648d73fe5a3 Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Wed, 21 Sep 2022 08:20:20 +1000 Subject: [PATCH 16/39] Remove old or broken jobs from Yoga branch These jobs are not required or broken on stable branches; remove them to avoid issues with updating the nodeset on the master branch or running constantly failing jobs: - devstack-platform-fedora-latest - devstack-platform-fedora-latest-virt-preview - devstack-platform-openEuler-20.03-SP2 Change-Id: I42d039236bc286e69a549d1be0ac6558ddce78ea --- .zuul.yaml | 65 ------------------------------------------------------ 1 file changed, 65 deletions(-) diff --git a/.zuul.yaml b/.zuul.yaml index 4701d9a262..df3618fd10 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -78,16 +78,6 @@ nodes: - controller -- nodeset: - name: devstack-single-node-fedora-latest - nodes: - - name: controller - label: fedora-35 - groups: - - name: tempest - nodes: - - controller - - nodeset: name: devstack-single-node-debian-bullseye nodes: @@ -98,16 +88,6 @@ nodes: - controller -- nodeset: - name: devstack-single-node-openeuler-20.03-sp2 - nodes: - - name: controller - label: openEuler-20-03-LTS-SP2 - groups: - - name: tempest - nodes: - - controller - - nodeset: name: openstack-two-node nodes: @@ -715,20 +695,6 @@ # Enable Neutron ML2/OVS services q-agt: true -- job: - name: devstack-platform-openEuler-20.03-SP2 - parent: tempest-full-py3 - description: openEuler 20.03 SP2 platform test - nodeset: devstack-single-node-openeuler-20.03-sp2 - voting: false - timeout: 9000 - vars: - configure_swap_size: 4096 - devstack_localrc: - # NOTE(wxy): OVN package is not supported by openEuler yet. Build it - # from source instead. - OVN_BUILD_FROM_SOURCE: True - - job: name: devstack-no-tls-proxy parent: tempest-full-py3 @@ -740,30 +706,6 @@ devstack_services: tls-proxy: false -- job: - name: devstack-platform-fedora-latest - parent: tempest-full-py3 - description: Fedora latest platform test - nodeset: devstack-single-node-fedora-latest - voting: false - vars: - configure_swap_size: 4096 - # Python 3.10 dependency issues; see - # https://bugs.launchpad.net/horizon/+bug/1960204 - devstack_services: - horizon: false - -- job: - name: devstack-platform-fedora-latest-virt-preview - parent: tempest-full-py3 - description: Fedora latest platform test using the virt-preview repo. - nodeset: devstack-single-node-fedora-latest - voting: false - vars: - configure_swap_size: 4096 - devstack_localrc: - ENABLE_FEDORA_VIRT_PREVIEW_REPO: true - - job: name: devstack-tox-base parent: devstack @@ -837,11 +779,9 @@ - devstack - devstack-ipv6 - devstack-enforce-scope - - devstack-platform-fedora-latest - devstack-platform-centos-8-stream - devstack-platform-centos-9-stream - devstack-platform-debian-bullseye - - devstack-platform-openEuler-20.03-SP2 - devstack-multinode - devstack-unit-tests - openstack-tox-bashate @@ -933,10 +873,6 @@ # 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 - # * devstack-platform-fedora-latest-virt-preview: Maintained by lyarwood - # for Nova to allow early testing of the latest versions of Libvirt and - # QEMU. Should only graduate out of experimental if it ever moves into - # the check queue for Nova. experimental: jobs: @@ -965,7 +901,6 @@ irrelevant-files: - ^.*\.rst$ - ^doc/.*$ - - devstack-platform-fedora-latest-virt-preview - devstack-no-tls-proxy periodic: jobs: From 7cfe94664f18329154f667146390a387d034b745 Mon Sep 17 00:00:00 2001 From: Balazs Gibizer Date: Fri, 22 Apr 2022 12:01:13 +0200 Subject: [PATCH 17/39] 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 (cherry picked from commit 7191c5e7e7edb1e2f28c0ce71294f61b409cf16b) --- unstack.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unstack.sh b/unstack.sh index 813f9a8117..a36af3fb59 100755 --- a/unstack.sh +++ b/unstack.sh @@ -185,4 +185,4 @@ rm -Rf $DEST/async # Clean any safe.directory items we wrote into the global # gitconfig. We can identify the relevant ones by checking that they # point to somewhere in our $DEST directory. -sudo sed -i "/directory=${DEST}/ d" /etc/gitconfig +sudo sed -i "\+directory = ${DEST}+ d" /etc/gitconfig From 0026c23e24a7d603446f9584bef937a251cb7385 Mon Sep 17 00:00:00 2001 From: Martin Kopec Date: Wed, 16 Nov 2022 10:51:30 +0100 Subject: [PATCH 18/39] Mark centos-9-stream as n-v on stable/yoga The devstack-platform-centos-9-stream job has been failing on stable/yoga branch for some time now. Let's put it to n-v to unblock the gate. Change-Id: I2c1eadc43adfbfbb2bb377a529d7af55aba5d4ee --- .zuul.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.zuul.yaml b/.zuul.yaml index df3618fd10..255c4d9cf0 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -650,6 +650,7 @@ parent: tempest-full-py3 description: CentOS 9 Stream platform test nodeset: devstack-single-node-centos-9-stream + voting: false timeout: 9000 vars: configure_swap_size: 4096 @@ -825,7 +826,6 @@ jobs: - devstack - devstack-ipv6 - - devstack-platform-centos-9-stream - devstack-enforce-scope - devstack-multinode - devstack-unit-tests From 03fbda125175883b621e4187f88f020034ed85cc Mon Sep 17 00:00:00 2001 From: Martin Kopec Date: Thu, 24 Nov 2022 01:14:55 +0100 Subject: [PATCH 19/39] Remove centos-8/9-stream jobs on stable/yoga The following 2 already n-v jobs have been failing: * devstack-platform-centos-8-stream - most of 2022 * devstack-platform-centos-9-stream - last 2 months Considering that there isn't a lot of traffic on stable/yoga and we have a centos job in newer branches so any backport patch gets tested there, the commit removes those 2 jobs not to waste CI resources. Change-Id: Id218cf2ad5fbb9cae5828972366fe85911e500b2 --- .zuul.yaml | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/.zuul.yaml b/.zuul.yaml index 255c4d9cf0..f2c7e0c6bf 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -635,26 +635,6 @@ # 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-8-stream - parent: tempest-full-py3 - description: CentOS 8 Stream platform test - nodeset: devstack-single-node-centos-8-stream - voting: false - timeout: 9000 - vars: - configure_swap_size: 4096 - -- job: - name: devstack-platform-centos-9-stream - parent: tempest-full-py3 - description: CentOS 9 Stream platform test - nodeset: devstack-single-node-centos-9-stream - voting: false - timeout: 9000 - vars: - configure_swap_size: 4096 - - job: name: devstack-platform-debian-bullseye parent: tempest-full-py3 @@ -780,8 +760,6 @@ - devstack - devstack-ipv6 - devstack-enforce-scope - - devstack-platform-centos-8-stream - - devstack-platform-centos-9-stream - devstack-platform-debian-bullseye - devstack-multinode - devstack-unit-tests From c0e6de04466a45288e78c25a6a09d5ff458a2b0a Mon Sep 17 00:00:00 2001 From: Martin Kopec Date: Tue, 29 Nov 2022 17:06:39 +0100 Subject: [PATCH 20/39] Stop running devstack-no-tls-proxy on stable branch Let's run devstack-no-tls-proxy job only on master periodic. Change-Id: I4c0a5144da2549fe988bbabe8536e9a9873e1cf7 --- .zuul.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.zuul.yaml b/.zuul.yaml index 255c4d9cf0..6ec539d5f6 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -902,6 +902,3 @@ - ^.*\.rst$ - ^doc/.*$ - devstack-no-tls-proxy - periodic: - jobs: - - devstack-no-tls-proxy From 9e73a67417fd05deda0ed6b0505f4fbbe35b11a5 Mon Sep 17 00:00:00 2001 From: Ghanshyam Mann Date: Thu, 8 Dec 2022 20:24:46 -0600 Subject: [PATCH 21/39] 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/+/867068 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 ba54baa4253f2c770760b59a4a8f28317e5e260d) (cherry picked from commit a3227ba0c0a6b951b301e556f78e634e6ce9e770) --- lib/tempest | 7 ++++++- playbooks/tox/pre.yaml | 8 +++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/lib/tempest b/lib/tempest index b1c5805c12..5cab53cc1a 100644 --- a/lib/tempest +++ b/lib/tempest @@ -805,7 +805,12 @@ function configure_tempest { # install_tempest() - Collect source and prepare function install_tempest { git_clone $TEMPEST_REPO $TEMPEST_DIR $TEMPEST_BRANCH - pip_install 'tox!=2.8.0' + # NOTE(gmann): Pinning tox<4.0.0 for stable/zed and lower. Tox 4.0.0 + # released after zed was released and has some incompatible changes + # and it is ok not to fix the issues caused by tox 4.0.0 in stable + # beanches jobs. We can continue testing the stable/zed and lower + # branches with tox<4.0.0 + pip_install 'tox!=2.8.0,<4.0.0' pushd $TEMPEST_DIR # NOTE(gmann): checkout the TEMPEST_BRANCH in case TEMPEST_BRANCH # is tag name not master. git_clone would not checkout tag because diff --git a/playbooks/tox/pre.yaml b/playbooks/tox/pre.yaml index d7e4670a80..68d5254251 100644 --- a/playbooks/tox/pre.yaml +++ b/playbooks/tox/pre.yaml @@ -5,4 +5,10 @@ bindep_profile: test bindep_dir: "{{ zuul_work_dir }}" - test-setup - - ensure-tox + # NOTE(gmann): Pinning tox<4.0.0 for stable/zed and lower. Tox 4.0.0 + # released after zed was released and has some incompatible changes + # and it is ok not to fix the issues caused by tox 4.0.0 in stable + # beanches jobs. We can continue testing the stable/zed and lower + # branches with tox<4.0.0 + - role: ensure-tox + ensure_tox_version: "<4" From a50aba2b8c0cf2988162805845b83c9f3b4d7e62 Mon Sep 17 00:00:00 2001 From: Ghanshyam Mann Date: Fri, 6 Jan 2023 12:20:34 -0600 Subject: [PATCH 22/39] [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/+/869520 Change-Id: I4407f7036e3fd51ac79f68791151c3f9cd03bd01 (cherry picked from commit 689b399e3a445c47368b9a17e428ab120f591d7b) --- playbooks/tox/run-both.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/playbooks/tox/run-both.yaml b/playbooks/tox/run-both.yaml index e4043d8231..0f8af920e4 100644 --- a/playbooks/tox/run-both.yaml +++ b/playbooks/tox/run-both.yaml @@ -6,6 +6,12 @@ bindep_profile: test bindep_dir: "{{ zuul_work_dir }}" - test-setup - - ensure-tox + # NOTE(gmann): Pinning tox<4.0.0 for stable/zed and lower. Tox 4.0.0 + # released after zed was released and has some incompatible changes + # and it is ok not to fix the issues caused by tox 4.0.0 in stable + # beanches jobs. We can continue testing the stable/zed and lower + # branches with tox<4.0.0 + - role: ensure-tox + ensure_tox_version: "<4" - get-devstack-os-environment - tox From b0fbae15a65590171412a3429cbe2d786ce43789 Mon Sep 17 00:00:00 2001 From: yatinkarel Date: Thu, 12 Jan 2023 17:31:36 +0530 Subject: [PATCH 23/39] [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 7fecba2f135f16204050b627bb850a87aa597bad) --- lib/neutron_plugins/ovn_agent | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/neutron_plugins/ovn_agent b/lib/neutron_plugins/ovn_agent index 9f35568ba7..12affdd0e8 100644 --- a/lib/neutron_plugins/ovn_agent +++ b/lib/neutron_plugins/ovn_agent @@ -577,6 +577,7 @@ function init_ovn { 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 { From febdb122e46ad22b5481c03c33fcd4130593d116 Mon Sep 17 00:00:00 2001 From: Ghanshyam Mann Date: Thu, 26 Jan 2023 22:28:07 -0600 Subject: [PATCH 24/39] 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/ 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 7fe998109bda8cdd5cb5ba4a0e02c6c83cb0566d) (cherry picked from commit 30a7d790b6bf45bbcc6333008621b093c84055d1) --- lib/tempest | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/tempest b/lib/tempest index 5cab53cc1a..77cb469a3f 100644 --- a/lib/tempest +++ b/lib/tempest @@ -128,6 +128,13 @@ function set_tempest_venv_constraints { (cd $REQUIREMENTS_DIR && git show master:upper-constraints.txt 2>/dev/null || git show origin/master:upper-constraints.txt) > $tmp_c + # NOTE(gmann): we need to set the below env var pointing to master + # constraints even that is what default in tox.ini. Otherwise it can + # create the issue for grenade run where old and new devstack can have + # different tempest (old and master) to install. For detail problem, + # refer to the https://bugs.launchpad.net/devstack/+bug/2003993 + export UPPER_CONSTRAINTS_FILE=https://releases.openstack.org/constraints/upper/master + export TOX_CONSTRAINTS_FILE=https://releases.openstack.org/constraints/upper/master else echo "Using $TEMPEST_VENV_UPPER_CONSTRAINTS constraints in Tempest virtual env." cat $TEMPEST_VENV_UPPER_CONSTRAINTS > $tmp_c From 4e2fe3a4686f7ddb558e6ee84841402638c51580 Mon Sep 17 00:00:00 2001 From: Rajat Dhasmana Date: Tue, 14 Mar 2023 05:35:33 +0000 Subject: [PATCH 25/39] 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 1898a683be78622445e48f1f071cf7188ab19450) (cherry picked from commit 16594b7b2a08fe17002966a959bcbe82fdbe74f8) Conflicts: lib/cinder conflicts due to nvme support being added in 2023.1 https://review.opendev.org/c/openstack/devstack/+/814193 (cherry picked from commit 977b591ee1cbcebcbf49613a0e34b0e078a8d2b7) --- lib/cinder | 35 ++++++++++++++++++++++++----------- lib/tempest | 4 ++++ 2 files changed, 28 insertions(+), 11 deletions(-) diff --git a/lib/cinder b/lib/cinder index 6537807eab..01c7f4f3dc 100644 --- a/lib/cinder +++ b/lib/cinder @@ -91,6 +91,8 @@ CINDER_VOLUME_CLEAR=$(echo ${CINDER_VOLUME_CLEAR} | tr '[:upper:]' '[:lower:]') # Default to lioadm CINDER_ISCSI_HELPER=${CINDER_ISCSI_HELPER:-lioadm} +VOLUME_TYPE_MULTIATTACH=${VOLUME_TYPE_MULTIATTACH:-multiattach} + # EL and SUSE should only use lioadm if is_fedora || is_suse; then if [[ ${CINDER_ISCSI_HELPER} != "lioadm" ]]; then @@ -573,6 +575,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 @@ -580,19 +599,13 @@ 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 " 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. diff --git a/lib/tempest b/lib/tempest index 77cb469a3f..b794832f2d 100644 --- a/lib/tempest +++ b/lib/tempest @@ -604,6 +604,10 @@ function configure_tempest { iniset $TEMPEST_CONFIG volume storage_protocol "$TEMPEST_STORAGE_PROTOCOL" fi + if [[ $ENABLE_VOLUME_MULTIATTACH == "True" ]]; then + iniset $TEMPEST_CONFIG volume volume_type_multiattach $VOLUME_TYPE_MULTIATTACH + fi + # Placement Features # Set the microversion range for placement. # Setting [None, latest] range of microversion which allow Tempest to run all microversions tests. From b0bd5b92fa14ca7d3621c3b342d4bd3d92bd6a4b Mon Sep 17 00:00:00 2001 From: Ihar Hrachyshka Date: Wed, 19 Apr 2023 16:57:44 -0400 Subject: [PATCH 26/39] 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 e8915786e1e007742f47fee507b1b6288b6cedae) --- functions-common | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/functions-common b/functions-common index c5166ba4e9..52d5105530 100644 --- a/functions-common +++ b/functions-common @@ -646,8 +646,9 @@ function git_clone { echo "the project to the \$PROJECTS variable in the job definition." 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 $git_clone_flags $git_remote $git_dest + cd $git_dest + git checkout $git_ref elif [[ "$RECLONE" = "True" ]]; then # if it does exist then simulate what clone does if asked to RECLONE cd $git_dest From fece4f466cf2c024bd1d6bd086312c8027ad55fe Mon Sep 17 00:00:00 2001 From: Ghanshyam Mann Date: Thu, 4 May 2023 17:52:30 -0500 Subject: [PATCH 27/39] [stable-only]: Set system_scope_supported There is a new config option 'system_scope_supported' added in glance-tempest-plugin - https://review.opendev.org/c/openstack/glance-tempest-plugin/+/882363 which control whether or not to test the system scope asserts. System scope is supported in glance only till stable/yoga so setting the new flag to True for <=stable/yoga Depends-On: https://review.opendev.org/c/openstack/glance-tempest-plugin/+/882363 Change-Id: I0e4a65a9887505e63b824a40c0dacea4a8396ea0 --- lib/tempest | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/tempest b/lib/tempest index b794832f2d..fb44b1b3ec 100644 --- a/lib/tempest +++ b/lib/tempest @@ -685,6 +685,8 @@ function configure_tempest { iniset $TEMPEST_CONFIG auth admin_project_name '' fi iniset $TEMPEST_CONFIG enforce_scope glance "$GLANCE_ENFORCE_SCOPE" + # NOTE(gmann): system scope is supported for <=stable/yoga only + iniset $TEMPEST_CONFIG glance_api system_scope_supported "True" iniset $TEMPEST_CONFIG enforce_scope cinder "$CINDER_ENFORCE_SCOPE" From 31701cd0b5d6248dc15b0634b60bbc90eb964ad0 Mon Sep 17 00:00:00 2001 From: Slawek Kaplonski Date: Fri, 26 Aug 2022 12:58:29 +0200 Subject: [PATCH 28/39] 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 Closes-Bug: #1987832 Change-Id: I83fc9250ae5b7c1686938a0dd25d66b40fc6c6aa (cherry picked from commit 3de92db6634a6d1455b7211ec869aed35508c58c) --- lib/neutron_plugins/ovn_agent | 4 ++-- lib/neutron_plugins/ovs_source | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/neutron_plugins/ovn_agent b/lib/neutron_plugins/ovn_agent index 12affdd0e8..634ec1e328 100644 --- a/lib/neutron_plugins/ovn_agent +++ b/lib/neutron_plugins/ovn_agent @@ -604,7 +604,7 @@ function _start_ovs { dbcmd+=" --remote=db:hardware_vtep,Global,managers $OVS_DATADIR/vtep.db" fi dbcmd+=" $OVS_DATADIR/conf.db" - _run_process ovsdb-server "$dbcmd" + _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. @@ -692,7 +692,7 @@ function start_ovn { 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" + _run_process ovn-northd "$cmd" "$stop_cmd" "$STACK_GROUP" "root" else _start_process "$OVN_NORTHD_SERVICE" fi diff --git a/lib/neutron_plugins/ovs_source b/lib/neutron_plugins/ovs_source index 9ae5555afb..164d574c42 100644 --- a/lib/neutron_plugins/ovs_source +++ b/lib/neutron_plugins/ovs_source @@ -87,9 +87,15 @@ function prepare_for_ovs_compilation { 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 } From c4a1f8654826166642880714999b25d00dfe3dfe Mon Sep 17 00:00:00 2001 From: Dan Smith Date: Mon, 13 Feb 2023 14:41:40 +0000 Subject: [PATCH 29/39] 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 7567359755a105e7278bbf97541332f28228b87d) (cherry picked from commit b12cc4181cd691c121265cf07e274a8021c18754) --- .zuul.yaml | 3 +++ lib/databases/mysql | 10 ++++++++++ stackrc | 5 +++++ 3 files changed, 18 insertions(+) diff --git a/.zuul.yaml b/.zuul.yaml index 76b492a290..004f76edef 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -630,6 +630,9 @@ description: | Simple multinode test to verify multinode functionality on devstack side. 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, diff --git a/lib/databases/mysql b/lib/databases/mysql index 0f45273d4b..3a4fa940aa 100644 --- a/lib/databases/mysql +++ b/lib/databases/mysql @@ -150,6 +150,16 @@ function configure_database_mysql { iniset -sudo $my_conf mysqld log-queries-not-using-indexes 1 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 } diff --git a/stackrc b/stackrc index eec61eaf5a..25743210d7 100644 --- a/stackrc +++ b/stackrc @@ -193,6 +193,11 @@ ADDITIONAL_VENV_PACKAGES=${ADITIONAL_VENV_PACKAGES:-""} # (currently only implemented for MySQL backend) DATABASE_QUERY_LOGGING=$(trueorfalse False DATABASE_QUERY_LOGGING) +# This can be used to reduce the amount of memory mysqld uses while running. +# These are unscientifically determined, and could reduce performance or +# cause other issues. +MYSQL_REDUCE_MEMORY=$(trueorfalse False MYSQL_REDUCE_MEMORY) + # Set a timeout for git operations. If git is still running when the # timeout expires, the command will be retried up to 3 times. This is # in the format for timeout(1); From 0a1ea3ed531a0c331e73d57b318b1d7450a8848f Mon Sep 17 00:00:00 2001 From: jskunda Date: Tue, 18 Jul 2023 09:32:05 +0200 Subject: [PATCH 30/39] 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 --- functions-common | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/functions-common b/functions-common index 52d5105530..20440920ec 100644 --- a/functions-common +++ b/functions-common @@ -646,9 +646,10 @@ function git_clone { echo "the project to the \$PROJECTS variable in the job definition." 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 + git_timed clone --no-checkout $git_clone_flags $git_remote $git_dest cd $git_dest - git checkout $git_ref + 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 From 4062cc0f85d6e865db2cc20f635a3942d4cc4dfc Mon Sep 17 00:00:00 2001 From: Alfredo Moralejo Date: Wed, 24 May 2023 21:03:28 +0200 Subject: [PATCH 31/39] 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 b2ad00cb66bd38ec6179d3bd1bf41556b966dc8c) --- stack.sh | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/stack.sh b/stack.sh index 0082b99f11..443c1db1f8 100755 --- a/stack.sh +++ b/stack.sh @@ -316,7 +316,22 @@ function _install_rdo { sudo dnf -y install https://rdoproject.org/repos/openstack-${rdo_release}/rdo-release-${rdo_release}.el8.rpm fi elif [[ $DISTRO == "rhel9" ]]; then - sudo curl -L -o /etc/yum.repos.d/delorean-deps.repo http://trunk.rdoproject.org/centos9-master/delorean-deps.repo + install_package wget + # We need to download rdo-release package using wget as installing with dnf from repo.fedoraproject.org fails in + # FIPS enabled systems after https://bugzilla.redhat.com/show_bug.cgi?id=2157951 + # Until we can pull rdo-release from a server which supports EMS, this workaround is doing wget, which does + # not relies on openssl but on gnutls, and then install it locally using rpm + TEMPRDODIR=$(mktemp -d) + if [[ "$TARGET_BRANCH" == "master" ]]; then + # rdo-release.el9.rpm points to latest RDO release, use that for master + wget -P $TEMPRDODIR https://rdoproject.org/repos/rdo-release.el9.rpm + else + # For stable branches use corresponding release rpm + rdo_release=$(echo $TARGET_BRANCH | sed "s|stable/||g") + wget -P $TEMPRDODIR https://rdoproject.org/repos/openstack-${rdo_release}/rdo-release-${rdo_release}.el9.rpm + fi + sudo rpm -ivh $TEMPRDODIR/rdo-release*rpm + rm -rf $TEMPRDODIR fi sudo dnf -y update } From 4d9e9db2100a93a8efa4a68c352c845551e22c7f Mon Sep 17 00:00:00 2001 From: OpenStack Release Bot Date: Wed, 28 Feb 2024 06:41:30 +0000 Subject: [PATCH 32/39] Update .gitreview for unmaintained/yoga Change-Id: I828edc24f88717260d1e509baf3d22244e38e7da --- .gitreview | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitreview b/.gitreview index b77ae24baa..c88fea6ca6 100644 --- a/.gitreview +++ b/.gitreview @@ -2,4 +2,4 @@ host=review.opendev.org port=29418 project=openstack/devstack.git -defaultbranch=stable/yoga +defaultbranch=unmaintained/yoga From c7472801f78c8b9f4b4d54c256a1274fdc8c08cb Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Mon, 4 Mar 2024 18:24:24 +0000 Subject: [PATCH 33/39] 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 1183167f191923f2473f1a93fece4caf8df2be54) --- .zuul.yaml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/.zuul.yaml b/.zuul.yaml index 004f76edef..fcd103fbd2 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -38,16 +38,6 @@ nodes: - controller -- nodeset: - name: devstack-single-node-centos-7 - nodes: - - name: controller - label: centos-7 - groups: - - name: tempest - nodes: - - controller - - nodeset: name: devstack-single-node-centos-8-stream nodes: From 77fb04e5e740496636ef8e83ccdc82d0b3e8c855 Mon Sep 17 00:00:00 2001 From: MinhNLH2 Date: Mon, 29 Apr 2024 23:18:56 +0700 Subject: [PATCH 34/39] Yoga: Fix wrong TARGET_BRANCH in stackrc Closes-Bug: 2064140 Change-Id: Ia515d18f8aa9aefc1a8feea02de3540057d92cdb Signed-off-by: MinhNLH2 --- stackrc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/stackrc b/stackrc index 25743210d7..b9d7b72fb6 100644 --- a/stackrc +++ b/stackrc @@ -15,7 +15,9 @@ source $RC_DIR/functions # Set the target branch. This is used so that stable branching # does not need to update each repo below. -TARGET_BRANCH=stable/yoga +# NOTE(minhnlh2): The yoga release is no longer supported, so we +# update the target branch from stable/yoga to unmaintained/yoga +TARGET_BRANCH=unmaintained/yoga # Cycle trailing projects need to branch later than the others. TRAILING_TARGET_BRANCH=master From 503116557a0b5ed91aa7bea2ef6eaa967ce15712 Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Wed, 15 May 2024 08:27:49 -0700 Subject: [PATCH 35/39] 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. NOTE(elod.illes): grenade is set as non-voting as it won't pass until grenade fix [1] is not landed, which is a 'catch 22' as it won't pass until this patch is not landed. [1] https://review.opendev.org/c/openstack/grenade/+/919818 Change-Id: I28a39b31f71153a602d41cefe621a216d09a290f (cherry picked from commit d487302e60bf295122ab04ba5d3b799132ed0b17) --- .zuul.yaml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/.zuul.yaml b/.zuul.yaml index fcd103fbd2..066deeb620 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -315,7 +315,6 @@ required-projects: - opendev.org/openstack/devstack roles: - - zuul: opendev.org/openstack/devstack-gate - zuul: opendev.org/openstack/openstack-zuul-jobs vars: devstack_localrc: @@ -760,6 +759,9 @@ - ironic-tempest-bios-ipmi-direct-tinyipa - swift-dsvm-functional - grenade: + # NOTE(elod.illes): needs to be set back as voting, when grenade + # patch merges: https://review.opendev.org/919818 + voting: false irrelevant-files: - ^.*\.rst$ - ^doc/.*$ @@ -790,6 +792,7 @@ - ^.*\.rst$ - ^doc/.*$ - nova-ceph-multistore: + voting: false irrelevant-files: - ^.*\.rst$ - ^doc/.*$ @@ -812,6 +815,9 @@ - ironic-tempest-bios-ipmi-direct-tinyipa - swift-dsvm-functional - grenade: + # NOTE(elod.illes): needs to be set back as voting, when grenade + # patch merges: https://review.opendev.org/919818 + voting: false irrelevant-files: - ^.*\.rst$ - ^doc/.*$ @@ -823,10 +829,13 @@ irrelevant-files: - ^.*\.rst$ - ^doc/.*$ - - nova-ceph-multistore: - 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. From d7b71cb65b2c84422e4b7dcaecda2f419e29c99d Mon Sep 17 00:00:00 2001 From: elajkat Date: Mon, 5 Aug 2024 11:39:06 +0200 Subject: [PATCH 36/39] Handle_tags and branches for unmaintained also Related-Bug: #2056276 Change-Id: Iaa34624d1d85cadf1b45bec780ef8d97dd054041 (cherry picked from commit 92b65a84cc8135316922a0f8b91420ed221f3269) (cherry picked from commit 0c1e594e45dc877c54d966fe9053aa0b13993c32) (cherry picked from commit d59e528c743233f4a6883c90f6e6c959f8f78daf) (cherry picked from commit c52f50ee8c07462813fd22452084b889741f7ab1) (cherry picked from commit c755ca9219e109a94edf3364390fa995bf0dbf3e) --- roles/setup-devstack-source-dirs/tasks/main.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/setup-devstack-source-dirs/tasks/main.yaml b/roles/setup-devstack-source-dirs/tasks/main.yaml index 294c29cd29..cb7c6e3af8 100644 --- a/roles/setup-devstack-source-dirs/tasks/main.yaml +++ b/roles/setup-devstack-source-dirs/tasks/main.yaml @@ -43,9 +43,9 @@ base_branch={{ devstack_sources_branch }} if git branch -a | grep "$base_branch" > /dev/null ; then git checkout $base_branch - elif [[ "$base_branch" == stable/* ]]; then + elif [[ "$base_branch" == stable/* ]] || [[ "$base_branch" == unmaintained/* ]]; then # Look for an eol tag for the stable branch. - eol_tag=${base_branch#stable/}-eol + eol_tag="${base_branch#*/}-eol" if git tag -l |grep $eol_tag >/dev/null; then git checkout $eol_tag git reset --hard $eol_tag From d5e95cb608e31d45c647cc598d98928c1a7e7b05 Mon Sep 17 00:00:00 2001 From: yatinkarel Date: Wed, 30 Oct 2024 12:31:21 +0530 Subject: [PATCH 37/39] [Stable/Unmaintained Only] Pin to last compatible tag for py3.8 Stable/2023.1 and Unmaintained xena/yoga/zed runs ubuntu-focal jobs and since with [1] py3.8 pins are dropped from master upper-constraints, so these branches can no longer use master constraints with envs running with python3.8. With this patch pinning tempest to the last compatible tag for py3.8 i.e 41.0.0[2] Additionally marked ironic-tempest-bios-ipmi-direct-tinyipa non-voting and removed from gate until this fixed in ironic. [1] https://review.opendev.org/c/openstack/requirements/+/925201 [2] https://lists.openstack.org/archives/list/openstack-discuss@\ lists.openstack.org/thread/FOWV4UQZTH4DPDA67QDEROAESYU5Z3LE/ Needed-By: https://review.opendev.org/c/openstack/ironic/+/934140 Depends-On: https://review.opendev.org/c/openstack/tempest/+/933716 Closes-Bug: #2085886 Change-Id: I5e714655ed329ea2c714f918e3dd843ca764c2c4 --- .zuul.yaml | 8 ++++++-- stackrc | 4 ++-- tests/test_refs.sh | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.zuul.yaml b/.zuul.yaml index 066deeb620..567cb9cfa9 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -756,7 +756,8 @@ - devstack-multinode - devstack-unit-tests - openstack-tox-bashate - - ironic-tempest-bios-ipmi-direct-tinyipa + - ironic-tempest-bios-ipmi-direct-tinyipa: + voting: false - swift-dsvm-functional - grenade: # NOTE(elod.illes): needs to be set back as voting, when grenade @@ -812,7 +813,10 @@ irrelevant-files: - ^.*\.rst$ - ^doc/.*$ - - ironic-tempest-bios-ipmi-direct-tinyipa + # TODO(ykarel): ironic-tempest job 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. + # - ironic-tempest-bios-ipmi-direct-tinyipa - swift-dsvm-functional - grenade: # NOTE(elod.illes): needs to be set back as voting, when grenade diff --git a/stackrc b/stackrc index b9d7b72fb6..cc7cbfad6e 100644 --- a/stackrc +++ b/stackrc @@ -294,8 +294,8 @@ REQUIREMENTS_BRANCH=${REQUIREMENTS_BRANCH:-$TARGET_BRANCH} # Tempest test suite TEMPEST_REPO=${TEMPEST_REPO:-${GIT_BASE}/openstack/tempest.git} -TEMPEST_BRANCH=${TEMPEST_BRANCH:-$BRANCHLESS_TARGET_BRANCH} -TEMPEST_VENV_UPPER_CONSTRAINTS=${TEMPEST_VENV_UPPER_CONSTRAINTS:-master} +TEMPEST_BRANCH=${TEMPEST_BRANCH:-41.0.0 } +TEMPEST_VENV_UPPER_CONSTRAINTS=${TEMPEST_VENV_UPPER_CONSTRAINTS:-$REQUIREMENTS_DIR/upper-constraints.txt} ############## diff --git a/tests/test_refs.sh b/tests/test_refs.sh index 0f9aa4a5ca..d9b328294a 100755 --- a/tests/test_refs.sh +++ b/tests/test_refs.sh @@ -15,7 +15,7 @@ echo "Ensuring we don't have crazy refs" -REFS=`grep BRANCH stackrc | grep -v 'TARGET_BRANCH' | grep -v 'NOVNC_BRANCH'` +REFS=`grep BRANCH stackrc | grep -v 'TARGET_BRANCH' | grep -v 'NOVNC_BRANCH' | grep -v 'TEMPEST_BRANCH'` rc=$? if [[ $rc -eq 0 ]]; then echo "Branch defaults must be one of the *TARGET_BRANCH values. Found:" From eafc0b27e59226b921e30cdea0a55002f1b5087b Mon Sep 17 00:00:00 2001 From: Rodolfo Alonso Hernandez Date: Fri, 18 Jul 2025 12:36:56 +0000 Subject: [PATCH 38/39] Removed several nodesets and jobs Nodesets: * devstack-single-node-opensuse-15 * devstack-single-node-centos-8-stream * openstack-single-node-xenial * openstack-single-node * openstack-two-node * openstack-two-node-xenial * openstack-two-node-centos-8-stream Jobs: * openstacksdk-functional-devstack Signed-off-by: Rodolfo Alonso Hernandez Change-Id: I344211b58b09cf7977a34bcd1686505ad9e57671 --- .zuul.yaml | 138 ----------------------------------------------------- 1 file changed, 138 deletions(-) diff --git a/.zuul.yaml b/.zuul.yaml index 567cb9cfa9..e5ce3e3995 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -1,13 +1,3 @@ -- nodeset: - name: openstack-single-node - nodes: - - name: controller - label: ubuntu-xenial - groups: - - name: tempest - nodes: - - controller - - nodeset: name: openstack-single-node-focal nodes: @@ -28,26 +18,6 @@ nodes: - controller -- nodeset: - name: openstack-single-node-xenial - nodes: - - name: controller - label: ubuntu-xenial - groups: - - name: tempest - nodes: - - controller - -- nodeset: - name: devstack-single-node-centos-8-stream - nodes: - - name: controller - label: centos-8-stream - groups: - - name: tempest - nodes: - - controller - - nodeset: name: devstack-single-node-centos-9-stream nodes: @@ -58,16 +28,6 @@ nodes: - controller -- nodeset: - name: devstack-single-node-opensuse-15 - nodes: - - name: controller - label: opensuse-15 - groups: - - name: tempest - nodes: - - controller - - nodeset: name: devstack-single-node-debian-bullseye nodes: @@ -78,66 +38,6 @@ nodes: - controller -- nodeset: - name: openstack-two-node - nodes: - - name: controller - label: ubuntu-xenial - - name: compute1 - label: ubuntu-xenial - 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-centos-8-stream - nodes: - - name: controller - label: centos-8-stream - - name: compute1 - label: centos-8-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: @@ -198,36 +98,6 @@ nodes: - compute1 -- nodeset: - name: openstack-two-node-xenial - nodes: - - name: controller - label: ubuntu-xenial - - name: compute1 - label: ubuntu-xenial - 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-three-node-focal nodes: @@ -784,10 +654,6 @@ irrelevant-files: - ^.*\.rst$ - ^doc/.*$ - - openstacksdk-functional-devstack: - irrelevant-files: - - ^.*\.rst$ - - ^doc/.*$ - tempest-ipv6-only: irrelevant-files: - ^.*\.rst$ @@ -825,10 +691,6 @@ irrelevant-files: - ^.*\.rst$ - ^doc/.*$ - - openstacksdk-functional-devstack: - irrelevant-files: - - ^.*\.rst$ - - ^doc/.*$ - tempest-ipv6-only: irrelevant-files: - ^.*\.rst$ From 9ef812376fd5bf7a3f4e5152062c7916b371f8f9 Mon Sep 17 00:00:00 2001 From: Elod Illes Date: Fri, 30 Jan 2026 16:31:21 +0100 Subject: [PATCH 39/39] [CI][stable-only] Remove neutron-tempest-with-uwsgi neutron-tempest-with-uwsgi had definition only on older branches, that were deleted recently (victoria, wallaby, and xena moved to End of Life), hence this is now causing zuul config errors [1]. The job is replaced in newer branches [2], but since this is an experimental job, probably it's enough to simply remove the job. devstack-platform-debian-bullseye job was set to non-voting on branch stable/2024.1 (before it went to unmaintained), and failing here on 2023.1 branch as well, so this patch sets it as non-voting in check queue, and removes it from gate-queue to unblock the gate. [1] https://zuul.opendev.org/t/openstack/config-errors?project=openstack%2Fdevstack&severity=error&skip=0 [2] If11e975fd890f55f99efc2c7d8122256ff831ad8 [3] I221a03b2f8314fee66672c23d7ece4eb900c038c Conflicts: .zuul.yaml Change-Id: I9a57e0964264d904e6581bbf4c30f7dae41276ee Signed-off-by: Elod Illes (cherry picked from commit 0a508a1bacbbef7eac35029a8af2a03755e9d8d5) (cherry picked from commit d728d3383d6e53fc715f4ca429ac284d4c3328d0) --- .zuul.yaml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.zuul.yaml b/.zuul.yaml index e5ce3e3995..a1f63caae0 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -622,7 +622,8 @@ - devstack - devstack-ipv6 - devstack-enforce-scope - - devstack-platform-debian-bullseye + - devstack-platform-debian-bullseye: + voting: false - devstack-multinode - devstack-unit-tests - openstack-tox-bashate @@ -715,8 +716,6 @@ # * neutron-functional-with-uwsgi: maintained by neutron for functional # test. Next cycle we can remove this one if things turn out to be # 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 @@ -726,7 +725,6 @@ - nova-next - neutron-fullstack-with-uwsgi - neutron-functional-with-uwsgi - - neutron-tempest-with-uwsgi - devstack-plugin-ceph-tempest-py3: irrelevant-files: - ^.*\.rst$