On 4/3/19 08:29, Thomas Goirand wrote:
On 4/3/19 10:54 AM, Kenn Leth Hansen wrote:
Hi list,

I've discovered the CloudStack datasource causes cloud-init to wait for 120 seconds 
before continuing to the next datasource if no service is responding on port 80 on the 
DHCP server address. As I am using an Ec2-style metadata server, I need to wait 120 
seconds every time i boot an instance until it is operational as this listens on 
"magic" IP 169.254.169.254 and I cannot easily redirect traffic to this IP.

The CloudStack datasource seems to have been introduced in dc1abbe1 but I don't 
see any reasoning for the ordering. In commit ce65da02 CloudStack was moved 
down the list to fix similar symptoms with OpenStack.

Would it be possible to move the Ec2 datasource up the list like "[ NoCloud, 
AltCloud, ConfigDrive, OpenStack, Ec2, CloudStack, ${DIGITAL_OCEAN_SOURCE} MAAS, OVF, 
GCE, None ]"? This also seems to be in line with expectations on how the datasources 
have been sorted before dc1abbe1.

Regards,
Kenn
If we do that, then OpenStack people are going to wait 120 seconds. So,
bad idea...

Cheers,

Thomas Goirand (zigo)

I may be missing something, but why would that impact OpenStack privisioning?  They'd still be ahead of CloudStack in the proposed ordering.  I'd need to trawl through the code and verify, but wouldn't it be sensible to put CloudStack about as far down the line as possible, given the overall impact (unless other data sources are expensive?).

To Kenn's comment though, in general with cloud-init you want to be giving it as specific a data source as you can.  If it's affecting you on every boot, I'd suggest putting the specific data source that is right for your environment in to /etc/cloud.cfg so that cloud-init jumps straight to that one instead of wasting time on anything else.

Cloud-init upstream has tried to introduce ways to shortcut the process of figuring out "Where on earth am I" process. A number of the clouds put something suitable in the DMI data coming from the BIOS, and I know cloud-init is starting to use that as a big pointer.

Paul

Reply via email to