tripleo-kernel: prevent reboot when TSX flag was added
During the 16.2 upgrade path, we enforce the inclusion of tsx flag by operators. If there was already kernelargs present, the node won't get rebooted, but if it's a new KernelArgs, the node will get rebooted as per the related bug. We want to prevent the unexpected reboot of nodes with workload when the TSX flag was added. Related: https://bugzilla.redhat.com/show_bug.cgi?id=1975240 Change-Id: Ib6140c8991469c950fd7e1b323c614103394e3f1 (cherry picked from commita15e925110
) (cherry picked from commitc647167f9d
) (cherry picked from commit601b607d7e
)
This commit is contained in:
parent
eba3be96bd
commit
ee6cf0cb26
|
@ -18,6 +18,30 @@
|
|||
command: cat /proc/cmdline
|
||||
register: cmdline
|
||||
|
||||
- name: TSX KernelArgs compute node reboot prevention
|
||||
when:
|
||||
- '"nova_libvirt" in groups'
|
||||
block:
|
||||
- name: Check if node has a nova.conf
|
||||
stat:
|
||||
path: /var/lib/config-data/puppet-generated/nova_libvirt/etc/nova/nova.conf
|
||||
register: nova_conf_check
|
||||
|
||||
- name: Enabling defer_reboot when TSX was added or appended
|
||||
when:
|
||||
- nova_conf_check.stat.exists
|
||||
- tripleo_kernel_args is regex("^[\s]*tsx=[^\s]+[\s]*$")
|
||||
block:
|
||||
- name: Warn operator about workload protection
|
||||
debug:
|
||||
msg: |
|
||||
Automated reboot for this node has been defered because it is already provisionned.
|
||||
Please schedule a manual reboot after this deployment is completed.
|
||||
|
||||
- name: Setting defer reboot fact
|
||||
set_fact:
|
||||
tripleo_kernel_defer_reboot: true
|
||||
|
||||
- name: Check if the kernelargs entry is already present in the file
|
||||
replace:
|
||||
regexp: TRIPLEO_HEAT_TEMPLATE_KERNEL_ARGS
|
||||
|
|
Loading…
Reference in New Issue