yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #65648
[Bug 1702570] [NEW] IPv6 subnets are not written correct to 50-cloud-init.cfg
Public bug reported:
I'm currently writing an open source software that should allow launching KVM cloud images.
The bug is present in the current version of cloud-init from git.
All versions of cloud-init in Ubuntu and Debian seem to be affected.
I'm using the following network-config on an iso image that is attached
to the KVM vm for usage with NoCloud datasource (for Debian 9 ens3 needs
to be changed to eth0):
---
version: 1
config:
- type: physical
name: ens3
subnets:
- type: static
control: auto
address: 176.9.X.X
gateway: 176.9.X.Y
netmask: 255.255.255.255
- type: static6
control: auto
address: 2a01::X:X
gateway: 2a01:X:Y
netmask: 64
This results in the following network configuration:
auto lo
iface lo inet loopback
auto ens3
iface ens3 inet static
address 176.9.X.X
gateway 176.9.X.Y
netmask 255.255.255.255
auto ens3:0
iface ens3:0 inet6 static6
address 2a01::X:X
gateway 2a01::X:Y
netmask 64
But this is a syntax error, the "static6" should be "static".
I was able to write a patch for this problem:
--- eni.py.orig 2017-07-05 12:59:09.838910769 +0200
+++ eni.py 2017-07-05 13:14:14.978143261 +0200
@@ -367,6 +367,10 @@
if subnet['type'].startswith('dhcp'):
iface['mode'] = 'dhcp'
+ # patch for static6
+ if iface['mode'] == 'static6':
+ iface['mode'] = 'static'
+
# do not emit multiple 'auto $IFACE' lines as older (precise)
# ifupdown complains
if True in ["auto %s" % (iface['name']) in line
Would be nice if this fix could be deployed and possibly put in Ubuntu Xenial and Debian 9, as this enables static IPv6 configurations.
** Affects: cloud-init
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to cloud-init.
https://bugs.launchpad.net/bugs/1702570
Title:
IPv6 subnets are not written correct to 50-cloud-init.cfg
Status in cloud-init:
New
Bug description:
I'm currently writing an open source software that should allow launching KVM cloud images.
The bug is present in the current version of cloud-init from git.
All versions of cloud-init in Ubuntu and Debian seem to be affected.
I'm using the following network-config on an iso image that is
attached to the KVM vm for usage with NoCloud datasource (for Debian 9
ens3 needs to be changed to eth0):
---
version: 1
config:
- type: physical
name: ens3
subnets:
- type: static
control: auto
address: 176.9.X.X
gateway: 176.9.X.Y
netmask: 255.255.255.255
- type: static6
control: auto
address: 2a01::X:X
gateway: 2a01:X:Y
netmask: 64
This results in the following network configuration:
auto lo
iface lo inet loopback
auto ens3
iface ens3 inet static
address 176.9.X.X
gateway 176.9.X.Y
netmask 255.255.255.255
auto ens3:0
iface ens3:0 inet6 static6
address 2a01::X:X
gateway 2a01::X:Y
netmask 64
But this is a syntax error, the "static6" should be "static".
I was able to write a patch for this problem:
--- eni.py.orig 2017-07-05 12:59:09.838910769 +0200
+++ eni.py 2017-07-05 13:14:14.978143261 +0200
@@ -367,6 +367,10 @@
if subnet['type'].startswith('dhcp'):
iface['mode'] = 'dhcp'
+ # patch for static6
+ if iface['mode'] == 'static6':
+ iface['mode'] = 'static'
+
# do not emit multiple 'auto $IFACE' lines as older (precise)
# ifupdown complains
if True in ["auto %s" % (iface['name']) in line
Would be nice if this fix could be deployed and possibly put in Ubuntu Xenial and Debian 9, as this enables static IPv6 configurations.
To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1702570/+subscriptions
Follow ups