ci(aio): migrate AIO molecule jobs to Zuul (#3671)

Signed-off-by: Mohammed Naser <mnaser@vexxhost.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Mohammed NaserandCopilot authored and GitHub committed 2026-02-24 14:48:10 -05:00
1 parent 159bb77855
commit 5afd0ea70f
13 files changed
+505 -428

No files matched your search

+116
View File
@@ -0,0 +1,116 @@
---
name: zuul
description: Troubleshoot failing Zuul CI jobs for this project. Use this when asked to debug, investigate, or fix Zuul job failures.
---
# Zuul CI troubleshooting
## Finding the Zuul check for a PR
Get the list of checks for the pull request. Identify the Zuul check by
looking for a check whose URL points to a Zuul instance (typically
containing `/buildset/` in the path). Note the check name, status, and
buildset URL for further investigation.
## Getting buildset details via Zuul API
Zuul's dashboard is an SPA so you cannot scrape it directly. Use the
REST API instead. Extract the Zuul base URL and buildset UUID from the
check URL, then call:
GET <zuul_base_url>/api/buildset/<buildset_uuid>
The response is JSON containing the buildset result, pipeline, refs, and
a `builds` array. Each build has `job_name`, `result`, `duration`,
`log_url`, and `error_detail`. Use this to identify which specific
job(s) failed within the buildset.
## Log retrieval
For details on reading job logs, scanning the artifact manifest, and
the artifact directory structure, see `.github/skills/zuul/logs.md`.
## Troubleshooting approach
1. Start with the buildset API to identify which job(s) failed.
2. Grep `job-output.txt` for `FAILED` (excluding `RETRYING`) and
`PLAY RECAP` with `failed=` > 0 to locate the failure point.
3. If the failure is in a verify/test stage (for example tempest), check
whether the converge stage itself passed (`failed=0`) — the root
cause may be environmental rather than a deployment error.
4. Use the scan-manifest script to discover available artifacts, then
inspect host-level state (networking, routes, processes) and pod
logs for the relevant services.
5. Cross-reference Ansible task output (`ok` vs `changed` vs `failed`)
with the actual system state from artifacts — tasks can report
success while the underlying command silently fails.
## Comparing variants in the same buildset
When a buildset has multiple job variants (for example OVN vs OVS, or
different CSI backends), and only one variant fails:
1. Check whether the same test passed in the other variant — this
narrows the root cause to what differs between them (networking
backend, storage driver, node configuration).
2. Compare system-level artifacts (routes, interfaces, bridge config)
between the passing and failing jobs to spot environmental
differences.
3. A failure in only one variant often points to an infrastructure or
configuration issue rather than a code bug.
## Analyzing tempest failures
Tempest is the OpenStack integration test suite used in the verify
stage. When tempest tests fail:
1. Use the scan-manifest script to find the tempest pod logs (search
for "tempest"). The `tempest-run-tests` pod log contains the full
tempest output and is much easier to parse than searching through
`job-output.txt`.
2. Categorize the failure type:
- **SSH/connectivity timeouts**: Likely a networking or routing issue
on the test host. Check interface state, routes, and bridge config.
- **API errors (4xx/5xx)**: Check the pod logs for the failing
OpenStack service (for example Neutron, Nova, Cinder).
- **Resource creation failures**: Check quota, scheduling, and the
relevant service logs.
3. Use the scan-manifest script to find pod logs for the service under
test and look for errors or crashes around the timestamp of the
failure.
4. When a test fails with a timeout waiting for a resource, trace
through the chain: check the service worker logs first, then the
compute logs (Nova) to verify the underlying VM state, then the
host networking artifacts (routes, interfaces). A resource stuck in
a pending state often means the control plane cannot reach the data
plane — verify connectivity, not just that the VM exists.
## Analyzing service failures
When OpenStack or infrastructure services are unhealthy:
1. Use the scan-manifest script to search for the service name and find
its pod logs and Kubernetes object descriptions.
2. Check for pods in `failed-pods/` — these are pods that were not
running at the time of log collection.
3. Review Helm release status in the helm artifacts to see if the
deployment itself succeeded.
4. Check the Kubernetes object descriptions for events, restart counts,
and readiness probe failures.
## Analyzing Ansible failures
When Ansible tasks fail or behave unexpectedly:
1. Look for `PLAY RECAP` lines to identify which play had failures.
2. Search backward from the recap to find the specific `TASK` that
failed and its error output.
3. Watch for tasks that use `|| true`, `ignore_errors`, or
`failed_when: false` — these mask real errors. A task can show `ok`
in the recap but have actually failed underneath.
4. Check whether plays that run privileged commands have `become: true`.
If a molecule scenario or Zuul job changed how privilege escalation
is configured (for example removing a global `ansible_become`
setting), individual plays may need explicit `become: true`.
5. Verify variable values by checking the generated workspace config
and Ansible facts in the job output.
+31
View File
@@ -0,0 +1,31 @@
# Zuul log retrieval and artifact navigation
## Reading job logs
Each build in the buildset response has a `log_url` pointing to a
directory listing of log artifacts. The main log file is `job-output.txt`
at that URL.
The log file can be very large (multiple MB). To find the failure
efficiently, use HTTP range requests or stream the file and grep for
key patterns like `fatal`, `FAILED` (excluding `RETRYING` lines),
`PLAY RECAP`, and `failed=`. Look for the PLAY RECAP with `failed=`
greater than zero, then work backward from there to find the root cause.
## Discovering available log artifacts
Each build has a `zuul-manifest.json` at its `log_url` root. The
manifest is a recursive JSON tree of all artifacts with file sizes —
it can be hundreds of KB so never dump it into context raw.
Use the helper script to scan it efficiently:
python3 .github/skills/zuul/scan-manifest.py <log_url>
python3 .github/skills/zuul/scan-manifest.py <log_url> neutron
The first form shows system diagnostics, top pod logs by size, and
failed pods. The second form searches for files matching a keyword.
Use the output to decide which specific files to fetch.
Use the scan-manifest output to discover what artifacts are available
for each build rather than assuming a fixed directory layout.
+69
View File
@@ -0,0 +1,69 @@
#!/usr/bin/env python3
"""Scan a Zuul build's zuul-manifest.json and print useful summaries.
Usage:
python3 scan-manifest.py <log_url> [keyword]
Examples:
python3 scan-manifest.py https://logs.oss.vexxhost.dev/abc/oss/def/
python3 scan-manifest.py https://logs.oss.vexxhost.dev/abc/oss/def/ neutron
"""
import json
import subprocess
import sys
def flatten(nodes, prefix=""):
for n in nodes:
path = prefix + "/" + n["name"]
if "children" in n:
yield from flatten(n["children"], path)
else:
yield (path, n.get("size", 0))
def main():
if len(sys.argv) < 2:
print(__doc__.strip())
sys.exit(1)
log_url = sys.argv[1].rstrip("/")
keyword = sys.argv[2].lower() if len(sys.argv) > 2 else None
manifest = json.loads(
subprocess.check_output(
["curl", "-s", log_url + "/zuul-manifest.json"],
timeout=30,
)
)
files = list(flatten(manifest["tree"]))
print(f"Total files: {len(files)}")
if keyword:
matches = [(p, s) for p, s in files if keyword in p.lower()]
print(f'\nFiles matching "{keyword}": {len(matches)}')
for p, s in matches:
print(f" {s:>10} {p}")
return
# Default: show system diagnostics + top pod logs + failed pods
print("\n=== System diagnostics ===")
for p, s in files:
if "/system/" in p:
print(f" {s:>10} {p}")
print("\n=== Pod logs (top 20 by size) ===")
pod_logs = [(p, s) for p, s in files if "/pod-logs/" in p]
for p, s in sorted(pod_logs, key=lambda x: -x[1])[:20]:
print(f" {s:>10} {p}")
failed = [(p, s) for p, s in files if "/failed-pods/" in p and s > 0]
if failed:
print("\n=== Failed pod logs (non-empty) ===")
for p, s in failed:
print(f" {s:>10} {p}")
if __name__ == "__main__":
main()
-19
View File
@@ -76,22 +76,3 @@ jobs:
- uses: ./.github/actions/molecule
with:
scenario: keycloak
aio:
runs-on: vexxhost-ubuntu-22.04-16
if: ${{ github.event_name == 'pull_request' }}
concurrency:
group: ${{ github.job }}-${{ matrix.network_backend }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
strategy:
fail-fast: false
matrix:
network_backend:
- openvswitch
- ovn
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: ./.github/actions/molecule
with:
scenario: aio
network_backend: ${{ matrix.network_backend }}
+205 -1
View File
@@ -14,6 +14,13 @@
nodes:
- instance
- nodeset:
name: atmosphere-ubuntu-jammy-single-node-16
nodes:
- name: instance
label: ubuntu-jammy-16
groups: *single_node_groups
- job:
name: atmosphere-molecule
parent: molecule
@@ -42,7 +49,6 @@
kube_vip_interface: "{{ ansible_facts['default_ipv4'].interface }}"
kube_vip_address: 172.17.0.100
kubernetes_hostname: "{{ ansible_facts['default_ipv4'].address }}"
cilium_ipv4_cidr: 172.24.0.0/16
cilium_helm_values:
operator:
replicas: 1
@@ -69,12 +75,210 @@
vars:
csi_driver: rbd
- job:
name: atmosphere-molecule-aio
parent: atmosphere-molecule
abstract: true
timeout: 7200
nodeset: atmosphere-ubuntu-jammy-single-node-16
vars:
molecule_scenario: aio
ceph_version: 18.2.7
kubernetes_keepalived_interface: br-mgmt
csi_driver: local-path-provisioner
cluster_issuer_type: self-signed
valkey_helm_values:
replica:
replicaCount: 1
ingress_nginx_helm_values:
controller:
config:
worker-processes: 2
percona_xtradb_cluster_spec:
allowUnsafeConfigurations: true
pxc:
size: 1
haproxy:
size: 1
keystone_helm_values:
pod:
replicas:
api: 1
barbican_helm_values:
pod:
replicas:
api: 1
rook_ceph_cluster_radosgw_spec:
metadataPool:
failureDomain: osd
dataPool:
failureDomain: osd
gateway:
instances: 1
glance_helm_values:
conf:
glance:
DEFAULT:
workers: 2
glance_store:
rbd_store_replication: 1
pod:
replicas:
api: 1
glance_images:
- name: cirros
url: http://download.cirros-cloud.net/0.6.2/cirros-0.6.2-x86_64-disk.img
min_disk: 1
disk_format: raw
container_format: bare
is_public: true
staffeln_helm_values:
pod:
replicas:
api: 1
conductor: 1
cinder_helm_values:
conf:
ceph:
pools:
backup:
replication: 1
cinder.volumes:
replication: 1
cinder:
DEFAULT:
osapi_volume_workers: 2
pod:
replicas:
api: 1
scheduler: 1
placement_helm_values:
conf:
placement_api_uwsgi:
uwsgi:
processes: 2
pod:
replicas:
api: 1
ovn_helm_values:
conf:
auto_bridge_add:
br-ex: null
pod:
replicas:
ovn_ovsdb_nb: 1
ovn_ovsdb_sb: 1
ovn_northd: 1
coredns_helm_values:
replicaCount: 1
nova_helm_values:
conf:
nova:
DEFAULT:
osapi_compute_workers: 2
metadata_workers: 2
conductor:
workers: 2
scheduler:
workers: 2
pod:
replicas:
api_metadata: 1
osapi: 1
conductor: 1
scheduler: 1
novncproxy: 1
spiceproxy: 1
neutron_helm_values:
conf:
neutron:
DEFAULT:
api_workers: 2
rpc_workers: 2
metadata_workers: 2
pod:
replicas:
server: 1
rpc_server: 1
heat_helm_values:
conf:
heat:
DEFAULT:
num_engine_workers: 2
heat_api:
workers: 2
heat_api_cfn:
workers: 2
heat_api_cloudwatch:
workers: 2
pod:
replicas:
api: 1
cfn: 1
cloudwatch: 1
engine: 1
octavia_helm_values:
conf:
octavia:
controller_worker:
workers: 2
octavia_api_uwsgi:
uwsgi:
processes: 2
pod:
replicas:
api: 1
worker: 1
housekeeping: 1
magnum_helm_values:
conf:
magnum:
api:
workers: 2
conductor:
workers: 2
pod:
replicas:
api: 1
conductor: 1
magnum_image_disk_format: qcow2
magnum_images: "[ {{ _magnum_images[-1] }} ]"
manila_helm_values:
conf:
manila:
DEFAULT:
osapi_share_workers: 2
pod:
replicas:
api: 1
scheduler: 1
horizon_helm_values:
pod:
replicas:
server: 1
- job:
name: atmosphere-molecule-aio-openvswitch
parent: atmosphere-molecule-aio
vars:
atmosphere_network_backend: openvswitch
- job:
name: atmosphere-molecule-aio-ovn
parent: atmosphere-molecule-aio
vars:
atmosphere_network_backend: ovn
- project:
check:
jobs:
- atmosphere-molecule-aio-openvswitch
- atmosphere-molecule-aio-ovn
- atmosphere-molecule-csi-local-path-provisioner
- atmosphere-molecule-csi-rbd
gate:
jobs:
- atmosphere-molecule-aio-openvswitch
- atmosphere-molecule-aio-ovn
- atmosphere-molecule-csi-local-path-provisioner
- atmosphere-molecule-csi-rbd
+1
View File
@@ -32,6 +32,7 @@
- name: Configure networking
hosts: all
become: true
tasks:
- name: Add IP address to "br-ex"
changed_when: false
-100
View File
@@ -1,100 +0,0 @@
# Copyright (c) 2024 VEXXHOST, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
- name: Wait for user to read warning
hosts: localhost
tasks:
- name: Wait for user to read warning
ignore_errors: true # noqa: ignore-errors
ansible.builtin.fail:
msg: >-
⚠️
This code will make substantial changes to your machine, it is strongly
recommended that you run this on a server or virtual machine that you
dedicate to this purpose.
⚠️
- name: Wait for user to read warning
ansible.builtin.wait_for:
timeout: 15
- name: Generate workspace
ansible.builtin.import_playbook: vexxhost.atmosphere.generate_workspace
vars:
workspace_path: "{{ lookup('env', 'MOLECULE_SCENARIO_DIRECTORY') }}"
domain_name: "{{ ansible_default_ipv4['address'].replace('.', '-') }}.{{ lookup('env', 'ATMOSPHERE_DNS_SUFFIX_NAME') | default('nip.io', True) }}"
- name: Setup networking
hosts: all
become: true
vars:
management_bridge: "br-mgmt"
tasks:
- name: Create bridge for management network
ignore_errors: true # noqa: ignore-errors
changed_when: false
ansible.builtin.command:
cmd: "ip link add name {{ management_bridge }} type bridge"
- name: Create fake interface for management bridge
ignore_errors: true # noqa: ignore-errors
changed_when: false
ansible.builtin.command:
cmd: "ip link add dummy0 type dummy"
# NOTE(mnaser): The bridge will not go up until it has an interface
# so we need to assign the dummy interface to the bridge
- name: Assign dummy interface to management bridge
ignore_errors: true # noqa: ignore-errors
changed_when: false
ansible.builtin.command:
cmd: "ip link set dummy0 master {{ management_bridge }}"
- name: Assign IP address for management bridge
ignore_errors: true # noqa: ignore-errors
changed_when: false
ansible.builtin.command:
cmd: "ip addr add 10.96.240.200/24 dev {{ management_bridge }}"
- name: Bring up interfaces
ignore_errors: true # noqa: ignore-errors
changed_when: false
ansible.builtin.command:
cmd: "ip link set {{ item }} up"
loop:
- br-mgmt
- dummy0
- name: Setup host for deployment
hosts: all
become: true
tasks:
- name: Purge "snapd" package
become: true
ansible.builtin.apt:
name: snapd
state: absent
purge: true
when: ansible_distribution | lower == 'ubuntu'
# TODO(mnaser): Get rid of this once default workspace uses this.
- name: Overwrite existing osds.yml file
ansible.builtin.copy:
dest: "{{ lookup('env', 'MOLECULE_SCENARIO_DIRECTORY') }}/group_vars/cephs/osds.yml"
mode: '0644'
content: |
ceph_osd_devices:
- "/dev/ceph-{{ inventory_hostname_short }}-osd0/data"
- "/dev/ceph-{{ inventory_hostname_short }}-osd1/data"
- "/dev/ceph-{{ inventory_hostname_short }}-osd2/data"
View File
Whitespace-only changes.
-242
View File
@@ -1,242 +0,0 @@
atmosphere_image_prefix: "{{ lookup('env', 'ATMOSPHERE_IMAGE_PREFIX') | default('', True) }}"
ceph_version: 18.2.7
ceph_conf_overrides:
- section: global
option: mon allow pool size one
value: true
- section: global
option: osd crush chooseleaf type
value: 0
- section: mon
option: auth allow insecure global id reclaim
value: false
kubernetes_keepalived_interface: br-mgmt
cilium_helm_values:
operator:
replicas: 1
csi_driver: "{{ lookup('ansible.builtin.env', 'MOLECULE_CSI_DRIVER', default='local-path-provisioner') }}"
cluster_issuer_type: self-signed
valkey_helm_values:
replica:
replicaCount: 1
ingress_nginx_helm_values:
controller:
config:
worker-processes: 2
percona_xtradb_cluster_spec:
allowUnsafeConfigurations: true
pxc:
size: 1
haproxy:
size: 1
keystone_helm_values:
conf:
keystone:
DEFAULT:
debug: "{{ lookup('env', 'ATMOSPHERE_DEBUG') | default('false', True) }}"
pod:
replicas:
api: 1
barbican_helm_values:
conf:
barbican:
DEFAULT:
debug: "{{ lookup('env', 'ATMOSPHERE_DEBUG') | default('false', True) }}"
pod:
replicas:
api: 1
rook_ceph_cluster_radosgw_spec:
metadataPool:
failureDomain: osd
dataPool:
failureDomain: osd
gateway:
instances: 1
glance_helm_values:
conf:
glance:
DEFAULT:
debug: "{{ lookup('env', 'ATMOSPHERE_DEBUG') | default('false', True) }}"
workers: 2
glance_store:
rbd_store_replication: 1
pod:
replicas:
api: 1
glance_images:
- name: cirros
url: http://download.cirros-cloud.net/0.6.2/cirros-0.6.2-x86_64-disk.img
min_disk: 1
disk_format: raw
container_format: bare
is_public: true
staffeln_helm_values:
conf:
staffeln:
DEFAULT:
debug: "{{ lookup('env', 'ATMOSPHERE_DEBUG') | default('false', True) }}"
pod:
replicas:
api: 1
conductor: 1
cinder_helm_values:
conf:
ceph:
pools:
backup:
replication: 1
cinder.volumes:
replication: 1
cinder:
DEFAULT:
debug: "{{ lookup('env', 'ATMOSPHERE_DEBUG') | default('false', True) }}"
osapi_volume_workers: 2
pod:
replicas:
api: 1
scheduler: 1
placement_helm_values:
conf:
placement:
DEFAULT:
debug: "{{ lookup('env', 'ATMOSPHERE_DEBUG') | default('false', True) }}"
placement_api_uwsgi:
uwsgi:
processes: 2
pod:
replicas:
api: 1
atmosphere_network_backend: "{{ lookup('env', 'ATMOSPHERE_NETWORK_BACKEND') | default('openvswitch', True) }}"
ovn_helm_values:
conf:
auto_bridge_add:
br-ex: null
pod:
replicas:
ovn_ovsdb_nb: 1
ovn_ovsdb_sb: 1
ovn_northd: 1
coredns_helm_values:
replicaCount: 1
nova_helm_values:
# TODO: reserve memory for host for aio scenario?
conf:
nova:
DEFAULT:
debug: "{{ lookup('env', 'ATMOSPHERE_DEBUG') | default('false', True) }}"
osapi_compute_workers: 2
metadata_workers: 2
conductor:
workers: 2
scheduler:
workers: 2
pod:
replicas:
api_metadata: 1
osapi: 1
conductor: 1
scheduler: 1
novncproxy: 1
spiceproxy: 1
neutron_helm_values:
conf:
neutron:
DEFAULT:
api_workers: 2
debug: "{{ lookup('env', 'ATMOSPHERE_DEBUG') | default('false', True) }}"
rpc_workers: 2
metadata_workers: 2
pod:
replicas:
server: 1
rpc_server: 1
heat_helm_values:
conf:
heat:
DEFAULT:
debug: "{{ lookup('env', 'ATMOSPHERE_DEBUG') | default('false', True) }}"
num_engine_workers: 2
heat_api:
workers: 2
heat_api_cfn:
workers: 2
heat_api_cloudwatch:
workers: 2
pod:
replicas:
api: 1
cfn: 1
cloudwatch: 1
engine: 1
octavia_helm_values:
conf:
octavia:
DEFAULT:
debug: "{{ lookup('env', 'ATMOSPHERE_DEBUG') | default('false', True) }}"
controller_worker:
workers: 2
octavia_api_uwsgi:
uwsgi:
processes: 2
pod:
replicas:
api: 1
worker: 1
housekeeping: 1
magnum_helm_values:
conf:
magnum:
DEFAULT:
debug: "{{ lookup('env', 'ATMOSPHERE_DEBUG') | default('false', True) }}"
api:
workers: 2
conductor:
workers: 2
pod:
replicas:
api: 1
conductor: 1
magnum_image_disk_format: qcow2
magnum_images: "[ {{ _magnum_images[-1] }} ]"
manila_helm_values:
conf:
manila:
DEFAULT:
debug: "{{ lookup('env', 'ATMOSPHERE_DEBUG') | default('false', True) }}"
osapi_share_workers: 2
pod:
replicas:
api: 1
scheduler: 1
horizon_helm_values:
conf:
horizon:
local_settings:
debug: "{{ lookup('env', 'ATMOSPHERE_DEBUG') | default('false', True) }}"
pod:
replicas:
server: 1
View File
Whitespace-only changes.
+11 -43
View File
@@ -1,46 +1,14 @@
# Copyright (c) 2024 VEXXHOST, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
# Copyright (c) 2025 VEXXHOST, Inc.
# SPDX-License-Identifier: Apache-2.0
dependency:
name: galaxy
driver:
name: default
options:
managed: False
ansible_connection_options:
ansible_become: "true"
ansible_connection: local
platforms:
- name: instance
groups:
- controllers
- cephs
- computes
provisioner:
name: ansible
env:
DOCKER_TIMEOUT: 600
config_options:
ansible:
cfg:
defaults:
callbacks_enabled: ansible.posix.profile_tasks
tags:
run: ${ATMOSPHERE_ANSIBLE_TAGS-all}
options:
skip-tags: "${ATMOSPHERE_ANSIBLE_SKIP_TAGS-molecule-notest,notest}"
inventory:
links:
host_vars: "${ATMOSPHERE_ANSIBLE_VARS_PATH-$MOLECULE_SCENARIO_DIRECTORY}/host_vars"
group_vars: "${ATMOSPHERE_ANSIBLE_VARS_PATH-$MOLECULE_SCENARIO_DIRECTORY}/group_vars"
verifier:
name: ansible
connection:
pipelining: true
executor:
backend: ansible-playbook
args:
ansible_playbook:
- --inventory=${MOLECULE_PROJECT_DIRECTORY}/inventory.yaml
+70 -22
View File
@@ -1,29 +1,77 @@
# Copyright (c) 2024 VEXXHOST, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
# Copyright (c) 2025 VEXXHOST, Inc.
# SPDX-License-Identifier: Apache-2.0
- name: Prepare systems for CI
- name: Prepare
hosts: all
become: true
tasks:
- name: Configure short hostname
ansible.builtin.hostname:
name: "{{ inventory_hostname_short }}"
- name: Workaround system hostname
block:
- name: Configure short hostname
ansible.builtin.hostname:
name: "{{ inventory_hostname_short }}"
- name: Ensure hostname inside hosts file
ansible.builtin.lineinfile:
path: /etc/hosts
regexp: '^127\.0\.1\.1'
line: 127.0.1.1 {{ inventory_hostname }} {{ inventory_hostname_short }}
- name: Ensure hostname inside hosts file
ansible.builtin.lineinfile:
path: /etc/hosts
regexp: '^127\.0\.1\.1'
line: 127.0.1.1 {{ inventory_hostname }} {{ inventory_hostname_short }}
- name: Install "dirmngr" for GPG keyserver operations
ansible.builtin.apt:
name: dirmngr
state: present
- name: Purge "snapd" package
when: ansible_distribution | lower == 'ubuntu'
ansible.builtin.apt:
name: snapd
state: absent
purge: true
- name: Generate workspace
ansible.builtin.import_playbook: vexxhost.atmosphere.generate_workspace
vars:
workspace_path: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') }}"
domain_name: "{{ ansible_default_ipv4['address'].replace('.', '-') }}.nip.io"
- name: Setup networking
hosts: all
become: true
vars:
management_bridge: "br-mgmt"
tasks:
- name: Create bridge for management network
ignore_errors: true # noqa: ignore-errors
changed_when: false
ansible.builtin.command:
cmd: "ip link add name {{ management_bridge }} type bridge"
- name: Create fake interface for management bridge
ignore_errors: true # noqa: ignore-errors
changed_when: false
ansible.builtin.command:
cmd: "ip link add dummy0 type dummy"
- name: Assign dummy interface to management bridge
ignore_errors: true # noqa: ignore-errors
changed_when: false
ansible.builtin.command:
cmd: "ip link set dummy0 master {{ management_bridge }}"
- name: Assign IP address for management bridge
ignore_errors: true # noqa: ignore-errors
changed_when: false
ansible.builtin.command:
cmd: "ip addr add 10.96.240.200/24 dev {{ management_bridge }}"
- name: Bring up interfaces
ignore_errors: true # noqa: ignore-errors
changed_when: false
ansible.builtin.command:
cmd: "ip link set {{ item }} up"
loop:
- br-mgmt
- dummy0
- name: Create fake devices for Ceph
ansible.builtin.import_playbook: vexxhost.ceph.create_fake_devices
+2 -1
View File
@@ -18,11 +18,12 @@
tasks:
- name: Run "stestr" tests
become: true
ansible.builtin.shell: stestr run
ansible.builtin.shell: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') }}/.venv/bin/stestr run"
args:
chdir: "{{ lookup('env', 'MOLECULE_PROJECT_DIRECTORY') }}"
environment:
KUBECONFIG: /root/.kube/config
ATMOSPHERE_NETWORK_BACKEND: "{{ atmosphere_network_backend }}"
- name: Run Tempest tests
ansible.builtin.import_playbook: vexxhost.atmosphere.tempest