/srv/irclogs.ubuntu.com/2017/08/30/#cloud-init.txt

basilABI was trying to use cloud-init (version:  0.7.5) on ubuntu-14.04. I am finding issue in appending ssh key to authorized from 'OpenStack' metadata. But it is working with 'ConfigDrive'00:55
basilABhttps://pastebin.com/0JPwU8fK00:56
robjosmoser: Can take another look at https://code.launchpad.net/~rjschwei/cloud-init/+git/cloud-init/+merge/329616 and merge or let me know what else needs fixing?11:58
niluje:<13:36
smoserwhats up niluje13:46
smoserrobjo, ... looking now13:47
smoserbasilAB, is that your holw /var/log/cloud-init.log ?13:48
basilABsmoser: yes. 'grep' with 'failed'13:49
basilABmy host has python2.7 and python 3 on the host and can see all the modules called under python2.713:50
afrancWhen does cloud-init detect payload as `text/x-not-multipart` ?14:33
afrancI passing a shell script as a user data but when i start some extra commands, the ShellScriptPartHandler detects the content as `text/x-not-multipart` ending it up as an `Empty payload`, logs - https://pastebin.com/raw/sd32FqJw14:39
smoserfun14:41
smoserhttps://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/32992614:41
smoserrobjo, i responded in mp14:41
smoserbasilAB, can you paste the hole log ?14:42
robjosmoser: thanks will get back to it today14:42
smoserblackboxsw, see merge above. powersj interested in your feedback there too14:42
smoserafranc, what was the problem ?. can you post an entire log and tell me what you expected ot happen and what didn't?14:43
blackboxswgrabbing it now14:43
powersjsmoser: ah yes I saw this fail recently on my artful box14:45
smoseri think that the MP above is really all we can do, but that means somehow we  have to have jenkins test runners have python3.514:45
smoseras i really want c-i to report failures that would be seen in xenial14:46
smoseri guess alternatively we could un-pin jsonpatch14:46
smoseror pin at a newer (artful) version and just live with the risk of differences14:47
basilABsmoser: Here is the full log https://paste.ubuntu.com/25432350/ (The problem which I was checking was to see why ssh key available in the metadata is not getting appended to ubuntu user)14:50
basilABI can see the user getting created14:50
smoser2017-08-30 14:45:00,079 - cc_final_message.py[WARNING]: Used fallback datasource14:52
smoserthat means it did not find a metadata service to use.14:52
afrancsmoser  i have posted both user-data and cloud-init.log which is failing - https://pastebin.com/raw/zEtB6XDf14:52
blackboxswsmoser: per your branch on xenial is it worth us adding a python3.6 tox env to better exercise 3.6 issues?14:53
smoserbasilAB, your networking seems to not have come up.  in 14.04 you have to have an /etc/network/interfaces that defines basically "dhcp on eth0".14:54
smosercloud-init assumes the systme is set up to configure networking.14:54
afrancsmoser  if i have a user-data like this https://pastebin.com/raw/wiDx027d, the ShellScriptPartHandler detects the content as `text/x-shellscript` writes it to `/var/lib/cloud/instance/scripts/part-001` and executes it fine14:54
smoserblackboxsw, well that becomes hard to run then from xenial14:54
afrancsmoser but if the user-data has additional commands like in https://pastebin.com/raw/zEtB6XDf, the `ShellScriptPartHandler` handler detects it as `text/x-not-multipart` and complains it as `Empty payload of type text/x-not-multipart` and writes it as `Writing to /var/lib/cloud/instances/af23b054-f125-4821-8639-084933ad7244/cloud-config.txt - wb: [384] 0 bytes` and do not execute the entire shell script from user-data14:56
afrancsmoser i wanted to know why adding extra commands, make the `ShellScriptPartHandler` detect the content as `text/x-not-multipar`14:58
-basilAB:#cloud-init- I have'source /etc/network/interfaces.d/*.cfg' in '/etc/network/interfaces . Interface configuration: https://paste.ubuntu.com/25432392/14:58
smoserafranc, i suspect you might not have an 'eth0' device?14:59
smosersomething made networking not come up14:59
smoserer.. sorry. not afranc above, but basilAB .14:59
afrancok14:59
basilABhmm.. I do see eth0 up with an IP assigned from DHCP after cloud-init run. Are you saying it is a timing issue ?15:01
smoserafranc, nothign created the user 'ubuntu' i think15:01
smoserafranc, what image are you using ?15:01
afrancsmoser  Ubuntu 14.04.2 LTS15:02
smoserfrom cloud-images.ubuntu.com ?15:02
smoseror did you build one15:02
afrancsmoser, i build one .15:03
afrancsmoser  i am confused because at some cases shell script as user-data works15:03
smoserafranc, well, cloud-init failed to find the datasource.15:18
smoserso it didn't get your user-data15:18
afrancsmoser doesnt this confirm `2017-08-30 14:48:06,025 - util.py[DEBUG]: Crawl of openstack metadata service took 36.475 seconds`15:22
afrancand this log - https://pastebin.com/raw/v4215hr8 is a working case using the same cloud.cfg15:22
smoserafranc, i'im confused a bit on what happened there.15:26
smoserbouncing the networking is wierd. 14.04 doesn't do networking that well. i do not think that the format of the user-data is your problem.15:27
afrancsmoser  this is a log from file from a working use case - https://pastebin.com/raw/wh2yyfQZ15:29
smoserafranc, well, a log of *only* that boot would be good too15:29
smoserthe one you posted has multiple boots15:29
smoserand i'd really suggest sanity checking *anything* against an official ubuntu image.15:30
afrancthis is another log file from non-working use case - https://pastebin.com/raw/UESQGp7S15:30
afrancok15:30
afranci was only seeing the difference in the way the `ShellScriptPartHandler` detecting the user-data15:30
afrancfor a working use case it detects the user-data as `text/x-shellscript` and the case where it doesn't work, it detects it as `text/x-not-multipart'`15:31
afrancok. i will do the sanity check on the image15:32
smoserafranc, possibly you have a space at the beginning of it ?15:35
smoserit only will read the first line. and expects it shoudl start with '#!' to be a shellscript15:36
afranci see. i will double check15:37
afranchow does it detect the content as `text/x-not-multipart` ?15:37
smoserit doesnt know what it is. thats just fallback.15:48
afranci see15:54
smoserrharper, fwiw, i think i agree with xnox's mp for upstart in artful.15:55
smoserhe doesnt delete the upstart/ jobs just removes the packaging of them in artful15:55
smoserand if all other ubuntu packages have done that, then cloud-init in ubuntu shoudl too.15:55
rharpersmoser: ok15:56
afrancthanks smoser  i will dig this further15:57
rharpersmoser: IIUC, when there is an artful+1;  it will get branched from master, so we'll need to re-apply the same MP to that from master;  no?  So, it seemed to me that upstream should need some changes so that a downstream would opt-in to those files being packaged; I dunno15:58
smoserno. master has no debian/15:58
smoserit has packages/debian15:59
smoserand packages/debian/rules *does* have 'upstart' in it. but we can drop that. it doesnt really hurt anything.15:59
smoserbasically the plan is that ubuntu/devel branch will always go on being ubuntu/devel (right now that is artful)16:00
rharperalso, downstream branches also have a cloud.cfg that'll have the emit upstart and other upstart related runtime files16:00
smoserthe first time we need to SRU to artful, we create ubuntu/artful branch. (or we can do taht whenever artful releases... doesnt really m atter).16:00
rharpergenerally I was hoping that we'd comb through master to find out what a 'non-upstart' code base would need to look like16:00
blackboxswrharper: were you referring to this locale branch in standup today? https://code.launchpad.net/~raharper/cloud-init/+git/cloud-init/+merge/32915216:06
rharperyeah16:06
blackboxswthat you mentioned you had updated yesterday?16:06
rharpery16:07
blackboxswlast commit pushed was 08-1616:07
rharpercan't be16:07
blackboxswI don't see the changes that were discussed between you and smoser16:07
blackboxswhmm refreshing16:07
blackboxswmaybe launchpad is falling apart. I'll try a clone and see if I see changes16:08
rharperok16:08
rharperit looks fine to me in lp16:08
rharpermaybe because of rebase?  I dunno16:09
nacccommit authorship date != push date16:09
naccand if you do amending, etc. the date won't necessarily change16:09
rharpernacc: thanks16:09
nacci think LP uses author date, rather than commit date (or v.v). I can't recall16:10
naccbut i've seen similar artifacts16:10
blackboxswhmm I'm only seeing cf1c4106545b6acceded30ae9f3f65910277335e16:10
rharpercf1c4106545b6acceded30ae9f3f65910277335e is where it's at16:11
rharperblackboxsw: see nacc's comment16:11
naccblackboxsw: you could try and look at `git log --pretty=full` to see the commit and authorship dates both16:12
nacci think that's the argument16:12
naccoh 'fuller'16:12
blackboxswnacc +1 on that.16:13
blackboxswhmm. rharper I thought you made references to authorship changes you made yesterday. I was expecting to see some changes that we determine needs_regen value based on a call to 'locale -a'16:18
blackboxswmaybe I misunderstood from standup. Was your intent to avoid the extra exec in querying whether the local was already generated?16:19
rharperblackboxsw: we're not querying what's present via locale -a; rather the change was to read the distro default locale config file, and if that has a set value, to assume the image is built correctly and not regenerate then16:21
rharperit handles if the file is present but has no value, or if missing, and will regen as needed there16:21
blackboxswok gotcha, thanks for the correction. ok, makes sense to rely on images to be properly built16:22
rharperI think the path we took was that the image builder should be in control of what the default lang for the image is, and declare that in the correct distro location;, cloud-init will read that and respect it;  if an image is built with locales but left unset, then cloud-init will regenerate the cloud-init default locale16:22
rharperblackboxsw: right16:22
rharpermy most recent change was the keep around the value present in the default locale config file and have that be separate from the cloud-init default/fallback value so we can reason on whether we need to update the locale config file, as well as regenerate16:23
blackboxswgotcha, and you must've squashed your commits then16:26
blackboxswwhich is why I didn't see updates16:26
blackboxswok16:26
rharperblackboxsw: I did16:29
rharperone of the reasons smoser liked bzr (-n 0 would show you the evolution of the code)16:29
dpb1cloud-init summit notes posted: https://lists.launchpad.net/cloud-init/msg00094.html16:35
smoserman. look at that active mailing list16:35
smoser3 messages in 2 days!16:36
* smoser just sent https://lists.launchpad.net/cloud-init/msg00095.html16:36
dpb1smoser: I almost couldn't find the archive link!16:36
dpb1smoser: can I modify the review to be a bit.ly link?16:36
dpb1(in topic)16:36
Odd_Blokeunsubscribe16:38
dpb1Odd_Bloke: you always have to be the center of attention16:38
smoserdpb1, i will.16:40
Odd_Blokedpb1: I find it's better for everyone.16:41
smoserOdd_Bloke, is that if you're the center of attention or if you leave the playground (unsubscribe)16:42
dpb1smoser: thx, can we also put up a bitly for the email list? like, | mail list: http://pad.lv/~cloud-init |16:43
=== smoser changed the topic of #cloud-init to: reviews: http://bit.ly/ci-reviews | mail: http://bit.ly/ci-mail-archive | docs: http://cloudinit.readthedocs.io/en/latest/ | next meeting Tue, 05 Sep 2017 16:30:00 +0000
smoserhow's that?16:45
dpb1nice16:46
Odd_Blokesmoser: Little bit of column A, little bit of column B.16:46
dpb1smoser: wish there was a way to inject text into this page: https://code.launchpad.net/~cloud-init-dev/cloud-init/+git/cloud-init/+ref/master/+activereviews16:47
dpb1smoser: like describing what it meant for something to be wip16:47
dpb1smoser: but, oh well16:47
naccdpb1: per project? yeah, i agree16:47
dpb1(going back to what we were discussing earlier about WIP branches)16:47
naccdpb1: i'd file a bug on launchpad16:48
nacctbh16:48
dpb1nacc: you have the same ask for #ubuntu-server stuff too, right?16:48
naccdpb1: yeah, and i imagine any team would like to put 'policy' somewhere that's well-defined and have LP display it16:48
dpb1nacc: ok, I will  no sense complaining about it in #cloud-init channel16:48
dpb1lol16:49
naccif they are using git on LP, i mean16:49
dpb1thx, good suggestion16:49
blackboxswrharper: approved with nits https://code.launchpad.net/~raharper/cloud-init/+git/cloud-init/+merge/32915216:51
robjosmoser: https://code.launchpad.net/~rjschwei/cloud-init/+git/cloud-init/+merge/329616 should be all set now16:56
blackboxswhttps://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/329946 looks good. a doc nit and and a question for you smoser17:22
blackboxswnice robjo, I'll glance over that too today to catch up on opensuse context.17:22
smoserblackboxsw, please do. i am basically good with it at this point. the tests bare minimum, but better than there *was* so i didnt want to tax robjo wit their creation.17:23
blackboxsw+1 landing it smoser don't wait on me for that :). but yeah I had missed his branch earlier so wanted to read it a bit more17:24
smoserblackboxsw, responded17:28
smoserhttps://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/32994617:28
smoserand updated with doc removal. good catch on that . thank you.17:28
smoserrharper, i had a question on your locale mp also17:28
rharpersmoser: here17:33
smoserrharper, see mp.17:35
rharperk17:35
smoseryou can answer here if you want more real time17:35
rharpersmoser: hrm, you're right;  I don't really like the idea of reading the same file twice in the default/common path; so either if we write an updated locale conf, we invalid the cached variable, or we just let it always read the file17:40
smoserrharper, oh. i was just suggesting when you successfully 'apply', then you can just set the new value.17:42
smoserbut yeah, setting it to None would do the same thing and just force a re-read17:42
rharperok; that works17:42
smoseryeah. just update it.  since you're caching it you are guaranteed to possibly be out of date17:42
smoserso setting it (rather than setting it to None) doesn't make it any worse17:43
rharperright17:43
rharperwe're not really protecting against file system writes underneath us17:43
rharperpossibly if we were to be daemonized and called a second time to switch locales;17:44
rharpersmoser: blackboxsw: thanks for review, working on an update17:51
smoserblackboxsw, so your change at https://code.launchpad.net/~chad.smith/cloud-init/+git/cloud-init/+merge/32987217:55
smoserthat does change to doing a 'import oathlib...' every time oauth_headers is called17:55
smoseri guess if you like the clarity it seems the performance is not terribly worse off.17:58
smoser>>> timeit.timeit("bool(oauth1 is None)", setup="import oauthlib.oauth1 as oauth1")17:59
smoser0.296416304074227817:59
smoserversus17:59
smoser>>> timeit.timeit("import oauthlib.oauth1 as oauth1")0.53106077690608817:59
smoser(default is 1M runs)17:59
* rharper wants is 2 tenths of a second back18:04
smoserpowersj, updated https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/32992618:09
smoser2 tenths of a second per 1M runs, rharper18:09
rharperthe average over 1M runs18:09
rharperno?18:09
rharperor total time?18:09
rharperyeah, you're right18:10
rharperor is that per loop? I'm confused now18:10
smoserthat shows total time18:10
rharperpython3 -m timeit '"-".join(str(n) for n in range(100))'18:10
rharper10000 loops, best of 3: 30.2 usec per loop18:10
smosertimeit does18:10
rharperhttps://docs.python.org/3/library/timeit.html18:10
smoserthe python -m might be different.18:11
rharpertimeit.timeit('"-".join(str(n) for n in range(100))', number=10000)18:11
rharper0.301861184882000118:11
smoserthe above definitely ran 1M imports in .3 seconds18:11
rharpernope18:11
rharperpretty sure that's time per loop18:11
smosernah. i'll show18:11
rharperI mean, there are words on that page18:11
smosertimeit.timeit("time.sleep(1)", setup="import time", number=3)18:12
smoser3.002655092859640718:12
rharperthat is really  bizarre that the cli and the library differ ; =(18:14
smoserblackboxsw, rharper please re-review https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/32981119:36
rharperk19:37
smoserand blackboxsw https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/32981119:38
blackboxswre-reading both19:39
blackboxswhmm that's the same link19:39
blackboxswand testing mkdtemp on permissions set.19:39
smoserblackboxsw, hm.. second ment to be19:40
smoserhttps://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/32994619:40
smoserblackboxsw, i will come back in later tonight and will pan on doing an artful upload.19:44
blackboxswsounds good smoser thx19:44
smoserand https://code.launchpad.net/~chad.smith/cloud-init/+git/cloud-init/+merge/329872 is in now.19:45
rharpersmoser: blackboxsw: I'll try to have an update to locale branch soon so it can get reviewed prior to smoser's return tonight19:51
blackboxswsmoser: thanks on the land. So, per import attempts inside oauth_headers (rharper too) this is a performance impact to every publish_event webhook in maas right?20:35
rharperack20:35
blackboxswroger. ok.20:36
rharperat least I think so20:36
rharperblackboxsw: well, I think we reasoned that 1) it only imports it once 2) systems without ouath pay the most (try to import again)  3) maas systems have oath20:36
rharperso, it should have no per-message impact on ubuntu (which is where the maas reporting with oauth is most used)20:37
rharpernon-ubuntu are unlikely to use the MAAS Datasource, so won't pay for the re-import attempt20:37
blackboxswright, ok that's reasonable. (and given that systems without  oauth would break if they tried calling oauth_headers in the first place, we're safe there).20:38
rharperright, pay once and then stacktrace20:38
powersjblackboxsw: FYI https://bugs.launchpad.net/cloud-init/+bug/171411723:48
ubot5Ubuntu bug 1714117 in cloud-init "tox: long CI times" [Undecided,Confirmed]23:48

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