lxc mutexes container actions using a lockfile, something like /run/lock/lxc/$lxcpath/$lxcname. The last path element is a file.
When you create a snapshot, the lockfile /run/lock/lxc/$lxcpath/$lxcname/snaps/snap0 (for instance) is used.
If the container's own lockfile happens to exist at the moment that you attemtp to create the snapshot lockfile, then you would see this 'mkdir: not a directory" because it tries to create that path as a directory when it already exists as a file.
There are several ways this could be fixed in lxc, but for a workaround the best I can suggest is to not act on a snapshot while concurrently acting on the parent container (from another shell/task).
Hi,
I think I see what's going on.
lxc mutexes container actions using a lockfile, something like /run/lock/ lxc/$lxcpath/ $lxcname. The last path element is a file.
When you create a snapshot, the lockfile /run/lock/ lxc/$lxcpath/ $lxcname/ snaps/snap0 (for instance) is used.
If the container's own lockfile happens to exist at the moment that you attemtp to create the snapshot lockfile, then you would see this 'mkdir: not a directory" because it tries to create that path as a directory when it already exists as a file.
There are several ways this could be fixed in lxc, but for a workaround the best I can suggest is to not act on a snapshot while concurrently acting on the parent container (from another shell/task).