Skip to content

Commit eaefad7

Browse files
technowhizzpriteau
authored andcommitted
Add hook to automate removal of --root-dev-only
1 parent 52c2886 commit eaefad7

File tree

3 files changed

+27
-1
lines changed

3 files changed

+27
-1
lines changed

doc/source/operations/upgrading-openstack.rst

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,8 @@ Known issues
134134
<https://access.redhat.com/security/cve/CVE-2023-4001>`__, the operating
135135
system can become unbootable (boot will stop at a ``grub>`` prompt). Remove
136136
the ``--root-dev-only`` option from ``/boot/efi/EFI/rocky/grub.cfg`` after
137-
applying package updates.
137+
applying package updates. This will happen automatically as a post hook when
138+
running the ``kayobe overcloud host package update`` command.
138139

139140
Security baseline
140141
=================
@@ -869,6 +870,15 @@ To update all eligible packages, use ``*``, escaping if necessary:
869870
870871
kayobe overcloud host package update --packages "*" --limit <host>
871872
873+
.. note::
874+
875+
Due to a `security-related change in the GRUB package on Rocky Linux 9
876+
<https://access.redhat.com/security/cve/CVE-2023-4001>`__, the operating
877+
system can become unbootable (boot will stop at a ``grub>`` prompt). Remove
878+
the ``--root-dev-only`` option from ``/boot/efi/EFI/rocky/grub.cfg`` after
879+
applying package updates. This will happen automatically as a post hook when
880+
running the ``kayobe overcloud host package update`` command.
881+
872882
If the kernel has been upgraded, reboot the host or batch of hosts to pick up
873883
the change:
874884

etc/kayobe/ansible/fix-grub-rl9.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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+
7+
tasks:
8+
- name: Remove "--root-dev-only" from /boot/efi/EFI/rocky/grub.cfg
9+
ansible.builtin.replace:
10+
path: /boot/efi/EFI/rocky/grub.cfg
11+
regexp: '--root-dev-only\s?'
12+
replace: ''
13+
when:
14+
- ansible_facts['distribution'] == 'Rocky'
15+
- ansible_facts['distribution_major_version'] == '9'
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)