Bug 1958418 - [OSP 16.1]Overcloud deployment - Issues with role specific tuned profiles
Summary: [OSP 16.1]Overcloud deployment - Issues with role specific tuned profiles
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-tripleo-heat-templates
Version: 16.1 (Train)
Hardware: x86_64
OS: Linux
high
high
Target Milestone: ---
: ---
Assignee: OSP Team
QA Contact: Joe H. Rahme
URL:
Whiteboard:
: 1958356 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-05-07 20:58 UTC by Matt Flusche
Modified: 2021-12-09 20:19 UTC (History)
7 users (show)

Fixed In Version: openstack-tripleo-heat-templates-11.3.2-1.20210517153303.29a02c1.el8ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-12-09 20:19:09 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
OpenStack gerrit 790385 0 None NEW Fix RoleParameters in tuned-baremetal-ansible.yaml 2021-05-10 08:34:04 UTC
Red Hat Issue Tracker OSP-3705 0 None None None 2021-11-18 11:32:05 UTC
Red Hat Product Errata RHBA-2021:3762 0 None None None 2021-12-09 20:19:28 UTC

Description Matt Flusche 2021-05-07 20:58:41 UTC
Description of problem:
Having issues applying role specific tuned profiles.

Example, in the default roles_data.yaml file for the compute role the following is set:

[...]
###############################################################################
# Role: Compute                                                               #
###############################################################################
- name: Compute
  description: |
    Basic Compute Node role
[...]
  RoleParametersDefault:
    TunedProfileName: "virtual-host"

One would expect after deployment the tuned profile would be set to virtual-host; however, it is throughput-performance:

[root@overcloud-novacompute-0 ~]# tuned-adm active
Current active profile: throughput-performance

Looking at the logs, we see ansible applying tuned profiles multiple times, first the virtual-host profile then a few min later the throughput-performance profile:

[root@overcloud-novacompute-0 ~]# grep tuned-adm /var/log/messages 
May  6 16:39:16 overcloud-novacompute-0 ansible-command[45303]: Invoked with _raw_params=which tuned-adm warn=True _uses_shell=False stdin_add_newline=True strip_empty_ends=True argv=None chdir=None executable=None creates=None removes=None stdin=None
May  6 16:39:18 overcloud-novacompute-0 ansible-command[45355]: Invoked with _raw_params=tuned-adm profile virtual-host warn=True _uses_shell=False stdin_add_newline=True strip_empty_ends=True argv=None chdir=None executable=None creates=None removes=None stdin=None
May  6 16:45:10 overcloud-novacompute-0 ansible-command[50443]: Invoked with _raw_params=which tuned-adm warn=True _uses_shell=False stdin_add_newline=True strip_empty_ends=True argv=None chdir=None executable=None creates=None removes=None stdin=None
May  6 16:45:12 overcloud-novacompute-0 ansible-command[50495]: Invoked with _raw_params=tuned-adm profile throughput-performance warn=True _uses_shell=False stdin_add_newline=True strip_empty_ends=True argv=None chdir=None executable=None creates=None removes=None stdin=None

It seems that the tuned profile is being applied through two services:  OS::TripleO::Services::BootParams & OS::TripleO::Services::Tuned

# grep -R tuned_profile /usr/share/openstack-tripleo-heat-templates
/usr/share/openstack-tripleo-heat-templates/deployment/kernel/kernel-boot-params-baremetal-ansible.yaml:            - tuned_profile: TunedProfileName
/usr/share/openstack-tripleo-heat-templates/deployment/kernel/kernel-boot-params-baremetal-ansible.yaml:            tuned_profile: {get_attr: [RoleParametersValue, value, tuned_profile]}
/usr/share/openstack-tripleo-heat-templates/deployment/tuned/tuned-baremetal-ansible.yaml:        tuned_profile: {get_param: TunedProfileName}

# grep 'deployment/kernel/kernel-boot-params-baremetal-ansible.yaml' /usr/share/openstack-tripleo-heat-templates/overcloud-resource-registry-puppet.j2.yaml 
  OS::TripleO::Services::BootParams: deployment/kernel/kernel-boot-params-baremetal-ansible.yaml

# grep 'deployment/tuned/tuned-baremetal-ansible.yaml' /usr/share/openstack-tripleo-heat-templates/overcloud-resource-registry-puppet.j2.yaml 
  OS::TripleO::Services::Tuned: deployment/tuned/tuned-baremetal-ansible.yaml


However, it looks like tuned-baremetal-ansible.yaml doesn't support role specific config.

This doesn't work:

  ComputeParameters:
    TunedProfileName: "virtual-host"

But this does work:

  ComputeExtraGroupVars:
    tuned_profile: "virtual-host"


Overall it seems that applying tuned profiles is confusing.

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

How reproducible:
100% I believe

Steps to Reproduce:
1. see above
2.
3.

Actual results:
Can't apply role specific tuned profile without using ComputeExtraGroupVars or changing the global default.

Expected results:
Role specific tuned profiles with {{role.name}}Parameters


Additional info:

Comment 2 Rabi Mishra 2021-05-10 20:19:55 UTC
*** Bug 1958356 has been marked as a duplicate of this bug. ***

Comment 3 Chris Fields 2021-05-10 21:21:59 UTC
From the closed duplicate bug https://bugzilla.redhat.com/show_bug.cgi?id=1958356:    

A work around is to remove  OS::TripleO::Services::Tuned from roles_data.yaml for the role that you want to use the role specific TunedProfileName parameter.

Comment 10 David Rosenfeld 2021-07-29 17:33:33 UTC
Deployed job: DFG-df-deployment-16.1-virthost-3cont_1comp_3ceph_3db_2net_3msg-yes_UC_SSL-no_OC_SSL-ceph-ipv4-geneve-RHELOSP-31889 which uses composable roles.

Verified this was present in roles_data.yaml:

- name: Compute
  description: |
    Basic Compute Node role
[...]
 RoleParametersDefault:
    TunedProfileName: "virtual-host"

Then on compute node:

[heat-admin@compute-0 ~]$ tuned-adm active
Current active profile: virtual-host

Comment 22 errata-xmlrpc 2021-12-09 20:19:09 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.7 (Train) 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/RHBA-2021:3762


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