Skip to content

Commit f03f939

Browse files
authored
Merge branch 'stackhpc/yoga' into yoga-infiniband
2 parents bb47e67 + e25cc4c commit f03f939

32 files changed

+240
-58
lines changed

.automation.conf/config.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ if [ ! -z ${KAYOBE_ENVIRONMENT:+x} ]; then
2424
# SMSLab is currently running with 1G switches. This causes tests using volumes and images to fail if
2525
# the concurrency is set too high.
2626
export TEMPEST_CONCURRENCY=1
27+
export KAYOBE_AUTOMATION_TEMPEST_SKIPLIST="ci-multinode-platform.2022.11"
2728
# Uncomment this to perform a full tempest test
2829
# export KAYOBE_AUTOMATION_TEMPEST_LOADLIST=tempest-full
2930
# export KAYOBE_AUTOMATION_TEMPEST_SKIPLIST=ci-multinode-tempest-full
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
tempest.api.volume.test_volumes_list.VolumesListTestJSON.test_volume_list_pagination: "Fails without public TLS"
2+
tempest.api.volume.test_volumes_list.VolumesListTestJSON.test_volume_list_details_pagination: "Fails without public TLS"
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
tempest.api.volume.test_volumes_list.VolumesListTestJSON.test_volume_list_pagination: "Fails without public TLS"
2+
tempest.api.volume.test_volumes_list.VolumesListTestJSON.test_volume_list_details_pagination: "Fails without public TLS"
13
tempest.scenario.test_network_basic_ops.TestNetworkBasicOps.test_subnet_details.*: "Cirros image doesn't have '/var/run/udhcpc.eth0.pid"

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ jobs:
297297
-v $(pwd)/tempest-artifacts:/stack/tempest-artifacts \
298298
-e KAYOBE_ENVIRONMENT -e KAYOBE_VAULT_PASSWORD -e KAYOBE_AUTOMATION_SSH_PRIVATE_KEY \
299299
$KAYOBE_IMAGE \
300-
/stack/kayobe-automation-env/src/kayobe-config/.automation/pipeline/tempest.sh -e ansible_user=stack
300+
/stack/kayobe-automation-env/src/kayobe-config/.automation/pipeline/tempest.sh -e ansible_user=stack -e rally_no_sensitive_log=false
301301
env:
302302
KAYOBE_AUTOMATION_SSH_PRIVATE_KEY: ${{ steps.ssh_key.outputs.ssh_key }}
303303

.github/workflows/stackhpc-container-image-build.yml

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,10 @@ on:
3939
required: false
4040
default: true
4141
push-dirty:
42-
description: Push scanned images that have vulnerabilities?
42+
description: Push scanned images that have critical vulnerabilities?
4343
type: boolean
4444
required: false
45-
# NOTE(Alex-Welsh): This default should be flipped once we resolve existing failures
46-
default: true
45+
default: false
4746

4847
env:
4948
ANSIBLE_FORCE_COLOR: True
@@ -181,7 +180,7 @@ jobs:
181180
KAYOBE_VAULT_PASSWORD: ${{ secrets.KAYOBE_VAULT_PASSWORD }}
182181

183182
- name: Create build logs output directory
184-
run: mkdir image-build-logs
183+
run: mkdir image-build-logs
185184

186185
- name: Build kolla overcloud images
187186
id: build_overcloud_images
@@ -233,16 +232,23 @@ jobs:
233232
run: mv image-scan-output image-build-logs/image-scan-output
234233

235234
- name: Fail if no images have passed scanning
236-
run: if [ $(wc -l < image-build-logs/image-scan-output/clean-images.txt) -le 0 ]; then exit 1; fi
235+
run: if [ $(wc -l < image-build-logs/image-scan-output/critical-images.txt) -gt 0 ]; then exit 1; fi
237236
if: ${{ !inputs.push-dirty }}
238237

239238
- name: Copy clean images to push-attempt-images list
240239
run: cp image-build-logs/image-scan-output/clean-images.txt image-build-logs/push-attempt-images.txt
241240
if: inputs.push
242241

242+
# NOTE(seunghun1ee): This always appends dirty images with CVEs severity lower than critical.
243+
# This should be reverted when it's decided to filter high level CVEs as well.
243244
- name: Append dirty images to push list
244245
run: |
245246
cat image-build-logs/image-scan-output/dirty-images.txt >> image-build-logs/push-attempt-images.txt
247+
if: ${{ inputs.push }}
248+
249+
- name: Append images with critical vulnerabilities to push list
250+
run: |
251+
cat image-build-logs/image-scan-output/critical-images.txt >> image-build-logs/push-attempt-images.txt
246252
if: ${{ inputs.push && inputs.push-dirty }}
247253

248254
- name: Push images
@@ -254,7 +260,7 @@ jobs:
254260
255261
while read -r image; do
256262
# Retries!
257-
for i in {1..5}; do
263+
for i in {1..5}; do
258264
if docker push $image; then
259265
echo "Pushed $image"
260266
break
@@ -288,8 +294,15 @@ jobs:
288294
run: if [ $(wc -l < image-build-logs/push-failed-images.txt) -gt 0 ]; then cat image-build-logs/push-failed-images.txt && exit 1; fi
289295
if: ${{ !cancelled() }}
290296

291-
- name: Fail when images failed scanning
292-
run: if [ $(wc -l < image-build-logs/dirty-images.txt) -gt 0 ]; then cat image-build-logs/dirty-images.txt && exit 1; fi
297+
# NOTE(seunghun1ee): Currently we want to mark the job fail only when critical CVEs are detected.
298+
# This can be used again instead of "Fail when critical vulnerabilities are found" when it's
299+
# decided to fail the job on detecting high CVEs as well.
300+
# - name: Fail when images failed scanning
301+
# run: if [ $(wc -l < image-build-logs/image-scan-output/dirty-images.txt) -gt 0 ]; then cat image-build-logs/image-scan-output/dirty-images.txt && exit 1; fi
302+
# if: ${{ !inputs.push-dirty && !cancelled() }}
303+
304+
- name: Fail when critical vulnerabilities are found
305+
run: if [ $(wc -l < image-build-logs/image-scan-output/critical-images.txt) -gt 0 ]; then cat image-build-logs/image-scan-output/critical-images.txt && exit 1; fi
293306
if: ${{ !inputs.push-dirty && !cancelled() }}
294307

295308
# NOTE(mgoddard): Trigger another CI workflow in the

etc/kayobe/ansible/cis.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,17 @@
1818
state: absent
1919
when: ansible_facts.os_family == 'RedHat' and ansible_facts.distribution_major_version == '8'
2020

21+
- name: Ensure service accounts have no expiry options set
22+
# This is to workaround an issue where we set the expiry to 365 days on kayobe
23+
# service accounts in a previous iteration of the CIS benchmark hardening
24+
# defaults. This should restore the defaults and can eventually be removed.
25+
command: chage -m 0 -M 99999 -W 7 -I -1 {{ item }}
26+
become: true
27+
changed_when: false
28+
with_items:
29+
- "{{ kayobe_ansible_user }}"
30+
- "{{ kolla_ansible_user }}"
31+
2132
- include_role:
2233
name: ansible-lockdown.rhel8_cis
2334
when: ansible_facts.os_family == 'RedHat' and ansible_facts.distribution_major_version == '8'

etc/kayobe/ansible/requirements.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ collections:
99
- name: stackhpc.pulp
1010
version: 0.4.1
1111
- name: stackhpc.hashicorp
12-
version: 2.4.0
12+
version: 2.5.0
1313
- name: stackhpc.kayobe_workflows
1414
version: 1.0.3
1515
roles:

etc/kayobe/ansible/ubuntu-upgrade.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
hosts: overcloud:infra-vms:seed:seed-hypervisor
66
vars:
77
ansible_python_interpreter: /usr/bin/python3
8+
reboot_timeout_s: "{{ 20 * 60 }}"
89
tasks:
910
- name: Assert that hosts are running Ubuntu Focal
1011
assert:
@@ -37,7 +38,7 @@
3738

3839
- name: Reboot to apply updates
3940
reboot:
40-
reboot_timeout: 1200
41+
reboot_timeout: "{{ reboot_timeout_s }}"
4142
connect_timeout: 600
4243
become: true
4344
when: file_status.stat.exists
@@ -81,16 +82,24 @@
8182
hosts: overcloud:infra-vms:seed:seed-hypervisor
8283
vars:
8384
ansible_python_interpreter: /usr/bin/python3
85+
reboot_timeout_s: "{{ 20 * 60 }}"
8486
tasks:
8587
- name: Ensure Jammy repo definitions do not exist in sources.list
8688
blockinfile:
8789
path: /etc/apt/sources.list
8890
state: absent
8991
become: true
9092

