diff --git a/packstack/plugins/puppet_950.py b/packstack/plugins/puppet_950.py index e11e7c51b..0bd56c2cc 100644 --- a/packstack/plugins/puppet_950.py +++ b/packstack/plugins/puppet_950.py @@ -53,9 +53,14 @@ def initSequences(controller): controller.insertSequence("Clean Up", [], [], puppetpresteps, index=0) puppetsteps = [ - {'title': 'Installing Dependencies', 'functions':[installdeps]}, - {'title': 'Copying Puppet modules and manifests', 'functions':[copyPuppetModules]}, - {'title': 'Applying Puppet manifests', 'functions':[applyPuppetManifest]}, + {'title': 'Installing Dependencies', + 'functions': [installdeps]}, + {'title': 'Copying Puppet modules and manifests', + 'functions': [copyPuppetModules]}, + {'title': 'Applying Puppet manifests', + 'functions': [applyPuppetManifest]}, + {'title': 'Finalizing', + 'functions': [finalize]} ] controller.addSequence("Puppet", [], [], puppetsteps) @@ -212,3 +217,17 @@ def applyPuppetManifest(config): # wait for outstanding puppet runs befor exiting waitforpuppet(currently_running) + + +def finalize(config): + for hostname in filtered_hosts(config): + server = utils.ScriptRunner(hostname) + server.append("installed=$(rpm -q kernel --last | head -n1 | " + "sed 's/kernel-\([a-z0-9\.\_\-]*\).*/\\1/g')") + server.append("loaded=$(uname -r | head -n1)") + server.append('[ "$loaded" == "$installed" ]') + try: + rc, out = server.execute() + except ScriptRuntimeError: + controller.MESSAGES.append('Because of the kernel update the host ' + '%s requires reboot.' % hostname) diff --git a/packstack/puppet/templates/prescript.pp b/packstack/puppet/templates/prescript.pp index 5c458c944..24f21d5db 100644 --- a/packstack/puppet/templates/prescript.pp +++ b/packstack/puppet/templates/prescript.pp @@ -5,12 +5,13 @@ if $::operatingsystem != "Fedora" { } } +$info = "The RDO kernel that includes network namespace (netns) support has been installed on host $::ipaddress." if $::operatingsystem == 'RedHat' { - $warning = "Kernel package with netns support has been installed on host $::ipaddress. Please note that with this action you are losing Red Hat support for this host. Because of the kernel update the host mentioned above requires reboot." + $warning = " This is a community supplied kernel and is not officially supported by Red Hat. Installing this kernel on RHEL systems may impact your ability to get support from Red Hat." } else { - $warning = "Kernel package with netns support has been installed on host $::ipaddress. Because of the kernel update the host mentioned above requires reboot." + $warning = "" } class { 'packstack::netns': - warning => $warning + warning => "${info}${warning}" }