/srv/irclogs.ubuntu.com/2017/05/25/#cloud-init.txt

smoserblackboxsw, yeah, i got the gist.01:00
smoserblackboxsw, your python2 shines through01:08
smoser(iteritems() is not python3 :)01:08
smoserpushed to https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+ref/cleanup/mask2cidr01:13
blackboxswwhoopsie. right grr, need to be more careful01:22
smoser<smoser> powersj, if your'e still arond01:41
smoser<smoser> i think that centos6 migith be as easy as01:41
smoser<smoser> https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/32458501:41
smoserblackboxsw, then... some python2.6 breakage from ntp01:41
smoser:-(01:41
smoserhttp://paste.ubuntu.com/24650034/01:41
smoserthere... https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/32458501:45
smoserthat fix there too now01:45
smoserand /me goes away 25 minuts late01:46
askbsmoser, seems like running into other ssh issues with 0.7.902:42
blackboxswhttps://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/324585 approved02:42
askbsmoser, here are the logs: http://paste.openstack.org/show/610611/02:45
powersjI propose we use 0.8 to drop python 2.6 support ;) centos 6 dropped full update last month and is only in maitence mode if I am reading dates right.03:14
askbpowersj, is there a python version dependency for cloud-init to work with centos7 ?03:20
powersjaskb: I think since centos 7 has 2.7 if I recall it isn't an issue03:23
askbpowersj, is 0.7.9 tested to work with centos7, running into issues: http://paste.openstack.org/show/610611/03:26
askbpowersj, mainly with ssh restart failure and failed to disable password for ubuntu user03:27
askbIs this a known issue ?03:27
powersjI'm not familiar with any issues, if you run the command manually what happens?03:30
powersjAs far as testing l, all I have in place right now is unit testing and package build. Working on getting some initial integration tests going next month.03:30
powersjAll on centos 6/703:30
powersjI'm not too sure how the version of cloud init gets into the images or that process but also need to research that03:31
askbhow do you run the cmd manually ?03:32
powersjAskb did you file a bug?03:32
askbcloud-init single -n cc_scripts_user03:32
askbyes - the original issue was with version 0.7.5 which is pretty old from centos7 repo03:33
askbbug: https://bugs.launchpad.net/cloud-init/+bug/169242403:33
ubot5Ubuntu bug 1692424 in cloud-init "util.py[WARNING]: Failed to disable password for user centos" [Undecided,New]03:33
powersjSorry to be more clear, try running the failing commans "passwd -l ubuntu"03:33
askbso I built an rpm with 0.7.9, now testing it again with the latest centos7 image has brought me to  http://paste.openstack.org/show/610611/03:34
askbfor running the cmd manually, now my user data script is not even available under /var/lib/cloud/scripts/*03:36
powersjaskb, Hmm I can try to look in the morning, easier when I'm not on my phone. Thanks for filing a big. Tbh I'm not familiar with the heat templates, but will look03:39
askbpowersj, thanks would appreciate that! ... btw ... there are several post on the net with users running into similar issues with 0.7.5 with no solution/work around unfortunately03:41
powersjaskb: if you have time can you add an example of those posts to the bug as well as what image you are using in the first place03:42
askbsure thing!03:43
askb2017-05-25 03:48:22,464 - util.py[WARNING]: Failed to disable password for user ubuntu03:49
askb2017-05-25 03:48:22,465 - util.py[WARNING]: Running module users-groups (<module 'cloudinit.config.cc_users_groups' from '/usr/lib/python2.7/site-packages/cloudinit/config/cc_users_groups.pyc'>) failed03:49
=== sambetts|afk is now known as sambetts
=== rangerpbzzzz is now known as rangerpb
smoserblackboxsw, you have merge conflicts https://code.launchpad.net/~chad.smith/cloud-init/+git/cloud-init/+merge/32449915:34
blackboxswsmoser: oops botched the conflict resolution in lp, clean proposal is at https://code.launchpad.net/~chad.smith/cloud-init/+git/cloud-init/+merge/32464017:18
=== sambetts is now known as sambetts|afk
blackboxswtrashed cc-ntp-schema branch17:18
blackboxsws/trashed/deleted17:19
smoserblackboxsw, ok. i will review locally17:20
blackboxswthanks17:21
smoserblackboxsw, fyi, that has c-i Needs fixing17:21
blackboxswlooking it over17:21
smoserblackboxsw,17:23
smoser$ ./tools/cloudconfig-schema --doc # to dump rst from the schema definition17:23
smoserbash: ./tools/cloudconfig-schema: No such file or directory17:23
blackboxswsmoser: are you refering to "RuntimeError: Device /dev/xdb1 did not exist and was not created with a udevamd settle."/17:23
smoseri was talking about https://code.launchpad.net/~chad.smith/cloud-init/+git/cloud-init/+merge/32464017:24
smoserblackboxsw, and also ^ . wasa the description still supposed to be valid ?17:24
smoseryou didnt add tools/cloudconfig-scheme17:25
smoseryou didnt add tools/cloudconfig-schema17:25
blackboxswsmoser: just pushed thx17:25
blackboxsw4858a3417:26
smoserblackboxsw, git push --force ?17:31
smoseri dont see it here.17:31
blackboxswsmoser: now?17:31
smoserblackboxsw, https://code.launchpad.net/~chad.smith/cloud-init/+git/cloud-init/+ref/cc-ntp-schema-validation17:35
smoser"28 minutes ago"17:35
blackboxswsmoser: dumb. fixed17:40
blackboxswPEBKAC17:40
sauloaislanHi!!17:43
sauloaislanI'm having a problem, my cloud init does not work on openstack with network interface neutron. I'm doing a deploy with network interface neutron using a simple cloud init, but I can not log in to the VM.17:46
smosersauloaislan, can you see a console log ?17:47
smoseror ideally you can get the cloud-init.log file off the system as that will likely have some info.17:47
sauloaislanIf I do a deploy with the network flat interface and the same cloud init I can login17:48
rharpersmoser: hrm, so, the .link files for rename are somewhat racy with udevd and the udev hotplug rules 80-ifupdown.rules I'm seeing the ipv6 vlan network configuration ...17:58
smoserrharper, i dont think they should be racy18:00
rharperwell, I wish it weren't either18:00
smoserit should be very deterministic. it may not do what you want. but i dont think it should be racy.18:00
smoserthe .link files definitely run last18:01
smoserand only apply if the device hasnt already been renamed18:01
smoser(that is what i recall at least)18:01
rharperI need to keep digging, but if I move the .link files out of the way, it all works fine;18:02
rharpermy concern is that I don't at which point the .link files apply vs. when the 80-ifupdown.rules run ; this is all prior to cloud-init local;18:02
smoserhttps://bugs.launchpad.net/ubuntu/+source/systemd/+bug/157913018:02
ubot5Ubuntu bug 1579130 in systemd (Ubuntu) "need to support renaming of devices in container and on first boot" [Wishlist,Triaged]18:02
smosertheres a lot of info there.18:02
rharperit appears like the interfaces are already named correctly but there's something going on with the vlan interface names18:02
smoserremember the .link files get into the initramfs18:03
smoser(although the udev rules would to)18:03
rharperhrm18:03
rharperon the second reboot ?18:03
rharperor after reboot,?18:03
smoserwell, cloud-init doesnt actully force re-generation of initramfs18:03
smoseras that'd be really heavy18:04
smoserand as we found in that bug above, wouldnt necessarily fix anything18:04
smoserso cloud-init makes sure it renames everthing it can by itself18:04
rharpersmoser: https://code.launchpad.net/~raharper/curtin/trunk.passthrough-netconfig , and XenialTestNetworkIPV6Vlan (or any of the IPV6Vlan) break18:05
rharperif we write the .link files (which we do in cloud-init, but not in curtin)18:05
smoserrharper, https://bugs.launchpad.net/cloud-init/+bug/159454618:10
ubot5Ubuntu bug 1594546 in cloud-init "no need to write systemd.link files" [Medium,Fix released]18:10
smoserwe *had* stopped writing them at one point.18:10
smoserwhyd'd we start again18:10
rharperISTR we thought it was harmless18:13
smoseref18b8ac4 put them back18:15
smoser:-(18:15
smoserrharper, i think what you're saying is that when cloud-init does netplan config it is still writing those .link files18:16
smoserand netplan is (i assume) also writing .link files18:16
smoserso that' dget harry18:16
rharpernetplan will write .link files;18:17
* rharper looks at ef18b8ac418:17
rharperhrm, I'm not seeing it, the links_path shouldn't be set when we instantiate an eni renderer18:24
smoseroh. maybe i read wrong18:28
smoserbut as you see, we are creating them, right?18:28
smoserrharper, thoughts on  https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/32463918:29
smoserit doesnt adda  unit test, but unit tests aren't easily useful in this scenario18:30
Odd_BlokeHmph, just discovered I've been sitting in #cloud-init on Canonical IRC since I last restarted weechat. >.<18:32
smoserOdd_Bloke, do you know.. was https://code.launchpad.net/~daniel-thewatkins/cloud-init/+git/cloud-init/+merge/32464219:02
smoseralways just *wrong* or did it get changed?19:02
smoserit seems odd that they would change instance/attributes/sshKeys to instance/attributes/ssh-keys while leaving the camelcase project/attributes/sshKeys19:03
Odd_Blokesmoser: It did get changed.19:12
Odd_Blokesmoser: Changing instance metadata keys is easier for them than project metadata keys.19:13
rharpersmoser: yes, they are getting created, I need to see why19:13
smoserOdd_Bloke, i asked in the mp, and asked for an update.19:14
smoserit seems very odd.19:14
smoserpylint tells me now:19:14
smoser Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00)19:15
smoserwhich is odd.19:15
smoserOdd_Bloke, if you fix that quick, i'll grab it and get it into artful end of day19:18
smoserand intend to prepare sru of trunk soon19:18
Odd_Blokesmoser: Updated.19:24
rharpersmoser: turns out that with no config passed to the renderer class, you get the defaults, which currently defaults to rendering the .link files for eni19:34
rharperI think it may make sense to set in the ubuntu distro class the links path to None, which would stop rendering them19:36
smoserrharper, that is what it previously had, right?19:37
smoserefef1c263ab1c473fd90f3782a785edab7d0243019:37
rharperhrm, we also have the 70-persistent rules19:37
rharpersmoser: I think so19:37
smoserwe do need the 70-persistent rules, i think.19:38
smosermaybe not.19:38
rharperwell, cloud-init does the rename19:39
smosercloud-init will take care of renaming any non-virtual devices that are present when init runs19:39
rharperright19:39
smoserbut if they are not present, then it wont do it19:39
rharperand udev rules and .link files are for physical19:39
smoserso i think we were relying on udev to do anything cloud-init couldnt do because it wasnt there yet.19:40
Odd_Blokesmoser: Thanks for the review+merge. :)19:41
rharpersmoser: I think you're right; after lxd, we had to do rename in cloud-init;19:45
rharperwhich removed the need to rely on udev for that19:45
smoserexcept for devices that are not present when cloud-init runs19:46
smosera device could have a name and networking infromation but not a address19:46
smoserand cloud-init should then arrange for it to get the right name19:47
smosereven though it wont be up (and may not even be around yet) when cloud-init init runs.19:47
smoserii think19:47
smoserrharper, or blackboxsw i'd appreciate https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/32463919:50
rharpersmoser: you're thinking a manual interface?  cloud-init will still attempt to provide a name for physical interfaces in network-config no matter if it has a subnet or not19:51
rharperon the control-hotplug; that may be right19:52
rharperwe could modify the rules and links to be rendered for missing interfaces or ones marked control: hotplug19:52
rharperbut it does seem strange to have some in the rules/links file but not others;  however; I don't see how we can disentangle the different rules which are attempting to do renames19:53
smoser http://paste.ubuntu.com/24658740/19:55
smoserthat would seem valid config. and if 'eth1' just wasnt there when cloud-init ran, you'd hope that it wouuld have still arranged for it to get the right name19:56
smoserrharper, i think we just render the udev rules for everything19:56
smoserwe can't rely on .link files... they suck19:57
smoserso we render udev rules for everything19:57
rharperfor all physical devices, yes19:57
smosercloud-init does the right thing and only attempts rename if it needs to19:57
rharperyes19:57
smoser"physical" including veth19:57
smoser:)19:57
rharperthat bears out too, if I remove the .link files and leave the .rules one, we;re fine19:57
rharpersure19:57
smoseri dont understand though why the .rules would break anything19:57
rharperI was referring to the possible interfaces from the network config19:58
smoseri really thought they are not supposed to do anything if a udev rule named them19:58
rharperI;m not sure that they do interfere at this time19:58
rharperwas just wondering why we did both .link and .rules19:58
smoserby accident19:58
smoser:)19:58
smoserdoh!19:58
smoserso when you fix that, please add a test case19:59
rharperyes19:59
smoserit always feels wrong to remove code that you think you might need in the future20:01
rharperheh20:01
smoserbut it might be the right thignto do to remove the support for rendering of the .link files20:01
rharperI think so20:01
rharpersmoser: so I'll do a patch that just pulls .link rendering completely20:07
rharperthat should keep this pretty clean, and then unittest updates should all be that's needed20:08
=== rangerpb is now known as rangerpbzzzz
askbpowersj ping23:10
powersjaskb: howdy23:11
askbpowersj, hey ...23:11
askbre the auth_url message, wondering how I could help with that23:12
askbyou are most likely seeing the error "Missing value auth-url required for auth plugin password" because that has to be source through ~/.config/openstack/clouds.yaml or RC file or as an env variable23:12
powersjah ok23:13
powersjcan you try running the validation script and get the results?23:13
askbbasically, the template itself works pretty well, since about 200 jobs run using those template23:13
askbuntil recently cloud-init stopped working23:14
askbsure, let me check23:14
powersjaskb: interesting. Do you have copies of the images you used? Is it possible to see what changed to the image?23:15
powersjoriginally I believe you said you were running a fairly old version of cloud-init, so I find it unlikely that behavior in cloud-init has changed causing the issue23:15
askbwhen I run the validate-script on the template, it returns nothing, no errors23:17
askbso that should be good23:17
askbcentos7 repo distributes 0.7.5 version of cloud-init23:18
askbthe newer images have package updates of possible dependencies23:20
askbI need to dig into the images to get a proper delta of the deps between new and old image23:20
askbwill do it a bit later today23:20
askbin the meantime, are there any basic tests for cloud-init which could be run on the instance to make sure its working fine or narrow down the issue23:21
askbyesterday, while running 0.7.9 this gives a different error:23:22
askb2017-05-25 02:07:00,591 - util.py[WARNING]: Failed to disable password for user ubuntu23:22
askb2017-05-25 02:07:00,593 - util.py[WARNING]: Running module users-groups (<module 'cloudinit.config.cc_users_groups' from '/usr/lib/python2.7/site-packages/cloudinit/config/cc_users_groups.pyc'>) failed23:22
askbI am unable to understand why its looking for ubuntu user on centos box ?23:23
powersjAs the pastebin's showed cloud-init was trying to run the passwd command when it failed, yeah the ubuntu user was also odd.23:23
askbpowersj, is the issue with 0.7.9 and 0.7.5 possibly the same ?23:32
askbfrom the logs23:32
askbother than the dependencies is there anything else I could provide or run some other tests23:33
powersjaskb: well you got the same error messages if I recall. However, I still wonder what changed on the system to cause the error in the first place. If you aren't expecting an ubuntu user, what change caused that? trace back to that first and that might determine why cloud-init is failing.23:34
powersjif you can get us the images themselves that might help.23:34
askbthe ubuntu user error was seen with 0.7.9 and centos user error was seen on 0.7.523:35
askbok will see if I can get the images23:35

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