<div dir="ltr"><div dir="ltr">Hi Martin<div><br></div><div>Okay, some progress which is great!</div><div><br></div><div>But, to help you further, a few more details:</div><div><br></div><div><ol><li>Which Linux OS are you using?</li><li>Is the LXD snap installed? - if so, which version is it? "lxc --version" will give the answer.</li><li>Have you configured a storage pool for LXD? (e.g. have you done "sudo lxd init" and created a default storage pool). What kind of storage pool is it? (e.g. dir, btrfs, zfs, etc.)</li><li>It looks like your using master version of nova-lxd (i.e. via devstack and the plugin)? I think it's also going to use ZFS? If so, there's a bug in nova-lxd (that I will fix in the not too distant future) where unless the ZFS pool is the same string as the LXD pool for it, then nova-lxd can't find the storage pool.</li></ol><div>So, if you run the following commands:</div></div><div><br></div><div>lxc storage list<br></div><div>zpool list</div><div><br></div><div>That should show the current configuration.</div><div><br></div><div>Hope that this helps.</div><div>Cheers</div><div>Alex.</div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 19, 2018 at 2:48 PM, Martin Bobák <span dir="ltr"><<a href="mailto:martin.bobak@savba.sk" target="_blank">martin.bobak@savba.sk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<p>Hi Alex,<br>
</p>
<p>first off, thank you for your kind reply. I followed your
advices. However, I still have a problem which looks like an
incorrect setting up of a storage pool for lxd. I configured the
/etc/nova-compute.conf as you suggested, but it didn't help. <br>
</p>
<p>In my case those lines look like:</p>
<p>[DEFAULT]<br>
compute_driver = nova_lxd.nova.virt.lxd.<wbr>LXDDriver</p>
<p>[lxd]<br>
allow_live_migration = True<br>
pool = lxd<br>
</p>
But the error is following (relevant parts from syslog --> it
looks like lxd variables from the /etc/nova-compute.conf aren't
delivered to the driver, or recognized by it, I tried to use
different names for compute_driver e.g. lxd.LXDDriver,
nova-lxd.nova.virt.lxd.(<wbr>driver).LXDDriver -> however, it didn't
help):<br>
<br>
Sep 19 09:15:08 localhost nova-conductor[1956]: #033[00;32mDEBUG
oslo_service.service [#033[01;36mNone
req-5cda2246-8087-4f49-b9b3-<wbr>463d29fd7bf8 #033[00;36mNone
None#033[00;32m]
#033[01;35m#033[00;32mcompute_<wbr>driver =
nova_lxd.nova.virt.lxd.<wbr>LXDDriver#033[00m #033[00;33m{{(pid=1956)
log_opt_values
/usr/local/lib/python2.7/dist-<wbr>packages/oslo_config/cfg.py:<wbr>2890}}#033[00m<br>
Sep 19 09:15:08 localhost nova-consoleauth[1984]: #033[00;32mDEBUG
oslo_service.service [#033[01;36mNone
req-2a9399e1-996d-42f4-899b-<wbr>62db8d8e5afd #033[00;36mNone
None#033[00;32m]
#033[01;35m#033[00;32mcompute_<wbr>driver =
nova_lxd.nova.virt.lxd.<wbr>LXDDriver#033[00m #033[00;33m{{(pid=1984)
log_opt_values
/usr/local/lib/python2.7/dist-<wbr>packages/oslo_config/cfg.py:<wbr>2890}}#033[00m<br>
Sep 19 09:15:10 localhost nova-scheduler[2000]: #033[00;32mDEBUG
oslo_service.service [#033[01;36mNone
req-3d23848b-270b-4718-91dd-<wbr>3b0417d27d21 #033[00;36mNone
None#033[00;32m]
#033[01;35m#033[00;32mcompute_<wbr>driver =
nova_lxd.nova.virt.lxd.<wbr>LXDDriver#033[00m #033[00;33m{{(pid=2000)
log_opt_values
/usr/local/lib/python2.7/dist-<wbr>packages/oslo_config/cfg.py:<wbr>2890}}#033[00m<br>
Sep 19 09:15:11 localhost <a class="m_61946375237961504moz-txt-link-abbreviated" href="mailto:devstack@placement-api.service" target="_blank">devstack@placement-api.service</a><wbr>[2030]:
#033[00;32mDEBUG nova.api.openstack.placement.<wbr>wsgi
[#033[00;36m-#033[00;32m]
#033[01;35m#033[00;32mcompute_<wbr>driver =
nova_lxd.nova.virt.lxd.<wbr>LXDDriver#033[00m #033[00;33m{{(pid=2294)
log_opt_values
/usr/local/lib/python2.7/dist-<wbr>packages/oslo_config/cfg.py:<wbr>2890}}#033[00m<br>
Sep 19 09:15:12 localhost <a class="m_61946375237961504moz-txt-link-abbreviated" href="mailto:devstack@n-api.service" target="_blank">devstack@n-api.service</a>[1999]:
#033[00;32mDEBUG nova.api.openstack.wsgi_app [#033[01;36mNone
req-1e20e359-2bcc-44e6-9c75-<wbr>7422c5837c03 #033[00;36mNone
None#033[00;32m]
#033[01;35m#033[00;32mcompute_<wbr>driver =
nova_lxd.nova.virt.lxd.<wbr>LXDDriver#033[00m #033[00;33m{{(pid=2181)
log_opt_values
/usr/local/lib/python2.7/dist-<wbr>packages/oslo_config/cfg.py:<wbr>2890}}#033[00m<br>
Sep 19 09:15:14 localhost <a class="m_61946375237961504moz-txt-link-abbreviated" href="mailto:devstack@placement-api.service" target="_blank">devstack@placement-api.service</a><wbr>[2030]:
#033[00;32mDEBUG nova.api.openstack.placement.<wbr>wsgi
[#033[00;36m-#033[00;32m]
#033[01;35m#033[00;32mcompute_<wbr>driver =
nova_lxd.nova.virt.lxd.<wbr>LXDDriver#033[00m #033[00;33m{{(pid=2292)
log_opt_values
/usr/local/lib/python2.7/dist-<wbr>packages/oslo_config/cfg.py:<wbr>2890}}#033[00m<br>
Sep 19 09:15:15 localhost <a class="m_61946375237961504moz-txt-link-abbreviated" href="mailto:devstack@n-api.service" target="_blank">devstack@n-api.service</a>[1999]:
#033[00;32mDEBUG nova.api.openstack.wsgi_app [#033[01;36mNone
req-6d5745e7-3784-4b8e-8210-<wbr>e7bf74fd9655 #033[00;36mNone
None#033[00;32m]
#033[01;35m#033[00;32mcompute_<wbr>driver =
nova_lxd.nova.virt.lxd.<wbr>LXDDriver#033[00m #033[00;33m{{(pid=2182)
log_opt_values
/usr/local/lib/python2.7/dist-<wbr>packages/oslo_config/cfg.py:<wbr>2890}}#033[00m<br>
Sep 19 09:15:20 localhost nova-compute[1968]: #033[00;32mDEBUG
oslo_service.service [#033[01;36mNone
req-1bc67100-ffbe-4d22-be1f-<wbr>42133eb60611 #033[00;36mNone
None#033[00;32m]
#033[01;35m#033[00;32mcompute_<wbr>driver =
lxd.LXDDriver#033[00m #033[00;33m{{(pid=1968) log_opt_values
/usr/local/lib/python2.7/dist-<wbr>packages/oslo_config/cfg.py:<wbr>2890}}#033[00m<br>
ep 19 09:15:20 localhost nova-compute[1968]: #033[00;32mDEBUG
oslo_service.service [#033[01;36mNone
req-1bc67100-ffbe-4d22-be1f-<wbr>42133eb60611 #033[00;36mNone
None#033[00;32m]
#033[01;35m#033[00;32mlxd.<wbr>allow_live_migration = False#033[00m
#033[00;33m{{(pid=1968) log_opt_values
/usr/local/lib/python2.7/dist-<wbr>packages/oslo_config/cfg.py:<wbr>2898}}#033[00m<br>
Sep 19 09:15:20 localhost nova-compute[1968]: #033[00;32mDEBUG
oslo_service.service [#033[01;36mNone
req-1bc67100-ffbe-4d22-be1f-<wbr>42133eb60611 #033[00;36mNone
None#033[00;32m]
#033[01;35m#033[00;32mlxd.<wbr>pool = None#033[00m
#033[00;33m{{(pid=1968) log_opt_values
/usr/local/lib/python2.7/dist-<wbr>packages/oslo_config/cfg.py:<wbr>2898}}#033[00m<br>
Sep 19 09:15:20 localhost nova-compute[1968]: #033[00;32mDEBUG
oslo_service.service [#033[01;36mNone
req-1bc67100-ffbe-4d22-be1f-<wbr>42133eb60611 #033[00;36mNone
None#033[00;32m]
#033[01;35m#033[00;32mlxd.<wbr>root_dir =
/var/lib/lxd/#033[00m #033[00;33m{{(pid=1968) log_opt_values
/usr/local/lib/python2.7/dist-<wbr>packages/oslo_config/cfg.py:<wbr>2898}}#033[00m<br>
Sep 19 09:15:20 localhost nova-compute[1968]: #033[00;32mDEBUG
oslo_service.service [#033[01;36mNone
req-1bc67100-ffbe-4d22-be1f-<wbr>42133eb60611 #033[00;36mNone
None#033[00;32m]
#033[01;35m#033[00;32mlxd.<wbr>timeout = -1#033[00m
#033[00;33m{{(pid=1968) log_opt_values
/usr/local/lib/python2.7/dist-<wbr>packages/oslo_config/cfg.py:<wbr>2898}}#033[00m<br>
.........<br>
.........<br>
Sep 19 09:15:21 localhost nova-compute[1968]: #033[00;32mDEBUG
oslo_concurrency.processutils [#033[01;36mNone
req-87a543da-84db-4fe1-a743-<wbr>75ca6525ac2a #033[00;36mNone
None#033[00;32m] #033[01;35m#033[00;32mu'sudo nova-rootwrap
/etc/nova/rootwrap.conf zpool list -o size -H None' failed. Not
Retrying.#033[00m #033[00;33m{{(pid=1968) execute
/usr/local/lib/python2.7/dist-<wbr>packages/oslo_concurrency/<wbr>processutils.py:457}}#033[00m<br>
Sep 19 09:15:21 localhost nova-compute[1968]: #033[01;31mERROR
nova.compute.manager [#033[01;36mNone
req-87a543da-84db-4fe1-a743-<wbr>75ca6525ac2a #033[00;36mNone
None#033[01;31m] #033[01;35m#033[01;31mError updating resources for
node ubuntu.#033[00m: ProcessExecutionError: Unexpected error while
running command.<br>
Sep 19 09:15:21 localhost nova-compute[1968]: Command: sudo
nova-rootwrap /etc/nova/rootwrap.conf zpool list -o size -H None<br>
Sep 19 09:15:21 localhost nova-compute[1968]: Exit code: 1<br>
Sep 19 09:15:21 localhost nova-compute[1968]: Stdout: u''<br>
Sep 19 09:15:21 localhost nova-compute[1968]: Stderr: u"cannot open
'None': no such pool\n"<br>
Sep 19 09:15:21 localhost nova-compute[1968]: ERROR
nova.compute.manager #033[01;35m#033[00mTraceback (most recent call
last):<br>
Sep 19 09:15:21 localhost nova-compute[1968]: ERROR
nova.compute.manager #033[01;35m#033[00m File
"/opt/stack/nova/nova/compute/<wbr>manager.py", line 7344, in
update_available_resource_for_<wbr>node<br>
Sep 19 09:15:21 localhost nova-compute[1968]: ERROR
nova.compute.manager #033[01;35m#033[00m
rt.update_available_resource(<wbr>context, nodename)<br>
Sep 19 09:15:21 localhost nova-compute[1968]: ERROR
nova.compute.manager #033[01;35m#033[00m File
"/opt/stack/nova/nova/compute/<wbr>resource_tracker.py", line 673, in
update_available_resource<br>
Sep 19 09:15:21 localhost nova-compute[1968]: ERROR
nova.compute.manager #033[01;35m#033[00m resources =
self.driver.get_available_<wbr>resource(nodename)<br>
Sep 19 09:15:21 localhost nova-compute[1968]: ERROR
nova.compute.manager #033[01;35m#033[00m File
"/opt/stack/nova-lxd/nova/<wbr>virt/lxd/driver.py", line 1031, in
get_available_resource<br>
Sep 19 09:15:21 localhost nova-compute[1968]: ERROR
nova.compute.manager #033[01;35m#033[00m local_disk_info =
_get_zpool_info(pool_name)<br>
Sep 19 09:15:21 localhost nova-compute[1968]: ERROR
nova.compute.manager #033[01;35m#033[00m File
"/opt/stack/nova-lxd/nova/<wbr>virt/lxd/driver.py", line 209, in
_get_zpool_info<br>
Sep 19 09:15:21 localhost nova-compute[1968]: ERROR
nova.compute.manager #033[01;35m#033[00m total =
_get_zpool_attribute('size')<br>
Sep 19 09:15:21 localhost nova-compute[1968]: ERROR
nova.compute.manager #033[01;35m#033[00m File
"/opt/stack/nova-lxd/nova/<wbr>virt/lxd/driver.py", line 201, in
_get_zpool_attribute<br>
Sep 19 09:15:21 localhost nova-compute[1968]: ERROR
nova.compute.manager #033[01;35m#033[00m run_as_root=True)<br>
Sep 19 09:15:21 localhost nova-compute[1968]: ERROR
nova.compute.manager #033[01;35m#033[00m File
"/opt/stack/nova/nova/utils.<wbr>py", line 230, in execute<br>
Sep 19 09:15:21 localhost nova-compute[1968]: ERROR
nova.compute.manager #033[01;35m#033[00m return
RootwrapProcessHelper().<wbr>execute(*cmd, **kwargs)<br>
Sep 19 09:15:21 localhost nova-compute[1968]: ERROR
nova.compute.manager #033[01;35m#033[00m File
"/opt/stack/nova/nova/utils.<wbr>py", line 113, in execute<br>
Sep 19 09:15:21 localhost nova-compute[1968]: ERROR
nova.compute.manager #033[01;35m#033[00m return
processutils.execute(*cmd, **kwargs)<br>
Sep 19 09:15:21 localhost nova-compute[1968]: ERROR
nova.compute.manager #033[01;35m#033[00m File
"/usr/local/lib/python2.7/<wbr>dist-packages/oslo_<wbr>concurrency/processutils.py",
line 424, in execute<br>
Sep 19 09:15:21 localhost nova-compute[1968]: ERROR
nova.compute.manager #033[01;35m#033[00m cmd=sanitized_cmd)<br>
Sep 19 09:15:21 localhost nova-compute[1968]: ERROR
nova.compute.manager #033[01;35m#033[<wbr>00mProcessExecutionError:
Unexpected error while running command.<br>
Sep 19 09:15:21 localhost nova-compute[1968]: ERROR
nova.compute.manager #033[01;35m#033[00mCommand: sudo nova-rootwrap
/etc/nova/rootwrap.conf zpool list -o size -H None<br>
Sep 19 09:15:21 localhost nova-compute[1968]: ERROR
nova.compute.manager #033[01;35m#033[00mExit code: 1<br>
Sep 19 09:15:21 localhost nova-compute[1968]: ERROR
nova.compute.manager #033[01;35m#033[00mStdout: u''<br>
Sep 19 09:15:21 localhost nova-compute[1968]: ERROR
nova.compute.manager #033[01;35m#033[00mStderr: u"cannot open
'None': no such pool\n"<br>
Sep 19 09:15:21 localhost nova-compute[1968]: ERROR
nova.compute.manager #033[01;35m#033[00m<br>
<br>
The local.conf used by devstack is looks like:<br>
<br>
[[local|localrc]]<br>
##############################<wbr>##############################<br>
# Customize the following HOST_IP based on your installation<br>
##############################<wbr>##############################<br>
HOST_IP=127.0.0.1<br>
<br>
ADMIN_PASSWORD=devstack<br>
MYSQL_PASSWORD=devstack<br>
RABBIT_PASSWORD=devstack<br>
SERVICE_PASSWORD=$ADMIN_<wbr>PASSWORD<br>
SERVICE_TOKEN=devstack<br>
<br>
# run the services you want to use<br>
ENABLED_SERVICES=rabbit,mysql,<wbr>key<br>
ENABLED_SERVICES+=,g-api,g-reg<br>
ENABLED_SERVICES+=,n-cpu,n-<wbr>api,n-crt,n-obj,n-cond,n-sch,<wbr>n-novnc,n-cauth,placement-api,<wbr>placement-client<br>
ENABLED_SERVICES+=,neutron,q-<wbr>svc,q-agt,q-dhcp,q-meta,q-l3<br>
ENABLED_SERVICES+=,cinder,c-<wbr>sch,c-api,c-vol<br>
ENABLED_SERVICES+=,horizon<br>
<br>
# disabled services<br>
disable_service n-net<br>
<br>
# enable nova-lxd<br>
enable_plugin nova-lxd <a class="m_61946375237961504moz-txt-link-freetext" href="https://git.openstack.org/openstack/nova-lxd" target="_blank">https://git.openstack.org/<wbr>openstack/nova-lxd</a>
stable/queens<br>
<br>
Best regards,<br>
Martin.<div><div class="h5"><br>
<br>
<div class="m_61946375237961504moz-cite-prefix">On 17.09.2018 15:29, Alex Kavanagh
wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">Hi Martin
<div class="gmail_extra"><br>
<div class="gmail_quote">On Sun, Sep 16, 2018 at 8:46
PM, Martin Bobák <span dir="ltr"><<a href="mailto:martin.bobak@savba.sk" target="_blank">martin.bobak@savba.sk</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi all,<br>
<br>
what is the recommended way of nova-lxd plugin
installation on a fresh xenial host running a pure
OpenStack devstack (Queens) installation? I have
tried to install the nova-lxd plugin by pip
install, or allowing it during OpenStack devstack
installation, but each attempt lead to the same
result. The plugin is either not recognized or the
installation doesn't finish successfully. I went
through the nova-lxd homepage as well as its
github repo, but I wasn't able to solve the whole
installation problem (e.g. I found out that the
installation of the newest version of pylxd helps
with installation of the plugin, however, the
plugin isn't still recognized. So additional
configuration is needed...).<br>
<br>
Do you have any thoughts about it?<br>
</blockquote>
<div><br>
</div>
<div>I'm one of the maintainers for nova-lxd, so
hopefully can get you up and running.</div>
<div><br>
</div>
<div>In order for nova-lxd to be configured in nova,
the /etc/nova-compute.conf needs to contain the
lines:</div>
<div><br>
</div>
<div>[DEFAULT]</div>
<div>compute_driver = nova_lxd.nova.virt.lxd.LXDDriv<wbr>er</div>
<div><br>
</div>
<div>This little 'fact' is hidden away in the
"nova-compute-lxd" debian package, unfortunately.</div>
<div><br>
</div>
<div>You'll also need to configure an [lxd] section
in nova.conf to control the storage pool in LXD
for containers to use when launching instances.</div>
<div><br>
</div>
<div>
<div>[lxd]<br>
</div>
<div>allow_live_migration = True<br>
</div>
<div>pool = {{ storage_pool }}<br>
</div>
<div><br>
</div>
</div>
<div>The storage pool will need to be set up
separately in lxd.</div>
<div>--</div>
<div><br>
</div>
<div>However, an 'easy' way to test OpenStack with
nova-lxd, is to use charms. We have a number of
bundles that work with Juju. For example we have
a deployable bundle for xenial and queens at <a href="https://github.com/openstack-charmers/openstack-bundles/tree/master/development/openstack-lxd-xenial-queens" target="_blank">https://github.com/openstac<wbr>k-charmers/openstack-bundles/<wbr>tree/master/development/<wbr>openstack-lxd-xenial-queens</a>
which also has some (hopefully) useful
instructions on how to get it going.</div>
<div><br>
</div>
<div>Note the instructions say you have to use MaaS,
but you should be able to adjust using it to the
hardware you are using.</div>
<div><br>
</div>
<div>As an alternative, the openstack-ansible
project also supports nova-lxd, but I don't have
any experience with that.</div>
<div><br>
</div>
<div>Do come back if you have any further questions;
do let me know how you get on.</div>
<div><br>
</div>
<div>Best regards</div>
<div>Alex.</div>
<div><br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Best,<br>
Martin.<br>
<br>
-- <br>
Martin Bobák, PhD.<br>
Researcher<br>
Institute of Informatics<br>
Slovak Academy of Sciences<br>
<a href="https://maps.google.com/?q=Dubravska+cesta+9&entry=gmail&source=g" target="_blank">Dubravska
cesta 9</a>, SK-845 07 Bratislava, Slovakia<br>
Room: 311, Phone: +421 (0)2 5941-1278<br>
E-mail: <a href="mailto:martin.bobak@savba.sk" target="_blank">martin.bobak@savba.sk</a><br>
URL: <a href="http://www.ui.sav.sk/w/odd/pdip/" rel="noreferrer" target="_blank">http://www.ui.sav.sk/w/odd/pdi<wbr>p/</a><br>
LinkedIn: <a href="https://www.linkedin.com/in/martin-bobak/" rel="noreferrer" target="_blank">https://www.linkedin.com/in/ma<wbr>rtin-bobak/</a><br>
<br>
______________________________<wbr>_________________<br>
lxc-users mailing list<br>
<a href="mailto:lxc-users@lists.linuxcontainers.org" target="_blank">lxc-users@lists.linuxcontainer<wbr>s.org</a><br>
<a href="http://lists.linuxcontainers.org/listinfo/lxc-users" rel="noreferrer" target="_blank">http://lists.linuxcontainers.o<wbr>rg/listinfo/lxc-users</a></blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
<div class="m_61946375237961504m_-3941120165608011932gmail_signature">
<div dir="ltr">Alex Kavanagh - Software Engineer
<div>Cloud Dev Ops - Solutions & Product
Engineering - Canonical Ltd</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
<fieldset class="m_61946375237961504mimeAttachmentHeader"></fieldset>
<br>
<pre>______________________________<wbr>_________________
lxc-users mailing list
<a class="m_61946375237961504moz-txt-link-abbreviated" href="mailto:lxc-users@lists.linuxcontainers.org" target="_blank">lxc-users@lists.<wbr>linuxcontainers.org</a>
<a class="m_61946375237961504moz-txt-link-freetext" href="http://lists.linuxcontainers.org/listinfo/lxc-users" target="_blank">http://lists.linuxcontainers.<wbr>org/listinfo/lxc-users</a></pre>
</blockquote>
</div></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Alex Kavanagh - Software Engineer<div>Cloud Dev Ops - Solutions & Product Engineering - Canonical Ltd</div></div></div>
</div>