Public bug reported: cloud-init trunk with the following network config:
network: version: 1 config: - type: physical name: interface0 mac_address: "52:54:00:12:34:00" subnets: - type: static address: 10.0.2.15 netmask: 255.255.255.0 gateway: 10.0.2.2 renders an ifcfg-interface0 file without a GATEWAY=10.0.2.2 % cat /etc/sysconfig/network-scripts/ifcfg-interface0 # Created by cloud-init on instance boot automatically, do not edit. # BOOTPROTO=static DEVICE=interface0 HWADDR=52:54:00:12:34:00 IPADDR=10.0.2.15 NETMASK=255.255.255.0 NM_CONTROLLED=no ONBOOT=yes TYPE=Ethernet USERCTL=no Subsequently, route -n shows that a default gateway is not set. % route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 10.0.2.0 0.0.0.0 255.255.255.0 U 0 0 0 interface0 169.254.0.0 0.0.0.0 255.255.0.0 U 1002 0 0 interface0 If you add GATEWAY=10.0.2.2 you see a route like this: % route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 10.0.2.2 0.0.0.0 UG 0 0 0 interface0 10.0.2.0 0.0.0.0 255.255.255.0 U 0 0 0 interface0 169.254.0.0 0.0.0.0 255.255.0.0 U 1002 0 0 interface0 ** Affects: cloud-init Importance: Undecided Status: New ** Tags: centos7 -- 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/1686856 Title: sysconfig renderer does not render gateway settings in ifcfg-$iface files Status in cloud-init: New Bug description: cloud-init trunk with the following network config: network: version: 1 config: - type: physical name: interface0 mac_address: "52:54:00:12:34:00" subnets: - type: static address: 10.0.2.15 netmask: 255.255.255.0 gateway: 10.0.2.2 renders an ifcfg-interface0 file without a GATEWAY=10.0.2.2 % cat /etc/sysconfig/network-scripts/ifcfg-interface0 # Created by cloud-init on instance boot automatically, do not edit. # BOOTPROTO=static DEVICE=interface0 HWADDR=52:54:00:12:34:00 IPADDR=10.0.2.15 NETMASK=255.255.255.0 NM_CONTROLLED=no ONBOOT=yes TYPE=Ethernet USERCTL=no Subsequently, route -n shows that a default gateway is not set. % route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 10.0.2.0 0.0.0.0 255.255.255.0 U 0 0 0 interface0 169.254.0.0 0.0.0.0 255.255.0.0 U 1002 0 0 interface0 If you add GATEWAY=10.0.2.2 you see a route like this: % route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 10.0.2.2 0.0.0.0 UG 0 0 0 interface0 10.0.2.0 0.0.0.0 255.255.255.0 U 0 0 0 interface0 169.254.0.0 0.0.0.0 255.255.0.0 U 1002 0 0 interface0 To manage notifications about this bug go to: https://bugs.launchpad.net/cloud-init/+bug/1686856/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : yahoo-eng-team@lists.launchpad.net Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp