[lxc-users] cgmanager + zfs

Tamas Papp tompos at martos.bme.hu
Sun Feb 23 14:12:30 UTC 2014


hi,

I found a more serious issue with cgmanager.

# start a zfs based container container
$ lxc-start -d -n redmine

# stop it
$ lxc-stop -n redmine

# rename it: it gets unmounted, but cannot be renamed nor remounted
$ zfs rename tank/lxc/redmine tank/lxc/r
cannot rename 'tank/lxc/redmine': dataset is busy
filesystem 'tank/lxc/redmine' is already mounted
cannot mount 'tank/lxc/redmine': Resource temporarily unavailable


$ stop cgmanager
cgmanager stop/waiting/

# rename successfull
$ zfs rename tank/lxc/redmine tank/lxc/r
$ zfs rename tank/lxc/r tank/lxc/redmine

# mount dataset
$ zfs mount tank/lxc/redmine

# container cannot get started
$ lxc-start -d -n redmine
lxc-start: command get_cgroup failed to receive response


# if cgmanager is started, container is starting successfully
$ start cgmanager
cgmanager start/running, process 25740
$ lxc-start -d -n redmine


# if it matters: zfs dataset contains both rootfs AND configs
$ ls /tank/lxc/redmine/
config  fstab  rootfs  rootfs.hold


1. zfs dataset is locked by cgmanager for some reason after lxc-stop.

2. lxc-start fails if cgmanager isn't running (just a note, it's could
be intentional)



Thanks,
tamas


More information about the lxc-users mailing list