INIT_SCRIPTS runs without a working network

Hi all,

I’m running v6.0 and I am somewhat confused over the execution process when creating VMs. I have some scripts that need to be executed when a system is brought up for the first time. One of them,, retrieves a .repo file from another server in the network and then runs “yum update” against the RPMs that are on that same server. These are stored in the Files repository in ON and are configured as CONTEXT variables in the VM templates:

  FILES_DS = "$FILE[IMAGE=\"\", IMAGE_UNAME=\"oneadmin\"] $FILE[IMAGE=\"\", IMAGE_UNAME=\"oneadmin\"] $FILE[IMAGE=\"\", IMAGE_UNAME=\"oneadmin\"] $FILE[IMAGE=\"\", IMAGE_UNAME=\"oneadmin\"]",
  SSH_PUBLIC_KEY = "ecdsa-sha2-nistp256 AAAAblahblahblah....= oneadmin@on1.test.lab" ]

the problem is that, although the network looks like it is properly set up as in it has an IP address, the DNS server is correctly configured.

I modified the script to print IP and routing information to a file in the root directory so that I could see what state things were in when the script was executed and I see the following:

+ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 02:00:ac:1f:20:18 brd ff:ff:ff:ff:ff:ff
    inet brd scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::acff:fe1f:2018/64 scope link
       valid_lft forever preferred_lft forever
+ ip route
default via dev eth0 dev eth0 proto kernel scope link src

This is all absolutely fine and is exactly how the network looks once I can login. However the script is unable to access the server that contains the repo files:

+ curl -o /etc/yum.repos.d/lab.repo http://repos.test.lab/lab-el7.repo
curl: (6) Could not resolve host: repos.test.lab; Unknown error

If I replace “repos.test.lab” with the actual IP address it still fails, this time with “No route to host”.

These tests suggest that although the network is configured within the VM, ON has not yet set up any links to the virtual network so the VM cannot actually access any other hosts on the network at this time.

Is there any way to have the INIT_SCRIPTS scripts run when there is a fully-working network?

Any thoughts on what ON is doing at this point?


Ok, so this has not been solved but the problem has gone away. I hate these kinds of things because I won’t know what to do if/when it happens again. As far as I am aware nothing was changed.

Oh well, marking this as done since at least everything is working correctly again.