Obscure error message when region without racks fails to retreive LXD projects list
Bug #1997007 reported by
Igor Brovtsin
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Triaged
|
Low
|
Unassigned |
Bug Description
When trying to add an LXD host on a region without rack controllers, region fails with
`'NoneType' object is not iterable`
Steps to reproduce:
1. Initialize MAAS in `region` configuration without adding rack controllers
2. Go to KVM -> Add LXD host
3. Fill in the name and IP address
4. Add the certificate to LXD, click "Check Authentication"
5. An error message will appear.
It's easy to fix that by handling an exception or raising a proper one when no racks are registered for region. Another easy fix with better UX is to prohibit user from adding LXDs when there are no rack controllers.
Changed in maas: | |
status: | New → Triaged |
milestone: | none → 3.4.0 |
Changed in maas: | |
milestone: | 3.4.0 → 3.4.x |
To post a comment you must log in.
Here's a traceback:
2022-11-18 10:16:00 maasserver. websockets. protocol: [critical] Error on request (98) pod.get_projects: 'NoneType' object is not iterable maas/x1/ lib/python3. 10/site- packages/ maasserver/ websockets/ handlers/ pod.py" , line 181, in get_projects project) for project in projects]
builtins. TypeError: 'NoneType' object is not iterable
Traceback (most recent call last):
<omitted>
File "/snap/
return [attr.asdict(