Bug 1347652

Summary: post-install deletes foreign o-r-c configure.d scripts
Product: [Community] RDO Reporter: Chris Jones <chjones>
Component: openstack-tripleo-image-elementsAssignee: James Slagle <jslagle>
Status: CLOSED CURRENTRELEASE QA Contact: Shai Revivo <srevivo>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: MitakaCC: michele
Target Milestone: ---   
Target Release: trunk   
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: 2018-07-31 20:42:45 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:

Description Chris Jones 2016-06-17 10:39:39 UTC
Description of problem:
Upgrading a CentOS 7.2 machine from liberty (deployed with tripleo-quickstart) to mitaka, there is a yum update, which pulls in a new openstack-tripleo-image-elements rpm.

The post-install script of that rpm does an rsync of the new os-refresh-config configure.d scripts into the directory of old scripts, but it uses --delete, presumably to clean up no-longer-required scripts.

Unfortunately, this deletes any scripts which were supplied outside the o-t-i-e package. In the specific case of the upgrade, it takes out the 55-heat-config script, causing subsequent stages of the upgrade process to never be applied, and the overall upgrade to stall indefinitely.

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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Chris Jones 2016-06-17 10:41:55 UTC
Specifically, this is affecting the overcloud-controller nodes.

Comment 2 Chris Jones 2016-06-20 13:20:18 UTC
This should be resolved by https://review.gerrithub.io/#/c/280655/

Comment 3 Michele Baldessari 2016-06-21 08:56:53 UTC
Seems that after we remove this package in our upgrade scripts. It gets pulled
in by the following packages when we do a yum update:
==============================================================================================================================================================================================
 Package                                                Arch                         Version                                                            Repository                       Size
==============================================================================================================================================================================================
Removing:
 openstack-tripleo-image-elements                       noarch                       5.0.0-0.20160613170807.5feb901.el7.centos                          @delorean                       645 k
Removing for dependencies:
 instack-undercloud                                     noarch                       4.0.1-0.20160615124324.ddac9f3.el7.centos                          @delorean                       212 k
 openstack-tripleo-common                               noarch                       2.0.1-0.20160615184247.d87771a.el7.centos                          @delorean                       183 k

Transaction Summary
==============================================================================================================================================================================================

Comment 4 Chris Jones 2016-06-22 08:33:45 UTC
So, comment #2 may have been a slightly shallow hope. While it does in theory cause o-t-i-e to not be installed in the overcloud images, we're finding that it's quite easily pulled back in by other packages.

I think we may be able to definitively solve this by adding the openstack-heat-templates elements folder to the ELEMENTS_PATH list in o-t-i-e's post-install script.

Given that heat-config is listed in /etc/dib-manifests/dib-element-manifest, this should cause the post-install to preserve its o-r-c .d scripts (and indeed any others that are being affected by the rsync --delete).

Comment 5 James Slagle 2016-06-22 15:57:25 UTC
(In reply to Chris Jones from comment #4)
> So, comment #2 may have been a slightly shallow hope. While it does in
> theory cause o-t-i-e to not be installed in the overcloud images, we're
> finding that it's quite easily pulled back in by other packages.
> 
> I think we may be able to definitively solve this by adding the
> openstack-heat-templates elements folder to the ELEMENTS_PATH list in
> o-t-i-e's post-install script.
> 
> Given that heat-config is listed in /etc/dib-manifests/dib-element-manifest,
> this should cause the post-install to preserve its o-r-c .d scripts (and
> indeed any others that are being affected by the rsync --delete).

yea, that would likely work.

i do think we could still solve this by getting t-i-e off the overcloud image once and for all. we don't need instack-undercloud and openstack-tripleo-common on there either.

this issue seems contained only to the RDO images afaik. so the upstream tripleo images and the downstream osp-d images seem to be going fine without openstack-tripleo-image-elements installed.

Comment 6 Michele Baldessari 2016-06-22 16:17:22 UTC
(In reply to James Slagle from comment #5)
> (In reply to Chris Jones from comment #4)
> > So, comment #2 may have been a slightly shallow hope. While it does in
> > theory cause o-t-i-e to not be installed in the overcloud images, we're
> > finding that it's quite easily pulled back in by other packages.
> > 
> > I think we may be able to definitively solve this by adding the
> > openstack-heat-templates elements folder to the ELEMENTS_PATH list in
> > o-t-i-e's post-install script.
> > 
> > Given that heat-config is listed in /etc/dib-manifests/dib-element-manifest,
> > this should cause the post-install to preserve its o-r-c .d scripts (and
> > indeed any others that are being affected by the rsync --delete).
> 
> yea, that would likely work.
> 
> i do think we could still solve this by getting t-i-e off the overcloud
> image once and for all. we don't need instack-undercloud and
> openstack-tripleo-common on there either.
> 
> this issue seems contained only to the RDO images afaik. so the upstream
> tripleo images and the downstream osp-d images seem to be going fine without
> openstack-tripleo-image-elements installed.

I fully agree that t-i-e should not be on the overcloud and some patches went
into tripleo-quickstart for this!

But think of the poor soul (me, really :) that by accident one day installs 
python-tripleoclient on any other node of the overcloud. Later on said poor soul 
(still me) will realize that his upgrades broke completely and basically 
impossible to recover from.

I think if we can avoid this scenario without introducing all too much complexity we should really strive for that. I don't think that a yum install <wrongpackage> should give an unknowing user that punishment ;)

Comment 7 Chris Jones 2017-05-17 08:55:02 UTC
@James: what about if we specifically blacklist openstack-tripleo-image-elements on overcloud machines at the yum/dnf level?

Comment 8 Michele Baldessari 2018-07-31 20:42:45 UTC
I think at this point in time we can just close this one out. Scream if you disagree.