/srv/irclogs.ubuntu.com/2017/11/03/#cloud-init.txt

rharperbdx: if you can pastebin /var/log/cloud-init.log we can see what's going on;00:13
bdxrharper: https://bugs.launchpad.net/cloud-init/+bug/172971503:19
ubot5Ubuntu bug 1729715 in cloud-init "nocloud datasource network-config not working" [Undecided,New]03:19
smoserrharper: in netwokr config v1, i think that we can't rename an interface without knowing the mac. is that right ?14:00
rharpersmoser: correct14:09
smoserhttps://git.launchpad.net/~smoser/cloud-init/commit/?h=feature/json-socket-server16:49
smoserthats my json server16:49
smosersee that commit message for how to use.16:49
SargunCan you write templates in write_files?16:59
blackboxswnot sure what you mean Sargun, you can write any file content  you want. if you wrote templates in write_files I'd guess you'd be processing templates  in your runcmd config.17:13
blackboxswthe files written by the write_files is a list with a single file declared per list item.17:18
bdx@rharper, @smoser does static interface network-config for nocloud work for you guys?17:53
rharperbdx: working; I replied, you need network-config in separate file, and drop the top 'network' key18:07
bdxrharper: that is awesome!18:10
bdxI just got it to work18:10
rharper]o/18:10
bdxmany thanks18:10
rharperwhat happened to my arm!?18:10
rharper\o/18:10
rharperthere we go18:10
bdx:)18:10
rharpernp, sorry it wasn't clear from the docs18:10
bdxits cool, its pretty clear, there are just a few gotchas18:11
bdxlike you *must* use the network-config file18:11
bdxwhich I did18:11
bdxgeh18:11
rharperI've filed https://bugs.launchpad.net/cloud-init/+bug/170825518:11
ubot5Ubuntu bug 1708255 in cloud-init "empty or invalid network config dictionaries are not handled well" [Undecided,New]18:12
* bdx beats his own head18:12
rharperwhich should have made it obvious that it got a config but was unhappy with it18:12
rharpernow just to allocate time toward that one18:12
bdxha - right18:12
bdxthanks all the same18:12
rharpernp18:13
rharperI may repurpose your bug into updating the docs around NoCloud's use of network-config since that part wasn't clear18:13
bdxthat would be great18:14
Sargunblackboxsw: I have a file I want to write in write_files, but I want to substitute instance_id into the config files in some places. Is there an easy way to do this?18:15
smoserSargun: no. :-(18:40
smoserbut https://trello.com/c/AYaCdQyT18:40
smoserthat is the trello card that i descried what i'd want.18:40
smoserpowersj: what am i doing wrong18:41
smoserSargun: i'd be interested in your thoughts on that.18:43
powersjsmoser: not sure yet, I was just finishing lunch let me dig in18:43
powersjsmoser: hmm now it is working, but super slow... 20 seconds for each pull.18:49
powersjhttps://paste.ubuntu.com/25881348/18:50
powersjare you seeing similar results?18:51
smoserfor each pull ?18:52
smoserwhat is pull18:52
powersjsorry each cmd run18:52
smoserno..18:54
smoser2017-11-03 18:53:28,938 - tests.cloud_tests - DEBUG - running collect script: result.json18:54
smoser2017-11-03 18:53:28,938 - tests.cloud_tests - DEBUG - Executing "collect: result.json"18:54
smoser2017-11-03 18:53:29,321 - tests.cloud_tests - DEBUG - running collect script: status.json18:54
smoser2017-11-03 18:53:29,322 - tests.cloud_tests - DEBUG - Executing "collect: status.json"18:54
powersjhmm18:56
smoserpowersj: i have a thoguht that it could be sudo and dns related possibly.18:56
smoseror it could be paramiko related.18:57
smosermaybe the wway we are sending stdin now is not rigiht18:58
smoser(we were not sending before)18:58
smoserpowersj: can you try19:07
smoser http://paste.ubuntu.com/25881453/19:08
smoserthat re-uses the connected ssh client19:08
blackboxswsmoser: powersj I'm seeing successes on nocloud-kvm (artful)19:35
blackboxswwill pull in your paste too19:35
powersjblackboxsw: Are you seeing timings like smoser, which are quick?19:37
powersjsmoser: still getting 20-second delays between each collect... that definitely feels like something is timing out somewhere along the path.19:39
powersjI'll pastebin shortly19:39
blackboxswlemme, check timestamps on that powersj19:40
powersjhttps://paste.ubuntu.com/25881623/19:41
blackboxswmeh powersj yeah 20 second delays between collect calls19:41
blackboxswhttp://pastebin.ubuntu.com/25881628/19:41
* powersj goes and find's smoser's venv cmd19:43
smoserpowersj: ./tools/tox-venv19:47
smoserblackboxsw: where are you running that ?19:47
* blackboxsw hasn't tried smoser I'm running that on artful desktop at home.19:48
smoseroh. i thought you said you had.19:48
blackboxswtox -e citest -- run --verbose --os-name xenial --deb cloud-init_17.1-46-g8a49e051-1~bddeb_all.deb --data-dir ~/collection --preserve-data --platform=nocloud-kvm --test=tests/cloud_tests/testcases/modules/final_message.py19:48
powersjsmoser: still having issues: https://paste.ubuntu.com/25881674/19:51
blackboxswsmoser: sorry about the last couple comments,  I had tried running artful with the following commandline  I see various successes there, but I'm seeing the 20 second gap between each collect19:53
blackboxswand that 20 second gap persists even across your re-use ssh patch19:54
smosercould one of you letl me in somewhere ?19:55
smoserso i can run. i'm kind of out of ideas.19:55
blackboxswsmoser: yeah adding you19:56
blackboxswgotta open up my router one min19:57
smoserblackboxsw: hm.. ok . i ran here and i see it. (locally on artful desktoip) rather than on diglett.20:00
blackboxswsmoser: ok. I've got creds for you if needed20:00
powersjRunning on torkoal seems fine20:06
smoserit hangs on20:06
smoser            rc = channel.recv_exit_status()20:06
blackboxswshould we be checking exit_status_ready ?20:14
blackboxswnot going to help20:17
blackboxswI looped in a pdb session20:17
blackboxswhttp://pastebin.ubuntu.com/25881811/20:17
blackboxswit also is false for about 20 seconds20:17
blackboxswthen true20:17
blackboxswwhich presumably is when the exit status becomes available to paramiko20:17
smoserblackboxsw: yeah, iwas looking at that too.20:22
smoserthe examples of paramiko and sending data are not a lot.20:22
smoserjust tried here doing a channel.shutdown(2)20:22
smoserhttp://docs.paramiko.org/en/2.3/api/channel.html20:22
smoserrather than shutdown_write()20:22
smoserand taht didnt help20:22
smoserblackboxsw: dropping remvoes the hang.20:42
smoserself.ssh(["sudo", "cat", "/etc/cloud/build.info"])20:43
smoser ^^ slow ---- vv faster20:43
smoserself.ssh(["cat", "/etc/cloud/build.info"])20:43
smoserok.20:45
smoserwell... not paramiko fault20:45
smoserthis hangs similarly20:45
smoserssh ubuntu@localhost -p 37425 -i results.nocloud-kvm.d/id_rsa "cat /etc/passwd"20:45
smoseri really, really hate that feature in sudo20:46
blackboxswgeez right, it's sudo trying to hit resolve or something for the hostname?20:51
rharperyeah20:51
rharperyou need the hostname in /etc/hosts or sudo barfs;20:51
blackboxswso we could set the hostname in /etc/hosts20:52
blackboxswyeah20:52
rharperor, set NOPASSWD in sudoers20:52
smoser?20:52
smoserwe do have nopassword for that user20:52
rharperah, right, I guess it still does the lookup20:52
rharperlooks like ALL would work20:53
blackboxswok in ip tools world (no netstat) how do I check what open ports I'm listening too20:53
blackboxswI'm so used to netstat -ln20:55
smoserits such a non-feature20:55
smoserhttps://superuser.com/questions/429790/sudo-command-trying-to-search-for-hostname20:55
smoserthat describes what it is and what is doing it.20:55
rharperhey, you want to share your sudoers file across your entire company20:55
rharperit needs to know which host it's on20:55
blackboxswss -l20:56
smoserim' not sure why, but20:57
smoser 'time host ubuntu'20:57
smoserthat returns in 1 second on my system (where this is slow)20:57
smoserand 0.014 seconds on diglett20:57
blackboxswdns search order?20:57
smoserwhich i think is basically the source of why it works fast on diglett20:57
rharperwhat does host -v show ?20:58
rharperthat walks the dns search list here20:58
rharperwith vpn, it rns through all of those domains in the list20:59
rharperall those domains have to say no before your caching nameserver can give up and let /etc/hosts respond IIUC20:59
rharperwow, localhost even has to do that with the "host" command20:59
blackboxswso on artful I'm talking to systemd/resolved, what's diglett running again?21:01
rharperartful21:01
blackboxswhmm ok21:01
smoserdiglet is bionic21:01
rharperoh, when did we upgrade ?21:01
smoserhttps://bugs.launchpad.net/ubuntu/+source/apt/+bug/172861621:02
ubot5Ubuntu bug 1728616 in apt (Ubuntu) "using 'devel' in sources.list causes apt-get update to fail" [Undecided,Opinion]21:02
smoserlooks like i did on 2017-10-3021:02
smoser:)21:02
rharperheh21:02
smoserwe really should fix sudo21:03
smoserto not do a dns lookup if it doesnt need to21:03
rharperthe claim is that it wants to, ifyou set the section to (ALL) for the hostname it won't do that21:13
smoserit doesnt claim that.21:13
rharperhttps://bugs.launchpad.net/ubuntu/+source/sudo/+bug/3290621:13
ubot5Ubuntu bug 32906 in sudo (Ubuntu Hardy) "sudo fails if it cannot resolve the local hostname and no MTA is installed" [High,Fix released]21:13
smoserwell, it doesnt fail21:13
smoser…yeah, sudo, it’s all very clever until someone loses an eye!21:14
smoseri like that :)21:14
rharpernow, it appears are are using (ALL); so now I'm confused21:14
rharperhttps://www.sudo.ws/repos/sudo/rev/1e10105ade5b21:16
rharperfun stuff21:16
rharpersudo + PAM21:16
smoserwell, acouple of options here.21:18
smosera.) cloud-init can be set to write the  hostname to /etc/hosts21:18
smoserb.) we can just eat this once when we first run a command21:18
smoserbut even then, 20 seconds is suck21:18
smoserc.) maybe this is sufficient, for nocloud we can just modify it pre-boot21:19
smoseralso in these scenario..21:20
smoserwe can be trickly.21:20
smoserfor nocloud-kvm, if i add an 'ubuntu' to the *hosts* /etc/hosts21:20
smoserthen qemu dns -> host resolv -> that entry21:20
smoserand magic fast21:20
smoser127.0.0.1   localhost ubuntu21:21
blackboxswyeah I think I don't want to eat that 20 second cost even on setup21:22
blackboxswthat makes every test that much more costly21:22
smoserwith that in place, on diglett21:23
blackboxswI like being trickly21:23
smoserhttp://paste.ubuntu.com/25882159/21:23
blackboxswlooks much better21:23
smoser~ 0.0621:23
blackboxswinstead of 0.014 right?21:23
smoseroh. no. instead of something like a half a second it hink21:24
blackboxswOhh I was thinking you were talking time host ubuntu ... and 0.014 seconds on diglett21:24
rharperI'm +1 for writing ubuntu into hosts21:25
rharperoh, heh, I forgot we had something like this for m-i-c21:26
blackboxswyeah, I think that's warranted given we know sudo's shortfall w.r.t. hostname lookup21:26

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