[2.5] "Pod does not have a network defined" path causes unexpected behavior
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
High
|
Newell Jensen |
Bug Description
I tore down and rebuilt the container I was testing KVM pods in today, and hit some unexpected issues (some in MAAS, some in other packages). That is, due to a related regression (bug #1784501), my pod did not have any networks defined. Therefore, when I went to compose a machine, I hit the following error:
Pod does not have a network defined. Please add a 'default' or 'maas' network.
I didn't really care that the networks weren't defined, since I was planning to deploy my pods with an interface constraint. So I tried again with an interface constraint, and hit the same error.
There are a couple things wrong in this scenario:
(1) Not having a 'maas' or 'default' network defined should not be a fatal error, as long as MAAS can attach an interface to a DHCP-enabled VLAN (and/or an `interfaces` constraint was specified).
(2) Machines were created in the hypervisor (with zero interfaces) when the API was called.
I'm filing this as one bug, because I think the fix to (1) can also fix (2).
Related branches
- Mike Pontillo (community): Approve
- MAAS Lander: Approve
-
Diff: 236 lines (+54/-26)2 files modifiedsrc/provisioningserver/drivers/pod/tests/test_virsh.py (+40/-15)
src/provisioningserver/drivers/pod/virsh.py (+14/-11)
Changed in maas: | |
status: | Triaged → In Progress |
Changed in maas: | |
status: | In Progress → Fix Committed |
Changed in maas: | |
assignee: | nobody → Newell Jensen (newell-jensen) |
Changed in maas: | |
status: | Fix Committed → Fix Released |
The “default” and “Maas” networks were required previous from 2.5 for networking to work. That means we should continue to use that if exists for backwards compat.
Also we need to think about the errors that Maas shows when not networks are defined, or it cannot use Bruges or macvtap.