yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #70510
[Bug 1744796] [NEW] cloud-init status traceback on successful Ec2
Public bug reported:
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/main.py", line 853, in main
get_uptime=True, func=functor, args=(name, args))
File "/usr/lib/python3/dist-packages/cloudinit/util.py", line 2279, in log_time
ret = func(*args, **kwargs)
File "/usr/lib/python3/dist-packages/cloudinit/cmd/status.py", line 55, in handle_status_args
status, status_detail, time = _get_status_details(init.paths)
File "/usr/lib/python3/dist-packages/cloudinit/cmd/status.py", line 114, in _get_status_details
CLOUDINIT_DISABLED_FILE, paths)
File "/usr/lib/python3/dist-packages/cloudinit/cmd/status.py", line 96, in _is_cloudinit_disabled
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
}
}
** Affects: cloud-init
Importance: Medium
Assignee: Chad Smith (chad.smith)
Status: In Progress
** Changed in: cloud-init
Importance: Undecided => Medium
** Changed in: cloud-init
Status: New => In Progress
** Changed in: cloud-init
Assignee: (unassigned) => Chad Smith (chad.smith)
--
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/1744796
Title:
cloud-init status traceback on successful Ec2
Status in cloud-init:
In Progress
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/main.py", line 853, in main
get_uptime=True, func=functor, args=(name, args))
File "/usr/lib/python3/dist-packages/cloudinit/util.py", line 2279, in log_time
ret = func(*args, **kwargs)
File "/usr/lib/python3/dist-packages/cloudinit/cmd/status.py", line 55, in handle_status_args
status, status_detail, time = _get_status_details(init.paths)
File "/usr/lib/python3/dist-packages/cloudinit/cmd/status.py", line 114, in _get_status_details
CLOUDINIT_DISABLED_FILE, paths)
File "/usr/lib/python3/dist-packages/cloudinit/cmd/status.py", line 96, in _is_cloudinit_disabled
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:
https://bugs.launchpad.net/cloud-init/+bug/1744796/+subscriptions
Follow ups