So it started because I was trying to get auto-scalable nodes for self-registration with the chef. In my client.rb file, I had the following:
node_name "some_prefix-#{`hostname`}"
the idea was that each node would have the same prefix, but a suffix based on the host name. Unfortunately, hostname returns a string with \n at the end of it. The chef happily allowed me to create this client, but he cannot get access to it in any way.
knife client show some_prefix-myHostname knife client show "some_prefix-myHostname\n" knife client show "some_prefix-myHostname%0A"
all three results in 404
knife client list
shows the client and the empty line of the new line after it.
I fixed my client.rb template, but I cannot get rid of the nodes that I created using a new line in my names. I tried using a knife, webui, and even manually using the Chef :: REST library in irb, but it all leads to 404.
Any ideas?
EDIT: I also tried knife client bulk delete , but that also fails. It appears that the REST library deactivates the URL and removes the new line before trying to send a request.
source share