← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1303934] Re: traceback when unable to reach metadata server

 

I have to mark this as fix-released.  I'm not really sure how you could have seen the output you saw, and I just verified that cloud-init in trusty gives a saner message.  Heres how:
 sudo dpkg-reconfigure cloud-init   # select 'Azure' on an openstack instance, something that iwll not be found
 sudo cloud-init init --local
 sudo cloud-init init
 
this shows on stderr:
 2014-06-03 13:28:56,208 - util.py[WARNING]: No instance datasource found! Likely bad things to come!
the /var/log/cloud-init.log shows:

Jun  3 13:27:10 inst-trusty-20140602-191433 [CLOUDINIT] util.py[DEBUG]:
No instance datasource found! Likely bad things to come!#012Traceback
(most recent call last):#012  File "/usr/bin/cloud-init", line 242, in
main_init#012    init.fetch()#012  File "/usr/lib/python2.7/dist-
packages/cloudinit/stages.py", line 308, in fetch#012    return
self._get_data_source()#012  File "/usr/lib/python2.7/dist-
packages/cloudinit/stages.py", line 236, in _get_data_source#012
pkg_list)#012  File "/usr/lib/python2.7/dist-
packages/cloudinit/sources/__init__.py", line 260, in find_source#012
raise DataSourceNotFoundException(msg)#012DataSourceNotFoundException:
Did not find any data source, searched classes: (DataSourceAzureNet)

See here, the 'searched classes' is not empty.

The other part of this bug (what I actually think happened) is that
cloud-init did not sanely warn that it tried to read something from the
cloud_config_url and was unable to get it.

I'm just going to re-purpose this bug to that.
 

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

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

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

** Also affects: cloud-init
   Importance: Undecided
       Status: New

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

** Changed in: cloud-init
       Status: New => Confirmed

** Summary changed:

- traceback when unable to reach metadata server
+ no error message when cloud_config_url fails to load

** Summary changed:

- no error message when cloud_config_url fails to load
+ no error message to console when cloud-config-url fails to load

-- 
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/1303934

Title:
  no error message to console when cloud-config-url fails to load

Status in Init scripts for use on cloud images:
  Confirmed
Status in “cloud-init” package in Ubuntu:
  Confirmed

Bug description:
  When booting an Ubuntu 12.04 ephmeral into MAAS commissioning on a
  node which was unable to reach the region controller, I got the
  following traceback:

  | Can not apply stage final, no datasource found! Likely bad things to come!
  | ------------------------------------------------------------
  | Traceback (most recent call last):
  |   File "/usr/bin/cloud-init", line 315, in main_modules
  |     init.fetch()
  |   File "/usr/lib/python2.7/dist-packages/cloudinit/stages.py", line 302, in fetch
  |     return self._get_data_source()
  |   File "/usr/lib/python2.7/dist-packages/cloudinit/stages.py", line 234, in _get_data_source
  |     pkg_list)
  |   File "/usr/lib/python2.7/dist-packages/cloudinit/sources/__init__.py", line 212, in find_source
  |     raise DataSourceNotFoundException(msg)
  | DataSourceNotFoundException: Did not find any data source, searched classes: ()
  | ------------------------------------------------------------

  Fuller log attached.

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