Skip to content

Commit 5931c4c

Browse files
authored
Merge branch 'stackhpc/2024.1' into cross-arch-builds-2024.1
2 parents 4844d72 + bc562dd commit 5931c4c

28 files changed

+386
-45
lines changed

.github/workflows/stackhpc-all-in-one.yml

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ jobs:
167167
VM_NETWORK: ${{ inputs.vm_network }}
168168
VM_SUBNET: ${{ inputs.vm_subnet }}
169169
VM_INTERFACE: ${{ inputs.vm_interface }}
170-
VM_VOLUME_SIZE: ${{ inputs.upgrade && '55' || '40' }}
170+
VM_VOLUME_SIZE: ${{ inputs.upgrade && '65' || '50' }}
171171
VM_TAGS: '["skc-ci-aio", "PR=${{ github.event.number }}"]'
172172

173173
- name: Terraform Plan
@@ -214,22 +214,12 @@ jobs:
214214
- name: Write Terraform network config
215215
run: |
216216
cat << EOF > etc/kayobe/environments/$KAYOBE_ENVIRONMENT/tf-networks.yml
217-
218-
admin_oc_net_name: admin
219-
admin_cidr: "{{ access_cidr.value }}"
220-
admin_allocation_pool_start: 0.0.0.0
221-
admin_allocation_pool_end: 0.0.0.0
222-
admin_gateway: "{{ access_gw.value }}"
223-
admin_bootproto: dhcp
224-
admin_ips:
217+
admin_oc_net_name: ethernet
218+
ethernet_cidr: "{{ access_cidr.value }}"
219+
ethernet_allocation_pool_start: 0.0.0.0
220+
ethernet_allocation_pool_end: 0.0.0.0
221+
ethernet_ips:
225222
controller0: "{{ access_ip_v4.value }}"
226-
admin_zone: admin
227-
EOF
228-
229-
- name: Write Terraform network interface config
230-
run: |
231-
cat << EOF > etc/kayobe/environments/$KAYOBE_ENVIRONMENT/inventory/group_vars/controllers/tf-network-interfaces
232-
admin_interface: "{{ access_interface.value }}"
233223
EOF
234224
235225
- name: Write all-in-one scenario config

doc/source/operations/upgrading-openstack.rst

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,13 @@ to ``default``. Whilst this does not have any negative impact on services
121121
that utilise Redis it will feature prominently in any preview of the overcloud
122122
configuration.
123123

124+
AvailabilityZoneFilter removal
125+
------------------------------
126+
127+
Support for the ``AvailabilityZoneFilter`` filter has been dropped in Nova.
128+
Remove it from any Nova config files before upgrading. It will cause errors in
129+
Caracal and halt the Nova scheduler.
130+
124131
Known issues
125132
============
126133

@@ -130,6 +137,24 @@ Known issues
130137
around this in custom config, see the SMS PR for an example:
131138
https://github.com/stackhpc/smslab-kayobe-config/pull/354
132139

140+
* Due to a `security-related change in the GRUB package on Rocky Linux 9
141+
<https://access.redhat.com/security/cve/CVE-2023-4001>`__, the operating
142+
system can become unbootable (boot will stop at a ``grub>`` prompt). Remove
143+
the ``--root-dev-only`` option from ``/boot/efi/EFI/rocky/grub.cfg`` after
144+
applying package updates. This will happen automatically as a post hook when
145+
running the ``kayobe overcloud host package update`` command.
146+
147+
* After upgrading OpenSearch to the latest 2023.1 container image, we have seen
148+
cluster routing allocation be disabled on some systems. See bug for details:
149+
https://bugs.launchpad.net/kolla-ansible/+bug/2085943.
150+
This will cause the "Perform a flush" handler to fail during the 2024.1
151+
OpenSearch upgrade. To workaround this, you can run the following PUT request
152+
to enable allocation again:
153+
154+
..code-block:: console
155+
156+
curl -X PUT "https://<kolla-vip>:9200/_cluster/settings?pretty" -H 'Content-Type: application/json' -d '{ "transient" : { "cluster.routing.allocation.enable" : "all" } } '
157+
133158
Security baseline
134159
=================
135160

