Rephrase support message.

Also tell user to reboot only if latest kernel is not loaded

Change-Id: Ic122367d500dfb7ea70dd2b63d545e853e049f56
Fixes: rhbz#991801
This commit is contained in:
Martin Magr
2013-08-30 14:25:36 +02:00
parent 9234dd31c4
commit 0abe9fa0b6
2 changed files with 26 additions and 6 deletions

View File

@@ -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)

View File

@@ -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}"
}