Bug 1278181 - 55-heat-config shouldn't use /var/run for it's DEPLOYED_DIR
Summary: 55-heat-config shouldn't use /var/run for it's DEPLOYED_DIR
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-heat-templates
Version: 7.0 (Kilo)
Hardware: Unspecified
OS: Unspecified
urgent
unspecified
Target Milestone: z3
: 7.0 (Kilo)
Assignee: Steve Baker
QA Contact: Amit Ugol
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-11-04 21:12 UTC by James Slagle
Modified: 2017-05-25 04:20 UTC (History)
13 users (show)

Fixed In Version: openstack-heat-templates-0-0.8.20150605git.el7ost
Doc Type: Bug Fix
Doc Text:
This update moves the deployed directory from /var/run/heat-config/deployed, which is usually tmpfs, to /var/lib/heat-config/deployed, which allows the deployed state to persist across reboots.
Clone Of:
: 1405896 (view as bug list)
Environment:
Last Closed: 2015-12-21 17:02:10 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1513220 0 None None None Never
OpenStack gerrit 242924 0 None MERGED Move deployed dir from /var/run to /var/lib 2020-08-11 02:20:32 UTC
OpenStack gerrit 251551 0 None MERGED Add script so that deployments won't get rerun 2020-08-11 02:20:32 UTC
Red Hat Product Errata RHBA-2015:2680 0 normal SHIPPED_LIVE openstack-heat bug fix advisory 2015-12-21 21:51:10 UTC

Description James Slagle 2015-11-04 21:12:54 UTC
The os-refresh-config script 55-heat-config uses /var/run for the value of it's DEPLOYED_DIR variable. DEPLOYED_DIR is then used to determine what SoftwareDeployments have already been applied or not.

The issue is that /var/run is often tmpfs mounted, which means after a reboot and any subsequent os-collect-config metadata changes all the SoftwareDeployemnts are reapplied whether they should be or not.

Comment 2 Steve Baker 2015-11-04 21:37:11 UTC
The permanent fix will be in heat-templates, but if we need a fix which doesn't require a new image we could put a workaround in tripleo-heat-templates which moves existing files from /var/run/heat-config to /var/lib/heat-config and creates a symlink from /var/run/heat-config to /var/lib/heat-config

Comment 7 James Slagle 2015-11-06 15:24:28 UTC
i think we need an async update to openstack-heat-templates to address this, or at the very least in z3.

the package update could have a %post script to do a migration of the existing /var/run/heat-config to a more persistent location

steve what are your thoughts on this and when it could get done?

Comment 8 Steve Baker 2015-11-06 21:39:19 UTC
If it is a priority I can do it early next week.

As an alternative to %post migration, 55-heat-config could check for old and new paths and self-migrate the next time it is run.

Comment 9 Steve Baker 2015-11-10 23:22:31 UTC
Upstream fix is ready for review, its not obvious to me whether this gets downstream via rebase or rh gerrit.

Comment 13 James Slagle 2015-12-01 00:55:41 UTC
there's an additional fix needed for this one, so moving back to ON_DEV. the patches are posted (see external ref's).

Comment 14 Amit Ugol 2015-12-09 13:46:32 UTC
Unless I am missing something here, then /var/run must not be used at all.
on this version: openstack-heat-templates-0-0.8.20150605git.el7ost.noarch
and in this file /usr/share/openstack-heat-templates/software-config/heat-container-agent/scripts/55-heat-config
lines 27 and 31 point to /var/run anyway.

Comment 15 Amit Ugol 2015-12-10 14:37:30 UTC
I re-read it again. If the script is there, moving things after reboot and upgrade works (7.0 to 7.2 and 7.1 to 7.2 works at this time) then this is suffice to say that it did its job and verify this bug.

Comment 17 errata-xmlrpc 2015-12-21 17:02: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://access.redhat.com/errata/RHBA-2015:2680


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