Skip to content

Commit 07d46cc

Browse files
kayrusstephenfin
andauthored
[release-1.31] tests: Bump DevStack to Epoxy (2025.1) (#2977)
* tests: Bump DevStack to Epoxy (2025.1) (#2742) * tests: Prefer ginkgo timeout So that we actually get test results. Signed-off-by: Stephen Finucane <[email protected]> * tests: Align opts for Cinder, Manila tests Add a timeout to the Manila job and otherwise move some lines around. Signed-off-by: Stephen Finucane <[email protected]> * tests: Suffix image version While boskos will reap most resources for us, it doesn't reap images [1]. This has resulted in us using the same image for who knows how long at this point. Encode the Ubuntu version to prevent us picking up other version by mistake. [1] https://github.com/kubernetes-sigs/boskos/blob/5993cef5a1c719c33c0936d416b7d935058e1204/cmd/janitor/gcp_janitor.py#L46-L88 Signed-off-by: Stephen Finucane <[email protected]> * tests: Bump DevStack to Epoxy (2025.1) Signed-off-by: Stephen Finucane <[email protected]> * tests: Bump amphora image Use the Ubuntu 24.04 version, rather than the 22.04 version. This aligns with what we're using for DevStack itself. Signed-off-by: Stephen Finucane <[email protected]> * devstack: Remove USE_PYTHON3 It's all Python 3 now, baby. Signed-off-by: Stephen Finucane <[email protected]> * tests: Install Ansible from Debian Testing Signed-off-by: Stephen Finucane <[email protected]> * tests: Correct broken conditions Per the Ansible 2.19 porting guide [1]. [1] https://ansible.readthedocs.io/projects/ansible-core/devel/porting_guides/porting_guide_core_2.19.html Signed-off-by: Stephen Finucane <[email protected]> * tests: Decrease device detach timeout Wait less time before retrying. Signed-off-by: Stephen Finucane <[email protected]> --------- Signed-off-by: Stephen Finucane <[email protected]> * Bump CSI test timeouts (#2966) * Bump CSI test timeouts We have worked around Nova bug #2119114 by lowering the device detach threshold to 1 second. Unfortunately this still leaves us with a N seconds of additional runtime, where N is the number of device detaches incurred by our test suite (since we run tests serially). This has put us right on the cusp of timeouts, meaning our jobs occasionally pass and occasionally fail, depending on the node we end up on. Add a bit more breathing room for the jobs while we wait for the Nova fix. Note that we do this for both Cinder and Manila to try keep those jobs consistent where possible. [1] https://bugs.launchpad.net/nova/+bug/2119114 Signed-off-by: Stephen Finucane <[email protected]> * tests: Temporarily remove share v1 endpoint Signed-off-by: Stephen Finucane <[email protected]> --------- Signed-off-by: Stephen Finucane <[email protected]> --------- Signed-off-by: Stephen Finucane <[email protected]> Co-authored-by: Stephen Finucane <[email protected]>
1 parent 7ae2326 commit 07d46cc

File tree

11 files changed

+106
-21
lines changed

11 files changed

+106
-21
lines changed

tests/ci-csi-cinder-e2e.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,24 @@ cleanup() {
4141
}
4242
trap cleanup EXIT
4343

44+
# Install Ansible from Trixie (Debian Testing) to allow us to talk to a host
45+
# running Python 3.12 like Ubuntu 24.04
46+
#
47+
# https://woju.eu/blog/2025/03/ansible-bookworm/
48+
cat << EOF > /etc/apt/sources.list.d/trixie.list
49+
deb https://deb.debian.org/debian trixie main
50+
EOF
51+
52+
cat << EOF > /etc/apt/preferences.d/ansible.pref
53+
Package: *
54+
Pin: release n=trixie
55+
Pin-Priority: -10
56+
57+
Package: ansible* python3-netaddr
58+
Pin: release n=trixie
59+
Pin-Priority: 990
60+
EOF
61+
4462
apt-get update
4563
apt-get install -y python3-requests ansible
4664

tests/ci-csi-manila-e2e.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,24 @@ cleanup() {
4141
}
4242
trap cleanup EXIT
4343

44+
# Install Ansible from Trixie (Debian Testing) to allow us to talk to a host
45+
# running Python 3.12 like Ubuntu 24.04
46+
#
47+
# https://woju.eu/blog/2025/03/ansible-bookworm/
48+
cat << EOF > /etc/apt/sources.list.d/trixie.list
49+
deb https://deb.debian.org/debian trixie main
50+
EOF
51+
52+
cat << EOF > /etc/apt/preferences.d/ansible.pref
53+
Package: *
54+
Pin: release n=trixie
55+
Pin-Priority: -10
56+
57+
Package: ansible* python3-netaddr
58+
Pin: release n=trixie
59+
Pin-Priority: 990
60+
EOF
61+
4462
apt-get update
4563
apt-get install -y python3-requests ansible
4664

tests/ci-occm-e2e.sh

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,24 @@ cleanup() {
4242
}
4343
trap cleanup EXIT
4444

45+
# Install Ansible from Trixie (Debian Testing) to allow us to talk to a host
46+
# running Python 3.12 like Ubuntu 24.04
47+
#
48+
# https://woju.eu/blog/2025/03/ansible-bookworm/
49+
cat << EOF > /etc/apt/sources.list.d/trixie.list
50+
deb https://deb.debian.org/debian trixie main
51+
EOF
52+
53+
cat << EOF > /etc/apt/preferences.d/ansible.pref
54+
Package: *
55+
Pin: release n=trixie
56+
Pin-Priority: -10
57+
58+
Package: ansible* python3-netaddr
59+
Pin: release n=trixie
60+
Pin-Priority: 990
61+
EOF
62+
4563
apt-get update
4664
apt-get install -y python3-requests ansible
4765

@@ -133,4 +151,4 @@ scp -i ~/.ssh/google_compute_engine \
133151
# If Boskos is being used then release the resource back to Boskos.
134152
[ -z "${BOSKOS_HOST:-}" ] || python3 tests/scripts/boskos.py --release >> "$ARTIFACTS/logs/boskos.log" 2>&1
135153

136-
exit ${exit_code}
154+
exit ${exit_code}

tests/playbooks/roles/install-cpo-occm/tasks/main.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@
128128
msg: *failmsg
129129

130130
- name: Run functional tests for openstack-cloud-controller-manager
131-
when: run_e2e
131+
when: run_e2e | bool
132132
register: run_tests
133133
shell:
134134
executable: /bin/bash
@@ -145,7 +145,7 @@
145145

146146
- name: Print logs for debugging
147147
when:
148-
- run_e2e
148+
- run_e2e | bool
149149
- run_tests.failed
150150
block:
151151
- name: Show openstack-cloud-controller-manager pod logs

tests/playbooks/roles/install-csi-cinder/tasks/main.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,14 +187,16 @@
187187
-storage.testdriver=tests/e2e/csi/cinder/test-driver.yaml \
188188
--ginkgo.focus='External.Storage' \
189189
--ginkgo.skip='\[Disruptive\]|\[Testpattern:\s+Dynamic\s+PV\s+\(default\s+fs\)\]\s+provisioning\s+should\s+mount\s+multiple\s+PV\s+pointing\s+to\s+the\s+same\s+storage\s+on\s+the\s+same\s+node|\[Testpattern:\s+Dynamic\s+PV\s+\(default\s+fs\)\]\s+provisioning\s+should\s+provision\s+storage\s+with\s+any\s+volume\s+data\s+source\s+\[Serial\]|should\s+support\s+expansion\s+of\s+pvcs\s+created\s+for\s+ephemeral\s+pvcs' \
190+
--ginkgo.v \
190191
--ginkgo.noColor \
191192
--ginkgo.progress \
192-
--ginkgo.v \
193-
--ginkgo.timeout=24h \
193+
--ginkgo.timeout=1h45m \
194194
-test.timeout=0 \
195195
-report-dir="/var/log/csi-pod" | tee "/var/log/csi-pod/cinder-csi-e2e.log"
196196
register: functional_test_result
197197
ignore_errors: true
198+
async: 6600 # wait 1h50m (i.e. 5 mins longer than the ginkgo timeout) then fail and fetch the logs
199+
poll: 15
198200

199201
- name: Collect pod logs for debug purpose
200202
shell:

tests/playbooks/roles/install-csi-manila/tasks/main.yaml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -227,21 +227,23 @@
227227
set +x; source {{ devstack_workdir }}/openrc demo demo > /dev/null; set -x
228228
229229
cd {{ ansible_user_dir }}/src/k8s.io/cloud-provider-openstack
230-
231-
# GATEWAY_IP is the default value in devstack
232230
mkdir -p /var/log/csi-pod
231+
# GATEWAY_IP is the default value in devstack
233232
GATEWAY_IP=172.24.5.1 \
234233
OS_RC={{ devstack_workdir }}/openrc \
235234
go test -v ./cmd/tests/manila-csi-e2e-suite/manila_csi_e2e_suite_test.go \
235+
--ginkgo.focus="\[manila-csi-e2e\]" \
236+
--ginkgo.skip="\[Disruptive\]|\[sig-storage\]\s+\[manila-csi-e2e\]\s+CSI\s+Volumes\s+\[Driver:\s+nfs.manila.csi.openstack.org\]\s+\[Testpattern:\s+Dynamic\s+PV\s+\(default\s+fs\)\]\s+provisioning\s+should\s+provision\s+storage\s+with\s+any\s+volume\s+data\s+source\s+\[Serial\]|should\s+provision\s+storage\s+with\s+snapshot\s+data\s+source|restoring\s+snapshot\s+to\s+larger\s+size" \
236237
--ginkgo.v \
237238
--ginkgo.noColor \
238239
--ginkgo.progress \
239-
--ginkgo.skip="\[Disruptive\]|\[sig-storage\]\s+\[manila-csi-e2e\]\s+CSI\s+Volumes\s+\[Driver:\s+nfs.manila.csi.openstack.org\]\s+\[Testpattern:\s+Dynamic\s+PV\s+\(default\s+fs\)\]\s+provisioning\s+should\s+provision\s+storage\s+with\s+any\s+volume\s+data\s+source\s+\[Serial\]|should\s+provision\s+storage\s+with\s+snapshot\s+data\s+source|restoring\s+snapshot\s+to\s+larger\s+size" \
240-
--ginkgo.focus="\[manila-csi-e2e\]" \
241-
-report-dir /var/log/csi-pod \
242-
-timeout=0 | tee "/var/log/csi-pod/manila-csi-e2e.log"
240+
--ginkgo.timeout=1h45m \
241+
-timeout=0 \
242+
-report-dir /var/log/csi-pod | tee "/var/log/csi-pod/manila-csi-e2e.log"
243243
register: functional_test_result
244244
ignore_errors: true
245+
async: 6600 # wait 1h50m (i.e. 5 mins longer than the ginkgo timeout) then fail and fetch the logs
246+
poll: 15
245247

246248
- name: Collect pod logs for debug purpose
247249
shell:
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
user: "stack"
33
workdir: "/home/{{ user }}/devstack"
4-
branch: "2023.2-eol"
4+
branch: "stable/2025.1"
55
enable_services:
66
- nova
77
- glance
@@ -10,6 +10,6 @@ enable_services:
1010
- octavia
1111
- ovn-octavia
1212
- barbican
13-
octavia_amphora_url: "https://tarballs.opendev.org/openstack/octavia/test-images/test-only-amphora-x64-haproxy-ubuntu-jammy.qcow2"
13+
octavia_amphora_url: "https://tarballs.opendev.org/openstack/octavia/test-images/test-only-amphora-x64-haproxy-ubuntu-noble.qcow2"
1414
octavia_amphora_dir: /opt/octavia-amphora
1515
octavia_amphora_filename: amphora-x64-haproxy.qcow2

tests/playbooks/roles/install-devstack/tasks/main.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,3 +133,19 @@
133133
fi
134134
openstack service create --name cinder volumev3
135135
openstack endpoint create --region RegionOne volumev3 public "${URL}"
136+
137+
# FIXME(stephenfin): We should remove this as soon as [1] merges and we
138+
# bump our dependencies to include it.
139+
# [1] https://github.com/gophercloud/gophercloud/pull/3435
140+
- name: Delete legacy manila endpoint
141+
shell:
142+
executable: /bin/bash
143+
chdir: "{{ workdir }}"
144+
cmd: |
145+
set -ex
146+
export OS_CLOUD=devstack-admin
147+
148+
# delete legacy manila API endpoints
149+
if openstack service show manila > /dev/null 2>&1; then
150+
openstack service delete manila
151+
fi

tests/playbooks/roles/install-devstack/templates/local.conf.j2

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ RECLONE=False
33
HOST_IP={{ local_ip_address }}
44
DEST=/opt/stack
55
DATA_DIR=${DEST}/data
6-
USE_PYTHON3=True
76
LOGFILE=$DEST/logs/stack.sh.log
87
VERBOSE=True
98
LOG_COLOR=False
@@ -29,6 +28,7 @@ enable_service n-cond
2928
enable_service n-sch
3029
enable_service n-api-meta
3130

31+
# Placement
3232
enable_service placement-api
3333
enable_service placement-client
3434
{% endif %}
@@ -128,6 +128,16 @@ if [ -f /opt/stack/data/venv/bin/activate ]; then
128128
deactivate
129129
fi
130130

131+
{% if "nova" in enable_services %}
132+
[[post-config|$NOVA_CONF]]
133+
[libvirt]
134+
# Workaround for nova bug #2119114. Until that bug is resolved, Nova will
135+
# always timeout when detaching volumes (which affects deletion of PVCs)
136+
#
137+
# https://bugs.launchpad.net/nova/+bug/2119114
138+
device_detach_timeout = 1
139+
{% endif %}
140+
131141
{% if "glance" in enable_services %}
132142
[[post-config|$GLANCE_API_CONF]]
133143
[glance_store]

tests/playbooks/test-occm-e2e.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@
2525
- role: install-k3s
2626
worker_node_count: 0
2727
- role: install-cpo-occm
28-
run_e2e: "{{ run_e2e }}"
28+
run_e2e: "{{ run_e2e | bool }}"
2929
octavia_provider: "{{ octavia_provider }}"

0 commit comments

Comments
 (0)