Hi,
Thanks for filing a bug. Can you provide the version of cloud-init you're using? You might give the our daily centos build a try to see if this resolves your issue.
https://copr.fedorainfracloud.org/coprs/g/cloud-init/cloud-init-dev/
I've not seen cloud-init render sysconfig files with the /CIDR suffix, we generally will use NETMASK value instead:
If I take your provided network-config and have cloud-init write it out on centos; this is the file we create:
(neipa) cloud-init % cat test-centos-ipaddr/etc/sysconfig/network-scripts/ifcfg-eth0 # Created by cloud-init on instance boot automatically, do not edit. # BOOTPROTO=none DEFROUTE=yes DEVICE=eth0 GATEWAY=10.0.0.4 HWADDR=F2:15:C8:E1:0A:49 IPADDR=10.0.88.151 NETMASK=255.0.0.0 NM_CONTROLLED=no ONBOOT=yes STARTMODE=auto TYPE=Ethernet USERCTL=no (neipa) cloud-init % PYTHONPATH=`pwd` python3 -m cloudinit.cmd.main devel net-convert -p network_configs/centos-ipaddr-prefix.yaml --kind yaml --distro centos -O sysconfig -d test-centos-ipaddr Read input format 'yaml' from 'network_configs/centos-ipaddr-prefix.yaml'. Wrote output format 'sysconfig' to 'test-centos-ipaddr/'
(neipa) cloud-init % cat test-centos-ipaddr/etc/sysconfig/network-scripts/ifcfg-eth0 # Created by cloud-init on instance boot automatically, do not edit. # BOOTPROTO=none DEFROUTE=yes DEVICE=eth0 GATEWAY=10.0.0.4 HWADDR=F2:15:C8:E1:0A:49 IPADDR=10.0.88.151 NETMASK=255.0.0.0 NM_CONTROLLED=no ONBOOT=yes STARTMODE=auto TYPE=Ethernet USERCTL=no
Hi,
Thanks for filing a bug. Can you provide the version of cloud-init you're using?
You might give the our daily centos build a try to see if this resolves your issue.
https:/ /copr.fedorainf racloud. org/coprs/ g/cloud- init/cloud- init-dev/
I've not seen cloud-init render sysconfig files with the /CIDR suffix, we generally will use NETMASK value instead:
If I take your provided network-config and have cloud-init write it out on centos; this is the file we create:
(neipa) cloud-init % cat test-centos- ipaddr/ etc/sysconfig/ network- scripts/ ifcfg-eth0 F2:15:C8: E1:0A:49 configs/ centos- ipaddr- prefix. yaml --kind yaml --distro centos -O sysconfig -d test-centos-ipaddr configs/ centos- ipaddr- prefix. yaml'. ipaddr/ '
# Created by cloud-init on instance boot automatically, do not edit.
#
BOOTPROTO=none
DEFROUTE=yes
DEVICE=eth0
GATEWAY=10.0.0.4
HWADDR=
IPADDR=10.0.88.151
NETMASK=255.0.0.0
NM_CONTROLLED=no
ONBOOT=yes
STARTMODE=auto
TYPE=Ethernet
USERCTL=no
(neipa) cloud-init % PYTHONPATH=`pwd` python3 -m cloudinit.cmd.main devel net-convert -p network_
Read input format 'yaml' from 'network_
Wrote output format 'sysconfig' to 'test-centos-
(neipa) cloud-init % cat test-centos- ipaddr/ etc/sysconfig/ network- scripts/ ifcfg-eth0 F2:15:C8: E1:0A:49
# Created by cloud-init on instance boot automatically, do not edit.
#
BOOTPROTO=none
DEFROUTE=yes
DEVICE=eth0
GATEWAY=10.0.0.4
HWADDR=
IPADDR=10.0.88.151
NETMASK=255.0.0.0
NM_CONTROLLED=no
ONBOOT=yes
STARTMODE=auto
TYPE=Ethernet
USERCTL=no