provide a way to seed NoCloud from network without image modification.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init |
Fix Released
|
Medium
|
Unassigned | ||
cloud-init (Ubuntu) |
Fix Released
|
Medium
|
Unassigned | ||
Xenial |
Fix Released
|
Medium
|
Unassigned | ||
Zesty |
Fix Released
|
Medium
|
Unassigned |
Bug Description
=== Begin SRU Template ===
[Impact]
In bug 1660385, we made imitating the EC2 datasource more difficult.
By design, that broke some users or platforms who have done so in the past.
The change here gives users who were using the Ubuntu images in a low-tech
"No Cloud" fashion an easier way to regain that functionality.
The solution was to read the 'system-
consider it as as input to the nocloud datasource in a similar way to
what we had done in the past with the kernel command line.
[Test Case]
a.) download a cloud image, update its cloud-init
# see below for 'get-proposed-
$ release=xenial
$ get-proposed-
b.) boot that image with command line pointing at a 'seed'
$ img=${release}
# url has to provide '<url>/user-data' and '<url>/meta-data'
$ url=https:/
$ qemu-system-x86_64 -snapshot -enable-kvm -m 512 \
-device virtio-
-drive "file=$
-smbios "type=1,
-nographic
# note, you can hit 'ctrl-a c' to toggle between the qemu monitor
# and the serial console in '-nographic' mode.
c.) Log in with 'ubuntu:passw0rd' and check hostname.
If the above url was correctly used, then:
* you can log in with 'ubuntu:passw0rd'
* the hostname will be set to 'nocloud-guest'
* /run/cloud-
ubuntu@
nocloud-guest
ubuntu@
{
"v1": {
"datasource": "DataSourceNoCl
"errors": []
}
}
[Regression Potential]
The code attempts to parse the 'system-
string with data in it. If that field had the string 'ds=nocloud' that was
not intended as consumable for cloud-init, a false positive could occur and
an exception cause the NoCloud datasource to not read data from another
location.
This seems somewhat unlikely and other paths should result in simply no
new action being taken.
[Other Info]
Upstream commit at
https:/
get-proposed-
ubuntu cloud image, enables -proposed and upgrade/installs cloud-init.
--
[1] https:/
=== End SRU Template ===
Vladimir suggested this in bug 1660385 comment 12 [1].
The idea would be to have a supported way that you could seed images with cloud-init using Nocloud without any tinkering in the image. That would mean
a.) no second block device
b.) no usage of kernel command line.
--
[1] https:/
Related bugs:
* bug 1879294: Support fw_cfg data source
* bug 1753558: NoCloud should use "OEM Strings" instead of
system-
* bug 1691772: provide a way to seed NoCloud from network without image modification.
Changed in cloud-init: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
Changed in cloud-init (Ubuntu): | |
status: | New → Fix Released |
importance: | Undecided → Medium |
Changed in cloud-init (Ubuntu Xenial): | |
status: | New → Confirmed |
Changed in cloud-init (Ubuntu Zesty): | |
status: | New → Confirmed |
Changed in cloud-init (Ubuntu Xenial): | |
importance: | Undecided → Medium |
Changed in cloud-init (Ubuntu Zesty): | |
importance: | Undecided → Medium |
description: | updated |
description: | updated |
Changed in cloud-init: | |
status: | Confirmed → Fix Released |
Changed in cloud-init: | |
status: | Fix Released → Fix Committed |
description: | updated |
Proposed a merge with a simple implementation: https:/ /code.launchpad .net/~farcaller /cloud- init/+git/ cloud-init/ +merge/ 324273