This bug is believed to be fixed in cloud-init in 18.1. If this is still
a problem for you, please make a comment and set the state back to New

Thank you.

** Changed in: cloud-init
       Status: Fix Committed => Fix Released

You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to cloud-init.

  cloud-init status traceback on successful Ec2

Status in cloud-init:
  Fix Released

Bug description:
  On Ec2 successful deployments, the command cloud-init status hits the 
following traceback:
  cloud-init status
  Traceback (most recent call last):
    File "/usr/bin/cloud-init", line 11, in <module>
      load_entry_point('cloud-init==17.2', 'console_scripts', 'cloud-init')()
    File "/usr/lib/python3/dist-packages/cloudinit/cmd/", line 853, in 
      get_uptime=True, func=functor, args=(name, args))
    File "/usr/lib/python3/dist-packages/cloudinit/", line 2279, in 
      ret = func(*args, **kwargs)
    File "/usr/lib/python3/dist-packages/cloudinit/cmd/", line 55, in 
      status, status_detail, time = _get_status_details(init.paths)
    File "/usr/lib/python3/dist-packages/cloudinit/cmd/", line 114, in 
    File "/usr/lib/python3/dist-packages/cloudinit/cmd/", line 96, in 
      return (is_disabled, reason)
  UnboundLocalError: local variable 'reason' referenced before assignment

  In Ec2's case, modules-init is never run because we detect the datasource in 
init-local timeframe. As a result the status.json looks like this (note that 
start and finished are both null on mondules-init stage:
   "v1": {
    "datasource": "DataSourceEc2Local",
    "init": {
     "errors": [],
     "finished": 1515706844.3537874,
     "start": 1515706843.7459064
    "init-local": {
     "errors": [],
     "finished": 1515706841.0270455,
     "start": 1515706840.1508064
    "modules-config": {
     "errors": [],
     "finished": 1515706846.916724,
     "start": 1515706846.218318
    "modules-final": {
     "errors": [],
     "finished": 1515706847.6123502,
     "start": 1515706847.2455244
    "modules-init": {
     "errors": [],
     "finished": null,
     "start": null
    "stage": null

To manage notifications about this bug go to:

Mailing list:
Post to     :
Unsubscribe :
More help   :

Reply via email to