[SRU] datasource for smartos uses util.is_true instead of futil.is_true
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
Precise |
Fix Released
|
High
|
Unassigned |
Bug Description
[Impact]: The cloud-init version Precise uses the wrong is_true test from util instead of futil for the SmartOS datasource. If a user sends over a user-script or user-data, the instance will be unaccessable due to a stack trace. This means that user-data or user-scripts are fatal to the instance as the user will be unable to access system using SmartOS as the virtualization platform.
This only affects 12.04. futil is a backport of utilities in future version. util.is_true is valid for 12.10 and later. As result, there is no fix needed for quantal and later.
[Test Case]:
1. Create a simple user-data script
2. Boot up 12.04 in SmartOS
3. Update the instance meta-data with user-script
4. delete /var/lib/cloud
5. Run "cloud-init start" and "cloud-init-cfg all"
6. Check /var/log/
7. Confirm that simple user-data script ran
8. The user-data script should be found in /var/lib/
[REGRESSION] None. This change is fixes broken functionality and is a two line change. This has been tested on SmartOS and confirmed to fix the problem.
datasource for smartos uses util.is_true instead of futil.is_true, this causes a stack trace on SmartOS
2013-11-01 18:21:39,683 - cloud-init[INFO]: cloud-init start-local running: Fri, 01 Nov 2013 18:21:39 +0000. up 7.28 seconds
2013-11-01 18:21:39,874 - __init__.py[DEBUG]: searching for data source in []
2013-11-01 18:21:39,874 - __init__.py[DEBUG]: Did not find data source. searched classes: []
2013-11-01 18:21:43,765 - cloud-init[INFO]: cloud-init start running: Fri, 01 Nov 2013 18:21:43 +0000. up 11.19 seconds
2013-11-01 18:21:43,861 - __init__.py[DEBUG]: searching for data source in ['DataSourceSma
2013-11-01 18:21:43,861 - DataSourceSmart
2013-11-01 18:21:43,864 - DataSourceSmart
2013-11-01 18:21:45,485 - __init_
2013-11-01 18:21:45,500 - util.py[DEBUG]: Traceback (most recent call last):
File "/usr/lib/
if s.get_data():
File "/usr/lib/
md[ci_noun] = self.query(
File "/usr/lib/
b64=b64)
File "/usr/lib/
b64 = util.is_true(b64)
AttributeError: 'module' object has no attribute 'is_true'
2013-11-01 18:21:45,500 - __init__.py[DEBUG]: Did not find data source. searched classes: ['DataSourceSma
{noformat}
summary: |
- datasource for smartos uses util.is_true instead of futil.is_true + [SRU] datasource for smartos uses util.is_true instead of futil.is_true |
description: | updated |
description: | updated |
affects: | ubuntu → cloud-init (Ubuntu) |
description: | updated |
Hello Ben, or anyone else affected,
Accepted cloud-init into precise-proposed. The package will build now and be available at http:// launchpad. net/ubuntu/ +source/ cloud-init/ 0.6.3-0ubuntu1. 9 in a few hours, and then in the -proposed repository.
Please help us by testing this new package. See https:/ /wiki.ubuntu. com/Testing/ EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.
If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification- failed. In either case, details of your testing will help us make a better decision.
Further information regarding the verification process can be found at https:/ /wiki.ubuntu. com/QATeam/ PerformingSRUVe rification . Thank you in advance!