=== daker_ is now known as daker === koolhead11|afk is now known as koolhead11 [16:38] smoser: so I'm messing with the nocloud thing... [16:38] smoser: in lxc, I can't append kernel cmdline parameters.. [16:39] umm... you dont boot a kernel in lxc. [16:39] so it doesn't surprise me that you can't change the kernel command line [16:39] you can probably edit /etc/cloud/cloud.cfg to do the same things [16:40] Ahh right [16:41] smoser: so if I set datasource_list: [ "NoCloud" ] ... it won't try to find metadata services, right? [16:42] correct. [16:42] you can actually set that with dpkg-reconfigure cloud-init [16:42] i'd trust that more than my brain for syntax [16:42] but there is also a file in /etc/cloud/cloud.cfg.d/ [16:43] /var/lib/dpkg/info/cloud-init.templates should be all I need. :) [17:28] smoser: ok, so I have cloud-config data in /var/lib/cloud/seed/nocloud-net/meta-data [17:29] http://paste.ubuntu.com/630870/ [17:29] http://paste.ubuntu.com/630871/ [17:29] there is cloud-init.log === koolhead11 is now known as koolhead11| [18:13] SpamapS, well, what it thinks has happened is that there is no network [18:14] something created /var/lib/cloud/data/no-net (probably /etc/init/cloud-init-nonet.conf [18:15] SpamapS, if you move your data to /var/lib/cloud-seed/nocloud/meta-data then it will probably run via DataSourceNoCloud [18:16] but the file you pasted in http://paste.ubuntu.com/630870/ is user-data, not meta-data. i'm guessing that was just typing wrong [18:20] smoser: no that was understanding wrong ;) [18:20] was the example not clear? [18:21] No I just put the user-data in the meta-data [18:21] is meta-data required? [18:21] and actually, what example? [18:21] yeah. it says int he meta-data example exactly what. mostly just 'instance-id' [18:22] http://bazaar.launchpad.net/~cloud-init-dev/cloud-init/trunk/files/head:/doc/examples/seed/ [18:22] ahhh ok [18:32] w00t.. it at least ran my stuff. :-D [18:36] ok.. so I think I need nocloud-net .. because I want to pull in packages.. :-P [18:37] oh wait, sources.list is whack [18:37] * SpamapS fixes [18:42] Hello everybody, [18:42] smoser: does cloud-init create the ubuntu user? [18:42] How can I add another gateway for an instance (before it starts?) [18:42] because i think i could not update /var/run/eucalyptus/net/euca-dhcp.conf === daker is now known as daker_ [18:44] SpamapS, no. [18:44] you can configure which user it writes, but it expects it to be there. [18:45] patches welcome ;) it'd be nice if it could do that. [18:47] smoser: ahh no I just forgot to pass -m to useradd [18:53] smoser: and before I go digging too far, how do we turn on sudo NOPASSWD easily for the admin group? [18:56] let me look. [18:57] i think you want: [18:57] %admin ALL=(ALL) NOPASSWD:ALL [18:58] put that in /etc/sudoers.d/90-admin-nopasswd [18:59] OO I didn't even realize there was a .d [19:00] * SpamapS wonders how much of ubuntu-vm-builder he has now duplicated in his lxc template [19:04] SpamapS, why are you not using an image ? [19:04] smoser: I'm building an lxc container [19:04] SpamapS, why are you not using an image ? [19:05] don't do that [19:05] just talk to me like I'm busy and have no time for word-play [19:05] mount -o loop file.img /mnt; sudo rsync -aXsomeotheropts /newdir; sudo umount /mnt [19:06] you have no time for word play, but are rewriting vm-builder. ;-) [19:06] ass [19:06] i'm legitimately asking why you're not using an image. [19:06] because we want the images to work for such things [19:06] Because I didn't think of doing that. [19:06] ok. [19:06] the lxc tools are so nice. :) [19:06] thats perfectly reasonable, and i agree i sound like an ass [19:07] let me try it out [19:07] SpamapS, that is basically what we're hoping to have working for lxc support in openstack [19:08] * SpamapS downloads http://uec-images.ubuntu.com/natty/current/natty-server-uec-amd64-disk1.vmdk [19:08] no [19:08] .img.tar.gz [19:08] >:| [19:08] you said loop mount [19:08] .vmdk is a disk image [19:08] .tar.gz contains a .img [19:08] *brilliant* [19:08] the disk image contains a partition table is really the only thing. [19:09] why isn't it .disk.gz ? [19:09] well, it delievers 3 things that you needed in the past. [19:09] making 'uec-publish-tarball' able to do the right thing. [19:09] and costs you 12M of download or something. [19:09] ok [19:10] we used to have .img.gz, but dropped it. yes, you do have to waste IO now. [19:10] so I can download this.. mount the image loop, and copy it, then drop my seed data in the nocloud dir. Anything else I should watch out for? [19:10] well, it wont' boot :) [19:10] due to the bug you're hoping to fix [19:10] (i think) [19:10] because it doesn't have lxcguest [19:10] but I can install that w/ chroot [19:10] it does have lxc guest [19:10] for this purpose [19:10] but network will timeout [19:10] because of that bug [19:11] Why doesn't my regular image time out then? [19:11] err [19:11] the images I have now, don't timeout with nocloud .. tho they do with nocloud-net [19:11] and my apt-get stuff is failing .. I'm guessing because network is not around yet [19:12] well, sort of. [19:12] if you use 'nocloud' then network isn't guaranteed to be there [19:12] if you use nocloud-net, then you end up waiting on ifup which wont happen in the right order [19:12] i think we never ended up opneing a bug on this :-( [19:13] but there is a large thread of emails between hallyn, you, zul, me [19:13] how is it any different than on a cloud image ? [19:13] i'm having dejavu [19:13] :) [19:13] ifup happens on lxc .. dhclient runs.. [19:13] i have to re-read emails for exact reason [19:14] oh.. i remember [19:14] smoser: i wonder if it'll go faster if you just remove the 'exit 0' in /etc/network/if-up.d/upstart [19:14] because udev depends on virutal-vilesystems [19:14] but, i'm not letting you distract me [19:14] and cloud-init-nonet is start on mounted / [19:14] and in lxc mounted / occurs before virtual filesystems [19:14] * SpamapS *CURSES* bash completion for not falling back to files always [19:14] yeah, that is stupid [19:15] i reall freaking hate that. [19:15] I fixed it for a large portion of completions.. [19:15] hallyn, it would not [19:15] if they do things right it will fall back to files if nothing is returned [19:15] but mount seems borked [19:15] the problem is is that cloud-init starts on mounted=/ and blocks waiting for network to come up [19:15] but network will never come up [19:15] because that depends on virtual-filesystems [19:16] and virtual-filesystems wont occur [19:16] in kvm or bare metal, virtua-filesystems occurs before mounted=/ [19:16] Right ok I recall now [19:17] SpamapS, don't you remember talking to me about this in UDS [19:17] ok [19:17] and the fix is, not to use mounted=/ but to use 'network-configured-blocking' [19:17] yeah. i had to leave to call home, so we didn't finish [19:17] :) [19:17] not really, though [19:17] because network-configured-blocking will not block other things [19:18] the goal of cloud-init "boothooks" or the like is to run early as possible, and block other things from happening. [19:18] because the more that happens the more you have to restart [19:19] my assumption is that running on netowrk-configured-blocking will not stop ssh from starting [19:19] and cloud-init needs to run before ssh starts (which starts on filesystems i think) [19:21] so at this point you're probably tihnking "why does cloud-init have to block and run so early". [19:21] no I know why [19:22] we should opne a bug [19:22] :) [19:22] init: cloud-init-local main process (25) terminated with status 1 [19:22] cloud-init-nonet waiting 60 seconds for a network device. [19:22] as predicted ;) [19:22] smoser: lets solve this next week [19:23] i'll open a bug [19:23] cloud-init-local should terminate with status 0 if it has no work to do [19:23] (that is another bug) [19:23] just to avoid that silly message [19:23] smoser: it booted btw. :) [19:23] right [19:23] but it doesn't run the cloud-init stuff [19:23] and takes 70 seconds [19:24] udev should probably be disabled [19:25] but if I drop meta-data and user-data into nocloud, it should run, am I right? [19:28] bug 800824 [19:28] Launchpad bug 800824 in cloud-init "cloud-init-nonet times out in lxc" [High,Confirmed] https://launchpad.net/bugs/800824 [19:29] SpamapS, i think so, yes [19:29] smoser: heh.. I cheated and added 'start networking' to nonet... [19:29] SpamapS: so, I'm sort of fearing that if I add -p and -i support, ppl will start asking for ppa support, and this, and that, and i'll end up reproducing vmbuilder [19:29] but when nocloud runs you wont have network. [19:30] hallyn: yes smoser and I were just discussing that [19:30] SpamapS: still, i think i'll do it. I'm just saying i will probably refuse ppa support [19:30] here? sorry i've not read up :) [19:30] smoser: I really want nocloud-net anyway tho.. ;) [19:31] because I need to pull in packages [19:31] SpamapS, well, if you can disable the timeout soemhow from within the nocloud, then you will be fine [19:31] because then the network will come up naturally... [19:31] hol don [19:31] anyway patches sent upstream. I'm going for a walk. bbl, to then add that support. [19:31] the network will come up on its own [19:31] and that will kill nonet [19:32] yeah, network wont be guaranteed to come up [19:32] you can re-write the cloud-init jobs to make it work from within a nonet boot hook [19:32] :) [19:32] make cloud-config (which is when the packages are intsalled) depend on networking-up [19:32] which, it probably should explicitly anyway [19:33] smoser: there is actually no reason to delay ifup -a.. this isn't a bad idea from what I can see. [19:34] smoser: boots very fast now.. and runs cloud-config [19:34] can you put exactly how you fixed it in the bug? [19:34] mostly for reference at the momeont. [19:35] Well I'm going to mess around with it a bit more [19:35] will you lose events in udev due to that? [19:36] anaywa. [19:36] I don't *have* udev events. :) [19:36] But in a VM.. no.. ifup -a just configures the static stuff [19:36] if an event comes along and tells me that another interface has arrived, thats going to configure just that interface [19:38] hrm no, too early.. dhclient failed [19:39] Jun 22 18:23:26 ubuntu dhclient: can't create /var/lib/dhcp3/dhclient.eth0.leases: No such file or directory [19:39] wait.. that may be a legitimate bug.. that dir doesn't exist [19:42] right.. / is not writable yet [19:42] err.. wait, it is [19:52] smoser: how do I disable this 'cc_resizefs' stuf? [19:52] File "/usr/lib/python2.7/dist-packages/cloudinit/CloudConfig/cc_resizefs.py", line 43, in handle [19:52] os.mknod(devpth, 0400 | stat.S_IFBLK, dev) [19:52] OSError: [Errno 1] Operation not permitted [19:59] oh wow. that sucks. [20:00] look in /etc/cloud/cloud.cfg [20:00] you can just take out 'resizefs' [20:00] but please open a bug so that we can avoid it correctly. [20:02] SpamapS, why wasn't / RW at that point ? [20:02] i thought you were running on mounted=/ (which i thought was RW) [20:02] it was [20:03] right.. / is not writable yet [20:03] so it was something else [20:03] I was wrong [20:03] ? [20:03] k [20:03] I don't know why dhclient didn't start that time. Its starting all the other times [20:03] but nocloud-net is not running [20:04] yeah, its not going to. [20:04] but cloud-config is where your installs would be done [20:04] and that would occur on filesystems [20:04] but as i mentioend above, it really assumes network [20:05] well I should have network by that time.. [20:10] # cat /var/lib/cloud/seed/nocloud/user-data [20:10] #cloud-config [20:10] ssh-import-id: clint-fewbar [20:10] smoser: that should import my key, or at least try to, right? [20:14] btw, bug #800856 [20:14] Launchpad bug 800856 in cloud-init "resizefs module causes problems on LXC containers" [Undecided,New] https://launchpad.net/bugs/800856 [20:14] that cloud-config looks sane to me, yes. [20:15] SpamapS, is there something in /var/log/cloud-init.log ? [20:15] is that easily pastebiniable ? [20:15] http://paste.ubuntu.com/630942/ [20:16] Jun 22 19:09:20 ubuntuhost [CLOUDINIT] __init__.py[DEBUG]: handling ssh-import-id with freq=None and args=[] [20:16] :( [20:17] SpamapS: args=[] [20:17] SpamapS: that don't look right [20:17] does it have to be a list? [20:17] SpamapS: a list of 1 or more [20:19] no, thats just bad logging. [20:19] to me it just looks like my user data has been ignored [20:19] hm... [20:21] oh. [20:21] heh [20:21] I think... [20:21] ssh_import_id: [smoser] [20:21] _ not - [20:21] yep [20:22] i recommend adding 'ssh_import_id: [smoser]' to all instances run anywhere in the world. [20:22] it just makes things easier for me [20:23] looks like network isn't up yet. :( [20:25] smoser: so, assuming cloud-init-nonet times out.. why won't nocloud-net run at that point ? [20:26] by design, it assumes there is no network. [20:26] Ok, but it gets killed because net-device-up IFACE!=lo *does* come up [20:26] clodu-init-nonet writes the file, and 'cloud-init start' says "oh, network didn't come up" [20:26] right. [20:26] OH I have to rm that file [20:26] well something is writing that file [20:27] wait no I'm not timing out [20:27] it should get cleaned on each boot [20:27] I added my 'start networking' and that file never gets touched [20:28] so nocloud-net *should* be run then? [20:28] I may have not gotten the incantations just right yet [20:29] 2011-06-22 19:28:57,309 - DataSourceNoCloud.py[DEBUG]: using seeded cache data in /var/lib/cloud/seed/nocloud-net [20:30] Jun 22 19:28:57 ubuntuhost [CLOUDINIT] cc_ssh_import_id.py[DEBUG]: importing ssh ids. cmd = ['sudo', '-Hu', 'ubuntu', 'ssh-import-id', 'clint-fewbar'] [20:30] W))T [20:30] w00T even [20:31] SpamapS: \o/ [20:31] SpamapS: what was the trick? [20:32] kirkland: the dance? [20:32] the trick is that cloud-init-nonet.conf actually tries to start the network [20:32] which, I'm fairly certain, is perfectly safe on all VMs/etc. [20:33] SpamapS, i'm gonna disappear for a couple hours, will be back later tonight. [20:33] Though it may not meet the "do things before anything has happened" requirement [20:33] smoser: cool, thanks for the help and suggestion [20:41] SpamapS: this crfappy client keeps spamming my scrren with whois results, will ttyl when back at other client [20:42] * SpamapS heads to lunch [20:57] lxc works with cloud-init now? [21:15] zul: I think I've got a patch that will make it work yes [21:15] sweet [21:22] smoser: any ideas why the actual images aren't signed, just the sha256sums ? [21:57] hmm.. I wonder if uec-images is mirrored anywhere [22:00] SpamapS: seems to be [22:00] http://releases-u-toyama.ubuntulinux.jp/ (unoffical) [22:01] The debootstrap method used by the lxc scripts is actually more scalable.. [22:02] SpamapS: how so? [22:02] Daviey: uses the full archive [22:03] which is mirrored all over the place [22:04] SpamapS: eventually, i think the hope is to get them onto cdimages.ubuntu.com, which is mirrored.. but AIUI disk space is currently an issue. [22:06] I can imagine. :-P [22:22] hallyn: I have a new template for you.. :-D [22:23] hallyn: tho I have my reservations about repeating the whole 'root:root' password bit. :) [22:26] SpamapS: yeah if we get some time, getting the templates to copy in your public ssh key and turning off password ssh access might be good [22:27] hallyn: thats pretty trivial actually... [22:27] SpamapS: but for generic container stuff it's good [22:27] yes, it is. BUT it adds yet another option [22:27] which i'm starting to resist. vmbuilder. [22:27] hallyn: so, this new template will download the UEC image and starts perfectly from it [22:27] SpamapS: cool. that was the whole lxcguest idea :) [22:27] hallyn: I think the only option you should support is --cloud-config [22:28] SpamapS: of course *you* do :) [22:28] The thing I'm struggling with now is how to easily get the hostnames resolvable on my local machine. [22:29] so I don't have to tail syslog and findout what the DHCP lease given was [22:29] Trying to wrap my head around whether dnsmasq can do this alone. [22:29] SpamapS: hm? isn't having dhcpd.conf push the hostname enough? [22:30] so you can then 'ssh lxc1.' [22:30] it pushes it to dnsmasq.. [22:30] but dnsmasq is running on my local machine.. [22:30] using my resolv.conf .. [22:30] if I point my resolv.conf to it.. [22:30] it won't be able to access the internet [22:30] mine has 192.168.122.1 as top nameserver in resolv.con [22:30] but you can probably think of a better way :) [22:30] how does it find the internet I wonder then.. [22:31] well 192.168.122.1 only resolves its own addresses [22:31] And then how does it know where to forward to? [22:31] thas what I'm saying. ;) [22:31] it does not only resolve its own addresses [22:31] ask it for anything, it will tell you. :) [22:31] Might be that it caches what was in resolv.conf when it starts [22:31] or it just queries the root servers [22:31] forwards to my other nameservers presumably? argue all you want, i'm just telling you it works for me :) [22:32] I just want to know how [22:32] hallyn: see thats my rub.. how does it know "your other nameservers" [22:34] hallyn: heh.. ok interesting trick.. if I add other DNS servers in it seems to work [22:34] in your host's resolv.conf you mean? [22:35] hallyn: yeah, I just put 192.168.122.1 first.. that does actually seem to work. [22:35] though it feels very unreliable and haphazard to me. :-P [22:36] SpamapS: I believe I got that from the security team's testing enviroment wiki page [22:36] I'll accept it now since I need to move forward [22:38] SpamapS: so to be clear, with your new template, yo don't need -packages or -chroot-includes support right? [22:38] if so i'll hold back on it [22:39] hallyn: right, it just installs the image from uec-images.ubuntu.com [22:39] excellent [22:39] then maybe tomorrow i can work on user namesapces :) [22:39] i'm just trying to decide whether to push the new template to oneiric asap, or leave it in ppa and wait for upstream to pull it in before going to oneiric's archive with it [22:40] The template system seems to have a lot of redundancy.. [22:40] why isn't there a shared_functions or something? [22:41] SpamapS: cause you haven't coded it [22:41] Hah.. ok [22:41] and i think the fedora, debian, ubuntu template writers want to feel more independent [22:41] I started to so that this wouldn't be lxc-natty-uec but lxc-uec .. but I couldn't find a way to pass in a series name [22:41] SpamapS: doh! look at my new source at ppa:serge-hallyn/lxc-natty [22:42] SpamapS: lxc-lucid..lxc-oneiric are now all consolidated into lxc-ubuntu [22:42] *sweet* [22:42] how do you tell it which one? [22:42] you add '-- -r natty' [22:42] wait.. [22:42] we can pass stuff in with -- ? [22:42] once lxc-create is trivially patched, yes :) [22:42] * SpamapS belays his happy dance [22:42] see http://sourceforge.net/mailarchive/forum.php?thread_name=20110622140928.GA12177%40mail.hallyn.com&forum_name=lxc-users [22:43] hallyn: the thing I did only really changes download_ubuntu [22:43] hallyn: just DL's it, verifies the GPG/sha256, and extracts. [22:43] yeah i suspect we can consolidate that in [22:43] Oh and copy_ubuntu mounts the image lopback and copies it instead of just copying the debootstrapped bit [22:43] an example command right now with my ppa is: [22:44] lxc-create -t ubuntu -f /etc/lxc.conf -n u1 -- -a i386 -r natty -b [22:44] where's your branch? I'll submit a MP against it [22:44] so we could add something like -uec [22:44] MP? [22:44] merge proposal [22:44] oh, you silly californian [22:45] hallyn: I don't think we should even bother with the debootstrap method for natty and later. [22:45] i'm sorry, i've stopped using bzr lately bc lp:ubuntu/ always seems to be out of date [22:45] well don't do that [22:45] They've recently caught up quite a bit on the out of sync branches [22:46] and if you have push rights, you can fix the branch fairly easily. [22:46] i don't [22:46] for lxc? [22:46] correct [22:46] *wtf* [22:46] yeah yeah [22:47] i feel in no hurry to face the firing squad again :) [22:47] i do need to go ask for the perms... [22:47] to either the server set, or coredev [22:47] but that's neither here nor there [22:48] right [23:02] SpamapS: trying my hand at a fresh lp branch so you can more easily look [23:02] hallyn: I believe 'bzr package-import file.dsc' works [23:02] no really? [23:03] where does it spit the result? [23:03] you might be just as well served by bzr add in an extracted source package dir tho [23:03] hallyn: it imports it into the current tree.. [23:03] hallyn: thats how they "fix" the out of sync trees.. the do the import, and fix conflicts if possible [23:07] SpamapS: well, i think that https://code.launchpad.net/~serge-hallyn/ubuntu/oneiric/lxc/update-templates represents all the changes i've been making [23:08] haven't quite tested the result of that manual mish-mash [23:08] and i think i'm about done for today [23:08] but go ahead and propose merge against that and i can use the diff regardless. [23:10] hallyn: ok, my diff is against lxc-natty ... [23:10] SpamapS: eh, just send me that then [23:11] i' flexible :) [23:12] lp:~clint-fewbar/ubuntu/oneiric/lxc/use-uec-for-natty [23:12] sigh. this is what i don't like. bzr on top of quilt on top of git. so i've lost the templates :) [23:13] lol [23:13] git sux [23:13] * SpamapS hides [23:13] no, git's not the problemhere... [23:15] SpamapS: i'll look at yours tomorrow, thanks. [23:15] i'll be around later, but let's pretend i won't. ttyl [23:18] later! [23:24] SpamapS: (the version now in that tree is working fine for me on my host) [23:28] hallyn: go away! ;) [23:31] SpamapS: but there's this one new bug :) (which i blame on zul :) [23:31] but i'd best just note it for later [23:32] * hallyn out