deployment fails when install_kvm/register_vmhost is true

Bug #1970962 reported by Diego Mascialino
24
This bug affects 7 people
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
High
Alberto Donato

Bug Description

I am trying to deploy a machine with:

`maas labmaas machine deploy scnxtr distro_series=jammy install_kvm=true register_vmhost=true`

This action ends with "Failed deployment".

I can connect to opelt via ssh, and I am able to compose a lxd VM:

```
ubuntu@opelt:~$ lxc launch ubuntu:20.04 --vm
Creating the instance
Instance name is: ample-sculpin
Starting ample-sculpin
```

Please find attached the sos report and opelt's cloud-init logs.

Related branches

Revision history for this message
Diego Mascialino (dmascialino) wrote :
Revision history for this message
Alberto Donato (ack) wrote :

VM host registration fails with the traceback below:

This happens because the boot interface doesn't have an IP, since we create a bridge and attach the physical interface to it (so that VMs can also get IPs from MAAS.

We should look at the bridge containing the boot interface for an IP.

2022-04-29 15:35:06 metadataserver.api_twisted: [critical] Failed to process status message instantly.
        Traceback (most recent call last):
          File "/usr/lib/python3.8/threading.py", line 870, in run
            self._target(*self._args, **self._kwargs)
          File "/snap/maas/x1/lib/python3.8/site-packages/provisioningserver/utils/twisted.py", line 821, in worker
            return target()
          File "/snap/maas/x1/usr/lib/python3/dist-packages/twisted/_threads/_threadworker.py", line 46, in work
            task()
          File "/snap/maas/x1/usr/lib/python3/dist-packages/twisted/_threads/_team.py", line 190, in doWork
            task()
        --- <exception caught here> ---
          File "/snap/maas/x1/usr/lib/python3/dist-packages/twisted/python/threadpool.py", line 250, in inContext
            result = inContext.theWork()
          File "/snap/maas/x1/usr/lib/python3/dist-packages/twisted/python/threadpool.py", line 266, in <lambda>
            inContext.theWork = lambda: context.call(ctx, func, *args, **kw)
          File "/snap/maas/x1/usr/lib/python3/dist-packages/twisted/python/context.py", line 122, in callWithContext
            return self.currentContext().callWithContext(ctx, func, *args, **kw)
          File "/snap/maas/x1/usr/lib/python3/dist-packages/twisted/python/context.py", line 85, in callWithContext
            return func(*args,**kw)
          File "/snap/maas/x1/lib/python3.8/site-packages/provisioningserver/utils/twisted.py", line 856, in callInContext
            return func(*args, **kwargs)
          File "/snap/maas/x1/lib/python3.8/site-packages/provisioningserver/utils/twisted.py", line 202, in wrapper
            result = func(*args, **kwargs)
          File "/snap/maas/x1/lib/python3.8/site-packages/metadataserver/api_twisted.py", line 561, in _processMessageNow
            self._processMessage(node, message)
          File "/snap/maas/x1/lib/python3.8/site-packages/maasserver/utils/orm.py", line 756, in call_within_transaction
            return func_outside_txn(*args, **kwargs)
          File "/snap/maas/x1/lib/python3.8/site-packages/maasserver/utils/orm.py", line 559, in retrier
            return func(*args, **kwargs)
          File "/usr/lib/python3.8/contextlib.py", line 75, in inner
            return func(*args, **kwds)
          File "/snap/maas/x1/lib/python3.8/site-packages/metadataserver/api_twisted.py", line 469, in _processMessage
            _create_vmhost_for_deployment(node)
          File "/snap/maas/x1/lib/python3.8/site-packages/metadataserver/api_twisted.py", line 207, in _create_vmhost_for_deployment
            ip = node.ip_addresses([boot_if])[0]
        builtins.IndexError: list index out of range

Changed in maas:
milestone: none → 3.2.0
assignee: nobody → Alberto Donato (ack)
Alberto Donato (ack)
Changed in maas:
status: Triaged → In Progress
Alberto Donato (ack)
summary: - deployment of jammy image fails when install_kvm is true
+ deployment fails when install_kvm/register_vmhost is true
Changed in maas:
status: In Progress → Fix Committed
Changed in maas:
milestone: 3.2.0 → 3.2.0-beta5
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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