Browse Source

Align kernel args for system upgrade using leapp

leapp is looking for errors in /etc/default/grub and
fixes it during upgrade. It does not recognize entries
starting other than "GRUB", as tripleo sets the entry
starting with TRIPLEO_ instead of GRUB, append the
entry with GRUB_ so that leapp upgrades correctly.
Closes-Bug: #1890080
Change-Id: I9238cd35a1114b1649a38ab4f24225865bcecf19
(cherry picked from commit f217eccc77)
changes/59/745059/1
Saravanan KR 11 months ago
parent
commit
2f382ac90a
1 changed files with 20 additions and 0 deletions
  1. +20
    -0
      deployment/kernel/kernel-boot-params-baremetal-ansible.yaml

+ 20
- 0
deployment/kernel/kernel-boot-params-baremetal-ansible.yaml View File

@ -98,3 +98,23 @@ outputs:
vars:
tripleo_kernel_args: {get_attr: [RoleParametersValue, value, kernel_args]}
tripleo_kernel_reboot_timeout: {get_param: NodeRebootWaitTimeout}
upgrade_tasks:
- name: upgrade prepare for leapp to align kernel arg shortcommings in leapp
tags:
- never
- system_upgrade
- system_upgrade_prepare
when:
- step|int == 3
- upgrade_leapp_enabled
block:
- name: fix grub entries to have name start with GRUB_
replace:
path: '/etc/default/grub'
regexp: '^(TRIPLEO_HEAT_TEMPLATE_KERNEL_ARGS)(.*)'
replace: 'GRUB_\1\2'
- name: fix grub entries in append statement
replace:
path: '/etc/default/grub'
regexp: '(.*){(TRIPLEO_HEAT_TEMPLATE_KERNEL_ARGS)}(.*)'
replace: '\1{GRUB_\2}\3'

Loading…
Cancel
Save