Trouble with LXD Clusters in MAAS

Trouble with Setting Up LXD Clusters in MAAS

Hello! I have been working with maas to try and setup a LXD cluster.

Setup

  • Maas Controller:
    Dell Optiplex (nothing special, just an extra computer that I had around.)
    The MAAS controller is setup as the DHCP server for the network. I just have one fabric with a 10.113.1.0/24 subnet for no particular reason. Setup is mainly proof-of-concept for now.
  • MAAS clients:
    3x Dell PowerEdge T630’s with Intel 10GB network cards and IPMI.

Versions

  • Maas Controller:
$ snap list | grep maas
maas                       3.2.0~beta6-11974-g.58f181df4  21449  3.2/beta         canonical**  -
maas-cli                   0.6.5                          13     latest/stable    canonical**  -
maas-test-db               12.4-22-g.aed1dfe              91     3.1/stable       canonical**  -

(This was also tested with 3.1/stable with the same results.)

  • The Dell PowerEdge servers are deployed with MAAS with the Ubuntu 22.04 LTS cloud image.
$ cat /etc/os-release 
PRETTY_NAME="Ubuntu 22.04 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy

$ snap list | grep lxd
lxd     5.2-79c3c3b  23155  latest/stable  canonical**  -

What I have tried

I have tried following the following articles:

  • h ttps://maas.io/docs/whats-new-in-maas#heading–lxd-clusters
  • htt ps://maas.io/docs/how-to-use-lxd

I am able to get the LXD cluster going using lxd init on the first Dell PowerEdge server and following the prompts. I then add the other two PowerEdge’s using lxd init again and copy/pasting their join tokens. However, when I add the LXD host from the maas KVM page, it just shows up as a single cluster.

Related Info

MAAS Dashboard:

$ maas admin machines read | jq 'insert jq magic here'
HOSTNAME      SYSID   POWER    STATUS    OWNER  TAGS             POOL     VLAN      FABRIC    SUBNET
--------      -----   -----    ------    -----  ----             ----     ----      ------    ------
fun-shad      ncw7a4  on       Deployed  ben    metal            default  untagged  fabric-1  
moral-dassie  krrkfk  on       Deployed  ben    metal            default  untagged  fabric-1  
new-drum      p68mcg  on       Deployed  ben    metal            default  untagged  fabric-1  

LXD Cluster:

root@fun-shad:~# lxc cluster list
+--------------+--------------------------+-----------------+--------------+----------------+-------------+--------+-------------------+
|     NAME     |           URL            |      ROLES      | ARCHITECTURE | FAILURE DOMAIN | DESCRIPTION | STATE  |      MESSAGE      |
+--------------+--------------------------+-----------------+--------------+----------------+-------------+--------+-------------------+
| fun-shad     | https://10.113.1.73:8443 | database-leader | x86_64       | default        |             | ONLINE | Fully operational |
|              |                          | database        |              |                |             |        |                   |
+--------------+--------------------------+-----------------+--------------+----------------+-------------+--------+-------------------+
| moral-dassie | https://10.113.1.74:8443 | database        | x86_64       | default        |             | ONLINE | Fully operational |
+--------------+--------------------------+-----------------+--------------+----------------+-------------+--------+-------------------+
| new-drum     | https://10.113.1.72:8443 | database        | x86_64       | default        |             | ONLINE | Fully operational |
+--------------+--------------------------+-----------------+--------------+----------------+-------------+--------+-------------------+

Images:

Thanks in advance to anyone who helps!

it shows up as a single cluster because that’s what you created. are you confusing VMs with clusters? can you explain more what you’re trying to accomplish?

Hello Bill,

First off, thanks for replying. I would like to deploy a LXD cluster using bare metal I have deployed through MAAS. Hostnames fun-shad, moral-dassie, and new-drum are all bare metal servers I have provisioned with MAAS. On each of the bare metal host, I have run lxd init and gone through the prompt to setup lxd clustering. That portion works just fine. However, when I go back to maas and try adding the lxd cluster, that’s were I have the issue. I add the lxd cluster leader and it only shows that is just a single node instead of being a part of a cluster.

So I guess to answer your question, I’m trying to deploy a LXD cluster fully managed with MAAS. Hopefully that makes sense. Due to limitation of this forum, I could only post two images and two links so I couldn’t share more pictures to explain the problem.

first, have you tried maas $PROFILE vmhosts read? tell me what you see if you try that.

