/srv/irclogs.ubuntu.com/2015/03/16/#cloud-init.txt

nk121hi, 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 time07:55
Odd_Blokenk121: You could put it in a script.10:02
Odd_Blokenk121: See https://cloudinit.readthedocs.org/en/latest/topics/examples.html#run-commands-on-first-boot10:02
smosernk121, why not just use linux-generic ?13:18
smosernk121, 13:20
smoser#cloud-config13:20
smoserpackages: [linux-generic]13:20
smoserapt_reboot_if_required: true13:20
smoseri think that will do what you want it to do.13:20
smoserboots, 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:21
Odd_Blokesmoser: Would that pull in -extra?13:27
smosergeneric depends on -extra13:28
smoserbasically generic = virtual + extra13:28
smoserOdd_Bloke, so the above is indeed what you want to use if you need "the full ubuntu kernel" in your image.13:29
Odd_BlokeOh, right, I didn't look at the fully resolved dependencies.13:34
Odd_Blokesmoser: Ping re: https://code.launchpad.net/~daniel-thewatkins/cloud-init/fix-smartos/+merge/25287416:17
smoserOdd_Bloke, i know. i really wanted to get that friday, but lost that day (and this morming so far) on maas images. 16:17
smoserbut always feel free to bother me with such reminders16:18
Odd_Blokesmoser: Consider yourself bothered. ;)16:18
smoseryeah. did you have another one also ?16:18
Odd_Blokesmoser: 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).16:19
nk121Odd_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 need18:42
smosernk121, well, sure. yo'ure going to get a lot more thna you need.18:44
smoserthere are basically only 2 kernel module sets. (virtual and "every thing else")18:44
nk121is the alsa loop driver part of "every thing else"?18:45
smoserprobably.18:47
smoserat least based on your description18:47
nk121also, 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:47
smoseri think you're asking if you can jsut stop if the package install module fails ?18:48
smoserie:18:48
smoserpackages: [this-package-does-not-exist]18:49
smoserand then that not go on ?18:49
nk121well 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 choice18:49
nk121well package might not exist, or maybe it can't download it / or some other unatticipate problem18:50
nk121unatticipated18:50
smosernk121, current versions write a file to /run/ that reports errors in json format.18:56
smosermuch 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
smoseri do see your point though18:56
nk121ok 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 inconsistent18:58
smosernk121, well, that is apt's behavior19:04
smosernk121, http://paste.ubuntu.com/10611394/19:05
nk121smoser: ah, i guess i assumed it was doing a for loop and installing each one by one19:06
smoserthat'd be a lot slower.19:06
nk121smoser: thanks for your help and the discussion, much appreciated.19:20
=== harlowja is now known as harlowja_away
=== harlowja_away is now known as harlowja
suro-patzsmoser: ping22:51
suro-patzI 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-patzI would appreciate if you can review the fix22:52
harlowjaor let suro-patz know that its just not the right way :-P22:52

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!