Bug 1039388 - cloud-init should reduce the timeout delay to find a datasource
Summary: cloud-init should reduce the timeout delay to find a datasource
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: cloud-init
Version: 6.5
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Lars Kellogg-Stedman
QA Contact: mkovacik
URL:
Whiteboard:
Depends On:
Blocks: 1039389
TreeView+ depends on / blocked
 
Reported: 2013-12-09 01:51 UTC by Joey Boggs
Modified: 2016-12-07 02:27 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1039389 (view as bug list)
Environment:
Last Closed: 2016-12-07 02:27:12 UTC
Target Upstream Version:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.