我遇到一个问题,有时链接未及时到达。我想在cloudinit创建的接口上增加延迟。因为我无法提供该配置。问题更类似于此https://serverfault.com/questions/522787/centos-6-4-network-interfaces-fail-when-rebooting-and-must-be-started-manually
cat test.yaml
network:
version: 1
config:
- type: physical
name: eth0
subnets:
- type: dhcp
LINKDELAY: 30
使用(https://github.com/cloud-init/cloud-init/blob/master/cloudinit/cmd/devel/net_convert.py)
生成了接口文件python cloudinit / cmd / devel / net_convert.py --network-data test.yaml -D centos --kind yaml -d〜/ test.file -O sysconfig
# Created by cloud-init on instance boot automatically, do not edit.
#
BOOTPROTO=dhcp
DEVICE=eth0
NM_CONTROLLED=no
ONBOOT=yes
STARTMODE=auto
TYPE=Ethernet
USERCTL=no
https://cloudinit.readthedocs.io/en/latest/topics/network-config.html LINKDELAY的文档似乎很少。 非常感谢您的帮助!