@@ -863,6 +888,15 @@ To update all eligible packages, use ``*``, escaping if necessary:
863888
864889
kayobe overcloud host package update --packages "*" --limit <host>
865890
891+
.. note::
892+
893+
Due to a `security-related change in the GRUB package on Rocky Linux 9
894+
<https://access.redhat.com/security/cve/CVE-2023-4001>`__, the operating
895+
system can become unbootable (boot will stop at a ``grub>`` prompt). Remove
896+
the ``--root-dev-only`` option from ``/boot/efi/EFI/rocky/grub.cfg`` after
897+
applying package updates. This will happen automatically as a post hook when
898+
running the ``kayobe overcloud host package update`` command.
899+
866900
If the kernel has been upgraded, reboot the host or batch of hosts to pick up
867901
the change:
868902

etc/kayobe/ansible/advise-run.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
name:
1717
- git+https://github.com/stackhpc/ADVise
1818
state: latest
19+
virtualenv_command: "python3 -m venv"
1920

2021
- name: Create data directory
2122
file:
Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
---
2+
- name: Deploy RADOS gateway usage exporter
3+
hosts: monitoring
4+
gather_facts: false
5+
tags: radosgw_usage_exporter
6+
vars:
7+
venv: "{{ virtualenv_path }}/openstack"
8+
tasks:
9+
- name: Deploy RADOS gateway usage exporter
10+
when: stackhpc_enable_radosgw_usage_exporter
11+
block:
12+
- name: Set up openstack cli virtualenv
13+
ansible.builtin.pip:
14+
virtualenv: "{{ venv }}"
15+
virtualenv_command: "/usr/bin/python3 -m venv"
16+
name:
17+
- python-openstackclient
18+
state: latest
19+
extra_args: "{% if pip_upper_constraints_file %}-c {{ pip_upper_constraints_file }}{% endif %}"
20+
run_once: true
21+
delegate_to: "{{ groups['controllers'][0] }}"
22+
vars:
23+
ansible_host: "{{ hostvars[groups['controllers'][0]].ansible_host }}"
24+
25+
- name: Read admin-openrc credential file
26+
ansible.builtin.command:
27+
cmd: "cat {{ lookup('ansible.builtin.env', 'KOLLA_CONFIG_PATH') }}/admin-openrc.sh"
28+
delegate_to: localhost
29+
register: credential
30+
changed_when: false
31+
32+
- name: Set facts for admin credentials
33+
ansible.builtin.set_fact:
34+
openstack_auth_env:
35+
OS_PROJECT_DOMAIN_NAME: "{{ credential.stdout_lines | select('match', '.*OS_PROJECT_DOMAIN_NAME*.') | first | split('=') | last | replace(\"'\", '') }}"
36+
OS_USER_DOMAIN_NAME: "{{ credential.stdout_lines | select('match', '.*OS_USER_DOMAIN_NAME*.') | first | split('=') | last | replace(\"'\", '') }}"
37+
OS_PROJECT_NAME: "{{ credential.stdout_lines | select('match', '.*OS_PROJECT_NAME*.') | first | split('=') | last | replace(\"'\", '') }}"
38+
OS_USERNAME: "{{ credential.stdout_lines | select('match', '.*OS_USERNAME*.') | first | split('=') | last | replace(\"'\", '') }}"
39+
OS_PASSWORD: "{{ credential.stdout_lines | select('match', '.*OS_PASSWORD*.') | first | split('=') | last | replace(\"'\", '') }}"
40+
OS_AUTH_URL: "{{ credential.stdout_lines | select('match', '.*OS_AUTH_URL*.') | first | split('=') | last | replace(\"'\", '') }}"
41+
OS_INTERFACE: "{{ credential.stdout_lines | select('match', '.*OS_INTERFACE*.') | first | split('=') | last | replace(\"'\", '') }}"
42+
OS_IDENTITY_API_VERSION: "{{ credential.stdout_lines | select('match', '.*OS_IDENTITY_API_VERSION*.') | first | split('=') | last | replace(\"'\", '') }}"
43+
OS_CACERT: "{{ '/etc/ssl/certs/ca-certificates.crt' if os_distribution == 'ubuntu' else '/etc/pki/tls/certs/ca-bundle.crt' }}"
44+
45+
- name: Check ec2 credential for ceph_rgw
46+
ansible.builtin.command: >
47+
{{ venv }}/bin/openstack
48+
ec2 credentials list --user ceph_rgw
49+
--format json
50+
environment: "{{ openstack_auth_env }}"
51+
register: credential_check
52+
delegate_to: "{{ groups['controllers'][0] }}"
53+
changed_when: false
54+
vars:
55+
ansible_host: "{{ hostvars[groups['controllers'][0]].ansible_host }}"
56+
run_once: true
57+
58+
- name: Create ec2 credential if there's none
59+
ansible.builtin.command: >
60+
{{ venv }}/bin/openstack
61+
ec2 credentials create --user ceph_rgw --project service
62+
--format json
63+
environment: "{{ openstack_auth_env }}"
64+
delegate_to: "{{ groups['controllers'][0] }}"
65+
changed_when: true
66+
vars:
67+
ansible_host: "{{ hostvars[groups['controllers'][0]].ansible_host }}"
68+
run_once: true
69+
when: credential_check.stdout == []
70+
71+
- name: Query ec2 credential for ceph_rgw
72+
ansible.builtin.command: >
73+
{{ venv }}/bin/openstack
74+
ec2 credentials list --user ceph_rgw
75+
--format json
76+
environment: "{{ openstack_auth_env }}"
77+
delegate_to: "{{ groups['controllers'][0] }}"
78+
changed_when: false
79+
vars:
80+
ansible_host: "{{ hostvars[groups['controllers'][0]].ansible_host }}"
81+
register: credential
82+
run_once: true
83+
84+
- name: Get object storage endpoint
85+
ansible.builtin.command: >
86+
{{ venv }}/bin/openstack
87+
endpoint list --service object-store --interface internal
88+
--format json
89+
environment: "{{ openstack_auth_env }}"
90+
delegate_to: "{{ groups['controllers'][0] }}"
91+
changed_when: false
92+
vars:
93+
ansible_host: "{{ hostvars[groups['controllers'][0]].ansible_host }}"
94+
register: endpoint
95+
run_once: true
96+
97+
- name: Process object storage endpoint
98+
ansible.builtin.set_fact:
99+
radosgw_server: "{{ scheme + '://' + hostname + ':' + radosgw_port }}"
100+
vars:
101+
swift: "{{ endpoint.stdout | from_json | first }}"
102+
hostname: "{{ swift.URL | urlsplit('hostname') }}"
103+
scheme: "{{ swift.URL | urlsplit('scheme') }}"
104+
radosgw_port: "{{ swift.URL | urlsplit('port') }}"
105+
run_once: true
106+
107+
- name: Ensure radosgw_usage_exporter container is running
108+
community.docker.docker_container:
109+
name: radosgw_usage_exporter
110+
image: ghcr.io/stackhpc/radosgw_usage_exporter:v0.1.1
111+
network_mode: host
112+
env:
113+
RADOSGW_SERVER: "{{ radosgw_server }}"
114+
ADMIN_ENTRY: admin
115+
ACCESS_KEY: "{{ ec2.Access }}"
116+
SECRET_KEY: "{{ ec2.Secret }}"
117+
VIRTUAL_PORT: "{{ stackhpc_radosgw_usage_exporter_port | string }}"
118+
entrypoint: "{{ ['python', '-u', './radosgw_usage_exporter.py', '--insecure'] if not stackhpc_radosgw_usage_exporter_verify else omit }}"
119+
vars:
120+
ec2: "{{ credential.stdout | from_json | first }}"
121+
become: true
122+
123+
- name: Ensure that the internal TLS certificate is trusted by the exporter
124+
when: stackhpc_radosgw_usage_exporter_cacert | length > 0
125+
block:
126+
- name: Create radosgw-usage-exporter directory
127+
ansible.builtin.file:
128+
path: /opt/kayobe/radosgw-usage-exporter/
129+
state: directory
130+
mode: 0755
131+
132+
- name: Copy CA certificate to RADOS gateway usage exporter nodes
133+
ansible.builtin.copy:
134+
src: "{{ stackhpc_radosgw_usage_exporter_cacert }}"
135+
dest: "/opt/kayobe/radosgw-usage-exporter/{{ stackhpc_radosgw_usage_exporter_cacert | basename }}"
136+
mode: 0644
137+
register: copy_to_node_result
138+
139+
- name: Copy CA certificate to RADOS gateway usage exporter container
140+
community.docker.docker_container_copy_into:
141+
container: radosgw_usage_exporter
142+
path: "{{ copy_to_node_result.dest }}"
143+
container_path: "/usr/local/share/ca-certificates/{{ copy_to_node_result.dest | basename }}"
144+
become: true
145+
146+
- name: Update CA certificate of RADOS gateway usage exporter container
147+
community.docker.docker_container_exec:
148+
container: radosgw_usage_exporter
149+
command: update-ca-certificates
150+
user: root
151+
become: true
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
- name: Remove "--root-dev-only" from grub.cfg if OS is Rocky Linux 9
3+
hosts: overcloud
4+
become: yes
5+
gather_facts: true
6+
tasks:
7+
- block:
8+
- name: Check that /boot/efi/EFI/rocky/grub.cfg exists
9+
ansible.builtin.stat:
10+
path: /boot/efi/EFI/rocky/grub.cfg
11+
register: stat_result
12+
13+
- name: Remove "--root-dev-only" from /boot/efi/EFI/rocky/grub.cfg
14+
ansible.builtin.replace:
15+
path: /boot/efi/EFI/rocky/grub.cfg
16+
regexp: '--root-dev-only\s?'
17+
replace: ''
18+
when: stat_result.stat.exists
19+
when:
20+
- ansible_facts['distribution'] == 'Rocky'
21+
- ansible_facts['distribution_major_version'] == '9'

