rancher / os

Tiny Linux distro that runs the entire OS as Docker containers
https://rancher.com/docs/os/v1.x/en/
Apache License 2.0
6.44k stars 655 forks source link

Boot lag if no WAN #2118

Open rockandska opened 7 years ago

rockandska commented 7 years ago

RancherOS Version: (ros os version) 1.1.0

Where are you running RancherOS? (docker-machine, AWS, GCE, baremetal, etc.) docker-machine + VSphere

After installing an host via docker-machine on VSphere, and after install RancherOs on disk, I decided to block the WAN connection on firewall for the hosts on this LAN thinking there is no need for the WAN anymore because the open-vm-service file was previously downloaded from github.

But the fact is, if i block the WAN, RancherOS start to take ages to boot and something seems hanging because the WAN is shutdown

The relevant part of the log who show this delay is this one :

time="2017-09-21T16:20:53Z" level=debug msg="Starting container" c.name="cloudinit_cloud-init_1" container.ID=8a600e2e5924e61e117918f3e2447c672b5cd403bf9a570cf744118372a8c937 
time="2017-09-21T16:20:53Z" level=debug msg="[0/1] [cloud-init]: Started container name=cloudinit_cloud-init_1" 
time="2017-09-21T16:24:17Z" level=info msg="[1/1] [cloud-init]: Started " 
time="2017-09-21T16:24:17Z" level=debug msg="[2/2] Done cloudinit Services" 
time="2017-09-21T16:24:17Z" level=info msg="Project [cloudinit]: Project started " 
time="2017-09-21T16:24:17Z" level=debug msg="[9/21] Done cloud-init" 

If a unblock the WAN this part is pretty fast :

time="2017-09-21T18:42:09Z" level=debug msg="Starting container" c.name="cloudinit_cloud-init_1" container.ID=cce1c4185f88ec441edcdf9b789d321e936b4a415e00784c3eae4ad9f1d0800a 
time="2017-09-21T18:42:09Z" level=debug msg="[0/1] [cloud-init]: Started container name=cloudinit_cloud-init_1" 
time="2017-09-21T18:42:13Z" level=info msg="[1/1] [cloud-init]: Started " 
time="2017-09-21T18:42:13Z" level=debug msg="[2/2] Done cloudinit Services" 
time="2017-09-21T18:42:13Z" level=info msg="Project [cloudinit]: Project started " 
time="2017-09-21T18:42:13Z" level=debug msg="[9/21] Done cloud-init" 

And if re-block the WAN :

time="2017-09-21T18:44:46Z" level=debug msg="Starting container" c.name="cloudinit_cloud-init_1" container.ID=391f611e9be92469bf3b02cea85883464438a7e8acd7bc5fb9a7596dfe18a84e 
time="2017-09-21T18:44:46Z" level=debug msg="[0/1] [cloud-init]: Started container name=cloudinit_cloud-init_1" 
time="2017-09-21T18:48:12Z" level=info msg="[1/1] [cloud-init]: Started " 
time="2017-09-21T18:48:12Z" level=info msg="Project [cloudinit]: Project started " 
time="2017-09-21T18:48:12Z" level=debug msg="[2/2] Done cloudinit Services" 
time="2017-09-21T18:48:12Z" level=debug msg="[9/21] Done cloud-init" 
time="2017-09-21T18:48:12Z" level=info msg="[10/21] Starting read cfg and log files"

Did i missed something ? Is there another services who require the WAN even if the host seems to boot normally after this hang period ?

SvenDowideit commented 7 years ago

yeah - its trying to get the open-vm-tools cfg because 1.1 detects that you're running vmware.

There are some improvements in the pipeline.

niusmallnan commented 6 years ago

Duplicate of #2171 Close this one.

rockandska commented 6 years ago

It is not a duplicate of the issue you mention and you can see than the problem is not the same at all. In the issue you mention, the service config was downloaded. This is not the case in this issue due to the fact than there is no WAN and the service config can't be downloaded from github, that's why the boot hang.

niusmallnan commented 6 years ago

@rockandska If it doesn't try to enable open-vm-tools service, there is no problem here. Only running on vmware will enable it.

I consider one way to solve these two issues, but respect your thoughts, reopen this issue.

rockandska commented 6 years ago

I only let this issue opened because i didn't tried yet to change the open-vm-tools service config file url via service options to see if i can download it from a private repository only accessible from the LAN instead of github