Avoid reboot for node update even when kernelargs changed
During update/upgrade/scale, already deployed node should not be rebooted, if the kernel args are changed. Reboot of the node should be planned by the user with migration and downtime window. With this change, the kernel args will be updated to the already deployed node, but it will not be applied with reboot. For fresh nodes, where kernel args entry is not found, the reboot will be applied. In case, when the existing node is deployed without kernel args but during an update the kernel args are added. At this time a reboot is required, because there are other services which depends on the kernel args like hugepages for OvS-DPDK and iommu for SR-IOV. It leaves with another edge case, when the node is deployed with only SR-IOV and OvS-DPDK is added later or vice-versa, the node will not be rebooted. As such kind of deployments require network config changes, it requires more planning. This scenario has to be handled on case-by-case basis. Closes-Bug: #1895105 Change-Id: I25fbad4ef76bccc45a06f78751f7efb906758b90
This commit is contained in:
parent
9cdc0a5b41
commit
a89cc63f79
|
@ -18,6 +18,14 @@
|
|||
command: cat /proc/cmdline
|
||||
register: cmdline
|
||||
|
||||
- name: Check if the kernelargs entry is already present in the file
|
||||
replace:
|
||||
regexp: TRIPLEO_HEAT_TEMPLATE_KERNEL_ARGS
|
||||
dest: /etc/default/grub
|
||||
replace: ''
|
||||
check_mode: true
|
||||
register: grub_file_entry_check
|
||||
|
||||
# Kernel Args Configuration
|
||||
- block:
|
||||
- name: Ensure the kernel args ( {{ tripleo_kernel_args }} ) is present as TRIPLEO_HEAT_TEMPLATE_KERNEL_ARGS
|
||||
|
@ -69,8 +77,18 @@
|
|||
- name: vfio_iommu_type1
|
||||
when: tripleo_kernel_args is search("iommu")
|
||||
|
||||
- name: Reboot and workaround block
|
||||
include_tasks: reboot.yaml
|
||||
- name: Reboot block
|
||||
when:
|
||||
- reboot_required is defined and reboot_required
|
||||
- not tripleo_kernel_defer_reboot|bool
|
||||
block:
|
||||
- name: Reboot tasks
|
||||
include_tasks: reboot.yaml
|
||||
when:
|
||||
- grub_file_entry_check is not changed
|
||||
|
||||
- name: Skipping reboot for deployed node
|
||||
debug:
|
||||
msg: "Reboot is skipped for kernel arg change, user has to plan the reboot with migration and downtime"
|
||||
when:
|
||||
- grub_file_entry_check is changed
|
||||
|
|
Loading…
Reference in New Issue