Unable to connect MAAS to an LXD VM host

Bug #1919000 reported by Lee Trager
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
High
Alberto Donato

Bug Description

I deployed Ubuntu 20.04 to a machine and installed the latest stable LXD snap(2.49 rev 11109). I then configured it to be available over the network. When I tried to connect I get the following stack trace

==> /var/log/maas/rackd.log <==
2021-03-12 18:18:07 provisioningserver.rpc.pods: [critical] Failed to discover pod.
 Traceback (most recent call last):
   File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
     self.run()
   File "/usr/lib/python3.8/threading.py", line 870, in run
     self._target(*self._args, **self._kwargs)
   File "/usr/lib/python3/dist-packages/twisted/_threads/_threadworker.py", line 46, in work
     task()
   File "/usr/lib/python3/dist-packages/twisted/_threads/_team.py", line 190, in doWork
     task()
 --- <exception caught here> ---
   File "/usr/lib/python3/dist-packages/twisted/python/threadpool.py", line 250, in inContext
     result = inContext.theWork()
   File "/usr/lib/python3/dist-packages/twisted/python/threadpool.py", line 266, in <lambda>
     inContext.theWork = lambda: context.call(ctx, func, *args, **kw)
   File "/usr/lib/python3/dist-packages/twisted/python/context.py", line 122, in callWithContext
     return self.currentContext().callWithContext(ctx, func, *args, **kw)
   File "/usr/lib/python3/dist-packages/twisted/python/context.py", line 85, in callWithContext
     return func(*args,**kw)
   File "/usr/lib/python3/dist-packages/provisioningserver/utils/twisted.py", line 202, in wrapper
     result = func(*args, **kwargs)
   File "/usr/lib/python3/dist-packages/provisioningserver/drivers/pod/lxd.py", line 254, in discover
     client = self._get_client(pod_id, context)
   File "/usr/lib/python3/dist-packages/provisioningserver/drivers/pod/lxd.py", line 791, in _get_client
     client = Client(
 builtins.TypeError: __init__() got an unexpected keyword argument 'project'

==> /var/log/maas/regiond.log <==
2021-03-12 18:18:07 maasserver.forms.pods: [critical] Failed to discover pod.
 Traceback (most recent call last):
   File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 654, in _runCallbacks
     current.result = callback(current.result, *args, **kw)
   File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1116, in _cbDeferred
     self.callback(self.resultList)
   File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 460, in callback
     self._startRunCallbacks(result)
   File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 568, in _startRunCallbacks
     self._runCallbacks()
 --- <exception caught here> ---
   File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 654, in _runCallbacks
     current.result = callback(current.result, *args, **kw)
   File "/usr/lib/python3/dist-packages/maasserver/forms/pods.py", line 407, in <lambda>
     get_best_discovered_result(discovered),
   File "/usr/lib/python3/dist-packages/maasserver/clusterrpc/pods.py", line 95, in get_best_discovered_result
     raise exc
 provisioningserver.rpc.exceptions.PodActionFail: Failed talking to pod: __init__() got an unexpected keyword argument 'project'

2021-03-12 18:18:07 maasserver.websockets.protocol: [critical] Error on request (842) pod.create: Failed talking to pod: __init__() got an unexpected keyword argument 'project'
 Traceback (most recent call last):
   File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 654, in _runCallbacks
     current.result = callback(current.result, *args, **kw)
   File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 1116, in _cbDeferred
     self.callback(self.resultList)
   File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 460, in callback
     self._startRunCallbacks(result)
   File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 568, in _startRunCallbacks
     self._runCallbacks()
 --- <exception caught here> ---
   File "/usr/lib/python3/dist-packages/twisted/internet/defer.py", line 654, in _runCallbacks
     current.result = callback(current.result, *args, **kw)
   File "/usr/lib/python3/dist-packages/maasserver/forms/pods.py", line 426, in wrap_errors
     raise PodProblem(str(failure.value))
 maasserver.exceptions.PodProblem: Failed talking to pod: __init__() got an unexpected keyword argument 'project'

Related branches

Alberto Donato (ack)
Changed in maas:
status: Triaged → In Progress
assignee: nobody → Alberto Donato (ack)
importance: Critical → Low
importance: Low → High
Revision history for this message
Alberto Donato (ack) wrote :

If you install maas from master, you need the latest-deps PPA (https://launchpad.net/~maas-committers/+archive/ubuntu/latest-deps).

That being said, maas should depend on pylxd 2.3.0, which adds project support.
The python3-pylxd version we currently have in that PPA is badly named, as it is built from master and it's actually post-2.3.0.
I pushed a changelog entry, a package with the correct version should build soon.

Changed in maas:
status: In Progress → Fix Committed
Changed in maas:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers