/srv/irclogs.ubuntu.com/2014/08/11/#juju-dev.txt

axwwaigani: #1270466 can be closed now?01:37
axwhm, mup doesn't recognise LP bug IDs anymore? :(01:37
waiganiaxw: closed01:38
axwcool01:39
waiganiaxw: so getting api endpoints at end of bootstrap. I can get machine 0's public address. But what about HA? I see a machine has a DistributionGroup. Should I use that to see if we are in HA and get the endpoints of the others? I think api.Client.APIHostPorts() would get them all, but that func is not allowed while 'in upgrade'01:42
axwwaigani: there's only one machine during bootstrap. bootstrap already grabs that machine's address so it can SSH in01:43
axwwaigani: see waitSSH in provider/common/bootstrap.go01:45
waiganiaxw: will do, cheers01:45
axwwaigani: once Bootstrap has returned successfully, you should be able to assume that the instance has addresses, so you don't need the complicated logic from there01:45
axwyou may just want to return the addresses from there tho01:46
waiganiaxw: ah, perfect. I assumed something like that was going on, as bootstrap finished but common.ProviderStateInstances was not finding any instances. I'll use waitSSH to wait01:47
axwwaigani: just to be clear, waitSSH is already used by bootstrap. So you should just be able to bubble up the addresses it calculates01:49
waiganiaxw: I have not been able to do that so far01:50
waiganiaxw: but I'll have a look at how waitSSH is used and see what I'm missing01:51
axwwaigani: provider/common.Bootstrap should return addresses. it should get them from FinishBootstrap, which should get them from waitSSH01:51
waiganiaxw: ah, the dummy bootstrap does not use common.Bootstrap01:52
axwwaigani: you'll need to change Environ.Bootstrap's signature to return hostports, and dummy/manual/local will need different logic as they don't use common.Bootstrap01:53
axwnot that straightforward; maybe you do want to make an API call for the first cut01:53
axwwaigani: if you make an API connection, *any* method (assuming Login passes validation), then you01:54
axw'll get back the hostports01:54
axwcached by juju.NewAPIConn01:54
waiganiaxw: sorry otp, reading now01:57
waiganiaxw: yeah, so I that is where I've ended up, dummy and local don't use common.Bootstrap, so I'm doing an API call to get endpoints (EnvCommandBase.NewAPIClient()). But client.APIHostPorts() is not allowed, because we are in 'upgrade' at the end of bootstrap.02:05
waiganiaxw: so I can only (so far) get the public address of machine 002:06
axwwaigani: (you could just return localhost for local, and any old thing for dummy...)    -- but you don't actually need to call APIHostPorts, you could just call, say, client.Status02:06
axwthat is allowed during upgrade02:07
axwthe act of making a method call will cache the addresses02:07
axwyou don't need to explicitly do anything with that02:07
axwwaigani: actually, I don't think you even need to make a method call. just open and close the API connection02:08
waiganiaxw: that was my first thought but thumper was adamant that just calling status does not work, he said he tried. I'll try myself (to be sure)02:08
axwwaigani: you can see how it works in juju/api.go02:09
axwat the bottom of newAPIFromStore02:09
waiganiaxw: grrrr, just calling state bloody works. I'll try just connecting to the api02:14
axwwaigani: just calling status you mean?02:15
waiganiaxw: yes sorry02:15
axwsure, just checking I understand02:15
waiganiyep, that works - sigh02:19
waiganithanks axw02:19
axwwaigani: cool, nps02:19
bigjoolshow much use do you guys make of syslog?  I got the impression from the ML that you're thinking of stopping using it?02:20
axwbigjools: we don't use syslog directly, we write our logs to a file and have rsyslog tail it02:20
axwthen they all send to a centralised rsyslog to aggregate02:21
bigjoolsok02:21
bigjoolsIn maas we're moving towards just sending everything to syslog and letting it do the heavy lifting02:21
axwbigjools: does that get sent anywhere remote? aggregated?02:22
bigjoolsthe plan is to aggregate somewhere, yes, not sure where yet02:23
axwmmk02:23
bigjoolswell we don't have a "central" place02:23
bigjoolsso the decision is not easy :)02:24
axwwhen I said centralised, I actually meant to all of the juju state servers02:24
axwso it's still HA02:24
* axw doesn't know MAAS well enough to draw parallels02:25
bigjoolsright02:25
bigjoolswe might do something similar and sync to all appservers02:25
=== rogpeppe1 is now known as rogpeppe
dimiternmorning all07:17
voidspaceyay, online07:31
voidspacemorning everyone07:31
TheMuemorning07:48
tasdomascould someone take a look at https://github.com/juju/juju/pull/464 ?08:26
=== rvba` is now known as rvba
TheMuetasdomas: yep, will do.08:34
tasdomasTheMue, thanks!08:37
fwereadetasdomas, LGTM with a followup, I think the problems may run a little deeper08:37
TheMuefwereade: just seen you’ve LGTMed the PR08:38
voidspacehmm... when I try to submit a "national holiday" to hr.canonical.com it asks me to attach supporting evidence to the request...08:45
mattywrogpeppe, would you be able to take another look at https://github.com/juju/juju/pull/46908:56
rogpeppemattyw: looking08:56
mattywvoidspace, https://www.gov.uk/bank-holidays08:57
mattywvoidspace, I think Auntie Liz has to approve bank holiday's each year so I did a quick google to see if I could find a pdf of her signature08:58
rogpeppemattyw: i'm mostly +1 on fwereade's suggestion08:59
rogpeppemattyw: except that i'd use Reset rather than creating a new timer each time09:00
mattywrogpeppe, that is what's i'm doing in the latest code09:01
rogpeppemattyw: oh, weird. i never quite get how github comments work09:02
mattywrogpeppe, oh right - fwereade commented 4 minutes ago09:02
mattywrogpeppe, so you were refering to a comment I hadn't seen yet :s - concurrency on a monday morning09:02
rogpeppemattyw: his code is pretty much functionally equivalent, but slightly neater and fits with a common worker pattern09:03
voidspacemattyw: hehe,09:12
* fwereade bbiab09:23
voidspaceTheMue: dimitern: internet has recovered, so I may make standup after all10:46
voidspacebut first, coffee...10:46
dimiternvoidspace, great :) see you there10:46
perrito666morning11:27
=== Guest42485 is now known as wallyworld
tasdomascould somebody take a look at https://github.com/juju/juju/pull/455 ?11:39
wallyworldkatco: mgz: standup?12:02
mgzno katco yet alas.12:12
tasdomasI'm seeing a failure on master in the test suite for utils/ssh : http://paste.ubuntu.com/8016636/ - is anybody else seeing something like this?12:13
mgztasdomas: nope, what does `ssh -V` say for you?12:15
mgz...not that that should matter actualyl12:16
tasdomasmgz, ssh: Could not resolve hostname hostname: Name or service not known12:17
mgztasdomas: your ssh looks broken then, check yuor network config?12:17
tasdomasmgz, that's the error I get when running the ssh line in terminal12:18
tasdomasmgz, ssh -V : OpenSSH_6.6.1p1 Ubuntu-2ubuntu2, OpenSSL 1.0.1f 6 Jan 201412:18
mgzoh, I was right, the ssh should in fact not be used12:20
mgztasdomas: try `BASH_ENV="" go test`?12:23
tasdomasmgz, seems like it was a godeps issue - forgot to run godeps -u12:24
mgzfair enough.12:25
tasdomasmgz, and I need to update my vm12:25
tasdomasmgz, thanks12:28
natefinchfwereade: you around?13:49
fwereadenatefinch, heyhey13:50
fwereadenatefinch, how's it going?13:50
natefinchfwereade: not bad.  Well rested from my week of not traveling ;)13:50
wwitzel3lol, too soon13:52
natefinchfwereade:  I'm a bit stuck on what to do about log rotation.  There's a few different bad options, and I'm not sure how to choose between them13:52
natefinchwwitzel3: heh13:52
fwereadenatefinch, haha13:52
wwitzel3natefinch: I'm working on tht now, with rsyslog, should I not be, or you talking about Windows?13:53
fwereadenatefinch, wwitzel3: windows is also interesting, gsamfira certainly has relevant input there13:53
natefinchwwitzel3: you're doing all-machines, right?13:54
fwereadenatefinch, wwitzel3: I would hope that log rotation would encompass *all* our logs, even if the work came in a few stages13:54
natefinchfwereade: yes of course.  There's really only a couple spots to hit - all-machines is a different beast than the machine-n and unit-n logs13:55
fwereadenatefinch, cool13:55
wwitzel3natefinch: yeah, all-machine13:56
wwitzel3s13:56
natefinchwwitzel3: cool, yes, there's no real option for anything but logrotate / rsyslog rotation there.13:56
gsamfiranot even if we log directly to rsyslog from juju? in the case of all-machines.log I mean13:57
gsamfira?13:57
natefinchgsamfira: the rotation has to be on the state machine, which is listening using rsyslog13:57
gsamfirathat's fine. That should be easily doable using standard logrotate13:58
gsamfiraand for all other juju logs, lumberjack can take care of the rotation13:58
gsamfirano?13:58
natefinchgsamfira: yes, sorry if I wasn't clear. That's what wwitzel3 is doing13:58
gsamfiraahh13:58
wwitzel3yep :)13:59
gsamfiramy mistake. Read diagonally13:59
natefinchthe thing that I'm talking about is rotating the unit-n and machine-n logs.  Some people have questioned why we don't just use logrotate for those as well, and only make windows use something else.13:59
natefinchmy preference would be that if we can do something the same everywhere, to do it the same, that way we don't need to maintain different codepaths depending on OS13:59
gsamfirawell, as you pointed out on the mailing list, its better to have one config that works across platforms then 2-3 separate ones :)14:00
natefinchyes14:00
gsamfirayep14:00
gsamfira:)14:00
gsamfirathe more os specific  dependencies you can remove, the better14:00
natefinchI believe that as well14:00
natefinchfwereade: the question is - how far do we go?  Do we write directly to syslog from inside juju, thereby bypassing rsyslog and not needing to worry about whether it misses log messages due to rotation?  Or do we continue with rsyslog and figure out how to make that work with rotation?  Or do you disagree with me. and think we should use logrotate on linux?14:02
gsamfiraimplementing syslog using Go, should be simple enough. I will cleanup the fork I made of the standard syslog package, and I can have a shot at implementing it in Juju by tomorrow.14:02
fwereadenatefinch, so, if we can write directly to syslog, I would like that very much14:03
fwereadenatefinch, I think thumper was going to reply to your post explaining the problems he'd found with go syslog14:03
natefinchfwereade: ahh, that would be very good to hear about.14:03
fwereadenatefinch, apart from handwaving about how it outputs stuff is in some way inconvenient I can't actually remember the issue with it myself14:03
gsamfirahmm. Syslog implements io.Writer. In theory, it should be like writting to a file. The only thing is that you need to set a prefix, which you would normally do via the rsyslog config14:04
gsamfirabut nay formatting should be done via loggo14:04
natefinchgsamfira: as long as loggo does it's output in a single write, that's ok.  If it batches them or breaks a single line into multiple writes, it can be a problem.  the syslog package expects each write to be a single log message.14:07
gsamfiraI would like to try and tackle any issues that might have stopped us from using this. Until better log aggregation is found at least :)14:07
natefinchgsamfira: I think that would be great14:07
wwitzel3natefinch: standup :)14:08
gsamfiranatefinch: Hopefully loggo adheres to that expectation as well :). I'll have a look14:10
katcogood morning all14:32
katcomgz: wallyworld: sorry about missing the standup14:33
perrito666natefinch: wwitzel3 ericsnow suddenly the page died on my and I can no longer connect sorry14:33
mgzkatco: no problem, ian will catch us up on last week tomorrow14:33
katcomgz: ok cool14:34
natefinchperrito666: np14:35
mgznatefinch: have you seen bug 1355219?14:48
bodie_morning all14:51
natefinchmgz: go get gopkg.in/natefinch/npipe.v2 works for me14:58
natefinchmgz: It looks like we assume juju-core_1.21-alpha1.tar.gz has it in there.... we should look at how that's generated and why it's not getting juju's dependencies.15:01
natefinchmgz: my guess is that it solely uses godeps and someone either messed up godeps or forgot to update it.15:02
natefinchbrb15:02
dimiternanybody willing to review a quick fix https://github.com/juju/juju/pull/491 for bug https://bugs.launchpad.net/juju-core/+bug/1353443 ?15:28
dimiternTheMue, rogpeppe, voidspace, fwereade ^^15:28
rogpeppedimitern: looking15:28
dimiternrogpeppe, ta!15:29
rogpeppedimitern: what if we're running inside kvm inside lxc? should that trigger the same logic?15:29
dimiternrogpeppe, so the kvm is the host, and the lxc is where the MA+networker runs?15:30
rogpeppedimitern: i was thinking the other way around actually15:30
dimiternrogpeppe, i don't think you can run kvm inside lxc15:31
rogpeppedimitern: you sure about that?15:31
dimiternrogpeppe, 99%15:31
dimiternrogpeppe, it doesn't make sense, as kvm needs full access to hardware virtualization, which an lxc host cannot provide15:32
rogpeppedimitern: i'm still a bit uncomfortable about assuming that there's no container type that can run inside lxc15:33
rogpeppedimitern: now and for the indefinite future15:33
dimiternrogpeppe, lxc can run inside lxc15:33
rogpeppedimitern: ok, no non-lxc container type :-)15:34
rogpeppedimitern: i'd be happier if the logic looked at the last container type15:34
rogpeppedimitern: because that's what it actually cares about, no?15:34
dimiternrogpeppe, you mean the logic about parsing the machine id ?15:35
rogpeppedimitern: yes15:35
rogpeppedimitern: specifically the fact you use strings.Contains15:36
natefinchsinzui: you around?15:36
dimiternrogpeppe, well, my idea there is that if lxc is involved at any level of nesting, we shouldn't modprobe15:37
natefinchmgz: I presume that 1.21 build is running off of trunk?15:38
mgznatefinch: yup15:38
voidspacedimitern: that's a big test for a little bit of code15:38
natefinchmgz: k thanks15:38
dimiternvoidspace, it's a fairly involved worker for all it does :)15:39
voidspaceheh, right15:39
dimiternvoidspace, we need to simplify it15:39
voidspace"we"15:39
voidspace:-p15:39
voidspaceI'm going afk for a while (two hours)15:40
rogpeppedimitern: i have difficulty working out if that's a valid decision or not15:41
rogpeppedimitern: because it's not clear to me that you might not be able to nest some container type that *does* allow modprobe15:41
dimiternrogpeppe, i'm chatting with jamespage and hallyn at #server (@c) about this actually15:41
jamespagedimitern, rogpeppe: lets talk here15:41
dimiternjamespage, right, sorry about the context switching :)15:43
jamespagedimitern, np15:43
dimiternjamespage, so, is my idea about not allowing modprobe if lxc is involved at any level of nesting, not only the last level?15:44
jamespagedimitern, rogpeppe: its possible to hack an LXC container sufficiently so it can run a KVM instance - but this still runs within the host kernel15:44
dimiternis it a correct approach to the problem, i mean15:44
jamespagedimitern, a KVM instance will always support modprobe as it has its own kernel etc...15:45
jamespagedimitern, LXC will not and should not15:45
jamespagedimitern, this is why its possible to run the nova-compute charm on KVM, but not LXC15:46
dimiternjamespage, so you can modprobe 8021q for example inside the kvm, hosted inside an lxc without 8021q on its respective host?15:46
jamespagedimitern, yes15:46
jamespagedimitern, in the very hyperthetical situation that is true15:46
dimiternjamespage, ok, so to be absolutely correct, we should check what rogpeppe suggests - only the last-level-of-nesting container, which runs the agent should not be lxc15:47
rogpeppei think we should allow that case, even if hypothetical15:47
jamespagedimitern, yes15:47
dimiternjamespage, rogpeppe, ok, fair enough, thanks for the feedback15:48
rogpeppedimitern: another approach might be just to ignore that error from modprobe15:48
rogpeppedimitern: that way if someone fixes lxc, the code will just work again15:49
dimiternrogpeppe, I don't really like this15:49
dimiternrogpeppe, because it's hard enough to deal with the output lsmod and modprobe give anyway15:50
rogpeppedimitern: yeah15:50
rogpeppedimitern: another thought is to put the "isRunningInLXC" logic inside (or called from) ensureVLANModule15:51
rogpeppedimitern: because at the moment it's really not clear why we  call isRunningInLXC before calling ensureVLANModule15:51
rogpeppedimitern: but if we passed the machine id into ensureVLANModule and did the check in there, the connection is obvious (and the comments would read nicely too)15:52
dimiternrogpeppe, ensureVLANModule should not be called like this, but this is another issue - we should only call it, if there are any VLANs to setup15:53
jcw4Fix for LP-1355319 : https://github.com/juju/juju/pull/49315:59
dimiternrogpeppe, updated isRunningInLXC a bit to check the last level container type16:00
rogpeppedimitern: looking16:01
rogpeppedimitern: i don't think that will actually work, will it?16:01
natefinchI hate it when I know I'm doing something stupidly wrong.... but still can't figure out what it is16:02
dimiternrogpeppe, why?16:02
rogpeppedimitern: don't you want something like: if len(parts) > 2 && parts[len(parts)-2] == "lxc" { ?16:02
rogpeppedimitern: because AFAICS the logic you've got now checks whether *any* of the splits holds the string "lxc"16:03
dimiternrogpeppe, ah, because it could be "0", yes ofc16:03
dimiternrogpeppe, it checks the last split first going forward16:03
rogpeppedimitern: better test case required :-)16:03
rogpeppedimitern: i'd write a test case for isRunningInLXC directly16:03
dimiternrogpeppe, you mean add a test for isRunningInLXC specifically?16:03
dimiternok16:03
rogpeppedimitern: it would seem worth it, yes16:04
rogpeppedimitern: your current logic doesn't seem to test the last split moving forward...16:05
jcw4wallyworld, perrito666 since you're on call reviewers :)  PTAL https://github.com/juju/juju/pull/49316:05
jcw4trivial dependencies.tsv fix16:06
perrito666jcw4: certainly16:06
jcw4perrito666: tx16:06
jcw4natefinch: shall I just close https://github.com/juju/juju/pull/493 ? (perrito666)16:08
natefinchjcw4: leave it open for now, if I can't get my fix in before yours, we can just use yours.  But I'd like to see if I can get mine in so godeps produces the correct result16:09
jcw4natefinch: +1 :)16:10
perrito666jcw4: I was really expecting a larger patch16:12
jcw4perrito666: :)16:12
rogpeppedimitern: what calls networker.SetUp ?16:12
rogpeppedimitern: ah, it's StringsWorker16:13
rogpeppedimitern: why are privateInterface and priviateBridge global variables?16:13
rogpeppedimitern: and unguarded by a mutex16:13
rogpeppedimitern: that gets my trouble whiskers twitching16:14
dimiternrogpeppe, that's all vlad's code, and needs some work16:15
rogpeppedimitern: but it's landed in core? hmm.16:15
dimiternrogpeppe, yes, but it's hardly ever used for now - only with maas and only when there are networks defined16:16
rogpeppedimitern: yeah but... sigh16:16
dimiternrogpeppe, I agree it needs refactoring, there are tech dept bugs for some things already16:18
dimiternrogpeppe, thanks for bearing with me :)16:19
dimiternrogpeppe, updated yet again - isrunninginlxc fixed + added a test16:20
dimiternrogpeppe, all comments addressed or replied to, can I get LGTM? :)16:29
katcois there a way to do an in-place branch in bazaar? creating a branch for some code changes is messing up the imports since it creates a new directory.16:29
rogpeppedimitern: i'm still trying to grok the test16:29
dimiternrogpeppe, so there's a fair amount of boilerplate setup code in there16:31
dimiternrogpeppe, the main thing is patching the executeCommands and monitoring modprobe does not happen before ifup commands16:32
dimiternrogpeppe, I tested if fails when I comment out the && !isRunningInLXC part16:32
jcw4natefinch: the more I think about it the more I think I should just close my PR and let you do the full fix.  If we're going to fix this bug we should fix it right and your plan sounds right :)16:39
natefinchjcw4: I have mine ready to propose anyway16:40
jcw4natefinch: perfect; thx16:40
rogpeppedimitern: review done16:41
=== Ursinha is now known as Ursinha-afk
dimiternrogpeppe, thanks!16:42
natefinchrogpeppe: quick review? https://github.com/juju/juju/pull/49416:44
natefinchjcw4: ^^16:47
rogpeppenatefinch: i hope you mean "godeps -t ./..."16:47
natefinchoh oops16:48
natefinchrogpeppe: no, but they apparently produce the same results on github.com/juju/juju16:49
natefinch(currently)16:50
rogpeppenatefinch: i guess that's not actually too surprising16:50
rogpeppenatefinch: because of the testing packages16:50
dimiternwtf is this?! "Build failed: Does not match ['fixes-1355219', 'fixes-1347715']\n        build url: http://juju-ci.vapour.ws:8080/job/github-merge-juju/261\n"16:50
natefinchrogpeppe: yep, was thinking that16:50
dimiternneither of those were mentioned in the PR at all16:50
rogpeppedimitern: you *need* to mention those in the PR16:51
rogpeppedimitern: because they're the critical bugs that currently need fixing16:51
natefinchdimitern: master is locked16:51
dimiternnatefinch, rogpeppe, I see, ok16:51
natefinchdimitern: I have this labeled as "CI blockers" in my bookmarks bar: https://bugs.launchpad.net/juju-core/+bugs?field.status%3Alist=TRIAGED&field.status%3Alist=INPROGRESS&field.importance%3Alist=CRITICAL&field.tag=ci+regression+&field.tags_combinator=ALL16:51
dimiternnothing to worry about then, it will get picked up by the bot when trunk is unblocked?16:51
natefinchthat I'm not sure about16:52
natefinchyou might need to repropose16:52
* rogpeppe adds that to his bookmarks bar too16:52
rogpeppei actually want a status constantly showing whether juju-core is currently blocked16:52
* dimitern as well, thanks!16:52
natefinch(that link is from curtis)16:52
natefinchrogpeppe: challenge: add it to your shell prompt ;)16:53
rogpeppenatefinch: i don't believe in dynamic shell prompts16:53
natefinchrogpeppe: ha ok16:53
rogpeppenatefinch: too much noise16:53
rogpeppenatefinch: i just have a single character for my prompt16:54
natefinchrogpeppe: I find it handy for seeing the current git branch, but yeah, I get that it can be noisy16:54
natefinchrogpeppe: where would you want to see the notification that master is blocked?16:54
rogpeppenatefinch: in the (largely blank) notification bar at the top of my screen16:55
dimiternrogpeppe, you won't like my shell prompt then: [maas-trusty] (lp-1353443-dont-modprobe-in-lxc) dimitern@kubrik:~/work/juju-core$16:55
dimitern:)16:55
natefinchrogpeppe: fair enough.  I hhave no idea how to do that.16:56
rogpeppedimitern: i'm surprised you've got any room to type a command there! :-)16:56
dimiternrogpeppe, like most problems in the world, this as well can be solved with a bigger screen :D16:56
rogpeppefor many of the shell commands i execute, i don't have a command prompt at all :-)16:56
rogpeppedimitern: yeah, i could do with a 6 foot by 6 foot screen :-)16:57
rogpeppenatefinch: why does your PR update the mgo dependency too?16:58
dimiternrogpeppe, but then again... who couldn't!16:58
* dimitern needs to stop for today16:58
dimiternDmC hack&slash awaits!16:59
natefinchrogpeppe: it's the same commit, it was just in the wrong (not alphabetical) spot16:59
rogpeppenatefinch: ha, good point :-)17:00
rogpeppedimitern: enjoy!17:00
natefinchrogpeppe: but thanks for checking... I realized I hadn't actually double checked that the commit numbers were the same.17:01
rogpeppenatefinch: reviewed17:01
natefinchrogpeppe: what portable API could it export?17:02
rogpeppenatefinch: a named pipe implementation that works on all platforms?17:03
perrito666rogpeppe: that is a bit overkill17:04
gsamfiranamed pipes on windows are a bit different then on linux. They are more akin to unix sockets.17:04
natefinchrogpeppe: it's just an implementation for net.Listener and net.Conn17:05
natefinch(etc)17:05
=== jog_ is now known as jog
rogpeppenatefinch: the portable API could be almost exactly that exported by the juju/sockets package17:07
rogpeppenatefinch: (speaking of which, why is that package under juju at all?)17:08
natefinchrogpeppe: that's where a bunch of our OS-specific abstractions live... probably just by accident, because thats where osenv lived first17:09
rogpeppenatefinch: osenv *is* very juju specific17:10
rogpeppenatefinch: sockets is not at all juju specific17:10
rogpeppenatefinch: FWIW, i'm not really sure why we're using named pipes at all under windows. we could presumably just use localhost sockets instead (the current port could be stored in the unit agent directory)17:13
rogpeppenatefinch: hmm, just thought: does juju-run mean that any process on the host can get root privileges?17:14
sinzuihi natefinch17:15
natefinchsinzui: hey17:15
gsamfirarogpeppe: that's how it was implemented in the PoC (tcp sockets bound to localhost). The run.socket actually held 127.0.0.1:<PORT> :)17:16
rogpeppegsamfira: PoC ?17:16
natefinchproof of concept17:16
gsamfiraProof of Concept17:16
rogpeppegsamfira: ah. that seems fine to me. apart from you can't hide the socket inside a root-accessible-only directory, i guess. which i *hope* we're doing currently.17:17
gsamfiraTCP sockets are slower though. It was noticeable when running juju commands.17:17
gsamfirawell, on windows at least, named pipes are not represented on disk17:18
rogpeppegsamfira: *really*? the sockets are that high-bandwidth?17:18
gsamfiraits not bandwidth...but the whole protocol stack init process and round trip17:18
gsamfiranamed pipes are recommended for Inter-process communication on windows. Chrome/Firefox use them17:19
gsamfiraoverhead is minimal17:19
gsamfiraand they behave like unix sockets17:19
gsamfirabut with a file API17:19
gsamfiraso you treat them as you would any file17:19
rogpeppegsamfira: i guess that a hook will make quite a lot of these connections17:19
gsamfirabut it allows bidirectional communication17:19
gsamfirayes17:19
gsamfiramost do17:19
gsamfiraeven juju-run was slower then with named pipes17:20
gsamfirathe biggest issue was allocating ports though17:20
rogpeppegsamfira: that was slow?17:20
gsamfirabecause there is no database locally, you needed to find a free one17:20
gsamfiraand each time you deploy a new charm, you need to make sure you don't overlap17:21
gsamfiraa simple directory listing via juju-run would take about a second17:21
gsamfira:)17:21
gsamfiraso in terms of allocating a named pipe, its simple. you have `\\.\pipe\unit-tag-run` and `\\.\pipe\unit-tag-agent`17:22
gsamfiraohh, and it was easier for an installed application (by a charm for example) to take over the port you allocated. So when a juju command would try to run, it would fail to bind on that port.17:24
rogpeppegsamfira: couldn't you just let the OS allocate one for you?17:25
rogpeppegsamfira: i guess that last is a potential problem though17:26
gsamfirayou could in theory allocate a different port each time.17:26
gsamfirabut in the end it was simpler just to use nate's named pipes module :)17:26
rogpeppegsamfira: :-)17:26
gsamfiranamed pipes is an unfortunate name17:27
rogpeppegsamfira: yeah.17:27
gsamfiraespecially considering that on unix it has such different behavior17:27
natefinchnamespaces are important :)17:28
rogpeppegsamfira: a better name might be fsnet, i suppose (for "file-system network")17:28
natefinchwindows.NamedPipe != linux.NamedPipe17:28
rogpeppenatefinch: you couldn't possibly know how much i agree with you there :-)17:28
rogpeppenatefinch: (about namespaces)17:29
gsamfirayep :)17:29
rogpeppenatefinch: i still think that npipe should export a portable interface17:29
gsamfirawell, its kind of hard to do17:29
rogpeppenatefinch: so that anyone that wants a filesystem based listener can use it, and their code will work regardless of whether it's on windows or not17:29
gsamfiranamed pipes on windows allows bi-directional communication, whereas on linux it does not17:29
natefinchrogpeppe: it's specifically a windows implementation... I think it would be a good idea to provide a different package that uses it to produce a platform-agnostic API17:30
natefinchrogpeppe: maybe the problem is just that it should be called winnpipe or something17:30
rogpeppenatefinch: what is in the npipe API that's windows-specific?17:31
gsamfirawhatever it ends up being called, I would love to see it in the standard "net" package :)17:31
perrito666natefinch: why dont you call the thing winPipes :p17:31
rogpeppenatefinch: i know you've written it as a window-specific package, but i don't see why it has to be. by making it portable, you make it more useful.17:32
rogpeppes/window/windows/17:32
rogpeppenatefinch: i guess the name space argument looks quite different17:33
gsamfirarogpeppe: I'm not sure named pipes on Linux can be used in the same way17:33
rogpeppegsamfira: it wouldn't use named pipes on linux17:33
rogpeppegsamfira: it would use unix-domain sockets17:33
gsamfirahmm, but the net package already does that17:33
rogpeppegsamfira: sure. but not for windows.17:33
=== ChanServ changed the topic of #juju-dev to: https://juju.ubuntu.com | On-call reviewer: see calendar | Open critical bugs 1355320, 1347715, 1355324
gsamfiraif nate's implementation makes it into the stdlib, we should be all set :)17:33
rogpeppegsamfira: so this would be a portable way of getting the same functionality using either net directly or the windows named pipe stuff17:34
=== Ursinha-afk is now known as Ursinha
gsamfiramy hope is that at some point we could do a rpc.Dial("local", path) and have the rpc package use named pipes on windows17:36
gsamfiraand unix sockets in linux17:36
gsamfirawithout any 3rd party package17:36
gsamfirabut I see what you are saying17:36
gsamfiraa helper package would be ok until that happens17:37
rogpeppegsamfira: rpc doesn't have a Dial function :-)17:38
rogpeppegsamfira: well, the juju one anyway17:38
natefinchrogpeppe: yeah, the real problem is that net.Listen("namedpipe", "\\.\foo") doesn't call my code on windows :)17:38
natefinchrogpeppe: that's the cross-platform API17:38
rogpeppenatefinch: we should always try to make cross-platform APIs when possible, in my view17:39
natefinchrogpeppe, gsamfira: I'd love to get the package into the stdlib... I don't know how likely that is, though.17:39
rogpeppenatefinch: platoform-specific code should be pushed down to as low a level as possible17:39
natefinchrogpeppe: I agree completely17:39
natefinchrogpeppe: like I said, it should live in platform-specific code inside net, if that were possible17:40
rogpeppenatefinch: sure, but given that it can't why not provide an interface similar to what you'd hope the net package *should* provide17:40
rogpeppe?17:40
rogpeppenatefinch: so that folks can use the abstraction your package provides without needing to write windows-specific shims like our juju/sockets package17:41
gsamfiraI guess it should be a simple addition. something like fsnet.Listen(path) and fsnet.Dial(path). Basically what the sockets package does :)17:42
gsamfirabut if you plan on proposing it for stdlib, I can see why you would not want this17:42
natefinchrogpeppe: I dunno, I prefer just having a package that is compatible with the net package.  I don't think it's really that bad, and it keeps my package more simple17:42
rogpeppenatefinch: for instance, i think it's really crappy that the highest level code in juju (cmd/jujud) needs to define RunCommand.winSockPath17:42
natefinchrogpeppe: that could live somewhere less prominent17:43
rogpeppenatefinch: it's only compatible with the net package on windows.17:43
natefinchrogpeppe: it only need to be compatible with the net package on windows. It can't run on linux.17:43
rogpeppenatefinch: if the abstraction was right, there would be no need for two separate paths17:43
rogpeppenatefinch: the abstraction can surely be implemented under linux17:43
gsamfirathat's my fault. I'll have a go at cleaning that up as soon as the final bits of the windows support is in. apologies17:45
natefinchrogpeppe: both sides have to agree to use named pipes.  You can't have both sides randomly picking some transport and assume they'll line up.17:46
natefinchrogpeppe: so, at some point, you have to say "hey, used named pipes", and that's only possible on windows17:46
rogpeppenatefinch: sure. you'd need to document that it use unix sockets under linux and named pipes under windows.17:46
natefinchrogpeppe: named pipes work across the network too.  You can't connect to a named pipe on another machine from a unix socket on this machine17:47
rogpeppenatefinch: and you'd need to document how the mapping is made between dial/listen addresses and the underlying named pipe/socket addresses17:47
rogpeppenatefinch: that's fine - it's an implementation restriction.17:47
natefinchrogpeppe: I don't like letting someone do a listen on one machine and a dial on the other using the same code and then have it not work because one is windows and one is linux.17:48
rogpeppenatefinch: obviously you can't accomplish the impossible.17:49
rogpeppenatefinch: if you defined things right, it would be obvious when you were dialling or listening in an OS-specific name space17:50
natefinchrogpeppe: I think that sometimes making it ugly and obvious is better than making it pretty and obscured.  The fact that both the client and server need to be on the same OS makes me want to make sure it's super obvious this is windows-only, and you can't just listen from linux and have it work.18:04
rogpeppenatefinch: if i was doing it, i might make a package interface something like this: http://paste.ubuntu.com/8019246/18:04
rogpeppenatefinch: i think the fact that the paths have backslashes in is a pretty good indication of that18:05
rogpeppenatefinch: i suspect that most people will be using named pipes for intra-machine communication18:05
rogpeppenatefinch: (we certainly are)18:05
natefinchrogpeppe: we are, and that's why we can safely just pick whichever transport and know the other side will work.  But I don't want my very specific package to encourage generic use without people thinking about it.18:08
rogpeppenatefinch: why would anyone use your package unless they knew what they needed it for?18:09
rogpeppenatefinch: i just hate to see OS-specific stuff spread throughout juju-core unnecessarily18:10
rogpeppeanyway, gotta go18:10
rogpeppenatefinch: ttfn18:10
natefinchrogpeppe: see ya18:12
natefinchrogpeppe: FWIW, I don't disagree.  an OS-agnostic wrapper around npipe is certainly welcome, I just don't think it belongs *in* npipe :)18:12
natefinchCI blockers are like a hydra... fix one and two more appear18:36
perrito666natefinch: what broke now?18:38
natefinchperrito666: HA, what else?18:39
perrito666...18:39
perrito666could you pass me the search link again?18:39
natefinchperrito666: https://bugs.launchpad.net/juju-core/+bugs?field.status%3Alist=TRIAGED&field.status%3Alist=INPROGRESS&field.importance%3Alist=CRITICAL&field.tag=ci+regression+&field.tags_combinator=ALL18:39
natefinchperrito666: you should bookmark it  :)18:40
natefinchperrito666: oh yeah, and restore :/18:40
perrito666natefinch: I bookmarked it on the other computer sorry18:40
natefinchperrito666: heh it's ok :)18:40
natefinchperrito666: chrome sync would fix that if you were using it :)18:40
perrito666natefinch: I am using chrome, which is odd, I guess when the computer froze during the hangout it caused it not to sync18:41
natefinchah, huh.  Wonder if it was an in-memory cache that didn't get written out18:42
perrito666natefinch: dunno, should be ok now18:42
perrito666mmm, restore breakage makes no sense18:47
sinzuiperrito666, I am going to try changing the restore command in the test to use --show-log to get more info19:29
perrito666sinzui: thank you19:29
natefinchheh, git diff <commit> HEAD  makes a lot more sense than git diff HEAD <commit>  .... the later makes it look like we removed a whole bunch of functionality, stopped using gopkg.in, etc19:31
=== Ursinha is now known as Ursinha-afk
sinzuiperrito666, --show-log isn't giving more information. I will add an attempt to get logs from the machine that added20:16
perrito666sinzui: --debug perhaps?20:17
perrito666if not I can reproduce this test in a moment20:17
perrito666I have a doctor appointment but will be back later20:17
dpb1Hi -- testing 1.20.4 -- I'm having trouble getting this openstack cloud to bootstrap: http://paste.ubuntu.com/8020244/ -- I suspect that the cloud api endpoint is not getting written out correctly somewhere.  Anyone seen something like this?20:18
sinzuiperrito666, Somone need to ensure --debug  stops leaking credentials. really! no person can post a log with --debug because the whole work gets the keys to use their account20:18
* perrito666 agrees with sinzui20:18
perrito666sinzui: what are you running the tests with, jenkins or your box?20:19
perrito666if its your own box you could just mail me the results, I do have access to these credentials anyway, I think20:19
perrito666now fine people if you excuse me, I really, really need to the doc20:20
perrito666might be back online from the waiting room20:20
sinzuiperrito666, I may do. I am trying to create a special log when a failure is detected and the env is still up20:20
perrito666I usually do that with the restore test by getting the logs before the destroy in finally, even when the tests dond fail20:22
sinzuiperrito666, I am trying to capture the new ip of the machine. It is in the string of the error message. I hope to get the log a the moment before destroy is called20:25
dpb1n/m, I've sorted it20:35
=== Ursinha-afk is now known as Ursinha
dpb1sinzui: https://bugs.launchpad.net/juju-deployer/+bug/1243827  -- are the juju tools compiled against an old goyaml by any chance?21:21
dpb1sinzui: I'm getting something very similar when the tools jujud reads in a yaml with an underscore in the openstack password.21:22
sinzuidpb1, The tools are from the debs we build. the debs used the tarball. The tarball pinned the deps to the version specified by juju-core21:22
dpb1sinzui: ok.  I guess I'll file a new bug then?  That same symptom seems to be happening with jujud from 1.20.4.  jujud reads in the environment on the bootstrap node, and if the password contains an '_', it gets stripped.21:25
sinzuidpb1, both devel and stable are 1 version behind21:25
sinzuidpb1, I see the fix was made...but the engineer never updated juju to use it :(21:28
dpb1oh dear21:28
dpb1:(21:28
sinzuidpb1, https://bugs.launchpad.net/juju-deployer/+bug/124382721:29
sinzui^ the bug wrongly says it is invalid for juju-core.21:29
dpb1ohhh21:29
sinzuiI will correct the bug and target it to 1.20 now21:30
dpb1sinzui: thanks!  I'll add our tags so we can track.  appreciate it21:30
menn0sinzui: have you had a chance to look at those CI log archiving changes I sent you?21:39
menn0sinzui: they could be useful in figuring out the current blockers21:39
sinzuimenn0, I was looking for them and couldn't find them. I thought you forgot to request a merge21:39
menn0sinzui: I don't think I'm allowed to request merges for that project or can I?21:40
menn0I sent you the changes in an email21:40
menn0as a bzr merge directive21:40
sinzuimenn0, https://code.launchpad.net/juju-ci-tools is a public project21:40
menn0you can bzr pull the changes straight out21:40
menn0sinzui: ok. let me try again.21:41
sinzuithank you menn021:55
menn0sinzui: https://code.launchpad.net/~menno.smits/juju-ci-tools/log-dumping-improvements/+merge/23039821:55
menn0sinzui: I blame my complete inexperience with Launchpad21:55
sinzuimenn0, hmm, at first glance, this wont help the current bug because the bootstrap host may not exist after the restore was attempted21:58
menn0sinzui: yep you're right. dump_env_logs assumes the bootstrap node is available.21:59
menn0it should help with the HA blockers though21:59
sinzuimenn0, okay that means my current branch is still valid. I am searching for the  address of the new instance. I will base my branch on yours though.22:00
menn0sinzui: where are you searching for the address?22:01
sinzuimenn0, the address might be in the output of error that is raised. I can see the "attempting to connect (.*)" lines, so I could use the last one as an address to ssh to22:02
menn0sinzui: that could work22:03
sinzuimenn0, does dump_euca_console work with openstack. that is where the tests can be run22:06
sinzuiand joyent22:06
sinzuiand azure22:06
menn0sinzui: apart from being in a new function, that code hasn't changed22:07
menn0dump_euca_console doesn't do anything unless the host_id is set22:07
sinzuimenn0, I see. That code is very naive22:08
menn0waigani: could the failures at the bottom of bug #1347715 be related to your recent work?22:20
sinzuimenn0, I merged your branch. I ponder one more change though22:39
sinzuimenn0, We really shouldn't try to get bootstrap_host (ip) after is was destroyed. that undermines getting all the logs from all the machines.22:40
sinzuimenn0, I think we should set bootstrap_host to None to encourage your new functions to get everything it can from what ever exists in the env22:40
waiganimenn0: I've read through bug and back through my possibly related change sets, nothing jumps out. were you thinking of anything in particular?22:41
menn0waigani: just that it appears to be SSH related22:59
menn0waigani: it might be a completely unrelated problem22:59
menn0waigani: so feel free to ignore me22:59
menn0sinzui: the idea behind passing in the bootstrap host address is that it allows retrieval of at least some logs even if "juju status" is no longer functioning23:05
menn0sinzui: generally tests seem to be remembering the bootstrap host address before doing something drastic23:05
menn0sinzui: thinking out loud... perhaps a better approach might be to ask the underlying provider infrastructure for machine addresses if "juju status" fails.23:07
menn0sinzui: we could then remove the bootstrap_host arg to dump_env_logs23:08

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