-
Notifications
You must be signed in to change notification settings - Fork 827
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
provide a way to seed NoCloud from network without image modification. #2895
Comments
Launchpad user Vladimir Pouzanov(farcaller) wrote on 2017-05-18T16:49:51.220654+00:00 Here's a trivial way to add the required support: From ff8b5683b0db8f0c899111fddf8d2e52737fdef1 Mon Sep 17 00:00:00 2001 This is particularly handy now that Ec2 backend is discouraged from use:
|
Launchpad user Vladimir Pouzanov(farcaller) wrote on 2017-05-18T16:52:52.384133+00:00 Proposed a merge with a simple implementation: https://code.launchpad.net/~farcaller/cloud-init/+git/cloud-init/+merge/324273 |
Launchpad user Chris J Arges(arges) wrote on 2017-08-23T12:28:11.067236+00:00 Hello Scott, or anyone else affected, Accepted cloud-init into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cloud-init/0.7.9-233-ge586fe35-0ubuntu1~16.04.1 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 on 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-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. 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/PerformingSRUVerification . Thank you in advance! |
Launchpad user Chris J Arges(arges) wrote on 2017-08-23T12:31:31.287204+00:00 Hello Scott, or anyone else affected, Accepted cloud-init into zesty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cloud-init/0.7.9-233-ge586fe35-0ubuntu1~17.04.1 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 on 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-zesty to verification-done-zesty. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-zesty. 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/PerformingSRUVerification . Thank you in advance! |
Launchpad user Chad Smith(chad.smith) wrote on 2017-08-28T20:44:09.898184+00:00 Verified seeding nocloud from URL sets hostname properly from seed.url=https://git.launchpad.net/~smoser/cloud-init/+git/sru-info/plain/bugs/lp-1691772/; login ubuntu:passw0rdhostname; -- xenial seed test ubuntu@nocloud-guest: -- zesty test ubuntu@nocloud-guest: |
Launchpad user Launchpad Janitor(janitor) wrote on 2017-09-13T01:26:05.837714+00:00 This bug was fixed in the package cloud-init - 0.7.9-233-ge586fe35-0ubuntu1~16.04.1 cloud-init (0.7.9-233-ge586fe35-0ubuntu1~16.04.1) xenial-proposed; urgency=medium
-- Scott Moser smoser@ubuntu.com Mon, 31 Jul 2017 16:36:16 -0400 |
Launchpad user Chris Halse Rogers(raof) wrote on 2017-09-13T01:26:42.140167+00:00 The verification of the Stable Release Update for cloud-init has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions. |
Launchpad user Launchpad Janitor(janitor) wrote on 2017-09-13T01:27:27.937540+00:00 This bug was fixed in the package cloud-init - 0.7.9-233-ge586fe35-0ubuntu1~17.04.1 cloud-init (0.7.9-233-ge586fe35-0ubuntu1~17.04.1) zesty; urgency=medium
-- Scott Moser smoser@ubuntu.com Mon, 31 Jul 2017 16:33:24 -0400 |
Launchpad user Scott Moser(smoser) wrote on 2017-09-23T02:32:57.008900+00:00 This bug is believed to be fixed in cloud-init in 17.1. If this is still a problem for you, please make a comment and set the state back to New Thank you. |
This bug was originally filed in Launchpad as LP: #1691772
Launchpad details
Launchpad user Scott Moser(smoser) wrote on 2017-05-18T14:23:03.412930+00:00
=== 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-serial-number' field in DMI data and
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-cloudimg'
$ release=xenial
$ get-proposed-cloudimg $release
b.) boot that image with command line pointing at a 'seed'
$ img=${release}-server-cloudimg-amd64-proposed.img
# url has to provide '/user-data' and '/meta-data'
$ url=https://git.launchpad.net/~smoser/cloud-init/+git/sru-info/plain/bugs/lp-1691772/
$ qemu-system-x86_64 -snapshot -enable-kvm -m 512
-device virtio-net-pci,netdev=net00 -netdev type=user,id=net00
-drive "file=$img,if=virtio"
-smbios "type=1,serial=ds=nocloud-net;seedfrom=$url"
-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-init/result.json will show that the url has been used.
ubuntu@nocloud-guest:~$ hostname
nocloud-guest
ubuntu@nocloud-guest$ cat /run/cloud-init/result.json
{
"v1": {
"datasource": "DataSourceNoCloudNet [seed=dmi,https://git.launchpad.net/~smoser/cloud-init/+git/sru-info/plain/bugs/lp-1691772/][dsmode=net]",
"errors": []
}
}
[Regression Potential]
The code attempts to parse the 'system-serial-number' entry in dmi data as a
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://git.launchpad.net/cloud-init/commit/?id=802e7cb2da8
get-proposed-cloudimg is available at [1], it basically downloads an
ubuntu cloud image, enables -proposed and upgrade/installs cloud-init.
--
[1] https://git.launchpad.net/~smoser/cloud-init/+git/sru-info/tree/bin/get-proposed-cloudimg
=== 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://bugs.launchpad.net/cloud-init/+bug/1660385/comments/12
Related bugs:
system-serial-number
The text was updated successfully, but these errors were encountered: