Traceback when passing user-data on GCE
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init (Ubuntu) |
Fix Released
|
High
|
Scott Moser |
Bug Description
With the following cloud-config:
```
#cloud-config
bootcmd:
- touch /tmp/cloud-
```
I see the following traceback in the cloud-init log when I launch a GCE artful instance:
```
Traceback (most recent call last):
File "/usr/lib/
freq=
File "/usr/lib/
return self._runners.
File "/usr/lib/
results = functor(*args)
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
walk_
File "/usr/lib/
handlers.
File "/usr/lib/
for part in msg.walk():
AttributeError: 'bytes' object has no attribute 'walk'
```
Related branches
- Server Team CI bot: Needs Fixing (continuous-integration)
- Chad Smith: Approve
- Dan Watkins: Approve
-
Diff: 71 lines (+21/-8)2 files modifiedcloudinit/sources/DataSourceGCE.py (+19/-7)
tests/unittests/test_datasource/test_gce.py (+2/-1)
The following reproduces (but produces an instance which I can't SSH in to; I had to capture the boot disk to discover this):
``` init-works alan-1710- artful- v20170915a --image-project ubuntu- os-cloud- devel --metadata- from-file user-data=cfg
$ cat << EOF > cfg
bootcmd:
- touch /tmp/cloud-
EOF
gcloud compute instances create aa-$(date +%y%m%d-%H%M) --image daily-ubuntu-
```