[07:55] hi, how can i pull down apt package like linux-image-extra-`uname -r` in cloud-init? specifically, i need uname -r to be resolved at run time [10:02] nk121: You could put it in a script. [10:02] nk121: See https://cloudinit.readthedocs.org/en/latest/topics/examples.html#run-commands-on-first-boot [13:18] nk121, why not just use linux-generic ? [13:20] nk121, [13:20] #cloud-config [13:20] packages: [linux-generic] [13:20] apt_reboot_if_required: true [13:20] i think that will do what you want it to do. [13:21] boots, installs linux-generic, if that is a newer version that in the image (which hopefully its not), then it will reboot into that new kernel. [13:27] smoser: Would that pull in -extra? [13:28] generic depends on -extra [13:28] basically generic = virtual + extra [13:29] Odd_Bloke, so the above is indeed what you want to use if you need "the full ubuntu kernel" in your image. [13:34] Oh, right, I didn't look at the fully resolved dependencies. [16:17] smoser: Ping re: https://code.launchpad.net/~daniel-thewatkins/cloud-init/fix-smartos/+merge/252874 [16:17] Odd_Bloke, i know. i really wanted to get that friday, but lost that day (and this morming so far) on maas images. [16:18] but always feel free to bother me with such reminders [16:18] smoser: Consider yourself bothered. ;) [16:18] yeah. did you have another one also ? [16:19] smoser: I have a branch to move to v2 metadata for SmartOS, but I haven't been able to test that properly yet (because of the above issues). [18:42] Odd_Bloke, smoser: thanks for the suggestions. i need snd-aloop loopback device from alsa. before i saw your replies i went with "linux-image-extra-virtual" but that seems to install a lot more than i need [18:44] nk121, well, sure. yo'ure going to get a lot more thna you need. [18:44] there are basically only 2 kernel module sets. (virtual and "every thing else") [18:45] is the alsa loop driver part of "every thing else"? [18:47] probably. [18:47] at least based on your description [18:47] also, as an aside, when i originally tried linux-image-extra-`uname -r` and ran it, i found that once it hit that line, it didn't install any packages after it, but then proceeded to run other parts of cloudinit that relied on packages that were not installed (with more failures). is there a way for it to stop at failure and not continue configuring a broken system? [18:48] i think you're asking if you can jsut stop if the package install module fails ? [18:48] ie: [18:49] packages: [this-package-does-not-exist] [18:49] and then that not go on ? [18:49] well i mean, i guess in general, what does it mean for system to fail in some part of the configuration -- i feel the option should either be, stop and escalate, or continue -- but should be a choice [18:50] well package might not exist, or maybe it can't download it / or some other unatticipate problem [18:50] unatticipated [18:56] nk121, current versions write a file to /run/ that reports errors in json format. [18:56] much of the reason it just goes on, is that if it did not, in many cases, you'd never have access to the system in order to see/diagnose such failure. [18:56] i do see your point though [18:58] ok i guess i should check for that file at the end then. with regards to just packags, it seems it completely stops doing the rest of the packages if it has a failure. thats rather inconsistent [19:04] nk121, well, that is apt's behavior [19:05] nk121, http://paste.ubuntu.com/10611394/ [19:06] smoser: ah, i guess i assumed it was doing a for loop and installing each one by one [19:06] that'd be a lot slower. [19:20] smoser: thanks for your help and the discussion, much appreciated. === harlowja is now known as harlowja_away === harlowja_away is now known as harlowja [22:51] smoser: ping [22:52] I worked towards addressing https://bugs.launchpad.net/cloud-init/+bug/1225922, with https://code.launchpad.net/~suro-patz/cloud-init/vm-clone-ip-reusage-issue/+merge/252961, as per the discussion in the bug and in paste.openstack.org/show/135506/ [22:52] I would appreciate if you can review the fix [22:52] or let suro-patz know that its just not the right way :-P