Just spent an hour attempting to implement the "optional" property and I'm 
afraid it can't be done in a sane way due to:
 - We rely on the path existing on the host at the time the device is added to 
read a number of flags from it for config validation
 - We rely on the bind-mount device existing during removal so we can 
unconfigure the cgroup limits.

I had a commit which attempted to workaround most of those, but it ended
up making "optional" such a special case that half the validation code
would be bypassed and cgroup configuration might have ended up left
behind after device removal which could be a potential security risk for
privileged containers...

So I'll only be submitting the batch removal fix for this issue.

** Changed in: lxd (Ubuntu)
       Status: Triaged => Fix Committed

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1690299

Title:
  Cannot remove detached devices from container

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/lxd/+bug/1690299/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to