Skip to content

Commit 3aa6637

Browse files
authored
Merge pull request #1161 from stackhpc/ubuntu-jammy-fixes
Ubuntu Jammy upgrade fixes
2 parents 6a5920c + 033a7a9 commit 3aa6637

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

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: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,25 +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
60+
required: true
5961
- url: "{{ stackhpc_repo_ubuntu_jammy_cve_2024_6387_url }}"
6062
suites: "pulp"
6163
components: upload
6264
architecture: amd64
6365
trusted: yes
66+
required: "{{ ansible_facts.distribution_release == 'jammy' }}"
6467
- url: "{{ stackhpc_repo_docker_ce_ubuntu_focal_url if ansible_facts.distribution_release == 'focal' else stackhpc_repo_docker_ce_ubuntu_jammy_url }}"
6568
suites: "{{ ansible_facts.distribution_release }}"
6669
components: stable
6770
signed_by: docker.asc
6871
architecture: amd64
72+
required: true
6973

7074
# Do not replace apt configuration for non-overcloud hosts. This can result in
7175
# errors if apt reconfiguration is performed before local repository mirrors
7276
# are deployed.
73-
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 [] }}"
7478

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

0 commit comments

Comments
 (0)