Closed kplimack closed 7 years ago
As you said, this is an issue with serverspec/specinfra and we can't really do anything about it.
@coderanger got any advise on ways to move forwards? I can't be the only one hitting this bug.
Use a command
resource and pgrep
instead? Or command('ps something | grep something')
. It's all just commands in the end.
I use a command resource.
thanks for the advise, thats what I was thinking, too. pretty lame bug, though
Description
this is really an issue for serverspec, but they dont accept issues. https://github.com/mizzy/specinfra/blob/c8a97ef154684452ba059beee4cddbc8e62258c2/lib/specinfra/command/base/process.rb#L4
the process matcher will grab the first thing that partially matches the process that you are looking for. so if you have
and you try to write an audit with
you will not be able to match the args, because the
process
is actually matching haproxy-master, the first one to grep forhaproxy
.Kitchen Version
Chef Development Kit Version: 1.2.22 chef-client version: 12.18.31 delivery version: master (0b746cafed65a9ea1a79de3cc546e7922de9187c) berks version: 5.6.3 kitchen version: 1.15.0 specinfra (2.67.2, 2.66.7) serverspec (2.38.0)