For some servers in our environment, we change the system name field in Spacewalk to include both the server name AND an easier to read alias: web-app-01(cu1prod2app1). We were using the api directly via Frontier::RPC, but are attempting to switch to using spacecmd instead so we don’t have to maintain the rpc portion of the code and so we don’t have to modify it every time a new api method is added as the maintainer is already doing that. Everything has been working until today when we started testing using servers that include parenthesis in the name field. This seems to either generate an error or to silently fail, depending on the command used.
For example: This command fails silently: rm -rf /root/.spacecmd/ spacecmd -d -s spacewalk -u someuser -p somepass -- system_updatecustomvalue 'web-app-01 (cu1prod2app1)' is_web yes This command fails with an error: rm -rf /root/.spacecmd/ spacecmd -d -s spacewalk -u someuser -p somepass -- system_updatecustomvalue web-app-01(cu1prod2app1) is_web yes The command also fails if there is a space in the system name field, even if quotes are used. It seems that quoting the name field causes the command to fail silently, even with debug turned on. This seems to be a spacecmd issue as it didn’t occur when we used rpc. I’m curious if this is a bug or an intended limitation. Additionally, the command does work if we pass the sid and not the name, but unfortunately, when using the group:GroupName switch to iterate through all servers in a group, we get errors as spacecmd seems to use the system name field and not the sid. Lastly, it also appears that spacecmd does not like spaces in group names, even if quotes are used. Any help that can be provided would be appreciated. _______________________________________________ Spacewalk-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/spacewalk-list
