UbuntuIRC / 2014 /10 /21 /#cloud-init.txt
niansa
Initial commit
4aa5fce
[00:44] <smoser> j12t, i'd suggest looking at the upstart jobs or sysvinit jobs.
[00:44] <smoser> but largely
[00:44] <smoser> cloud-init init --local
[00:44] <smoser> cloud-init init
[00:45] <smoser> cloud-init modules --mode=config
[00:45] <smoser> cloud-init modules --mode=final
[00:47] <j12t> I since found those in the Arch/systemd service files. I think I understand the difference between init and modules, but what about --local and the --modes?
=== gholms is now known as tbechkam
=== harlowja is now known as harlowja_away
=== tbechkam is now known as gholms
=== alexpilotti_ is now known as alexpilotti
=== harlowja_away is now known as harlowja
[18:23] <j12t> Why does cloud-init but a (slightly scrambled) version of the abc into .ssh/authorized_keys instead of my public key? Having trouble trusting my eyes here ...
[18:24] <harlowja> whats the 'abc'?
[18:25] <j12t> basically ascii table
[18:25] <j12t> each character separated by newline
[18:25] <j12t> od says: \n + \n - \n / \n 1 \n 0 \n 3 \n 2 \n
[18:25] <j12t> 5 \n 4 \n 7 \n 6 \n 9 \n 8 \n = \n A \n
[18:25] <j12t> and so it continues through uppercase and then lowercase letters
[18:26] <harlowja> that seems odd, ha
[18:26] <harlowja> whats the user-data u used to make this happen?
[18:27] <j12t> I don't really understand how this is supposed to work, but /var/lib/cloud/instance/user-data.txt has the correct value
[18:28] <j12t> http://pastebin.com/VTpTbNTS
[18:29] <j12t> it comes via /dev/sdb which is a vfat drive labeled cidata
[18:29] <smoser> well, its the key.
[18:30] <smoser> i suspect.
[18:30] <j12t> If you look at the pastebin, does this file look correct?
[18:30] <smoser> well, i think i probalby intended to support that... but maybe not.
[18:31] <j12t> "that" being ...?
[18:31] <smoser> make the 'ssh-authorized-keys' be a list
[18:31] <smoser> http://bazaar.launchpad.net/~cloud-init-dev/cloud-init/trunk/view/head:/doc/examples/cloud-config.txt#L205
[18:31] <smoser> the our ssh_authorized_keys is a string
[18:31] <smoser> which is then being iterated over as a list of chars
[18:31] <smoser> rather than a [<your-string>]
[18:32] <j12t> are you saying that if I make it a list, it might work?
[18:32] <smoser> i expect it will work, yeah.
[18:32] <smoser> if your'e by hand writing that.
[18:33] <smoser> then you can just wrap it in ["<your stuff>"]
[18:33] <smoser> if you're yaml.dump() ing something then just make it a list.
[18:33] <j12t> ha! you are correct
[18:34] <smoser> http://bazaar.launchpad.net/~cloud-init-dev/cloud-init/trunk/view/head:/cloudinit/distros/__init__.py#L389
[18:35] <smoser> thats the code that is going wrong there.
[18:35] <smoser> could definitely do:
[18:35] <smoser> if isinstance(kwargs['ssh_authorized_keys'], str)...
[18:35] <j12t> Just an error message would be good enough already :-)
[18:38] <j12t> As bugs go, this is a funny one. Was betting on some kind of prank first, but couldn
[18:38] <j12t> t think of a prankster doing this :-)
[18:53] <harlowja> i fix it
[19:05] <harlowja> https://code.launchpad.net/~harlowja/cloud-init/ssh-key-types/+merge/239121
[19:05] <harlowja> j12t ^
[19:06] <j12t> harlowja: very nice, thank you.
[19:06] <harlowja> np
[19:15] <harmw> harlowja: ever seen an instance's disk switch to some other storagebackend?
[19:15] <harlowja> i haven't :-/
[19:15] <harlowja> sounds bad
[19:16] <smoser> i don thitnk multi_log is righ thtere.
[19:16] <harmw> can't remember I did something, but this instance now thinks it needs to use a qcow2 image when booting, instead of rgular ceph rbd
[19:16] <smoser> "regular".
[19:16] <harmw> hehe
[19:16] <smoser> linux, harmw ?
[19:16] <harmw> my cloud? yep, centos7
[19:17] <harlowja> smoser want me to just use something other than multi_log (or not use it at all?)
[19:17] <smoser> just log i guess. you can warn that.
[19:18] <smoser> LOG.warn that seems potentially bad. as long as 'None' is not going to generate a warning
[19:18] <smoser> that must get filled in somewhere.
[19:18] <smoser> ie, doest raise KeyError on kwargs['ssh_authorized_keys']
[19:19] <harlowja> k
[19:24] <harlowja> updated
[21:14] <gkze> hi guys
[21:14] <gkze> question
[21:15] <gkze> why is there no option to set the UID of a user upon creation in cloud-config?
[21:22] <JayF> Because you haven't added support for it yet? :P
[21:23] <JayF> Mostly kidding. I don't know why, but I don't think it was explicitly excluded
[21:35] <smoser> gkze, its possible it would work.
[21:35] <smoser> hm.. no. thought it might .
[21:36] <gkze> The change is simple, you just have to add a k/v item to the dict for user creation and then it will work
[21:36] <smoser> have to just add to adduser_opts in cloudinit/distros/__init__.py
[21:36] <smoser> yeah.
[21:36] <gkze> maybe a few other changes
[21:36] <smoser> i have to run.
[21:36] <smoser> late