aboutsummaryrefslogtreecommitdiffstats
path: root/manifests/packages.pp
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2016-02-18 13:19:57 +0000
committerGerrit Code Review <review@openstack.org>2016-02-18 13:19:57 +0000
commit94a1aefd6213180804db4c7da9de477e1cc51a31 (patch)
tree02c8e19eabf2b38d2d2abf126ce6cf5648fba642 /manifests/packages.pp
parentaa6a6cecc257f78a3e064a449f618ff6eecdef36 (diff)
parent0543b4de44c36fcb351b127fa0c0d0c35d17965f (diff)
Merge "packages: secure upgrade workflow from dependency cycles"
Diffstat (limited to 'manifests/packages.pp')
-rw-r--r--manifests/packages.pp15
1 files changed, 11 insertions, 4 deletions
diff --git a/manifests/packages.pp b/manifests/packages.pp
index c0971e9..5e111fa 100644
--- a/manifests/packages.pp
+++ b/manifests/packages.pp
@@ -58,12 +58,19 @@ class tripleo::packages (
exec { 'package-upgrade':
command => $pkg_upgrade_cmd,
path => '/usr/bin',
+ timeout => 0,
}
# A resource chain to ensure the upgrade ordering we want:
- # 1) upgrade puppet managed packages (will trigger puppet dependencies)
- # 2) then upgrade all packages via exec
- # 3) then restart services
- Package <| |> -> Exec['package-upgrade'] -> Service <| |>
+ # 1) Upgrade all packages via exec.
+ # Note: The Package Puppet resources can be managed after or before package-upgrade,
+ # it does not matter. what we need to make sure is that they'll notify their
+ # respective services (if they have ~> in their manifests or here with the ->)
+ # for the other packages, they'll be upgraded before any Service notify.
+ # This approach prevents from Puppet dependencies cycle.
+ # 2) This upgrade will be run before any Service notified & managed by Puppet.
+ # Note: For example, during the Puppet catalog, configuration will change for most of
+ # the services so the Services will be likely restarted after the package upgrade.
+ Exec['package-upgrade'] -> Service <| |>
}