[07:55] <nk121> 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] <Odd_Bloke> nk121: You could put it in a script.
[10:02] <Odd_Bloke> nk121: See https://cloudinit.readthedocs.org/en/latest/topics/examples.html#run-commands-on-first-boot
[13:18] <smoser> nk121, why not just use linux-generic ?
[13:20] <smoser> nk121, 
[13:20] <smoser> #cloud-config
[13:20] <smoser> packages: [linux-generic]
[13:20] <smoser> apt_reboot_if_required: true
[13:20] <smoser> i think that will do what you want it to do.
[13:21] <smoser> 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] <Odd_Bloke> smoser: Would that pull in -extra?
[13:28] <smoser> generic depends on -extra
[13:28] <smoser> basically generic = virtual + extra
[13:29] <smoser> Odd_Bloke, so the above is indeed what you want to use if you need "the full ubuntu kernel" in your image.
[13:34] <Odd_Bloke> Oh, right, I didn't look at the fully resolved dependencies.
[16:17] <Odd_Bloke> smoser: Ping re: https://code.launchpad.net/~daniel-thewatkins/cloud-init/fix-smartos/+merge/252874
[16:17] <smoser> 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] <smoser> but always feel free to bother me with such reminders
[16:18] <Odd_Bloke> smoser: Consider yourself bothered. ;)
[16:18] <smoser> yeah. did you have another one also ?
[16:19] <Odd_Bloke> 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] <nk121> 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] <smoser> nk121, well, sure. yo'ure going to get a lot more thna you need.
[18:44] <smoser> there are basically only 2 kernel module sets. (virtual and "every thing else")
[18:45] <nk121> is the alsa loop driver part of "every thing else"?
[18:47] <smoser> probably.
[18:47] <smoser> at least based on your description
[18:47] <nk121> 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] <smoser> i think you're asking if you can jsut stop if the package install module fails ?
[18:48] <smoser> ie:
[18:49] <smoser> packages: [this-package-does-not-exist]
[18:49] <smoser> and then that not go on ?
[18:49] <nk121> 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] <nk121> well package might not exist, or maybe it can't download it / or some other unatticipate problem
[18:50] <nk121> unatticipated
[18:56] <smoser> nk121, current versions write a file to /run/ that reports errors in json format.
[18:56] <smoser> 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] <smoser> i do see your point though
[18:58] <nk121> 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] <smoser> nk121, well, that is apt's behavior
[19:05] <smoser> nk121, http://paste.ubuntu.com/10611394/
[19:06] <nk121> smoser: ah, i guess i assumed it was doing a for loop and installing each one by one
[19:06] <smoser> that'd be a lot slower.
[19:20] <nk121> smoser: thanks for your help and the discussion, much appreciated.
[22:51] <suro-patz> smoser: ping
[22:52] <suro-patz> 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] <suro-patz> I would appreciate if you can review the fix
[22:52] <harlowja> or let suro-patz know that its just not the right way :-P