packages: secure upgrade workflow from dependency cycles
authorEmilien Macchi <emilien@redhat.com>
Sat, 16 Jan 2016 00:25:17 +0000 (19:25 -0500)
committerJames Slagle <jslagle@redhat.com>
Wed, 20 Jan 2016 19:56:53 +0000 (19:56 +0000)
commit0543b4de44c36fcb351b127fa0c0d0c35d17965f
tree9fd5933155253bdf1ea9fe31b83c8bafd51ae7fe
parent69d44747ecd9f8fb0c171a7b533f8c3a81d89c5d
packages: secure upgrade workflow from dependency cycles

Change the workflow to be:
Upgrade all packages before any services that is notified & managed by
Puppet.
It also disable the Exec timeout so we rely on Heat timeout and not on
the 300s that are the default in Puppet [1]

Example: we upgrade and OpenStack config will change (obviously).
         Puppet catalog will contain 3 important things:
           * config resources
           * service resources
           * package-upgrade Exec resource
         with that patch, what will happen:
           * puppet will update config first or second and notify
             services
           * puppet will run package-upgrade first or second but before
             the package-upgrade Exec resource
           * at the very end, puppet will restart services

That way, we avoid complications with Puppet dependency cycle issues.

[1] https://docs.puppetlabs.com/references/latest/type.html#exec-attribute-timeout

Closes-Bug: 1536349
Change-Id: I07310bdfc5b07b03ac9fa5f8c13e87eaa2bfef4d
manifests/packages.pp
spec/classes/tripleo_packages_spec.rb