lxc config unset acontainer aninvalidconfigkey doesn't generate an error #1477

Closed
tych0 opened this Issue Jan 7, 2016 · 2 comments

Comments

Projects
None yet
2 participants
Member

tych0 commented Jan 7, 2016

No description provided.

Owner

stgraber commented Jan 7, 2016

That's because the invalid key never actually hits the server, otherwise it sure would generate an error.

What's happening is that the client pulls the current config, then unsets the key and pushes back the config. If the key doesn't exist to begin with, no errors are raised.

So we can't really raise an "invalid key" error, but we can have the client raise a "unsetting a key that's not set" error.

Member

tych0 commented Jan 8, 2016

On Thu, Jan 07, 2016 at 12:49:08PM -0800, Stéphane Graber wrote:

That's because the invalid key never actually hits the server, otherwise it sure would generate an error.

What's happening is that the client pulls the current config, then unsets the key and pushes back the config. If the key doesn't exist to begin with, no errors are raised.

So we can't really raise an "invalid key" error, but we can have the client raise a "unsetting a key that's not set" error.

Yep, when I looked at writing a patch before filing this it's actually
a little messier than that, because of the way it's handled
internally. Perhaps I'll get ambitious on a plane ride soon and try
and de-messy it.

@stgraber stgraber added Bug Easy labels Jan 26, 2016

@stgraber stgraber assigned stgraber and unassigned tych0 Feb 10, 2016

@tych0 tych0 closed this in 6cec215 Feb 10, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment