linux-system-roles / sap-hana-preconfigure

Apache License 2.0
19 stars 36 forks source link

Wrong comparison of the output of "cpupower info | grep perf-bias" in assertion mode #157

Closed berndfinger closed 3 years ago

berndfinger commented 3 years ago

In a non-failing case, the output of task "Get the current setting of EPB (x86_64 platform only)" is similar to: perf-bias: 0 but the task "Assert that the current setting of EPB is '0' (x86_64 platform only)" is comparing the stdout with just the digit '0'. So we better modify the command to: cpupower info -b | awk '/perf-bias/{print $NF}' and use the Ansible shell module. Or we stay with the command module and use the command cpupower info -b but compare with "perf-bias: 0"

berndfinger commented 3 years ago

We also can safely use the command cpupower info -b instead of cpupower info, just like in file configure-epb.yml.