/srv/irclogs.ubuntu.com/2017/10/26/#cloud-init.txt

smoserckonstanski: reviewed your two MP, i'll grab those tomorrow.02:08
smosernote my updates to commit messages we'll use those.  I realize they're long windeded for the changes but i like to read git logs (yeah, i'm that nerdy).02:09
smoseralso, LP: #XXXXX02:09
smoseris the way you reference a bug.02:09
smoserThanks!02:09
ckonstanskiWill do. At Charter se used Issue: #xxxxx. In Openstack it's Closes-Bug: xxxxx. One more to learn.02:20
ckonstanskiThe perfect couple of bugs to learn the ropes.02:27
powersjsmoser: here is the merge https://code.launchpad.net/~powersj/cloud-init/+git/cloud-init/+merge/33173615:11
powersjblackboxsw: ^15:11
blackboxswhttps://bugs.launchpad.net/cloud-init/+bug/172506715:19
ubot5Ubuntu bug 1725067 in cloud-init (Ubuntu Artful) "cloud-init resizefs fails when booting with root=PARTUUID=" [Medium,Fix committed]15:19
blackboxswso this is the bug I think we expect foundations to approve15:19
blackboxswhrm smoser rharper https://launchpad.net/cloud-init/+packages shows cloud-init for artful at rev 17.1-25-g17a15f9e-0ubuntu1~17.10.1 yes apt update/apt policy on artful still shows only 17.1-18-gd4f70470-0ubuntu116:26
blackboxswwhat 'else' do we wait for before we can see a published package version via apt repos once an SRU has landed?16:27
naccblackboxsw: it's in artful-proposed16:27
blackboxswpending-sru.html still shows the cloud-init package in pending status for artful16:27
nacc(per rmadison)16:27
blackboxswnacc right, but once we pass SRU, doesn't it move to artful-updates?16:27
blackboxsw 16:27
naccblackboxsw: after 7 days16:28
blackboxswahhh16:28
naccblackboxsw: depending on the package, there are exceptions, but usally there is a back period to flush out regressiosn16:28
blackboxswwas missing "what else needs doing" there. Answer:patience child, good things come to those who wait16:28
blackboxswthx nacc makes sense16:29
naccblackboxsw: http://people.canonical.com/~ubuntu-archive/pending-sru.html16:29
naccblackboxsw: it's pending still, but green on bugs meaning all are verified16:29
blackboxswyeah that is still sitting in artful (all green)16:29
blackboxswyeah16:29
blackboxswdidn't know if there was another button/person I needed to push (as the artful bugs themselves have been commented by landscape janitor as uploaded16:30
naccyep16:30
smoserblackboxsw and powersj http://paste.ubuntu.com/25825019/18:16
smoserthat is what i have run/am-running fro nocloud tests. and will post to the bugs.18:16
smoserbug18:16
powersjsmoser: that looks good18:18
* blackboxsw likes it. I'm reviewing powersj kvm branch 18:18
blackboxswI find myself wanting a make target for running out integration tests in general so I don't have to lookup what we are running from jenkins18:19
smoseryeah. something needs easier-ing18:19
powersjblackboxsw: so like a --proposed and it just does the right thing?18:21
blackboxswpowersj: yeah like that, I just want to document it somewhere in cloud-init src proper.18:27
powersjblackboxsw: https://cloudinit.readthedocs.io/en/latest/topics/tests.html18:27
powersjthat page would be a good place for it18:27
powersjHave an example runs18:27
powersjcan put what we do for nightly testing + proposed testing + ci18:27
smoserrharper: so.. looking at cyphermox's image19:39
rharpery19:39
smosercrazy. if i enable debug logging to the console (change 'WARNING' to 'DEBUG' in the stderr logger in /etc/cloud/cloud.cfg.d/05_logging.cfg)19:40
smoserthen ENOREPRODUCE19:40
rharperhrm19:40
smoserbut by default, it reproduces ;)19:40
rharperdoesn't change the logging19:40
rharperand if you just remove the import random from util.py in your image19:40
rharperwhat happens ?19:40
smoserapparently writing stuff to the console constitues entropy19:41
smoseri'll try that.19:41
cyphermoxsmoser: oh, hold on19:41
rharperoh, yeah19:41
rharperfor sure19:41
rharperconsole data19:41
cyphermoxsmoser: if you boot once and the reboot you won't necessarily get the same result19:41
smoseri'm not booting.19:41
smosermounting, changin file, unmounting booting.19:41
cyphermoxfair enough19:41
rharperdo we have the KCONFIG delta ?19:42
cyphermoxyou'll have to ask kamal for that19:43
rharperdoesn't the image have the config-X file in /boot ?19:43
rharperthat's enough then we can diff from some other image19:43
smoserremoving 'import random' didnt help19:43
cyphermoxrharper: what are you looking for?19:44
rharperdelta19:44
cyphermoxpresumably for something in particular19:44
rharpernot yet19:44
smoser# pastebinit /boot/config-4.4.0-1009-kvm19:44
smoserhttp://paste.ubuntu.com/25825393/19:44
smoser$ diff -u config-4.4.0-59-generic  config-4.4.0-1009-kvm  | pastebinit -f diff19:47
smoserhttp://paste.ubuntu.com/25825403/19:47
rharperno CONFIG_USER_NS ?  aren't the minumals used for containers ?19:52
blackboxswpowersj: how'd you setup /srv/citest/nocloud-kvm for integration test runs?20:12
blackboxswI'm trying to run your nocloud-kvm branch20:12
powersjmkdir -p /srv/citest/; chown -R jenkins:jenkins /srv/citest20:12
powersjsomething like that...20:12
blackboxswkk thx. just trying to document shortcomings on a fresh artful install20:13
powersjbasically make sure you own that dir20:13
powersj:)20:13
powersjthx20:13
blackboxswnp20:13
powersjartful!20:13
powersjdid you upgrade?20:13
blackboxswmy desktop is artful, laptop1 xenial laptop2 zesty20:13
blackboxsw:)20:13
blackboxswwant to play w/ all the pretty ponies20:14
seditionhi team.20:15
blackboxswhi sedition20:18
seditiony'all are always working hard. one of the most active channels i'm in.20:19
blackboxsw:) maybe we type too much in IRC :)20:22
seditionno such thing. i've been an irc junkie for too long20:22
blackboxswheh20:22
seditioni've really been digging cloud-init so i figured i would idle and watch20:23
blackboxswthat's nice to hear. File bugs/comments/code etc if you find features you think are needed etc. we have that status meeting Monday where we brain dump what we've been working toward.  You are welcome to raise questions concerns there too if there are things you are itching to discuss with a broader audience20:24
blackboxswreminds me I need to update the topic20:25
=== blackboxsw changed the topic of #cloud-init to: is Reviews: http://bit.ly/ci-reviews | Meeting minutes: https://goo.gl/mrHdaj | Next status meeting: Monday 10/30 16:00 UTC | cloud-init 17.1 released
seditionok great! i can do that.20:25
blackboxswso Monday 16:00 UTC there are a few more eyes on this channel20:25
blackboxsw:)20:25
blackboxswshould be every 2 weeks20:25
blackboxswgrr and I need to publish last meeting logs to the github.io page.20:29
blkadderHi all, I am trying to figure out the appropriate incantation to get cloud-init to run multiple commands via pipes while sudo'd to a user. The following works just fine when done as root: " gpg --list-keys --with-colons | grep sub | awk -F: '{print $5}' | gpg --armor --output /repo/qbis-repo.gpg.pub --export" When I try to invoke it via sudo -u -i user however it simply ignores the entire list of runcmd directives.20:57
blkaddersudo -u user -i that is...20:57
blkadderI've also tried sudo -u user -i sh -c which works on the command line but not via cloud-init.20:58
blkadderAm I relegated to making this a script or something?21:01
rharperhrm21:06
rharperblkadder: do you have a paste of your runcmd yaml ?21:07
blkadderYes, but I have been fiddling with it endlessly to try to get it to work.21:07
blkadderHow should I post it?21:08
blkadderIt's just the one line that is causing problems...21:08
blkadderIf I comment it out everything else works.21:08
blkadderAnd if I do it all as root (no sudo) it all works...21:08
rharperyeah, just runcmd: and the lines that don't work21:10
rharperwe can generally replace the gpg and stuff with piped echos and greps just to simulate the pipes21:10
rharperalso your cloud-init.log may be helpful in case there's something else going on21:10
blkadder   - sudo -u jenkins "gpg --list-keys --with-colons | grep sub | awk -F: '{print $5}' | gpg --armor --output /repo/qbis-repo.gpg.pub --export"21:11
blkadderThat was one invocation.21:11
rharperk21:11
blkadderI have also tried with - sudo -i -u jenkins21:11
blkadderAnd even sudo -i -u jenkins sh -c "...foo..."21:12
rharpertry this21:19
rharper-  [sudo, -u, jenkins, "gpg --list-keys --with-colons | grep sub | awk -F: '{print $5}' | gpg --armor --output /repo/qbis-repo.gpg.pub --export"]21:19
blkadderWill do, thanks.21:19
rharperthat gets put into the shell'fied config in /var/lib/cloud/instance/scripts/*  so you can see the script format there; possible run it by hand in the instance to see if there are other errors21:19
rharperroot@a1:/var/lib/cloud/instance/scripts# cat runcmd21:20
rharper#!/bin/sh21:20
rharper'sudo' '-u' 'jenkins' 'gpg --list-keys --with-colons | grep sub | awk -F: '\''{print $5}'\'' | gpg --armor --output /repo/qbis-repo.gpg.pub --export'21:20
blkadderThat's interesting...21:21
blkadderThat invocation creates a shell script?21:21
rharperruncmd elements get shellified21:22
rharperthat was the latest cloud-init; possible the older versions just exec them;21:22
* rharper reads the docs and code21:22
blkadderThat worked, thanks.21:23
blkadderI am doing my best to read docs and googling before bugging the channel. :-)21:23
blkadderMy google fu failed on this particular nuance.21:23
rharperno21:23
rharperI know it changed21:23
blkadderAhh. ok.21:24
rharperso the string is execve'd21:24
rharperthe list is shellified21:24
blkadderOh no it didn't quite work.21:24
blkadderThe parser works now but...21:24
blkaddersudo: gpg --list-keys --with-colons | grep sub | awk -F: '{print $5}' | gpg --armor --output /repo/qbis-repo.gpg.pub --export: command not found21:24
blkadderBefore it wasn't even parsing the yaml blob (errored in logs)21:25
rharperyea, I can see that, lemme play with the escaping21:25
blackboxswasking in channel is fine. it helps us know the probs people are hitting. (and it helps me learn from rharper/smoser)21:26
blkadderOk good deal, just didn't want to bother with noob questions...21:26
rharperok, try this21:28
rharper-  [sudo, -u, jenkins, --, "gpg --list-keys --with-colons | grep sub | awk -F: '{print $5}' | gpg --armor --output /repo/qbis-repo.gpg.pub --export"]21:29
blkadderOk, one sec.21:29
rharperthe -- tells sudo that it doesn't have any more argument parsing to do21:29
blkadderThanks for the info I was wondering...21:30
blackboxswrharper: I also just validated pipes in general in runcmd with this21:33
blackboxsw cat runcmd_pipes.yml21:33
blackboxsw#cloud-config21:33
blackboxswruncmd:21:33
blackboxsw - cat /etc/os-release | grep CODE > /tmp/cloud-init-output21:33
blackboxswno quotes etc worked for me (I know blkadder's using single quotes etc on a more complex command).21:34
rharperwell, the real trick is knowing that the  - [run, my, cmd] gets shellified, which makes | easy21:34
rharperotherwise you need the exec'ed command to invoke a shell for you sudo -u jenkins -- sh -c 'do this | eat that | write here'21:34
blkadderThe pipes work fine, it's the sudo that seems to cause issues...21:34
blkadderIf I run that same command that I posted previously as root, no problem.21:35
rharperright, you're in a shell21:35
rharpervs. exec, which expects a binary21:35
blkadderSame result rharper...21:35
rharperno dice, huh; I don't get that --export command not found21:35
blkadderLet me double check my yaml file21:35
blkadder  - [sudo, -u, jenkins, --, "gpg --list-keys --with-colons | grep sub | awk -F: '{print $5}' | gpg --armor --output /repo/qbis-repo.gpg.pub --export"]21:36
rharperI think I answered my own question;  you're sudo'ing to jekins to dump the keys, and then running the rest of that as non-jenkins21:37
blkadderAhh, I want to run it all as jenkins. :-)21:37
rharperok, that makes it easier21:37
rharperwe'll have sudo run a shell as jenkins21:37
blkadderI tried that.21:38
blkadderBut you have a smarter way I am sure.21:38
blkadderI tried sudo -i -u jenkins sh -c ...21:38
rharperthe trouble you'll have is that you can't write to /root as jenkins21:38
blkadderI don't want to.21:39
blkadderAm I missing something?21:39
blkadderI am writing to /repo21:39
blkadderWhich is owned by jenkins.21:39
rharperoh, right21:39
rharperthat was a local error21:39
rharperI don't have a jenkins, so I'm subbing something else21:39
blkadderAhh21:39
rharper-  [sudo, -u, jenkins, sh, -c, "gpg --list-keys --with-colons | grep sub | awk -F: '{print $5}' | gpg --armor --output /repo/qbis-repo.gpg.pub --export"]21:40
rharperI replaced jenkins with ubuntu; but running that gets me gpg running and no complaint about export commnd21:40
blkadderHmm...21:41
blkadderLet me give 'er a shot..21:41
blkadderAnd we have key!21:46
blkadderThanks!21:46
rharper\o/21:47
sedition:)21:48
rharperblkadder: thanks for stopping by =)21:48
blkadderSo on a side note would you be willing to explain the difference in invocation method?21:48
rharperyeah21:48
blkadderI tried sudo -u -i jenkins sh -c which did not work.21:48
rharperyou had -i21:48
rharperwhich does the login shell21:48
blkadderRight.21:48
rharperwhich I didn't try; but resets the env and other things21:49
rharperbut, you also didnt use the [, list  ] method21:49
blkadderI did not.21:49
rharperIIURC21:49
rharperso, cloud-init attempted to exec("string")21:49
blkadderI have used it elsewhere.21:49
rharperI suppose that should work if quoting and all were correct21:50
blkadderThat's what I am getting hung up on... Works fine on command line but not via cloud-init21:50
rharperif you have logs of the failure (/var/log/cloud-init*.log ) I might be able to see what went wrong21:52
blkadderWell, I can certainly reproduce if it is helpful.21:52
blkadderNot a huge deal since I have a working solution, but just more curious why what works on the command line doesn't work the same...21:53
rharperwell, I think it was the quoting since your were getting yaml parsing errors21:54
blkadderAck.21:54
rharperhttp://paste.ubuntu.com/25825970/21:55
rharperyou can try that21:55
rharperusing the | to let you inline the command as a string21:56
blkadderAhh, cool.21:56
blkadderNow to figure out why I am seeing read errors in the log...22:00
blkadderThanks again rharper.22:01
rharpernp22:01
blackboxswpowersj: minor comment on https://code.launchpad.net/~powersj/cloud-init/+git/cloud-init/+merge/33173622:20
powersjblackboxsw: re: tox, correct we pulled that in on a different commit, but that is in master22:20
powersjhttps://github.com/cloud-init/cloud-init/commit/aa024e331f8196855fa8d707a2dd7e26e1deab4022:21
blackboxswok yeah I didn't recal until I saw it working on my other master checkout22:21
powersjblackboxsw: what do you think about the use of /tmp22:22
blackboxswpowersj: as mentioned inline. use /var/tmp instead22:22
blackboxswit doesn't get clobbered as frequently22:22
blackboxswby systemd22:22
blackboxswit's what cloud-init does too for anything we write out that needs to be somewhat persistent22:24
powersj*sigh*22:24
powersjok :)22:24
blackboxswthough I don't think it should really affect these tests, best to get rid of any known intermittent failure conditions as that's been the bane of our existing with CI in the last couple weeks22:25
blackboxsws/in the last/over the last/22:25
dpb1why do we need persistence of files in tmp?22:25
powersjI feel that this should be equally documented then22:25
blackboxswby *our* I mean you and rharper22:25
dpb1past a run that is 1 hour long22:25
blackboxswpowersj: yeah want me to add it to readthedocs? like runcmd? or write_files ?22:26
dpb1I don't think so22:26
dpb1it's not a cloud-init specific thing22:26
blackboxswlike a Note: don't write to /tmp because of https://bugs.launchpad.net/cloud-init/+bug/1707222?22:26
ubot5Ubuntu bug 1707222 in cloud-init (Ubuntu) "usage of /tmp during boot is not safe due to systemd-tmpfiles-clean" [High,Fix released]22:26
powersjdpb1: how else would an end user know about this? I get that maybe it isn't a cloud-init only thing22:27
dpb1hm22:27
dpb1because of the after= before=22:27
powersjas an end user writting user-data I'm not sure I'd ever see that...22:28
dpb1ok22:28
dpb1guess so22:28
dpb1strike my comments22:28
dpb1yes, we should put it on readthedocs22:28
dpb1and yes, powersj should fix his branch22:28
blackboxswit's likely because cloud-init is so early in the boot process we are hit by this more than anywhere else22:28
powersj:) I will22:28
blackboxswalso, I think we probably shouldn't have examples that use this22:28
dpb1yup22:29
blackboxswlike https://cloudinit.readthedocs.io/en/latest/topics/modules.html#runcmd22:29
dpb1blackboxsw: new bug would be fair22:29
blackboxsw wget, "http://example.org", -O, /tmp/index.html22:29
blackboxswyeah will add it and can clean up docs22:29
blackboxswadd it and own it22:29
blackboxswhttps://bugs.launchpad.net/cloud-init/+bug/172787622:32
ubot5Ubuntu bug 1727876 in cloud-init "Document in RTD that cloud-init can't write to /tmp due races with systemd LP:1707222" [Medium,Triaged]22:32
powersjblackboxsw: thx for review I'll make changes and let you know when they are up22:40

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