Bug 1278181 - 55-heat-config shouldn't use /var/run for it's DEPLOYED_DIR
55-heat-config shouldn't use /var/run for it's DEPLOYED_DIR
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-heat-templates (Show other bugs)
7.0 (Kilo)
Unspecified Unspecified
urgent Severity unspecified
: z3
: 7.0 (Kilo)
Assigned To: Steve Baker
Amit Ugol
: ZStream
Depends On:
  Show dependency treegraph
Reported: 2015-11-04 16:12 EST by James Slagle
Modified: 2017-05-25 00:20 EDT (History)
13 users (show)

See Also:
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.
Story Points: ---
Clone Of:
: 1405896 (view as bug list)
Last Closed: 2015-12-21 12:02:10 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Launchpad 1513220 None None None Never
OpenStack gerrit 242924 None None None Never
OpenStack gerrit 251551 None None None Never

  None (edit)
Description James Slagle 2015-11-04 16:12:54 EST
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 16:37:11 EST
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 10:24:28 EST
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 16:39:19 EST
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 18:22:31 EST
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-11-30 19:55:41 EST
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 08:46:32 EST
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 09:37:30 EST
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 12:02:10 EST
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.


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