$ maas $profile vm-hosts read
Success.
Machine-readable output follows:
[
    {
        "host": {
            "system_id": "xyeckb",
            "__incomplete__": true
        },
        "architectures": [],
        "zone": {
            "name": "default",
            "description": "",
            "id": 1,
            "resource_uri": "/MAAS/api/2.0/zones/default/"
        },
        "storage_pools": [],
        "capabilities": [],
        "id": 6,
        "version": "",
        "total": {
            "cores": 0,
            "memory": 0,
            "local_storage": 0
        },
        "available": {
            "cores": 0,
            "memory": 0,
            "local_storage": 0
        },
        "cpu_over_commit_ratio": 1.0,
        "memory_over_commit_ratio": 1.0,
        "default_macvlan_mode": null,
        "tags": [
            "pod-console-logging"
        ],
        "name": "flying-adder-cluster",
        "type": "lxd",
        "used": {
            "cores": 0,
            "memory": 0,
            "local_storage": 0
        },
        "pool": {
            "name": "default",
            "description": "Default pool",
            "id": 0,
            "resource_uri": "/MAAS/api/2.0/resourcepool/0/"
        },
        "resource_uri": "/MAAS/api/2.0/vm-hosts/6/"
    }
]

I tried added each host individually to see if it would detect that the host were configured as a cluster, but that didn’t seem to work either. It was able to add the host, but they each show up by themselves.

$ maas $profile vm-hosts read
Success.
Machine-readable output follows:
[
    {
        "host": {
            "system_id": "xyeckb",
            "__incomplete__": true
        },
        "architectures": [],
        "zone": {
            "name": "default",
            "description": "",
            "id": 1,
            "resource_uri": "/MAAS/api/2.0/zones/default/"
        },
        "storage_pools": [],
        "capabilities": [],
        "id": 6,
        "version": "",
        "total": {
            "cores": 0,
            "memory": 0,
            "local_storage": 0
        },
        "available": {
            "cores": 0,
            "memory": 0,
            "local_storage": 0
        },
        "cpu_over_commit_ratio": 1.0,
        "memory_over_commit_ratio": 1.0,
        "default_macvlan_mode": null,
        "tags": [
            "pod-console-logging"
        ],
        "name": "flying-adder-cluster",
        "type": "lxd",
        "used": {
            "cores": 0,
            "memory": 0,
            "local_storage": 0
        },
        "pool": {
            "name": "default",
            "description": "Default pool",
            "id": 0,
            "resource_uri": "/MAAS/api/2.0/resourcepool/0/"
        },
        "resource_uri": "/MAAS/api/2.0/vm-hosts/6/"
    },
    {
        "host": {
            "system_id": "yyyd3n",
            "__incomplete__": true
        },
        "architectures": [],
        "zone": {
            "name": "default",
            "description": "",
            "id": 1,
            "resource_uri": "/MAAS/api/2.0/zones/default/"
        },
        "storage_pools": [],
        "capabilities": [],
        "id": 7,
        "version": "",
        "total": {
            "cores": 0,
            "memory": 0,
            "local_storage": 0
        },
        "available": {
            "cores": 0,
            "memory": 0,
            "local_storage": 0
        },
        "cpu_over_commit_ratio": 1.0,
        "memory_over_commit_ratio": 1.0,
        "default_macvlan_mode": null,
        "tags": [
            "pod-console-logging"
        ],
        "name": "equal-kiwi",
        "type": "lxd",
        "used": {
            "cores": 0,
            "memory": 0,
            "local_storage": 0
        },
        "pool": {
            "name": "default",
            "description": "Default pool",
            "id": 0,
            "resource_uri": "/MAAS/api/2.0/resourcepool/0/"
        },
        "resource_uri": "/MAAS/api/2.0/vm-hosts/7/"
    },
    {
        "host": {
            "system_id": "gyepxp",
            "__incomplete__": true
        },
        "architectures": [],
        "zone": {
            "name": "default",
            "description": "",
            "id": 1,
            "resource_uri": "/MAAS/api/2.0/zones/default/"
        },
        "storage_pools": [],
        "capabilities": [],
        "id": 8,
        "version": "",
        "total": {
            "cores": 0,
            "memory": 0,
            "local_storage": 0
        },
        "available": {
            "cores": 0,
            "memory": 0,
            "local_storage": 0
        },
        "cpu_over_commit_ratio": 1.0,
        "memory_over_commit_ratio": 1.0,
        "default_macvlan_mode": null,
        "tags": [
            "pod-console-logging"
        ],
        "name": "trusty-glider",
        "type": "lxd",
        "used": {
            "cores": 0,
            "memory": 0,
            "local_storage": 0
        },
        "pool": {
            "name": "default",
            "description": "Default pool",
            "id": 0,
            "resource_uri": "/MAAS/api/2.0/resourcepool/0/"
        },
        "resource_uri": "/MAAS/api/2.0/vm-hosts/8/"
    }
]

Note: These are the same three bare metal dell boxes, but I had to reconfigure maas so they have different names now.

Solved: RTFD

Turns out I shouldn’t have ignored the fact that only Ubuntu 20 LTS is currently supported. I redeployed with Ubuntu 20.04 instead of Ubuntu 22.04 LTS. Hopefully support is added for Ubuntu 22 soon.

cool, glad we solved that. we were just noticing that. thanks for bouncing back.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.