interface.update_ip_addresses raise an Exception when exsits multiple StaticIPAddress
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
High
|
Alberto Donato |
Bug Description
An user could not commissioned a server because 50-maas-
"maasserver.
This error is raised because the use of `get_one` in interface.
When multiple StaticIPAdress could exist some times.
The check of prev_address is done to delete it, so a possible fix would be to iterate for all the existing StaticIPAddress instead of use get_one.
Full log:
```
2022-08-15 09:52:24 metadataserver.api: [critical] deep-joey.
Traceback (most recent call last):
File "/usr/lib/
target_status = process(node, request, status)
File "/usr/lib/
self._store_
File "/usr/lib/
script_
File "/usr/lib/
signal_status = try_or_log_event(
--- <exception caught here> ---
File "/usr/lib/
func(*args, **kwargs)
File "/usr/lib/
_process_
File "/usr/lib/
update_
File "/usr/lib/
interface.
File "/usr/lib/
prev_address = get_one(
File "/usr/lib/
raise exception_
maasserver.
```
Related branches
- Björn Tillenius: Approve
- MAAS Lander: Approve
-
Diff: 167 lines (+51/-60)2 files modifiedsrc/maasserver/models/interface.py (+19/-39)
src/maasserver/models/tests/test_interface.py (+32/-21)
Changed in maas: | |
status: | New → Triaged |
Changed in maas: | |
milestone: | none → 3.3.0 |
importance: | Undecided → High |
status: | Triaged → In Progress |
assignee: | nobody → Alberto Donato (ack) |
summary: |
- `interface.update_ip_addresses raise an Exception when exsits multiple + interface.update_ip_addresses raise an Exception when exsits multiple StaticIPAddress |
Changed in maas: | |
status: | In Progress → Fix Committed |
Changed in maas: | |
milestone: | 3.3.0 → 3.3.0-beta1 |
Changed in maas: | |
status: | Fix Committed → Fix Released |