← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1356855] Re: Cloud-init 0.7.5 Failed to get cloudstack user-data because of trailing slash

 

This is fix-released in ubuntu at 0.7.7~bzr1055-0ubuntu1

** Changed in: cloud-init (Ubuntu)
   Importance: Undecided => Medium

** Changed in: cloud-init (Ubuntu)
       Status: New => Fix Released

** Also affects: cloud-init (Ubuntu Trusty)
   Importance: Undecided
       Status: New

** Also affects: cloud-init (Ubuntu Utopic)
   Importance: Undecided
       Status: New

** Changed in: cloud-init (Ubuntu Trusty)
       Status: New => Confirmed

** Changed in: cloud-init (Ubuntu Trusty)
   Importance: Undecided => High

** Changed in: cloud-init (Ubuntu Utopic)
   Importance: Undecided => High

** Changed in: cloud-init (Ubuntu Utopic)
       Status: New => Confirmed

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to cloud-init.
https://bugs.launchpad.net/bugs/1356855

Title:
  Cloud-init 0.7.5 Failed to get cloudstack user-data because of
  trailing slash

Status in Init scripts for use on cloud images:
  Fix Committed
Status in cloud-init package in Ubuntu:
  Fix Released
Status in cloud-init source package in Trusty:
  Confirmed
Status in cloud-init source package in Utopic:
  Confirmed

Bug description:
  === Begin SRU Information ===
  [Impact]
  CloudStack provides an EC2-style metadata server which cloud-init consumes.  Unfortunately, the CloudStack metadata server does not exactly match the behaviour of the EC2 metadata server.  When an instance using cloud-init is booted in a CloudStack environment, it will fail to retrieve metadata from the metadata server.  This leads to cloud-init bailing out and making no changes to the instance, generally rendering it inaccessible and unusable.

  This patch changes all access to EC2-style metadata servers.  Instead
  of accessing http://.../meta-data to determine the available metadata,
  cloud-init will access http://.../meta-data/ (i.e. with an added
  trailing slash).

  [Test Case]
  Booting an Ubuntu image configured to use the CloudStack data source within a CloudStack cloud environment.  If (for example) the instance name is set correctly, then the fix has worked.

  [Regression Potential]

  Regression potential is low; this patch does affect more than just the
  CloudStack data source, but it is backported from the version of
  cloud-init in utopic which has been observed working.

  === End SRU Information ===

  Hi,

  Cloud-init 0.7.5 fails to get cloudstack user-data because of trailing
  slash (ok in previous versions).

  As a temp workaround I use the following patch in url_helper.py line
  239 (0.7.5-0ubuntu1):

             if e.response.status_code == 404:
                  if url.endswith("/"):
                      url = url[:-1]
                      req_args["url"] = url
                  else:
                      url = url + "/"
                      req_args["url"] = url

  I don't know how other products (EC2, openstack & co) deal with
  trailing slash

  Hope that helps

  Thanks

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1356855/+subscriptions


References