Bug 1039388

Summary: cloud-init should reduce the timeout delay to find a datasource
Product: Red Hat Enterprise Linux 6 Reporter: Joey Boggs <jboggs>
Component: cloud-initAssignee: Lars Kellogg-Stedman <lars>
Status: CLOSED WONTFIX QA Contact: mkovacik
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.5CC: jgreguske
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1039389 (view as bug list) Environment:
Last Closed: 2016-12-07 02:27:12 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 1039389    

Description Joey Boggs 2013-12-09 01:51:13 UTC
Description of problem:
When booting the rhel-guest image with cloud-init in a pure kvm non-cloud environment the delay to login prompt will impact users that are not using OpenStack / RHEV-M etc. We should shorten the delay to speed it up or provide some configurable way to alter it, kernel arg etc.

Version-Release number of selected component (if applicable):
cloud-init-0.7.2-2

Comment 1 Lars Kellogg-Stedman 2013-12-09 21:52:39 UTC
We can do this via settings in /etc/cloud/cloud.cfg. E.g, for a
maximum wait time of 30 seconds:

datasource:
  Ec2:
    timeout: 10
    max_wait: 30

The default is a maximum wait time of 120 seconds.  The defaults come
from sources/DataSourceEc2.py:

    def _get_url_settings(self):
        mcfg = self.ds_cfg
        if not mcfg:
            mcfg = {}
        max_wait = 120
        try:
            max_wait = int(mcfg.get("max_wait", max_wait))
        except Exception:
            util.logexc(LOG, "Failed to get max wait. using %s", max_wait)

        if max_wait == 0:
            return False

        timeout = 50
        try:
            timeout = int(mcfg.get("timeout", timeout))
        except Exception:
            util.logexc(LOG, "Failed to get timeout, using %s", timeout)

        return (max_wait, timeout)

Does putting the above (timeout:10, max_wait: 30) in /etc/cloud/cloud.cfg make sense? It looks like this should work for at least anything as recent as 0.6.3.

Comment 2 Lars Kellogg-Stedman 2013-12-09 23:55:56 UTC
Arg, one needs to set this *per datasource*.

Comment 3 Lars Kellogg-Stedman 2013-12-10 01:37:59 UTC
We could add an alternate boot menu item that would append the following to the kernel command line:

    cc: datasource_list: [None] end_cc

This effectively disables cloud-init.

Comment 5 Lars Kellogg-Stedman 2016-12-07 02:27:12 UTC
We do not have the resources to update the cloud-init package in RHEL 6.x at this time.