/srv/irclogs.ubuntu.com/2016/01/08/#cloud-init.txt

bassamthi, cloud-init is failing on init for me with the following error UnicodeDecodeError: 'utf-8' codec can't decode byte 0x8d in position 0: invalid start byte00:18
bassamtversion 0.7.7 from an Ubuntu 15.10 AMI.00:19
bassamtany ideas for how I can debug the issue? user-data in AWS does look weird (and not something I can change)00:20
=== mgagne is now known as Guest41804
SuperLagthis is all I have in my cloud.cfg file http://pastebin.com/FrWTnHLf and when I try to SSH, it still asks for a password. What am I doing wrong? :/06:29
SuperLagI've changed it to be the stock file with only the stuff I needed included. It still doesn't work.08:08
SuperLagI clearly don't have a clue, and I'm at the end of my rope.08:08
SuperLagI'd be *happy* to pay someone to help me figure this out.08:08
xaelhello all, i am Alex from Bigstep, currently working on adding a new datasource for the Bigstep cloud service and to also port our templates into using cloudinit11:30
Odd_Blokexael: Hola!  (I'm Dan Watkins from Canonical. :)11:31
xaelcurrently, I am having a problem with changing the password for the root user on a CentOS 6.6 machine running cloud-init 0.7.511:32
xaelby sending it in a hashed form, not plaintext11:32
xaelthe way in which i managed to do it was to add an 'hashed_passwd' option in distros/__init__ and use the existing set_password with the hashed parameter set11:36
Odd_Blokexael: Can you pastebin the patch?  (Probably easier for me to grok that way :)11:44
xaelhttp://pastebin.com/1j1yzxYB here you go, i pasted the whole function11:46
Odd_Blokexael: That looks pretty sensible. :)11:49
xaelwhat do you mean by sensible?:))11:52
Odd_Blokexael: I mean: That looks like a change we should include in cloud-init. ^_^11:52
xael:D11:53
xaelOdd_Bloke: did you manage to look over the datasource I sent you before the holidays?11:56
Odd_Blokexael: I didn't, I think that must have got lost in the shuffle, I'm afraid.12:17
Odd_Blokexael: Could you send it over again?12:17
xaelof course12:20
Odd_Blokexael: Sorry about that!12:21
xaelno problem :D12:21
xaelsent, could you please tell me if you received it?12:25
Odd_Blokexael: Received; thanks. :)12:29
Odd_Blokexael: I doubt I'll be able to get to it today, but I'll try to have a look on Monday. :)12:29
xaelno rush12:31
Odd_Bloke:)12:36
atonalHello, is user-data supposed to merge with stuff from /etc/cloud/cloud.cfg?12:51
atonalI have merge_type: 'list(append)+dict(recurse_array)+str()' in the user-data, but merge doesn't seem to happen12:51
larsksatonal: what in particular are you trying to merge?13:08
atonallarsks: some users13:20
atonalIf I have two separate configs in the heat template with merge_type, they merge together fine, but stuff from /etc/cloud/cloud.cfg is missing14:28
atonalAnd if I remove the configs from the heat template, I get the stuff from /etc/cloud/cloud.cfg14:28
smoseratonal, can you show what you have in user data ?14:29
larskssmoser: I think I can replicate the problem.  I'm using this: http://chunk.io/f/6d69899a5f95470a8248256b731848bf14:48
larskssmoser: that seems to be *replacing* the users: block in /etc/cloud/cloud.cfg, rather than merging.14:48
atonalyes, that's close to what I have14:48
larsks(on my test systems, the users: block in cloud.cfg contains only "- default"14:49
larsks)14:49
larsksatonal: for what it's worth, I've always found the merging support in cloud-init to be confusing at best.  smoser and I have had several discussions where the outcome was "huh, I guess that won't work".14:51
atonalConfusing it definitely is.14:51
smoserlarsks, i agree with you14:54
smoser:)14:54
smoserthe merging is fairly straight forward for dict14:55
smoserand generally does the right thing14:55
smoserbut for lists, its wierd. and by default it just replaces lists.14:55
atonalBut in general, merging user data and /etc/cloud/cloud.cfg _should_ work? Or is this some undefined-behavior-land?14:57
smoseryeah.. but ther are some caviats.15:00
smosercaveats15:00
smoseratonal, for testing you can do this15:00
smoserPYTHONPATH=$PWD ./tools/ccfg-merge-debug config/cloud.cfg cc.cfg  > out.115:00
smoserjust from trunk. it will output a merged file.15:00
larsksatonal: I have never been able to successfully merge something with cloud.cfg, although i was trying to modify things like cloud_init_modules which if I recall are simply parsed too early in the process or something like that.15:00
smoseri did hyave to change the config/cloud.cfg to have '#cloud-config' at the top or it doesn't get considered cluod-config.15:01
smoserinit_modules is parsed too early15:01
smoserbut config_modules and final_modules can work..15:01
larsks...although those are lists, like users:, and since the users merge doesn't seem to be working even with list(append), I'm wondering if those will work.  I guess that's a quick test...15:02
* larsks tests.15:04
smoseractually... init_modules should be able to be re-written too.15:06
larskssmoser: you and I had looked at something like that in the past and discovered that I think it wouldn't work.  I thought.15:07
larsksI'd have to see if I still have the irc logs...15:07
smoseryeah. i think there is an issue with merging over builtin configs.15:09
smoserbut i thoguth i would have ahd a bug on it and i dont see it.15:09
larskssmoser: so, e.g, this appears to just override cloud_config_modules rather than appending: http://chunk.io/f/f3325b6193234a87a8ac4c1fa960496615:11
SuperLagI am still having issues getting my config to work. I just want to specify a user, and set up specific SSH keys for that user, and have that go into each instance I spin up. My config is at http://pastebin.com/ekjhZAEr.15:14
SuperLagDo you need to include every section in your cloud.cfg, and just leave the non-relevant parts blank? or do you only include the parts that you need?15:16
smoserlarsks, yeah, thats the issue. the merges only apply to config coming in in user-data.15:18
smoserwhich would also be why the users dont work as expected.15:18
smosercould you open a bug, just point to your data. i'd like to fix that.15:18
larskssmoser: sure.15:19
larskssmoser: https://bugs.launchpad.net/cloud-init/+bug/153223415:22
smoserSuperLag, the data you have there is not valid yaml15:22
smoserthere is probably a WARN message to this affect in /var/log/cloud-init.log15:23
smoserbut you can easily test yaml just with:15:23
smoser python -c 'import yaml, sys; yaml.load(open(sys.argv[1]).read())' foo.yaml15:23
smosernow, that said, i'm not certain that ssh keys are added to a user if the user is not created. let me check15:23
smoserit should.15:24
smoserlarsks, that is awell written bug report15:24
smoserthank you.15:24
openstackgerritJoshua Harlow proposed openstack/cloud-init: Change stackforge to openstack  https://review.openstack.org/25668423:10
openstackgerritJoshua Harlow proposed openstack/cloud-init: Update .gitreview for new namespace  https://review.openstack.org/23628923:10
openstackgerritJoshua Harlow proposed openstack/cloud-init: Update stackforge to openstack  https://review.openstack.org/23745223:11
openstackgerritMerged openstack/cloud-init: py26 is no longer supported by Infra's CI  https://review.openstack.org/26171823:19
openstackgerritMerged openstack/cloud-init: Deprecated tox -downloadcache option removed  https://review.openstack.org/25669423:26
openstackgerritMerged openstack/cloud-init: Update stackforge to openstack  https://review.openstack.org/23745223:49

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