puppet-manifests: validate cpu list before setting latencies

Do not attempt to set wakeup latency unless the list of CPU instances is
non-empty.  If either the low or high wakeup list is empty then there is
no need to attempt to run the script.  Running the script with an empty
list results in a manifest apply errors and fails the node
initialization.

Story: 2004357
Task: 27957

Change-Id: I89f19388d131b6c377020c55f5b13960738e350d
Signed-off-by: Allain Legacy <allain.legacy@windriver.com>
This commit is contained in:
Allain Legacy 2018-11-22 09:40:19 -06:00
parent aa61a05ecd
commit 3a697117c8
2 changed files with 15 additions and 11 deletions

View File

@ -1,2 +1,2 @@
SRC_DIR="src"
TIS_PATCH_VER=73
TIS_PATCH_VER=74

View File

@ -280,18 +280,22 @@ class platform::compute::pmqos (
$script = "/usr/bin/set-cpu-wakeup-latency.sh"
# Set low wakeup latency (shallow C-state) for vswitch CPUs using PM QoS interface
exec { "low-wakeup-latency":
command => "${script} low ${low_wakeup_cpus}",
onlyif => "test -f ${script}",
logoutput => true,
if $low_wakeup_cpus != '""' {
# Set low wakeup latency (shallow C-state) for vswitch CPUs using PM QoS interface
exec { "low-wakeup-latency":
command => "${script} low ${low_wakeup_cpus}",
onlyif => "test -f ${script}",
logoutput => true,
}
}
#Set high wakeup latency (deep C-state) for non-vswitch CPUs using PM QoS interface
exec { "high-wakeup-latency":
command => "${script} high ${hight_wakeup_cpus}",
onlyif => "test -f ${script}",
logoutput => true,
if $hight_wakeup_cpus != '""' {
#Set high wakeup latency (deep C-state) for non-vswitch CPUs using PM QoS interface
exec { "high-wakeup-latency":
command => "${script} high ${hight_wakeup_cpus}",
onlyif => "test -f ${script}",
logoutput => true,
}
}
}
}