LXD version compatibility for LXDoNe

Hello,

Would anybody know if the LXDoNe add-on would work well LXD 3.x ?

When following LXDoNe’s configuration guide LXD 2.0.11 gets installed, but I’d like to give LXD 3.x a try instead.

Thanks,

Alex

Hey, I’m the dev. Haven’t tested it yet, but according to the changes I’ve seen in the development, there should be no problem. Anyway, if you succeed, or fail, provide feedback please.

Hi,

That seams promising…!
Thanks. I’ll give it a try an see how it goes. (And come back with some feedback…)

Regards,

Alex

Hello Daniel,

My first try with LXD 3.0.1 was not successful (whereas LXD 2.0.11 worked).

While installing it, I followed the “Installation & Configuration Guide” as I did for LXD 2.0.11, except for these steps:

  • LXD installation: apt install -t xenial-backports lxd lxd-client lxd-tools python-pylxd/xenial-updates criu bridge-utils python-ws4py
  • LXD init: I run “lxd init” interactively. But I did set “network-address”, “network-port” and “trust-password” as per the “Installation & Configuration Guide” and also created the “lxdbr0” bridge. But instead of “dir” I used “zfs” as storage backend (I had already created a zpool prior to that).

Here OpenNebula’s container creation log:

Thu Jul 19 15:29:51 2018 [Z0][VM][I]: New state is ACTIVE
Thu Jul 19 15:29:51 2018 [Z0][VM][I]: New LCM state is PROLOG
Thu Jul 19 15:29:57 2018 [Z0][VM][I]: New LCM state is BOOT
Thu Jul 19 15:29:57 2018 [Z0][VMM][I]: Generating deployment file: /var/lib/one/vms/507/deployment.0
Thu Jul 19 15:29:58 2018 [Z0][VMM][I]: Successfully execute transfer manager driver operation: tm_context.
Thu Jul 19 15:29:59 2018 [Z0][VMM][I]: ExitCode: 0
Thu Jul 19 15:29:59 2018 [Z0][VMM][I]: Successfully execute network driver operation: pre.
Thu Jul 19 15:29:59 2018 [Z0][VMM][I]: Command execution fail: cat << EOT | /var/tmp/one/vmm/lxd/deploy ‘/var/lib/one//datastores/0/507/deployment.0’ ‘TLSUnixtst002’ 507 TLSUnixtst002
Thu Jul 19 15:29:59 2018 [Z0][VMM][I]: deploy.py: ########################################
Thu Jul 19 15:29:59 2018 [Z0][VMM][I]: Traceback (most recent call last):
Thu Jul 19 15:29:59 2018 [Z0][VMM][I]: File “/var/tmp/one/vmm/lxd/deploy.py”, line 133, in
Thu Jul 19 15:29:59 2018 [Z0][VMM][I]: container = client.containers.create(init, wait=True)
Thu Jul 19 15:29:59 2018 [Z0][VMM][I]: File “/usr/lib/python2.7/dist-packages/pylxd/container.py”, line 118, in create
Thu Jul 19 15:29:59 2018 [Z0][VMM][I]: Operation.wait_for_operation(client, response.json()[‘operation’])
Thu Jul 19 15:29:59 2018 [Z0][VMM][I]: File “/usr/lib/python2.7/dist-packages/pylxd/operation.py”, line 28, in wait_for_operation
Thu Jul 19 15:29:59 2018 [Z0][VMM][I]: operation = cls.get(client, operation_id)
Thu Jul 19 15:29:59 2018 [Z0][VMM][I]: File “/usr/lib/python2.7/dist-packages/pylxd/operation.py”, line 38, in get
Thu Jul 19 15:29:59 2018 [Z0][VMM][I]: return cls(_client=client, **response.json()[‘metadata’])
Thu Jul 19 15:29:59 2018 [Z0][VMM][I]: File “/usr/lib/python2.7/dist-packages/pylxd/operation.py”, line 43, in init
Thu Jul 19 15:29:59 2018 [Z0][VMM][I]: setattr(self, key, value)
Thu Jul 19 15:29:59 2018 [Z0][VMM][I]: AttributeError: ‘Operation’ object has no attribute ‘description’
Thu Jul 19 15:29:59 2018 [Z0][VMM][I]: ExitCode: 1
Thu Jul 19 15:29:59 2018 [Z0][VMM][I]: Failed to execute virtualization driver operation: deploy.
Thu Jul 19 15:29:59 2018 [Z0][VMM][E]: Error deploying virtual machine
Thu Jul 19 15:29:59 2018 [Z0][VM][I]: New LCM state is BOOT_FAILURE

This is OpenNebula 5.4.6 on Ubuntu 16.04, by the way.

And this is how Ubuntu is seeing LXD versions:
root@ubt002:/# dpkg --list | grep lxd
ii lxd 3.0.1-0ubuntu1~16.04.3 amd64 Container hypervisor based on LXC - daemon
ii lxd-client 3.0.1-0ubuntu1~16.04.3 amd64 Container hypervisor based on LXC - client
ii lxd-tools 3.0.1-0ubuntu1~16.04.3 amd64 Container hypervisor based on LXC - extra tools
ii python-pylxd 2.0.5-0ubuntu1.2 all Python library for interacting with LXD REST API
root@ubt002:/#

Let me know if I can provide you any helpful information.
The reason I’m testing LXD 3 is so our environment/setup does not gets born on an older version of LXD…

Regards,

Alex

Hi
I myself faced such a problem. Perhaps your solution is here.

https://github.com/OpenNebula/addon-lxdone/issues/21

http://marketplace.opennebula.systems/appliance/7dd50db7-33c4-4b39-940c-f6a55432622f

Hello AlexW

The logs errors point to the pylxd API client behaviour. LXDoNe manages lxd2 through pylxd 2.0.5, which is available in the xenial-updates repo. It is possbile that if you are trying lxd3 it won’t be compatible with that API version, so, maybe you have to try the bionic-updates pylxd version.

Hi Alexandr,

Thanks, but the image I have is working fine. Before trying LXD 3 I was able to deploy it on LXD 2…

Regards,

Alex

Hello Daniel,

Thanks a lot, I’ll take a look at that.
But for this specific test, I’ll revert to LXD 2, as I don’t want to “fight” two different battles at the same time: having LXD 3 working + configure OpenNebula/LXD/NAT/Azure…

Would you have an idea how could I install (or where could I download) LXD > 2.0.11? (" apt install -t xenial-backports" only gives me LXD 3.0…)

Regards,

Alex

xenial-updates should have lxd2, whereas bionic-updates should have lxd3, that is backported to xenial-backports. And LXD 3.0 > LXD 2.0.11 :slight_smile:

One battle at a time indeed

Ok, ok…: LXD 3.0 > LXD 2.0.11 :slight_smile:
But, based on other documents I’ve seen, I was under the impression that there is something like LXD 2.x, where “x” is not “0”…
(As you can see, I’m still learning it, but I’m quite sure I’ve seen)

Alex

Yes, those are the monthly releases, they can be quite unstable, sometimes, and I’m not sure how long are they supported. I wouldn’t recommend those. If you want to try them, I think LXD has a ppa, not sure at all, just try to match the LXD version with the corresponding pylxd version.

OK, I’ll play safe and stick to 2.0.11 for my OpenNebula/Azure/LXD tests.

Thanks a lot, Daniel

Alex

Good Luck !!