This PR fixes an issue with ChecMK always showing GC Task failed if a data store in PBS contains some special characters like -. This results in the UPID in the garbage-collection status step to return something like:
This is a result of the jq -r '.upid' call in the garbage-collection status step where JQ not only removes the quotes, but also the double-backslashes. However, removing the -r option does not seem to be a valid alternative since this leaves the quotes and also does not make sure the normal $upid is used in line before this single-line change.
With this simple bash char replacement task log is used with the correct escaped string while the command_section call keeps up using the upid returned by garbage-collection status.
This PR fixes an issue with ChecMK always showing
GC Task failed
if a data store in PBS contains some special characters like-
. This results in the UPID in thegarbage-collection status
step to return something like:for a data store called
test-store
This is a result of the
jq -r '.upid'
call in thegarbage-collection status
step where JQ not only removes the quotes, but also the double-backslashes. However, removing the-r
option does not seem to be a valid alternative since this leaves the quotes and also does not make sure the normal$upid
is used in line before this single-line change.With this simple bash char replacement
task log
is used with the correct escaped string while thecommand_section
call keeps up using the upid returned bygarbage-collection status
.