Bug 1390522 - Custom hieradata doesn't get applied on custom role config file
Summary: Custom hieradata doesn't get applied on custom role config file
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-tripleo-heat-templates
Version: 10.0 (Newton)
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
: 10.0 (Newton)
Assignee: Steven Hardy
QA Contact: Marius Cornea
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-01 09:57 UTC by Marius Cornea
Modified: 2016-12-14 16:27 UTC (History)
8 users (show)

Fixed In Version: openstack-tripleo-heat-templates-5.0.0-1.4.el7ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-12-14 16:27:10 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2016:2948 normal SHIPPED_LIVE Red Hat OpenStack Platform 10 enhancement update 2016-12-14 19:55:27 UTC
OpenStack gerrit 394488 None None None 2016-11-07 19:40:43 UTC
Launchpad 1638254 None None None 2016-11-01 11:20:37 UTC

Description Marius Cornea 2016-11-01 09:57:16 UTC
Description of problem:
I'm trying to specify custom hieradata for a custom role but it does't seem that it gets applied:

Deploy command:
source ~/stackrc
export THT=/usr/share/openstack-tripleo-heat-templates/

openstack overcloud deploy --templates $THT \
-r ~/openstack_deployment/roles/roles_data.yaml \
-e $THT/environments/network-isolation.yaml \
-e $THT/environments/network-management.yaml \
-e $THT/environments/storage-environment.yaml \
-e ~/openstack_deployment/environments/nodes.yaml \
-e ~/openstack_deployment/environments/network-environment.yaml \
-e ~/openstack_deployment/environments/disk-layout.yaml \
-e ~/openstack_deployment/environments/wipe-disk-env.yaml \
-e ~/openstack_deployment/environments/neutron-settings.yaml \
-e ~/openstack_deployment/environments/custom_nova.yaml \
--log-file overcloud_deployment.log &> overcloud_install.log

The custom role is called ServiceApi and it's running the Openstack API services:
http://paste.openstack.org/show/587524/

The custom hieradata environment file:
cat openstack_deployment/environments/custom_nova.yaml 
parameter_defaults:
  ServiceApiExtraConfig:
    'nova::scheduler::filter::ram_allocation_ratio': '2.5'

The hierdata seems to get passed to the custom role nodes but it doesn't get applied to the nova.conf file:

[root@overcloud-serviceapi-0 ~]# hiera nova::scheduler::filter::ram_allocation_ratio
2.5

[root@overcloud-serviceapi-0 ~]# grep ram_allocation_ratio /etc/nova/nova.conf; echo $?
1

Version-Release number of selected component (if applicable):
openstack-tripleo-heat-templates-5.0.0-0.9.0rc3.el7ost.noarch

How reproducible:
100%

Steps to Reproduce:
1. Deploy overcloud with custom hieradata for custom role
2. Check if the configuration gets adjusted

Actual results:
The configuration file doesn't contain the change passed via the environment file.

Expected results:
The custom hieradata should be reflected in the configuration file.  

Additional info:

Comment 1 Steven Hardy 2016-11-01 11:09:50 UTC
I think think may be broken for all roles, because puppet-nova moved this interface:

https://github.com/openstack/puppet-nova/blob/master/manifests/init.pp#L410

https://github.com/openstack/puppet-nova/blob/master/manifests/init.pp#L410

So think we need to update tripleo-heat-templates to use this new interface, and any ExtraConfig overrides will need a different key, e.g:

cat openstack_deployment/environments/custom_nova.yaml 
parameter_defaults:
  ServiceApiExtraConfig:
    'nova::ram_allocation_ratio': '2.5'

Comment 2 Steven Hardy 2016-11-01 11:12:16 UTC
Sorry first link above should be:

https://github.com/openstack/puppet-nova/blob/stable/newton/manifests/scheduler/filter.pp#L133

Comment 3 Steven Hardy 2016-11-01 11:17:23 UTC
Upstream bug raised to align t-h-t with the new interface:

https://bugs.launchpad.net/tripleo/+bug/1638254

Patch posted:

https://review.openstack.org/392108

Comment 4 Steven Hardy 2016-11-01 11:19:01 UTC
Provided Marius can confirm the nova::ram_allocation_ratio syntax above works, then I don't think this is a blocker, reduced the severity to medium.

Comment 5 Marius Cornea 2016-11-01 11:45:11 UTC
Thanks, Steve. Using the following worked fine:

parameter_defaults:
  ServiceApiExtraConfig:
    'nova::ram_allocation_ratio': '2.5'


[root@overcloud-serviceapi-0 ~]# grep ram_allocation_ratio /etc/nova/nova.conf; echo $?
ram_allocation_ratio=2.5
0

Comment 6 James Slagle 2016-11-01 15:09:48 UTC
moving to ON_DEV as a patch has been posted upstream

Comment 8 Marius Cornea 2016-11-10 17:20:58 UTC
openstack-tripleo-heat-templates-5.0.0-1.5.el7ost.noarch

Comment 10 errata-xmlrpc 2016-12-14 16:27:10 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, 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://rhn.redhat.com/errata/RHEA-2016-2948.html


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