Bug 1373185

Summary: Undercloud deployment fails if hiera is lower than hiera-1.3.4-1.el7.noarch. We should update hiera while while yum install -y python-tripleoclient
Product: Red Hat OpenStack Reporter: Leonid Natapov <lnatapov>
Component: instack-undercloudAssignee: James Slagle <jslagle>
Status: CLOSED NOTABUG QA Contact: Arik Chernetsky <achernet>
Severity: high Docs Contact:
Priority: unspecified    
Version: 10.0 (Newton)CC: dbecker, dtantsur, jcoufal, lnatapov, mburns, mcornea, michele, morazi, oblaut, rhel-osp-director-maint, ushkalim
Target Milestone: ---   
Target Release: 10.0 (Newton)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-10-14 15:37:43 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:

Description Leonid Natapov 2016-09-05 12:48:52 UTC
Undercloud deployment fails if hiera is lower than hiera-1.3.4-1.el7.noarch.  We should update hiera while  while yum install -y python-tripleoclient


--------

While deploying undercloud got the following error. I had hiera-1.3.1-2.el7.noarch. After updating hiera to hiera-1.3.4-1.el7.noarch undercloud deployment successfully passed.

016-09-05 13:59:41 - Warning: Scope(Class[Rabbitmq::Service]): deprecation. puppet_3_type_check. This method is deprecated, please use the stdlib validate_legacy function, with Stdlib::Compat::Re. There is further documentation for validate_legacy function in the README.
2016-09-05 13:59:41 - Warning: Scope(Class[Rabbitmq::Service]): deprecation. puppet_3_type_check. This method is deprecated, please use the stdlib validate_legacy function, with Stdlib::Compat::Bool. There is further documentation for validate_legacy function in the README.
2016-09-05 13:59:41 - Warning: Scope(Class[Rabbitmq::Service]): deprecation. puppet_3_type_check. This method is deprecated, please use the stdlib validate_legacy function, with Stdlib::Compat::Bool. There is further documentation for validate_legacy function in the README.
2016-09-05 13:59:42 - Warning: Scope(Class[Rabbitmq::Install::Rabbitmqadmin]): deprecation. puppet_3_type_check. This method is deprecated, please use the stdlib validate_legacy function, with Stdlib::Compat::Ipv6. There is further documentation for validate_legacy function in the README.
2016-09-05 13:59:42 - Error: Error from DataBinding 'hiera' while looking up 'tripleo::firewall::firewall_rules': no implicit conversion of Fixnum into String on node puma42.scl.lab.tlv.redhat.com
2016-09-05 13:59:42 - Wrapped exception:
2016-09-05 13:59:42 - no implicit conversion of Fixnum into String
2016-09-05 13:59:42 - Wrapped exception:
2016-09-05 13:59:42 - no implicit conversion of Fixnum into String
2016-09-05 13:59:42 - Error: Error from DataBinding 'hiera' while looking up 'tripleo::firewall::firewall_rules': no implicit conversion of Fixnum into String on node puma42.scl.lab.tlv.redhat.com
+ rc=1
+ set -e
+ echo 'puppet apply exited with exit code 1'
puppet apply exited with exit code 1
+ '[' 1 '!=' 2 -a 1 '!=' 0 ']'
+ exit 1
[2016-09-05 13:59:42,155] (os-refresh-config) [ERROR] during configure phase. [Command '['dib-run-parts', '/usr/libexec/os-refresh-config/configure.d']' returned non-zero exit status 1]

[2016-09-05 13:59:42,155] (os-refresh-config) [ERROR] Aborting...
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python2.7/site-packages/instack_undercloud/undercloud.py", line 1069, in install
    _run_orc(instack_env)
  File "/usr/lib/python2.7/site-packages/instack_undercloud/undercloud.py", line 947, in _run_orc
    _run_live_command(args, instack_env, 'os-refresh-config')
  File "/usr/lib/python2.7/site-packages/instack_undercloud/undercloud.py", line 509, in _run_live_command
    raise RuntimeError('%s failed. See log for details.' % name)
RuntimeError: os-refresh-config failed. See log for details.
Command 'instack-install-undercloud' returned non-zero exit status 1

Comment 1 Mike Burns 2016-09-06 12:41:16 UTC
Where are you getting the older package from?  I think this is very unlikely to occur in a customer environment, but I'd like to understand it first.  

The older version of hiera hasn't been shipped since OSP 6 and we have no in-place migration path from OSP 6 to 10.  

AFAICT, the only package with an rpm requirement on hiera is puppet itself and it's limited to:  hiera >= 1.0.0

Comment 2 Mike Burns 2016-09-06 12:52:58 UTC
I did notice that this older version is shipped with Satellite, so there may be a path there when a machine is provisioned from satellite with puppet/hiera already installed.

If you follow the documented procedure[1] for installing the undercloud, it says to enable only our repos, then yum update, then reboot.  This should update any older versions of hiera prior to running the undercloud install. 

If we want to remove this possible issue, there are a couple options:

1.  add a requires somewhere beyond puppet (instack-undercloud would make sense to me) requiring a newer version of hiera.  
2.  Add something in the undercloud installation either in python-tripleoclient, instack-undercloud or tripleo-common that updates hiera (or possibly a full yum update)

Updating the requires in puppet doesn't make a ton of sense, puppet doesn't *require* the newer hiera, it's how we're using it that needs the newer version.  

Regardless, the current docs would make this a less severe issue, IMO.

Jarda -- any thoughts on this?

[1] Section 4.4 https://access.redhat.com/documentation/en/red-hat-openstack-platform/9/paged/director-installation-and-usage/chapter-4-installing-the-undercloud

Comment 3 Jaromir Coufal 2016-09-06 18:09:21 UTC
Following the docs should be sufficient for current release.

1 or 2 makes sense to me to provide proper fix so that user does not end up in the situation in the first place. Whether 1 or 2, I would leave this on the actual assignee who will be designing the fix.

Thanks, Mike!

Comment 5 Mike Burns 2016-10-14 15:37:43 UTC
There is nothing to fix here.  OSP 10 is always 1.3.4-1.el7.  When updating, we don't do singular package updates, it's a global yum update, so any older package should be done correctly.  Docs say to enable only the right repos, so no bug.