Bug 1823893 - [OSP13] [THT] KernelArgs not applied to overcloud nodes with dedicated EFI partitions
Summary: [OSP13] [THT] KernelArgs not applied to overcloud nodes with dedicated EFI pa...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-tripleo-heat-templates
Version: 13.0 (Queens)
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Steve Baker
QA Contact: David Rosenfeld
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-04-14 18:14 UTC by Alberto Rivera Laporte
Modified: 2020-10-28 18:24 UTC (History)
7 users (show)

Fixed In Version: openstack-tripleo-heat-templates-8.4.1-65.el7ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-10-28 18:23:44 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1877215 0 None None None 2020-05-07 02:44:19 UTC
OpenStack gerrit 728330 0 None MERGED Handle generating grub config for EFI partitions 2021-02-11 22:24:37 UTC
Red Hat Product Errata RHBA-2020:4388 0 None None None 2020-10-28 18:24:00 UTC

Description Alberto Rivera Laporte 2020-04-14 18:14:26 UTC
Description of problem:

Deploying an overcloud with a whole disk overcloud image using a dedicated EFI partition result with kernel parameters (KernelArgs) not properly applied. I am not experiencing this issue with flat partition image that is packaged under the rhosp-director-images rpm.


Version-Release number of selected component (if applicable):

openstack-tripleo-heat-templates-8.4.1-42.el7ost.noarch


How reproducible: Always


Steps to Reproduce:

1. Build a whole disk image using a dedicated GPT+EFI partition following this document:  

https://access.redhat.com/documentation/en-us/red_hat_openstack_platform/13/html/director_installation_and_usage/appe-whole_disk_images

2. Deploy the overcloud with parameters file using customized kernel arguments[1] including the environment file: 
/usr/share/openstack-tripleo-heat-templates/environments/host-config-and-reboot.yaml 

3. Verify the kernel parameters have been applied after pre-networking host configuration and reboot. 


Actual results:
Kernel parameters are applied to the file /boot/grub2/grub.cfg but /proc/cmdline report the kernel parameters set in /boot/efi/EFI/redhat/grub.cfg which is the grub.cfg that resides in a dedicated EFI partition.

Expected results:
KernelArgs parameters applied to /boot/efi/EFI/redhat/grub.cfg


Additional info:

Looking at the file /usr/share/openstack-tripleo-heat-templates/extraconfig/pre_network/boot_param_tasks.yaml it looks like the grub configuration generation commands do not account for any grub configurations that reside in a dedicated EFI partition.


[stack@director ~]$ cat -n /usr/share/openstack-tripleo-heat-templates/extraconfig/pre_network/boot_param_tasks.yaml | sed -n '10,32p'
    10	    # Kernel Args Configuration
    11	    - block:
    12	        - name: Ensure the kernel args ( {{ _KERNEL_ARGS_ }} ) is present as TRIPLEO_HEAT_TEMPLATE_KERNEL_ARGS
    13	          lineinfile:
    14	            dest: /etc/default/grub
    15	            regexp: '^TRIPLEO_HEAT_TEMPLATE_KERNEL_ARGS.*'
    16	            insertafter: '^GRUB_CMDLINE_LINUX.*'
    17	            line: 'TRIPLEO_HEAT_TEMPLATE_KERNEL_ARGS=" {{ _KERNEL_ARGS_ }} "'
    18	        - name: Add TRIPLEO_HEAT_TEMPLATE_KERNEL_ARGS to the GRUB_CMDLINE_LINUX parameter
    19	          lineinfile:
    20	            dest: /etc/default/grub
    21	            line: 'GRUB_CMDLINE_LINUX="${GRUB_CMDLINE_LINUX:+$GRUB_CMDLINE_LINUX }${TRIPLEO_HEAT_TEMPLATE_KERNEL_ARGS}"'
    22	            insertafter: '^TRIPLEO_HEAT_TEMPLATE_KERNEL_ARGS.*'
    23	        - name: Generate grub config file
    24	          command: grub2-mkconfig -o /boot/grub2/grub.cfg
    25	        - name: Set reboot required fact
    26	          set_fact:
    27	            reboot_required: true
    28	      become: true
    29	      when:
    30	        - _KERNEL_ARGS_|default("") != ""
    31	        - _KERNEL_ARGS_|default("") not in cmdline.stdout_lines[0]
    32	





[1]
-----------------------------------

  ComputeVDIParameters:
    KernelArgs: 'default_hugepagesz=1G hugepagesz=1G hugepages=1480 transparent_hugepage=never intel_iommu=on iommu=pt rd.driver.blacklist=nouveau nouveau.modeset=0 rd.driver.pre=vfio-pci'
    NovaPCIPassthrough:
      - vendor_id: '10de'
        product_id: '1bb0'
  ComputeHCIParameters:
    KernelArgs: 'hugepagesz=1G hugepages=160'
-----------------------------------

Comment 3 Steve Baker 2020-05-06 23:28:34 UTC
This issue exists in releases since 13.0 also. I'm working on an ansible block which will check which grub.cfg paths exist and only generate the config for those.

Comment 4 Steve Baker 2020-05-07 02:45:25 UTC
I've proposed a fix upstream, this will need to be backported once it is approved

Comment 5 Steve Baker 2020-05-15 02:00:08 UTC
Updated with the upstream stable/queens fix

Comment 17 errata-xmlrpc 2020-10-28 18:23:44 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Red Hat OpenStack Platform 13.0 director bug fix advisory), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2020:4388


Note You need to log in before you can comment on or make changes to this bug.