93+
- name: Ensure Kolla Ansible Docker repo definition does not exist
94+
file:
95+
path: /etc/apt/sources.list.d/docker.list
96+
state: absent
97+
become: true
98+
when: apt_repositories | selectattr('url', 'match', '.*docker-ce.*') | list | length > 0
99+
91100
- name: Reboot and wait
92101
reboot:
93-
reboot_timeout: 1200
102+
reboot_timeout: "{{ reboot_timeout_s }}"
94103
connect_timeout: 600
95104
become: true
96105

etc/kayobe/apt.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,20 +52,29 @@ stackhpc_apt_repositories:
5252
suites: "{{ ansible_facts.distribution_release }} {{ ansible_facts.distribution_release }}-updates {{ ansible_facts.distribution_release }}-backports"
5353
components: main restricted universe multiverse
5454
architecture: amd64
55+
required: true
5556
- url: "{{ stackhpc_repo_ubuntu_focal_security_url if ansible_facts.distribution_release == 'focal' else stackhpc_repo_ubuntu_jammy_security_url }}"
5657
suites: "{{ ansible_facts.distribution_release }}-security"
5758
components: main restricted universe multiverse
5859
architecture: amd64
59-
- url: "{{ stackhpc_repo_docker_ce_ubuntu_url }}"
60-
suites: "{{ ansible_facts.distribution_release }}"
60+
required: true
61+
- url: "{{ stackhpc_repo_ubuntu_jammy_cve_2024_6387_url }}"
62+
suites: "pulp"
63+
components: upload
64+
architecture: amd64
65+
trusted: yes
66+
required: "{{ ansible_facts.distribution_release == 'jammy' }}"
67+
- url: "{{ stackhpc_repo_docker_ce_ubuntu_focal_url if ansible_facts.distribution_release == 'focal' else stackhpc_repo_docker_ce_ubuntu_jammy_url }}"
68+
suites: "{{ ansible_facts.distribution_release }}"
6169
components: stable
6270
signed_by: docker.asc
6371
architecture: amd64
72+
required: true
6473

6574
# Do not replace apt configuration for non-overcloud hosts. This can result in
6675
# errors if apt reconfiguration is performed before local repository mirrors
6776
# are deployed.
68-
apt_repositories: "{{ stackhpc_apt_repositories if 'overcloud' in group_names else [] }}"
77+
apt_repositories: "{{ stackhpc_apt_repositories | selectattr('required') | list if 'overcloud' in group_names else [] }}"
6978

7079
# Whether to disable repositories in /etc/apt/sources.list. This may be used
7180
# when replacing the distribution repositories via apt_repositories.

etc/kayobe/dnf.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,15 @@ dnf_custom_repos_rocky_9:
215215
gpgcheck: yes
216216
username: "{{ stackhpc_repo_mirror_username | default(omit, true) }}"
217217
password: "{{ stackhpc_repo_mirror_password | default(omit, true) }}"
218+
security-common:
219+
baseurl: "{{ stackhpc_repo_rocky_9_sig_security_common_url }}"
220+
description: "Rocky Linux $releasever - SIG Security Common"
221+
file: Rocky-SIG-Security-Common
222+
gpgkey: "{{ rocky_9_sig_security_gpg_key }}"
223+
gpgcheck: yes
224+
includepkgs: "openssh*"
225+
username: "{{ stackhpc_repo_mirror_username | default(omit, true) }}"
226+
password: "{{ stackhpc_repo_mirror_password | default(omit, true) }}"
218227

219228
# Whether to enable EPEL repositories. This affects RedHat-based systems only.
220229
dnf_enable_epel: "{{ dnf_install_epel | bool }}"
@@ -227,6 +236,7 @@ dnf_epel_8_gpg_key_url: "https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-
227236
dnf_epel_9_gpg_key_url: "https://dl.fedoraproject.org/pub/epel/RPM-GPG-KEY-EPEL-9"
228237

229238
rocky_9_gpg_key: "https://dl.rockylinux.org/pub/rocky/RPM-GPG-KEY-Rocky-9"
239+
rocky_9_sig_security_gpg_key: "https://dl.rockylinux.org/pub/sig/9/security/x86_64/security-common/RPM-GPG-KEY-Rocky-SIG-Security"
230240

231241
# Whether to install the epel-release package. This affects RedHat-based
232242
# systems only. Default value is 'false'.

0 commit comments

Comments
 (0)