=== StoneTable is now known as aisrael === shardy_afk is now known as shardy [11:33] hi [11:33] i'm having troubles with cloud init, it fails with my configuration [11:34] i've created a file in /etc/cloud/cloud.cfg.d with following content http://pastebin.com/c4ZP1KA2 [11:34] I'm using the NoCloud datasource [11:35] wondering if I have syntax errors or something.. [11:37] Raboo: One test would be to use a yaml library to inspect the content and see if it looks how you expect. [11:38] Odd_Bloke ok [11:39] yaml is valid [11:40] cloud-init[1521]: Can not apply stage config, no datasource found! Likely bad things to come! [11:42] Raboo: Is the yaml within user-data valid? [11:42] Raboo: (It looks like you have a trailing space on everything after #cloud-config; don't know if that matters.) [11:44] Odd_Bloke I think pastebin did that [11:45] Raboo: So locally lines 8 and 9 have the same level of indentation? [11:45] Because it looks like 5 spaces and 6 spaces in the paste. [11:45] everything after user-data have 6 spaces or more if it have sub-config [11:46] Odd_Bloke yes [11:46] Fair enough. [11:46] 8-9 have same indentation [11:46] * Odd_Bloke is out of ideas. [11:46] 6 spaces [11:46] I've never had cause to use the NoCloud datasource. [11:46] Sorry I couldn't be more help. :( [11:47] np, thanks anyway [11:48] the thing is that i just put this file in /etc/cloud/cloud.cfg.d on the raw image [11:48] don't know if it will work like that [11:48] is user-data: supposed to have that pipe "|"? [11:49] That's yaml for "treat lines below this as a single string". [11:50] So I expect so. [11:53] Odd_Bloke when does it end, when indentation becomes equal? [11:57] Raboo: Not exactly sure, sorry. [11:57] k [12:33] how can i stop cloud init from trying to rename the interface? [12:33] 2017-01-19 12:32:35,562 - stages.py[WARNING]: Failed to rename devices: [unknown] Error performing rename('enp5s0f0', 'bond0') for d8:d3:85:65:82:f4, bond0: Unexpected error while running command. [12:33] Command: ['ip', 'link', 'set', 'enp5s0f0', 'name', 'bond0'] [12:34] how can i stop it to configure any networking? === shardy is now known as shardy_lunch [12:34] should i edit /etc/cloud/cloud.cfg or can i do it from user-data? [13:06] Raboo: from what I understand, you're missing the NoCloud data source [13:07] * ffledgling is still reading scrollback [13:07] Raboo: you need to create an .iso and mount it on the cd drive of your VM/Machine and that needs to have two files user-data and meta-data iirc [13:08] I don't recall having to edit cloud.cfg to use the NoCloud data source [13:10] Here's a makefile that I wrote a while back that (1) fires up a fedora 22 qcow2 image with qemu-kvm (2) Generates the cloud-init files (3) creates the .iso, mounts them correctly and configures the VM using cloud-init [13:10] https://gist.github.com/ffledgling/27460a617f0e9ef93afd847b6ef3c20a [13:11] ffledgling im trying to do this on bare-metal [13:11] so mounting an iso kind if defeats the automation [13:12] Raboo: what's your setup look like exactly? [13:12] thats why i inject the config in /etc/clod/cloud.cfg.d [13:12] ffledgling and i got around the problem of no datasources [13:12] i simply split it to two files [13:12] oh? [13:13] i put the datasource_list: [ NoCloud ] in a own file [13:13] and a separate file with the datasource: stuff [13:13] ah [13:13] now i believe that it dies when trying to rename the interfaces, which I don't want it to do [13:14] ffledgling i'm redeploying the node now, give me 2 minutes. [13:14] i removed the network setup now, so now when the node it shouldn't have a network setup, only a udev rule that runs dhcps on all interfaces i believe [13:15] ffledgling what im doing is building a way to deploy ready raw images to bare metal nodes using theforeman [13:15] so boot a minor image via pxe that partitions the hdd, then curl cloudimage.img | of=/dev/sdaX [13:16] mount /dev/sdaX [13:16] add cloud init config to /etc/cloud/cloud.cfg.d/ [13:16] (previously until 2 minutes ago also added network config to /etc/network/interfaces.d/) [13:16] reboot [13:17] cloud image boots, and should run cloud-init [13:17] Out of curiousity, any reason you wouldn't just do this with a salt/ansible playbook that runs at startup after the node boots up? [13:18] ffledgling we do that aswell, run chef [13:18] but preseed sucks and is slow [13:18] and we already maintain cloud-init config for our virtual nodes, so why not deploy bare-metal nodes in the same way as virtual? [13:19] Hm, haven't heard of preseed [13:19] bbl, gotta go and donate some blood [13:19] Yeah, that's fair, I just hadn't heard of many people using cloud-init for bare metal [13:19] ffledgling you pxe boot physical nodes and use debian bootstrap with preseed files [13:19] be back in 30 === shardy_lunch is now known as shardy [13:20] (y) [14:37] hmm [14:37] i'm back at no datasources found. [14:38] but i do run echo 'datasource_list: [ NoCloud ]' > /etc/cloud/cloud.cfg.d/98_datasources.cfg [14:38] do I need to run anything after i add that config for cloud-init to apply? [14:39] Raboo: sorry if i'm offtopic.. this https://maas.ubuntu.com/docs/development/preseeds.html (curtin) can provision bare-metal quicky with metadata similar to cloud-init (it's a part of ubuntu maas) [14:42] liqw ok, i'm trying to avoid preseed [14:42] i simply want to boot an image [14:43] and have cloud init get it's configuration from the local disk [14:43] not some remote data source [14:43] just can [14:43] just can't figure out how [14:44] on baremetal? [14:46] liqw yes [14:47] everything else in in place [14:47] new machine boots for the first time [14:48] boots into a tiny pxe image that writes the ubuntu cloud image to disk, adds my cloud-init configs and reboots [14:48] second boot, is the newly written cloud image and it runs cloud init since it's a "first boot" [14:52] I'm a bit new to cloud-init.. im curious, can Cloud-init be configurd to call a final command in the event of any error code being generated by one of the runcmd sections, or any other failure? [14:52] basically "look, the host didnt finish booting man… so lets call the amazon set-instance-status command and mark us as unhealthy" [14:52] Raboo: so no cdrom if i get it right? [15:03] liqw no cdrom [16:02] liqw ffledgling Odd_Bloke i found a way [16:02] if i put my user-data and meta-data in /var/lib/cloud/seed/nocloud/ [16:02] it works. [16:28] http://paste.ubuntu.com/23828513/ [16:28] for what its worth, Raboo ^ that works for me. [16:31] Raboo, and not shown there, but the hostname is set correctly as 'foo' [18:53] hello ! [19:18] hey [20:44] ola [20:45] when I run make in one of the ubuntu/* branches, it complains about git describe returning a different version [20:45] like this: git describe version (ubuntu/0.7.8-49-g9e904bb-0ubuntu1_16.04.4) differs from cloudinit.version (0.7.8) [20:47] am I doing something wrong? [20:49] ah this is the whole tags not being checked in problem [20:49] well not problem, just have to do something and I don't remember what [20:50] yeah it looks like tools/read-version doesn't expect the ubuntu/ to be in front of the tags... [20:51] paulmey: you can just checkout from the tag you want [20:52] something like 'git checkout 0.7.8' should handle it [20:52] or rename the tag if you want the ubuntu/* ones [20:52] I'm trying to build the xenial package [20:52] (for example) [20:52] so I do git checkout ubuntu/xenial [20:52] and then run make [22:35] smoser hmm, thanks, guess i had something wrong in my file [23:13] What is the cloud-init command to read from a yml file and add users in ubuntu? [23:13] In coreos - /bin/coreos-cloudinit —from-file [23:13] In ubuntu cloud-init —f does not work