MAAS Fails to Connect to LXD Host

Bug #1885777 reported by Hakan Saplakoglu
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
MAAS
Expired
Undecided
Unassigned

Bug Description

Recreate:
1. Add new LXD Pod
2. Fill in info
3. Click "Add KVM"

When I do this I get an error: Failed talking to pod: 'ports'. I'm not sure what this means. I was unable to find any documentation on the new LXD pod feature.

It seems MAAS is able to contact the LXD API at the very least, because if I try a different address/port it will give a different error. I would like to clarify what exactly the "LXD Address" should be. I've tried the following:

<ip>:8443 - Above Error
<ip>:8443/1.0 - Not Found Error
https://<ip>:8443 - Above Error
https://<ip>:8443/1.0 - Not Found Error

I could be missing something here, but could I get more info about the error?

Revision history for this message
Lee Trager (ltrager) wrote :

<ip>, <ip>:<port>, https://<ip>, http://<ip>:<port> should all work. The MAAS logs should contain more information about why MAAS can't connect.

Changed in maas:
status: New → Incomplete
Revision history for this message
Hakan Saplakoglu (hakasapl) wrote :

Here's what the log has:

2020-07-01 23:48:42 maasserver.forms.pods: [critical] Failed to discover pod.
        Traceback (most recent call last):
          File "/snap/maas/7578/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 653, in _runCallbacks
            current.result = callback(current.result, *args, **kw)
          File "/snap/maas/7578/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1117, in _cbDeferred
            self.callback(self.resultList)
          File "/snap/maas/7578/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 459, in callback
            self._startRunCallbacks(result)
          File "/snap/maas/7578/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 567, in _startRunCallbacks
            self._runCallbacks()
        --- <exception caught here> ---
          File "/snap/maas/7578/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 653, in _runCallbacks
            current.result = callback(current.result, *args, **kw)
          File "/snap/maas/7578/lib/python3.6/site-packages/maasserver/forms/pods.py", line 407, in <lambda>
            get_best_discovered_result(discovered),
          File "/snap/maas/7578/lib/python3.6/site-packages/maasserver/clusterrpc/pods.py", line 86, in get_best_discovered_result
            raise exc
        provisioningserver.rpc.exceptions.PodActionFail: Failed talking to pod: 'ports'

2020-07-01 23:48:42 maasserver.websockets.protocol: [critical] Error on request (75) pod.create: Failed talking to pod: 'ports'
        Traceback (most recent call last):
          File "/snap/maas/7578/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 653, in _runCallbacks
            current.result = callback(current.result, *args, **kw)
          File "/snap/maas/7578/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1117, in _cbDeferred
            self.callback(self.resultList)
          File "/snap/maas/7578/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 459, in callback
            self._startRunCallbacks(result)
          File "/snap/maas/7578/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 567, in _startRunCallbacks
            self._runCallbacks()
        --- <exception caught here> ---
          File "/snap/maas/7578/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 653, in _runCallbacks
            current.result = callback(current.result, *args, **kw)
          File "/snap/maas/7578/lib/python3.6/site-packages/maasserver/forms/pods.py", line 426, in wrap_errors
            raise PodProblem(str(failure.value))
        maasserver.exceptions.PodProblem: Failed talking to pod: 'ports'

Netstat reveals LXD listening on 8443:
tcp6 0 0 :::8443 :::* LISTEN 249941/lxd

Revision history for this message
Hakan Saplakoglu (hakasapl) wrote :

Any updates on this? The LXD daemon is running on the same host as the maas region controller, and is remotely accessible.

Revision history for this message
Hakan Saplakoglu (hakasapl) wrote :

Any updates? Do you need any more info from me?

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for MAAS because there has been no activity for 60 days.]

Changed in maas:
status: Incomplete → Expired
Revision history for this message
Dan Ardelean (danardelean) wrote :

I am having the same issues with MAAS 3.1 and LXD 4.19 on the same host, "provisioningserver.drivers.pod.lxd.LXDPodError: Pod 0: Failed to connect to the LXD REST API."

Alberto Donato (ack)
Changed in maas:
status: Expired → New
Revision history for this message
Alexsander de Souza (alexsander-souza) wrote :

Hi Dan, can you please attach the rackd.log to this bug?

Changed in maas:
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for MAAS because there has been no activity for 60 days.]

Changed in maas:
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.