cloud-init mishandles dhcp6 subnets in network_data.json
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init |
Invalid
|
Undecided
|
Unassigned |
Bug Description
It looks like there's a typo in the helpers/
With a config like:
{
"links" : [ {
"name" : "test",
"id" : "test",
"type" : "vif"
} ],
"networks" : [ {
"netmask" : "255.255.255.0",
"link" : "test",
"id" : "test",
"ip_address" : "192.168.122.201",
"type" : "ipv4",
"gateway" : "192.168.122.1"
}, {
"link" : "test",
"id" : "test",
"type" : "dhcp6"
} ]
}
the resulting network state object is
Internal State
!!python/
_network_state:
dns:
search: []
interfaces:
inet: inet
mode: manual
mtu: null
name: !!python/unicode 'test'
- address: !!python/unicode '192.168.122.201'
- !!python/unicode 'type': dhcp4
type: physical
routes: []
_version: 1
When it should be
Internal State
!!python/
_network_state:
dns:
search: []
interfaces:
inet: inet
mode: manual
mtu: null
name: !!python/unicode 'test'
- address: !!python/unicode '192.168.122.201'
- !!python/unicode 'type': dhcp6
type: physical
routes: []
_version: 1
It looks like this is caused by an error on line 570 of helpers/
t = 'dhcp6' if network[
which will always result in 'dhcp4' since the network type is 'dhcp6'
it looks like changing the test to
t = 'dhcp6' if network[
fixes things.
ovirt will change to match openstack, so that no changes are needed.