[Error detail]
I built an openstack environment with nova-lxd by devstack on Ubuntu 16.04 Xenial.
At that time, I add the following settings to my local.conf.
enable_plugin nova-lxd https://git.openstack.org/openstack/nova-lxd
LXD_BACKEND_DRIVER=zfs
As a result, nova-compute output the following error.
Feb 09 05:03:55 lxd-1 nova-compute[27109]: ERROR nova.compute.manager [None req-cb7209c1-b444-4069-910b-baa1012bdf04 None None] Error updating resources for node lxd-1.: ProcessExecutionError: Unexpected error while running command.
Feb 09 05:03:55 lxd-1 nova-compute[27109]: Command: sudo nova-rootwrap /etc/nova/rootwrap.conf zpool list -o size -H -p devstack
Feb 09 05:03:55 lxd-1 nova-compute[27109]: Exit code: 2
Feb 09 05:03:55 lxd-1 nova-compute[27109]: Stdout: u''
Feb 09 05:03:55 lxd-1 nova-compute[27109]: Stderr: u"invalid option 'p'\nusage:\n\tlist [-gHLPv] [-o property[,...]] [-T d|u] [pool] ... [interval [count]]\n\nthe following properties are supported:\n\n\tPROPERTY EDIT VALUES\n\n\tallocated
Feb 09 05:03:55 lxd-1 nova-compute[27109]: ERROR nova.compute.manager Traceback (most recent call last):
Feb 09 05:03:55 lxd-1 nova-compute[27109]: ERROR nova.compute.manager File "/opt/stack/nova/nova/compute/manager.py", line 7745, in _update_available_resource_for_node
Feb 09 05:03:55 lxd-1 nova-compute[27109]: ERROR nova.compute.manager startup=startup)
Feb 09 05:03:55 lxd-1 nova-compute[27109]: ERROR nova.compute.manager File "/opt/stack/nova/nova/compute/resource_tracker.py", line 723, in update_available_resource
Feb 09 05:03:55 lxd-1 nova-compute[27109]: ERROR nova.compute.manager resources = self.driver.get_available_resource(nodename)
Feb 09 05:03:55 lxd-1 nova-compute[27109]: ERROR nova.compute.manager File "/opt/stack/nova-lxd/nova/virt/lxd/driver.py", line 1069, in get_available_resource
Feb 09 05:03:55 lxd-1 nova-compute[27109]: ERROR nova.compute.manager local_disk_info = _get_zpool_info(pool_name)
Feb 09 05:03:55 lxd-1 nova-compute[27109]: ERROR nova.compute.manager File "/opt/stack/nova-lxd/nova/virt/lxd/driver.py", line 228, in _get_zpool_info
Feb 09 05:03:55 lxd-1 nova-compute[27109]: ERROR nova.compute.manager total = _get_zfs_attribute('zpool', 'size')
Feb 09 05:03:55 lxd-1 nova-compute[27109]: ERROR nova.compute.manager File "/opt/stack/nova-lxd/nova/virt/lxd/driver.py", line 212, in _get_zfs_attribute
Feb 09 05:03:55 lxd-1 nova-compute[27109]: ERROR nova.compute.manager run_as_root=True)
Feb 09 05:03:55 lxd-1 nova-compute[27109]: ERROR nova.compute.manager File "/opt/stack/nova/nova/utils.py", line 234, in execute
Feb 09 05:03:55 lxd-1 nova-compute[27109]: ERROR nova.compute.manager return RootwrapProcessHelper().execute(*cmd, **kwargs)
Feb 09 05:03:55 lxd-1 nova-compute[27109]: ERROR nova.compute.manager File "/opt/stack/nova/nova/utils.py", line 117, in execute
Feb 09 05:03:55 lxd-1 nova-compute[27109]: ERROR nova.compute.manager return processutils.execute(*cmd, **kwargs)
Feb 09 05:03:55 lxd-1 nova-compute[27109]: ERROR nova.compute.manager File "/usr/local/lib/python2.7/dist-packages/oslo_concurrency/processutils.py", line 424, in execute
Feb 09 05:03:55 lxd-1 nova-compute[27109]: ERROR nova.compute.manager cmd=sanitized_cmd)
Feb 09 05:03:55 lxd-1 nova-compute[27109]: ERROR nova.compute.manager ProcessExecutionError: Unexpected error while running command.
Feb 09 05:03:55 lxd-1 nova-compute[27109]: ERROR nova.compute.manager Command: sudo nova-rootwrap /etc/nova/rootwrap.conf zpool list -o size -H -p devstack
Feb 09 05:03:55 lxd-1 nova-compute[27109]: ERROR nova.compute.manager Exit code: 2
Feb 09 05:03:55 lxd-1 nova-compute[27109]: ERROR nova.compute.manager Stdout: u''
Feb 09 05:03:55 lxd-1 nova-compute[27109]: ERROR nova.compute.manager Stderr: u"invalid option 'p'\nusage:\n\tlist [-gHLPv] [-o property[,...]] [-T d|u] [pool] ... [interval [count]]\n\nthe following properties are supported:\n\n\tPROPERTY EDIT
Feb 09 05:03:55 lxd-1 nova-compute[27109]: ERROR nova.compute.manager
[Cause of this error]
"-p" option of zpool command was added at zfs 0.7.0.
But, the latest version of zpool in Xenial is 0.6.5.6.
So this error was occurred.
Users who want to use zfs backend for nova-lxd should install zfs 0.7.0 or higher.
Hi Rikimaru
The issue is of incompatible nova, nova-lxd and Host Ubuntu versions.
On devstack, you'll need to use a tagged version of nova-lxd (13.x) as the plugin. This will then be compatible with xenial, but might not be compatible with nova in devstack. Devstack is/has moved to bionic where this won't be a problem.
If you're not trying to develop nova + nova-lxd, it might be easier to just use the packages?
On Xenial, we validate that the nova and nova-lxd packages are compatible in the distro archives. The version osf nova-lxd that works on xenial can be found at https:/ /launchpad. net/ubuntu/ xenial/ +source/ nova-lxd
(i.e. nova-lxd 13.0.0.*)
So we support
distro = xenial-mitaka
xenial-pike
xenial-queens
However, please note that bionic is supported as bionic-rocky in distro as well.