Search syntax where you need a "/"

I’m trying to find all nodes which don’t have /srv as a mount point, doing:

knife search node -i “os:linux AND NOT filesystem_*_mount:*srv”

works, but what I really wanted was:

knife search node -i “os:linux AND NOT filesystem_*_mount:/srv”

i.e. the search value is /srv rather than *srv.

But I can’t for the life of me figure out a syntax which makes it
happy with the “/”, any pointers?


Alex Kiernan

Hi,

On Wed, Jan 18, 2012 at 4:34 AM, Alex Kiernan alex.kiernan@gmail.com wrote:

But I can't for the life of me figure out a syntax which makes it
happy with the "/", any pointers?

There is an open bug report on this issue here:

http://tickets.opscode.com/browse/CHEF-2760

From my own testing and from the comments on the bug report, I don't
think there is a magical escape sequence that will help here
unfortunately. One of the bug commenters has identified the problem,
so hopefully someone jumps in and offers a fix.

Cheers,

Steven

Hey,

Using the REST API in the past I have used ASCII code to do special stuff. So / would be %2F, but I have never used it in the search statement itself.

Zuhaib
On Jan 18, 2012, at 7:28 AM, Steven Danna wrote:

Hi,

On Wed, Jan 18, 2012 at 4:34 AM, Alex Kiernan alex.kiernan@gmail.com wrote:

But I can't for the life of me figure out a syntax which makes it
happy with the "/", any pointers?

There is an open bug report on this issue here:

http://tickets.opscode.com/browse/CHEF-2760

From my own testing and from the comments on the bug report, I don't
think there is a magical escape sequence that will help here
unfortunately. One of the bug commenters has identified the problem,
so hopefully someone jumps in and offers a fix.

Cheers,

Steven