Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1379436

Summary: Upgrade from 0SP7 to OSP9 fails due to missing puppet modules symlink
Product: Red Hat OpenStack Reporter: Dimitri Savineau <dsavinea>
Component: openstack-tripleo-heat-templatesAssignee: Sofer Athlan-Guyot <sathlang>
Status: CLOSED ERRATA QA Contact: Marius Cornea <mcornea>
Severity: high Docs Contact:
Priority: low    
Version: 9.0 (Mitaka)CC: achernet, akaris, augol, dbecker, mburns, mcornea, morazi, rhel-osp-director-maint, sathlang
Target Milestone: ---   
Target Release: 9.0 (Mitaka)   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: openstack-tripleo-heat-templates-2.0.0-44.el7ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-03-08 20:06:55 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:
Attachments:
Description Flags
Puppet modules in an upgraded OSP7 env
none
Puppet modules in a clean OSP9 env none

Description Dimitri Savineau 2016-09-26 18:05:36 UTC
Description of problem:
Upgrading the overcloud from OSP7 to OSP9 (7->8->9) fails during aodh installation (section 3.4.2 [1]). Puppet is not able to find the aodh puppet class. In fact there is no symlink in /etc/puppet/modules for aodh (and other modules).

Version-Release number of selected component (if applicable):
# OSP9 (but this point every nodes are still running OSP8)
# rpm -qa openstack-puppet-modules
openstack-puppet-modules-7.1.3-1.el7ost.noarch

How reproducible:
100%

Steps to Reproduce:
1. Deploy the overcloud with OSP7
2. Upgrade the overcloud to OSP8
3. Upgrade the overcloud to OSP9

Actual results:
We don't have the issue during the upgrade to OSP8 but I think this affects OSP8 too.
Compared to a fresh OSP8/9 installation we don't have all the symlink for the puppet modules in /etc/puppet/modules (ex: aodh). This results to a puppet error during aodh installation :

---------------------
Error: Puppet::Parser::AST::Resource failed with error ArgumentError: Could not find declared class ::aodh at /var/lib/heat-config/heat-config-puppet/264e2c11-6407-4070-a94c-8b6503d52bca.pp:30 on node sc-ctrl00.localdomain
Wrapped exception:
Could not find declared class ::aodh
Error: Puppet::Parser::AST::Resource failed with error ArgumentError: Could not find declared class ::aodh at /var/lib/heat-config/heat-config-puppet/264e2c11-6407-4070-a94c-8b6503d52bca.pp:30 on node sc-ctrl00.localdomain
---------------------

---------------------
# ls -hl /etc/puppet/modules/aodh
ls: cannot access /etc/puppet/modules/aodh: No such file or directory
# ls -hl /usr/share/openstack-puppet/modules/aodh
total 28K
-rw-r--r--. 1 root root  220 Jul 14 16:09 CHANGELOG.md
drwxr-xr-x. 2 root root   20 Sep 22 20:31 examples
-rw-r--r--. 1 root root  575 Jul 14 16:09 Gemfile
drwxr-xr-x. 3 root root   19 Sep 22 20:31 lib
-rw-r--r--. 1 root root  561 Jul 14 16:09 LICENSE
drwxr-xr-x. 5 root root 4.0K Sep 22 20:31 manifests
-rw-r--r--. 1 root root 1.1K Jul 14 16:09 metadata.json
-rw-r--r--. 1 root root 2.9K Jul 14 16:09 Rakefile
-rw-r--r--. 1 root root 2.9K Jul 14 16:09 README.md
drwxr-xr-x. 2 root root   20 Sep 22 20:31 tests
---------------------

Expected results:
All symlinks to /usr/share/openstack-puppet/modules/*
Upgrading from scratch OSP8 to OSP9 doesn't have this issue because the overcloud image already have all the right symlinks [2]

Additional info:
During OSP7 updates (7.x to 7.y [3]) we forced the symlink creation () in the yum_update.sh but this line has been removed in OSP8/9.

[1] https://access.redhat.com/documentation/en/red-hat-openstack-platform/9/single/upgrading-red-hat-openstack-platform/#sect-Major-Upgrading_the_Overcloud-Aodh
[2] https://github.com/openstack/tripleo-puppet-elements/blob/stable/mitaka/elements/puppet-modules/install.d/puppet-modules-package-install/75-puppet-modules-package#L7
[3] https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux_OpenStack_Platform/7/html/Director_Installation_and_Usage/sect-Updating_the_Overcloud.html#sect-Updating_the_Overcloud_Packages

in attachment the puppet modules list in /etc/puppet/modules for an upgraded OSP7 env and from scratch OSP9

Comment 1 Dimitri Savineau 2016-09-26 18:06:12 UTC
Created attachment 1204897 [details]
Puppet modules in an upgraded OSP7 env

Comment 2 Dimitri Savineau 2016-09-26 18:06:47 UTC
Created attachment 1204898 [details]
Puppet modules in a clean OSP9 env

Comment 6 Sofer Athlan-Guyot 2017-01-25 00:32:03 UTC
Hi,

this look legit.  This is also affecting upstream.  The kilo branch isn't supported upstream anymore, that's why you can't find the branch.  I will make sure that the lines exists in yum_update.sh for osp8/osp9.  This isnt' needed in osp10 as the puppet module path is coded inside the puppet run.

Thanks,

Comment 7 Sofer Athlan-Guyot 2017-02-09 16:04:21 UTC
*** Bug 1414502 has been marked as a duplicate of this bug. ***

Comment 8 Sofer Athlan-Guyot 2017-02-09 16:11:59 UTC
The upstream bug already exist, but is not backported to mitaka.

Comment 9 Sofer Athlan-Guyot 2017-02-09 16:21:26 UTC
Wrong comment, there is a fix for mitaka adding it to the bz.  It needs z-stream.

Comment 13 errata-xmlrpc 2017-03-08 20:06:55 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/RHBA-2017-0470.html