etc/kayobe/environments/ci-aio/automated-setup.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,6 @@ fi
7676
sudo ip l set dummy1 up
7777
sudo ip l set dummy1 master breth1
7878

79-
if type apt; then
80-
sudo cp /run/systemd/network/* /etc/systemd/network
81-
fi
82-
8379
export KAYOBE_VAULT_PASSWORD=$(cat $BASE_PATH/vault-pw)
8480
pushd $BASE_PATH/src/kayobe-config
8581
source kayobe-env --environment ci-aio

etc/kayobe/environments/ci-aio/controllers.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
# to setup the Kayobe user account. Default is {{ os_distribution }}.
77
controller_bootstrap_user: "{{ os_distribution if os_distribution == 'ubuntu' else 'cloud-user' }}"
88

9+
controller_extra_network_interfaces:
10+
- ethernet
11+
912
# Controller lvm configuration. See intentory/group_vars/controllers/lvm.yml
1013
# for the exact configuration.
1114
controller_lvm_groups:

etc/kayobe/environments/ci-aio/inventory/group_vars/controllers/network-interfaces

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
###############################################################################
33
# Network interface definitions for the controller group.
44

5+
# Ethernet interface is the `primary` or `physical` interface associated
6+
# with the instance that the AIO deployment runs inside of. It is the interface used
7+
# to reach the instance.
8+
ethernet_interface: "{{ ansible_facts['default_ipv4']['interface'] }}"
9+
510
# Controller interface on all-in-one network.
611
aio_interface: breth1
712
# Use dummy1 if it exists, otherwise the bridge will have no ports.

etc/kayobe/environments/ci-aio/networks.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,12 @@ cleaning_net_name: aio
8080
###############################################################################
8181
# Network definitions.
8282

83+
# This network is required to be defined within `ci-aio` environment to ensure that
84+
# the network interface files are created appropriately and to provide easy inclusion
85+
# within the firewall configuration.
86+
ethernet_bootproto: dhcp
87+
ethernet_zone: trusted
88+
8389
# All-in-one network.
8490
aio_cidr: 192.168.33.0/24
8591
aio_allocation_pool_start: 192.168.33.3
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../ansible/fix-grub-rl9.yml

0 commit comments

Comments
 (0)