When Salt is managing an OpenVZ hardware node, the command "ps -efH" returns information about all processes in all containers. This is very likely not what the sysadmin intends and it makes the service.status command return false positives.
When grains['virtual'] == 'openvzhn', a better setting for grains['ps'] would be 'vzps -E 0 -efH|cut -b 6-', which filters out guest processes and formats the output similarly to the standard 'ps' command.
Thanks for the heads up! This should be an easy fix!
Does this look all right?
Are you certain that the _ps function will be called after the _virtual function? If _virtual is called first then this patch should work, but if _ps happens to be called first then the ps command will revert to the non-VZ form.
Yes, it is. The functions which have underscores are only called internally, not by the loader
Sounds good then, thanks!