I am trying to start an lxd container with both a root disk and an ephemeral disk. I use the `default` storage pool with a zfs storage driver.
Launching failed due to "LXDAPIException: Storage volumes cannot be specified as absolute paths".
I am running:
- Openstack Queens
- Ubuntu Bionic
- nova-lxd 17.0.1-0ubuntu1
- lxd 3.0.3-0ubuntu1~18.04.1
- python-pylxd 2.2.6-0ubuntu1.1
The full info log of nova-lxd (I added info log statements to flavor.to_profile to print config, device and block_info):
INFO os_vif [req-5f3143bf-21e0-4d37-985f-3d81898b62bc bccab7d86ea9436a81c3345bf2f73fc5 d33bca6fdab744348a44f231da1f81ad - default default] Successfully plugged vif VIFBridge(active=False,address=fa:16:3e:d2:e2:78,bridge_name='brqc68b2e19-64',has_traffic_filtering=True,id=800d658e-163d-42c9-bb9d-89d72ae4fb5b,network=Network(c68b2e19-6454-4b9b-8f6e-cb2c763cf2e5),plugin='linux_bridge',port_profile=<?>,preserve_on_delete=False,vif_name='tap800d658e-16')
INFO nova.virt.lxd.flavor [req-5f3143bf-21e0-4d37-985f-3d81898b62bc bccab7d86ea9436a81c3345bf2f73fc5 d33bca6fdab744348a44f231da1f81ad - default default] {'environment.product_name': 'OpenStack Nova',
'limits.cpu': '1',
'limits.memory': '2048MB',
'raw.lxc': 'lxc.console.logfile=/var/log/lxd/d33bca6f-lxdb-003372/console.log\n'}
INFO nova.virt.lxd.flavor [req-5f3143bf-21e0-4d37-985f-3d81898b62bc bccab7d86ea9436a81c3345bf2f73fc5 d33bca6fdab744348a44f231da1f81ad - default default] {'ephemeral0': {'path': '/mnt',
'pool': 'default',
'source': u'/var/lib/nova/instances/d33bca6f-lxdb-003372/storage/ephemeral0',
'type': 'disk'},
'root': {'path': '/', 'pool': 'default', 'size': '5GB', 'type': 'disk'},
u'tap800d658e-16': {'hwaddr': 'fa:16:3e:d2:e2:78',
'nictype': 'physical',
'parent': u'tin800d658e-16',
'type': 'nic'}}
INFO nova.virt.lxd.flavor [req-5f3143bf-21e0-4d37-985f-3d81898b62bc bccab7d86ea9436a81c3345bf2f73fc5 d33bca6fdab744348a44f231da1f81ad - default default] {'block_device_mapping': [],
'ephemerals': [{'device_name': u'/dev/sdb',
'num': 0,
'size': 5,
'virtual_name': 'ephemeral0'}],
'root_device_name': u'/dev/sda',
'swap': None}
INFO os_vif [req-5f3143bf-21e0-4d37-985f-3d81898b62bc bccab7d86ea9436a81c3345bf2f73fc5 d33bca6fdab744348a44f231da1f81ad - default default] Successfully unplugged vif VIFBridge(active=False,address=fa:16:3e:d2:e2:78,bridge_name='brqc68b2e19-64',has_traffic_filtering=True,id=800d658e-163d-42c9-bb9d-89d72ae4fb5b,network=Network(c68b2e19-6454-4b9b-8f6e-cb2c763cf2e5),plugin='linux_bridge',port_profile=<?>,preserve_on_delete=False,vif_name='tap800d658e-16')
ERROR root [req-5f3143bf-21e0-4d37-985f-3d81898b62bc bccab7d86ea9436a81c3345bf2f73fc5 d33bca6fdab744348a44f231da1f81ad - default default] Original exception being dropped: ['Traceback (most recent call last):\n', ' File "/usr/lib/python2.7/dist-packages/nova/virt/lxd/driver.py", line 539, in spawn\n self.client, instance, network_info, block_device_info)\n', ' File "/usr/lib/python2.7/dist-packages/nova/virt/lxd/flavor.py", line 236, in to_profile\n return client.profiles.create(name, config, devices)\n', ' File "/usr/lib/python2.7/dist-packages/pylxd/models/profile.py", line 60, in create\n client.api.profiles.post(json=profile)\n', ' File "/usr/lib/python2.7/dist-packages/pylxd/client.py", line 134, in post\n self._assert_response(response, allowed_status_codes=(200, 201, 202))\n', ' File "/usr/lib/python2.7/dist-packages/pylxd/client.py", line 91, in _assert_response\n raise exceptions.LXDAPIException(response)\n', 'LXDAPIException: Storage volumes cannot be specified as absolute paths\n']: ProcessExecutionError: Unexpected error while running command.
ERROR nova.compute.manager [req-5f3143bf-21e0-4d37-985f-3d81898b62bc bccab7d86ea9436a81c3345bf2f73fc5 d33bca6fdab744348a44f231da1f81ad - default default] [instance: a6b37119-e3fd-4538-858a-75a0f8515a8e] Instance failed to spawn: ProcessExecutionError: Unexpected error while running command.
Command: sudo nova-rootwrap /etc/nova/rootwrap.conf zfs destroy default/d33bca6f-lxdb-003372-ephemeral
Exit code: 1
Stdout: u''
Stderr: u"cannot open 'default/d33bca6f-lxdb-003372-ephemeral': dataset does not exist\n"
ERROR nova.compute.manager [instance: a6b37119-e3fd-4538-858a-75a0f8515a8e] Traceback (most recent call last):
ERROR nova.compute.manager [instance: a6b37119-e3fd-4538-858a-75a0f8515a8e] File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 2239, in _build_resources
ERROR nova.compute.manager [instance: a6b37119-e3fd-4538-858a-75a0f8515a8e] yield resources
ERROR nova.compute.manager [instance: a6b37119-e3fd-4538-858a-75a0f8515a8e] File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 2019, in _build_and_run_instance
ERROR nova.compute.manager [instance: a6b37119-e3fd-4538-858a-75a0f8515a8e] block_device_info=block_device_info)
ERROR nova.compute.manager [instance: a6b37119-e3fd-4538-858a-75a0f8515a8e] File "/usr/lib/python2.7/dist-packages/nova/virt/lxd/driver.py", line 543, in spawn
ERROR nova.compute.manager [instance: a6b37119-e3fd-4538-858a-75a0f8515a8e] context, instance, network_info, block_device_info)
ERROR nova.compute.manager [instance: a6b37119-e3fd-4538-858a-75a0f8515a8e] File "/usr/lib/python2.7/dist-packages/nova/virt/lxd/driver.py", line 645, in cleanup
ERROR nova.compute.manager [instance: a6b37119-e3fd-4538-858a-75a0f8515a8e] instance)
ERROR nova.compute.manager [instance: a6b37119-e3fd-4538-858a-75a0f8515a8e] File "/usr/lib/python2.7/dist-packages/nova/virt/lxd/storage.py", line 128, in detach_ephemeral
ERROR nova.compute.manager [instance: a6b37119-e3fd-4538-858a-75a0f8515a8e] run_as_root=True)
ERROR nova.compute.manager [instance: a6b37119-e3fd-4538-858a-75a0f8515a8e] File "/usr/lib/python2.7/dist-packages/nova/utils.py", line 230, in execute
ERROR nova.compute.manager [instance: a6b37119-e3fd-4538-858a-75a0f8515a8e] return RootwrapProcessHelper().execute(*cmd, **kwargs)
ERROR nova.compute.manager [instance: a6b37119-e3fd-4538-858a-75a0f8515a8e] File "/usr/lib/python2.7/dist-packages/nova/utils.py", line 113, in execute
ERROR nova.compute.manager [instance: a6b37119-e3fd-4538-858a-75a0f8515a8e] return processutils.execute(*cmd, **kwargs)
ERROR nova.compute.manager [instance: a6b37119-e3fd-4538-858a-75a0f8515a8e] File "/usr/lib/python2.7/dist-packages/oslo_concurrency/processutils.py", line 424, in execute
ERROR nova.compute.manager [instance: a6b37119-e3fd-4538-858a-75a0f8515a8e] cmd=sanitized_cmd)
ERROR nova.compute.manager [instance: a6b37119-e3fd-4538-858a-75a0f8515a8e] ProcessExecutionError: Unexpected error while running command.
ERROR nova.compute.manager [instance: a6b37119-e3fd-4538-858a-75a0f8515a8e] Command: sudo nova-rootwrap /etc/nova/rootwrap.conf zfs destroy default/d33bca6f-lxdb-003372-ephemeral
ERROR nova.compute.manager [instance: a6b37119-e3fd-4538-858a-75a0f8515a8e] Exit code: 1
ERROR nova.compute.manager [instance: a6b37119-e3fd-4538-858a-75a0f8515a8e] Stdout: u''
ERROR nova.compute.manager [instance: a6b37119-e3fd-4538-858a-75a0f8515a8e] Stderr: u"cannot open 'default/d33bca6f-lxdb-003372-ephemeral': dataset does not exist\n"
ERROR nova.compute.manager [instance: a6b37119-e3fd-4538-858a-75a0f8515a8e]
INFO nova.compute.manager [req-5f3143bf-21e0-4d37-985f-3d81898b62bc bccab7d86ea9436a81c3345bf2f73fc5 d33bca6fdab744348a44f231da1f81ad - default default] [instance: a6b37119-e3fd-4538-858a-75a0f8515a8e] Terminating instance
WARNING nova.virt.lxd.driver [req-5f3143bf-21e0-4d37-985f-3d81898b62bc bccab7d86ea9436a81c3345bf2f73fc5 d33bca6fdab744348a44f231da1f81ad - default default] Failed to delete instance. Container does not exist for d33bca6f-lxdb-003372.: NotFound: not found
INFO os_vif [req-5f3143bf-21e0-4d37-985f-3d81898b62bc bccab7d86ea9436a81c3345bf2f73fc5 d33bca6fdab744348a44f231da1f81ad - default default] Successfully unplugged vif VIFBridge(active=False,address=fa:16:3e:d2:e2:78,bridge_name='brqc68b2e19-64',has_traffic_filtering=True,id=800d658e-163d-42c9-bb9d-89d72ae4fb5b,network=Network(c68b2e19-6454-4b9b-8f6e-cb2c763cf2e5),plugin='linux_bridge',port_profile=<?>,preserve_on_delete=False,vif_name='tap800d658e-16')
WARNING nova.compute.manager [req-5f3143bf-21e0-4d37-985f-3d81898b62bc bccab7d86ea9436a81c3345bf2f73fc5 d33bca6fdab744348a44f231da1f81ad - default default] Could not clean up failed build, not rescheduling. Error: Unexpected error while running command.
Command: sudo nova-rootwrap /etc/nova/rootwrap.conf zfs destroy default/d33bca6f-lxdb-003372-ephemeral
Exit code: 1
Stdout: u''
Stderr: u"cannot open 'default/d33bca6f-lxdb-003372-ephemeral': dataset does not exist\n": ProcessExecutionError: Unexpected error while running command.
ERROR nova.compute.manager [req-5f3143bf-21e0-4d37-985f-3d81898b62bc bccab7d86ea9436a81c3345bf2f73fc5 d33bca6fdab744348a44f231da1f81ad - default default] [instance: a6b37119-e3fd-4538-858a-75a0f8515a8e] Build of instance a6b37119-e3fd-4538-858a-75a0f8515a8e aborted: Unexpected error while running command.
Command: sudo nova-rootwrap /etc/nova/rootwrap.conf zfs destroy default/d33bca6f-lxdb-003372-ephemeral
Exit code: 1
Stdout: u''
Stderr: u"cannot open 'default/d33bca6f-lxdb-003372-ephemeral': dataset does not exist\n": BuildAbortException: Build of instance a6b37119-e3fd-4538-858a-75a0f8515a8e aborted: Unexpected error while running command.
Command: sudo nova-rootwrap /etc/nova/rootwrap.conf zfs destroy default/d33bca6f-lxdb-003372-ephemeral
Exit code: 1
Stdout: u''
Stderr: u"cannot open 'default/d33bca6f-lxdb-003372-ephemeral': dataset does not exist\n"
ERROR nova.compute.manager [instance: a6b37119-e3fd-4538-858a-75a0f8515a8e] Traceback (most recent call last):
ERROR nova.compute.manager [instance: a6b37119-e3fd-4538-858a-75a0f8515a8e] File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 1828, in _do_build_and_run_instance
ERROR nova.compute.manager [instance: a6b37119-e3fd-4538-858a-75a0f8515a8e] filter_properties, request_spec)
ERROR nova.compute.manager [instance: a6b37119-e3fd-4538-858a-75a0f8515a8e] File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 2050, in _build_and_run_instance
ERROR nova.compute.manager [instance: a6b37119-e3fd-4538-858a-75a0f8515a8e] bdms=block_device_mapping)
ERROR nova.compute.manager [instance: a6b37119-e3fd-4538-858a-75a0f8515a8e] File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
ERROR nova.compute.manager [instance: a6b37119-e3fd-4538-858a-75a0f8515a8e] self.force_reraise()
ERROR nova.compute.manager [instance: a6b37119-e3fd-4538-858a-75a0f8515a8e] File "/usr/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
ERROR nova.compute.manager [instance: a6b37119-e3fd-4538-858a-75a0f8515a8e] six.reraise(self.type_, self.value, self.tb)
ERROR nova.compute.manager [instance: a6b37119-e3fd-4538-858a-75a0f8515a8e] File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 2022, in _build_and_run_instance
ERROR nova.compute.manager [instance: a6b37119-e3fd-4538-858a-75a0f8515a8e] instance=instance)
ERROR nova.compute.manager [instance: a6b37119-e3fd-4538-858a-75a0f8515a8e] File "/usr/lib/python2.7/contextlib.py", line 35, in __exit__
ERROR nova.compute.manager [instance: a6b37119-e3fd-4538-858a-75a0f8515a8e] self.gen.throw(type, value, traceback)
ERROR nova.compute.manager [instance: a6b37119-e3fd-4538-858a-75a0f8515a8e] File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 2266, in _build_resources
ERROR nova.compute.manager [instance: a6b37119-e3fd-4538-858a-75a0f8515a8e] reason=six.text_type(exc))
ERROR nova.compute.manager [instance: a6b37119-e3fd-4538-858a-75a0f8515a8e] BuildAbortException: Build of instance a6b37119-e3fd-4538-858a-75a0f8515a8e aborted: Unexpected error while running command.
ERROR nova.compute.manager [instance: a6b37119-e3fd-4538-858a-75a0f8515a8e] Command: sudo nova-rootwrap /etc/nova/rootwrap.conf zfs destroy default/d33bca6f-lxdb-003372-ephemeral
ERROR nova.compute.manager [instance: a6b37119-e3fd-4538-858a-75a0f8515a8e] Exit code: 1
ERROR nova.compute.manager [instance: a6b37119-e3fd-4538-858a-75a0f8515a8e] Stdout: u''
ERROR nova.compute.manager [instance: a6b37119-e3fd-4538-858a-75a0f8515a8e] Stderr: u"cannot open 'default/d33bca6f-lxdb-003372-ephemeral': dataset does not exist\n"
ERROR nova.compute.manager [instance: a6b37119-e3fd-4538-858a-75a0f8515a8e]
INFO nova.compute.manager [req-5f3143bf-21e0-4d37-985f-3d81898b62bc bccab7d86ea9436a81c3345bf2f73fc5 d33bca6fdab744348a44f231da1f81ad - default default] [instance: a6b37119-e3fd-4538-858a-75a0f8515a8e] Took 1.17 seconds to deallocate network for instance.
INFO nova.scheduler.client.report [req-5f3143bf-21e0-4d37-985f-3d81898b62bc bccab7d86ea9436a81c3345bf2f73fc5 d33bca6fdab744348a44f231da1f81ad - default default] Deleted allocation for instance a6b37119-e3fd-4538-858a-75a0f8515a8e
INFO nova.compute.resource_tracker [req-a74980a4-7a0d-4532-9963-933263e061a2 - - - - -] Final resource view: name=db3 phys_ram=193409MB used_ram=1024MB phys_disk=17GB used_disk=5GB total_vcpus=48 used_vcpus=1 pci_stats=[]
Hi Malte
In order to dig into this a bit further, we'll need a bit more information:
Can you add, please:
* the the configuration of your nova.conf please nova/nova- compute. log (from the LXD host) xxxx/lxc. log (if you can find it -- it's usually in /var/log/ lxd/instance- xxx/lxc. log)
* the lxd storage (lxc storage list)
* the command you issued to create the container
* the relevant bit of /var/log/
* The instance-
* How the OpenStack was deployed (charms, Ansible, etc.)