This repository was archived by the owner on Oct 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 651
This repository was archived by the owner on Oct 11, 2023. It is now read-only.
Boot order for cloud-config services not working (DHCP delay causes unstablility) #1904
Copy link
Copy link
Open
Description
RancherOS Version: (ros os version)
v1.0.1
- Use the following cloud-config:
#cloud-config
ssh_authorized_keys:
- ssh-rsa 123
rancher:
services_include:
open-vm-tools: true
services:
service-dyndns:
image: dockerhub.myrepo.com/services/dyndns:latest
labels:
io.rancher.os.scope: system
io.rancher.os.after: console
net: host
Expected behaviour
service-dyndns is started after the console
Actual behaviour
service-dyndns is started before the console according to the logs.
This also seems to cause this service to win a race against DHCPd writing the local nameservers to /etc/resolv.conf. As a result Docker is using the default Google DNS to resolve the repository, which fails because its not a public DNS name.
[10.541505] INFO[0001] [10/17] [network]: Starting
[10.546390] time="2017-06-07T15:46:26Z" level=debug msg="START: [/usr/bin/ros entrypoint udevd] in /"
[10.566894] udevd[1]: starting version 3.2
[10.566942] udevd[1]: starting eudev-3.2
[10.590523] DEBU[0001] Rebuild values newRebuildLabel= origRebuildLabel= outOfSync=false rebuildLabelChanged=false
[10.666823] time="2017-06-07T15:46:26Z" level=debug msg="START: [/usr/bin/ros entrypoint netconf] in /"
[10.670019] INFO[0001] [11/17] [network]: Started
[10.705479] time="2017-06-07T15:46:27Z" level=debug msg="START: [netconf] in /"
[10.714023] time="2017-06-07T15:46:27Z" level=info msg="Apply Network Config"
[10.714187] time="2017-06-07T15:46:27Z" level=debug msg="Config: &netconf.NetworkConfig{PreCmds:[]string(nil), DNS:netconf.DNSConfig{Nameservers:[]string(nil), Search:[]string(nil)}, Interfaces:map[string]netconf.InterfaceConfig{\"lo\":netconf.InterfaceConfig{Match:\"\", DHCP:false, DHCPArgs:\"\", Address:\"\", Addresses:[]string{\"127.0.0.1/8\", \"::1/128\"}, IPV4LL:false, Gateway:\"\", GatewayIpv6:\"\", MTU:0, Bridge:\"\", Bond:\"\", BondOpts:map[string]string(nil), PostUp:[]string(nil), PreUp:[]string(nil), Vlans:\"\"}, \"eth*\":netconf.InterfaceConfig{Match:\"\", DHCP:true, DHCPArgs:\"\", Address:\"\", Addresses:[]string(nil), IPV4LL:false, Gateway:\"\", GatewayIpv6:\"\", MTU:0, Bridge:\"\", Bond:\"\", BondOpts:map[string]string(nil), PostUp:[]string(nil), PreUp:[]string(nil), Vlans:\"\"}}, PostCmds:[]string(nil), HTTPProxy:\"\", HTTPSProxy:\"\", NoProxy:\"\"}"
[10.715383] time="2017-06-07T15:46:27Z" level=info msg="Applying 127.0.0.1/8 to lo"
[10.715513] time="2017-06-07T15:46:27Z" level=info msg="Applying ::1/128 to lo"
[10.715634] time="2017-06-07T15:46:27Z" level=info msg="Apply Network Config RunDhcp"
[10.715782] time="2017-06-07T15:46:27Z" level=debug msg=RunDhcp
[10.715901] time="2017-06-07T15:46:27Z" level=info msg="Running DHCP on eth0: dhcpcd -MA4 eth0"
[10.761547] DEBU[0001] Loaded open-vm-tools from https://raw.githubusercontent.com/rancher/os-services/v1.0.1/o/open-vm-tools.yml
[10.762336] DEBU[0001] Using /proc/version to set rancher.environment.KERNEL_VERSION = 4.9.24-rancher
[10.762474] DEBU[0001] Using /proc/version to set rancher.environment.KERNEL_VERSION = 4.9.24-rancher
[10.762628] DEBU[0001] Using /proc/version to set rancher.environment.KERNEL_VERSION = 4.9.24-rancher
[10.769237] INFO[0001] [11/18] [ntp]: Starting
[10.769352] INFO[0001] [11/18] [open-vm-tools]: Starting
[10.770567] INFO[0001] [11/18] [service-dyndns]: Starting
[10.823837] DEBU[0001] Rebuild values newRebuildLabel= origRebuildLabel= outOfSync=false rebuildLabelChanged=false
[10.906008] time="2017-06-07T15:46:27Z" level=debug msg="START: [/usr/bin/ros entrypoint ntpd --nofork -g] in /"
[10.906315] INFO[0002] [12/18] [ntp]: Started
[10.906463] INFO[0002] [12/18] [cloud-init-execute]: Starting
[10.959001] DEBU[0002] Rebuild values newRebuildLabel= origRebuildLabel= outOfSync=false rebuildLabelChanged=false
[11.040162] time="2017-06-07T15:46:27Z" level=debug msg="START: [/usr/bin/ros entrypoint cloud-init-execute -pre-console] in /"
[11.060808] time="2017-06-07T15:46:27Z" level=debug msg="START: [cloud-init-execute -pre-console] in /"
[11.060824] time="2017-06-07T15:46:27Z" level=info msg="Running cloud-init-execute: pre-console=true, console=false"
[11.206411] ERRO[0002] Failed to pull image dockerhub.myrepo.com/services/dyndns:latest: Error response from daemon: Get https://dockerhub.myrepo.com/v1/_ping: dial tcp: lookup dockerhub.myrepo.com on 8.8.4.4:53: server misbehaving
[11.206848] ERRO[0002] Failed Starting service-dyndns : Error response from daemon: Get https://dockerhub.cisco.com/v1/_ping: dial tcp: lookup dockerhub.myrepo.com on 8.8.4.4:53: server misbehaving
[11.326026] INFO[0002] [13/18] [cloud-init-execute]: Started
[11.326178] INFO[0002] [13/18] [console]: Starting
[11.405223] DEBU[0002] Rebuild values newRebuildLabel=always origRebuildLabel=always outOfSync=false rebuildLabelChanged=false
[11.405372] INFO[0002] Rebuilding console
[11.540496] INFO[0002] [14/18] [console]: Started
[11.540671] INFO[0002] [14/18] [docker]: Starting
[11.540828] INFO[0002] [14/18] [preload-user-images]: Starting