Bug 1901004

Summary: Wrong default NovaLibvirtCPUMode set in nova.conf for nova-compute nodes
Product: Red Hat OpenStack Reporter: Yariv <yrachman>
Component: openstack-tripleo-heat-templatesAssignee: Martin Schuppert <mschuppe>
Status: CLOSED ERRATA QA Contact: James Parker <jparker>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 16.1 (Train)CC: dasmith, eglynn, jhakimra, jparker, kchamart, mburns, mnietoji, mschuppe, oblaut, sbauza, sgordon, spower, supadhya, vromanso
Target Milestone: z3Keywords: Regression, Triaged
Target Release: 16.1 (Train on RHEL 8.2)   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: openstack-tripleo-heat-templates-11.3.2-1.20200914170176.el8ost Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of:
: 1901597 (view as bug list) Environment:
Last Closed: 2020-12-15 18:37:35 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1901597    
Attachments:
Description Flags
virsh16.1.xml
none
virsh13.xml none

Description Yariv 2020-11-24 08:53:55 UTC
Description of problem:

Failed to create 1G huge pages on rhel guest.
mount -t hugetlbfs -o pagesize=1G none /dev/hugepages1G 


Version-Release number of selected component (if applicable):
Red Hat OpenStack Platform release 16.1.3 GA (Train)
RHOS-16.1-RHEL-8-20201110.n.1

How reproducible:

Always, with regression of NFV perf ci,



Steps to Reproduce:
1. Deploy, Director w/ ovs+dpdk, not a must, with the following templates.
 
https://code.engineering.redhat.com/gerrit/gitweb?p=nfv-qe.git;a=tree;f=ospd-16.1-vxlan-dpdk-sriov-ctlplane-dataplane-bonding-hybrid;h=247e16dd031230866fa91e9121305b6409b77d0c;hb=refs/heads/ci

2. Deploy vm rhel7.6 image and the follwoing extra-specs
aggregate_instance_extra_specs:flavor='dut_ag', hw:cpu_policy='dedicated', hw:emulator_threads_policy='share', hw:mem_page_size='1GB', hw:numa_cpus.1='0,1,2,3,4,5,6,7', hw:numa_mem.1='8192', hw:numa_nodes='1'

3. ssh to guest, Update kernel with the following:
Add the following to /etc/default/grub
default_hugepagesz=1G hugepagesz=1G hugepages=2

4. grub2-mkconfig -o /boot/grub2/grub.cfg
This is causing to kernel crash
delete from /etc/fstab: nodev /mnt/huge hugetlbfs pagesize=1GB 0 0

5. try the following:
mount -t hugetlbfs nodev /mnt/huge
mkdir /dev/hugepages1G
mount -t hugetlbfs -o pagesize=1G none /dev/hugepages1G

Actual results:
Receive the following err:
[  402.080533] hugetlbfs: Unsupported page size 1024 MB



Expected results:
mount should complete success


Additional info:
sos report will be added as first comment with link

Comment 2 Yariv 2020-11-24 09:13:55 UTC
Created attachment 1732890 [details]
virsh16.1.xml

Comment 3 Yariv 2020-11-24 09:14:44 UTC
Created attachment 1732891 [details]
virsh13.xml

Comment 6 Martin Schuppert 2020-11-25 10:22:39 UTC
https://github.com/openstack/tripleo-heat-templates/commit/772b7398a7222e8b286848ba00c06006d6b68785 introduced THT parameters to set libvirt/cpu_mode. The patch sets the NovaLibvirtCPUMode wrong to 'none' string which results in puppet-nova not to handle the default cases correct and sets libvirt/cpu_mode to none which results in qemu64 CPU model be used.

A workaround should be to set NovaLibvirtCPUMode to host-model

Comment 9 Miguel Angel Nieto 2020-11-26 11:09:58 UTC
I tested the workaround introducing NovaLibvirtCPUMode: 'host-model' in the templates and now it is working, i can create 1g hugepages in the guest and the cpu of the guests are the right one.

Comment 20 errata-xmlrpc 2020-12-15 18:37:35 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 16.1.3 bug fix and enhancement 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/RHEA-2020:5413