From 102534fdb8e1e49b9bdbbc9a79145788d88d49c8 Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Thu, 13 Oct 2022 08:18:59 +1100 Subject: [PATCH] Switch bridge to bridge01.opendev.org This switches the bridge name to bridge01.opendev.org. The testing path is updated along with some final references still in testinfra. The production jobs are updated in add-bastion-host, and will have the correct setup on the new host after the dependent change. Everything else is abstracted behind the "bastion" group; the entry is changed here which will make all the relevant playbooks run on the new host. Depends-On: https://review.opendev.org/c/opendev/base-jobs/+/862551 Change-Id: I21df81e45a57f1a4aa5bc290e9884e6dc9b4ca13 --- inventory/service/groups.yaml | 2 +- .../zuul/roles/add-bastion-host/tasks/main.yaml | 4 ++-- testinfra/test_base.py | 2 +- testinfra/test_bridge.py | 2 +- testinfra/test_letsencrypt.py | 4 ++-- zuul.d/system-config-run.yaml | 12 ++++++------ 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/inventory/service/groups.yaml b/inventory/service/groups.yaml index d2c6277891..0afce37875 100644 --- a/inventory/service/groups.yaml +++ b/inventory/service/groups.yaml @@ -18,7 +18,7 @@ groups: # bastion group should should only have one entry because we assume # groups['bastion'][0] is the bastion host name in several places. bastion: - - bridge.openstack.org + - bridge01.opendev.org borg-backup: - etherpad[0-9]*.opendev.org - gitea01.opendev.org diff --git a/playbooks/zuul/roles/add-bastion-host/tasks/main.yaml b/playbooks/zuul/roles/add-bastion-host/tasks/main.yaml index 3c1966daec..0f3dcd4d84 100644 --- a/playbooks/zuul/roles/add-bastion-host/tasks/main.yaml +++ b/playbooks/zuul/roles/add-bastion-host/tasks/main.yaml @@ -1,13 +1,13 @@ - name: Add bastion host to inventory for production playbook add_host: - name: 'bridge.openstack.org' + name: 'bridge01.opendev.org' groups: 'bastion' ansible_python_interpreter: python3 ansible_user: zuul # Without setting ansible_host directly, mirror-workspace-git-repos # gets sad because if delegate_to localhost and with add_host that # ends up with ansible_host being localhost. - ansible_host: 'bridge.openstack.org' + ansible_host: 'bridge01.opendev.org' ansible_port: 22 # Port 19885 is firewalled zuul_console_disabled: true diff --git a/testinfra/test_base.py b/testinfra/test_base.py index 2d84be10e3..7c796acd44 100644 --- a/testinfra/test_base.py +++ b/testinfra/test_base.py @@ -129,7 +129,7 @@ def test_logrotate(host): path to the rotated logfile; the role adds this for uniqueness. ''' ansible_vars = host.ansible.get_variables() - if ansible_vars['inventory_hostname'] == 'bridge.openstack.org': + if ansible_vars['inventory_hostname'].startswith('bridge'): cfg_file = host.file("/etc/logrotate.d/ansible.log.37237.conf") assert cfg_file.exists assert cfg_file.contains('/var/log/ansible/ansible.log') diff --git a/testinfra/test_bridge.py b/testinfra/test_bridge.py index 13deeef512..5e82fc2d39 100644 --- a/testinfra/test_bridge.py +++ b/testinfra/test_bridge.py @@ -14,7 +14,7 @@ import platform import pytest -testinfra_hosts = ['bridge.openstack.org'] +testinfra_hosts = ['bridge01.opendev.org'] def test_zuul_data(host, zuul_data): diff --git a/testinfra/test_letsencrypt.py b/testinfra/test_letsencrypt.py index 532f34ff2d..a988afc53f 100644 --- a/testinfra/test_letsencrypt.py +++ b/testinfra/test_letsencrypt.py @@ -15,7 +15,7 @@ import pytest testinfra_hosts = ['adns-letsencrypt.opendev.org', - 'bridge.openstack.org', + 'bridge01.opendev.org', 'letsencrypt01.opendev.org', 'letsencrypt02.opendev.org'] @@ -141,7 +141,7 @@ def test_acme_sh_config(host): assert config.contains("^ACCOUNT_EMAIL=le-test@opendev.org") def test_certcheck_config(host, zuul_data): - if host.backend.get_hostname() != 'bridge.openstack.org': + if not host.backend.get_hostname().startswith('bridge'): pytest.skip() if zuul_data['extra']['zuul']['job'] != 'system-config-run-letsencrypt': diff --git a/zuul.d/system-config-run.yaml b/zuul.d/system-config-run.yaml index 8649bfa0ea..df8af9d311 100644 --- a/zuul.d/system-config-run.yaml +++ b/zuul.d/system-config-run.yaml @@ -23,7 +23,7 @@ '/etc/iptables/rules.v4': logs_txt '/etc/iptables/rules.v6': logs_txt host-vars: - bridge.openstack.org: + bridge01.opendev.org: host_copy_output: '{{ zuul.project.src_dir }}/junit.xml': logs '{{ zuul.project.src_dir }}/test-results.html': logs @@ -59,7 +59,7 @@ currently in use. nodeset: nodes: - - &bridge_node_x86 { name: bridge.openstack.org, label: ubuntu-jammy } + - &bridge_node_x86 { name: bridge01.opendev.org, label: ubuntu-jammy } - name: xenial label: ubuntu-xenial - name: bionic @@ -81,7 +81,7 @@ # bridge node. This node will then run a nested Ansible to # test the production playbooks -- *that* Ansible has a # "bastion" group too - - &bastion_group { name: bastion, nodes: [ bridge.openstack.org ] } + - &bastion_group { name: bastion, nodes: [ bridge01.opendev.org ] } files: - tox.ini - playbooks/ @@ -166,7 +166,7 @@ Run the "base" playbook on ARM64. nodeset: nodes: - - &bridge_node_arm64 { name: bridge.openstack.org, label: ubuntu-jammy-arm64 } + - &bridge_node_arm64 { name: bridge01.opendev.org, label: ubuntu-jammy-arm64 } - name: bionic label: ubuntu-bionic-arm64 - name: focal @@ -256,7 +256,7 @@ # Make sure this test runs acme.sh letsencrypt_self_generate_tokens: False host-vars: - bridge.openstack.org: + bridge01.opendev.org: host_copy_output: '/var/lib/certcheck': logs letsencrypt01.opendev.org: @@ -995,7 +995,7 @@ '/etc/hosts': logs '/etc/zuul/zuul.conf': logs '/var/log/zuul/debug.log': logs - bridge.openstack.org: + bridge01.opendev.org: host_copy_output: '/etc/hosts': logs zuul-lb01.opendev.org: