Client resource creates clones
Closed this issue · 2 comments
ares commented
Supposing I have client on chef server (open-source server in my case)
connection.clients.update('name', :name => 'new')
It saves new client but old one remains there as well, so basically it clones the client and saves it under new name. That's probably not expected.
sethvargo commented
This is behaving as expected, kinda. Clients are "keyed" by name, so changing the name actually creates a new resource in the Chef Server. This is documented in the Chef Server API. I supposed ChefAPI could blacklist changing the name attribute, but that seems like bad UX.
ares commented
Oh, thanks for clarification and fast answer, it's quite confusing, so maybe readme should cover that. Feel free to close this issue then :-)