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

=== hatch__ is now known as hatch
cmarswallyworld_, i'm trying to write a standalone juju plugin (for fun & to learn) with the cmd.Command framework, connect to the state server, etc.00:41
cmarsthing is, when i try to connect, i get error: Unable to connect to environment "foo": no registered provider for "openstack"00:41
wallyworld_"for fun"00:42
wallyworld_ha00:42
cmars:)00:42
cmarsto scratch an itch, actually00:42
cmarswhat do i need to do to initialize those providers00:42
wallyworld_you need to import from providers so the init() gets run00:42
cmarsah, ok00:42
wallyworld_use a _ at the start00:42
wallyworld_so it doesn't complain about unused imports00:43
wallyworld_grep for it and you'll see where else it's done00:43
mischief61507davechen1y: how hard do you think it would be to remove all use of non-portable syscall imports from juju-core/cmd/juju and its deps? :)00:43
cmarswallyworld_, that did the trick, thanks00:44
wallyworld_np00:44
davechen1ymischief61507: not hard00:45
davechen1ymischief61507: can you raise and issue with the syscalls that are missing00:45
davechen1yi'm assuming its the usual TCSET/TCGET00:45
davechen1yictls00:45
mischief61507nono00:45
mischief61507it's mainly use of nonportable signal names00:46
mischief61507i would like to run juju-core/cmd/juju on plan 9 you see, and once i hacked out the references to nonportable signal names from syscall, it seemed to run ok00:47
davechen1ymischief61507: i'm sure we can do some kind of conditional compilatoin00:47
mischief61507yea, having _unix and _plan9.go files would likely work00:48
davechen1ymischief61507: https://bugs.launchpad.net/juju-core/+filebug00:48
davechen1yif you would be so kind00:48
sinzuiwallyworld_, Do you have an experience unfucking gobot. we have a backlog of branches that cannot merge in 1.18.00:59
wallyworld_sinzui: i have and i will01:00
wallyworld_sinzui: bot is running01:01
wallyworld_must be something else01:01
wallyworld_i'll look01:01
wallyworld_it says no approved proposals for 1.1801:01
sinzuiwallyworld_, jhobbs and I stopped after a while01:02
sinzuiwallyworld_, This is mine https://code.launchpad.net/~sinzui/juju-core/inc-1.18.0/+merge/21405301:03
wallyworld_sinzui: gotbot claims that one is not approved01:03
sinzuiI will approve it again01:03
sinzuidone01:03
wallyworld_sinzui: and tests running01:04
=== thumper-gym is now known as thumper
sinzuiwallyworld_, gobot failed the version change to 1.18.0 again https://code.launchpad.net/~sinzui/juju-core/inc-1.18.0/+merge/21405301:21
wallyworld_:-(01:21
wallyworld_do you need me to check anything?01:22
wallyworld_hmmm.01:23
wallyworld_looking at the errors, looks like it fails to upload and/or find tools01:23
wallyworld_sinzui: i can look into it01:25
waiganithumper: juju-mongodb was installed but mongodb was not. If tests rely on mongodb, should it be added to the makefile as a dependency?01:52
thumperyes probably01:52
thumperbut the real problem is that on trusty, the tests should rely on juju-mongodb01:52
waiganithumper: okay, as a temp patch, should I add it in?01:53
thumperadd what where?01:53
waiganithumper: to the makefile - install dependencies01:54
thumperhttps://bugs.launchpad.net/juju-core/+bug/130135301:54
_mup_Bug #1301353: juju test suite should use juju-mongodb <tech-debt> <trusty> <juju-core:Triaged> <https://launchpad.net/bugs/1301353>01:54
thumperwaigani: no01:54
thumperwaigani: perhaps fix that bug01:54
waiganiah01:55
thumperwaigani: also, there is the test to make sure that juju-mongodb is installed for the local provider prechecker01:55
thumperwaigani: that would be a good thing to fix too01:55
davechen1ythumper: isn't juju-mongodb a dep of juju-local now ?01:56
thumperdavechen1y: I believe so01:56
thumperdavechen1y: but many people don't have juju-local installed when trying to use the local provider01:56
thumperwe should tell them01:56
sinzuidavechen1y, thumper. It appears NO juju users install the juju-local package01:57
sinzuiI have had 5 complaints from canonical staff in 2 weeks alone. Juju local is broken they say. They have not installed juju-local to get the correct deps01:58
davechen1ysinzui: shitballs01:58
sinzuiI amended the release note to make it clear juju-local is required https://docs.google.com/a/canonical.com/document/d/1h13ZT7dB-Ajl2MHUJA2Qt0BKGPTZq2pFXqAVKGYSinQ/edit?disco=AAAAAJTTWP801:58
davechen1yand there isn't a file path that we can hang the usual check off01:58
davechen1ydumb suggestion: juju-1.18 depends on juju local01:59
davechen1yi think that is a less worse solution that making it optional01:59
davechen1yactually01:59
davechen1yscrap that01:59
davechen1yi can see the complains about mongodb already01:59
davechen1yshit, sam left something at home01:59
davechen1yback in 10 mins, gotta go drop it off01:59
sinzuidavechen1y, I think jamespage mulled that suggestion in the past. We don't want lxc on the servers in many cases, but for many people, local provider is the first env they test before sending a stack to a cloud that costs moneyh02:00
sinzuiwaigani, thumper, maybe juju shouldn't check for mongodb-server or cpu-checker or rsyslog-gnutls. Just check for juju-local. No package, then stop and demand it02:02
* thumper nods02:03
waiganiokay02:03
davechen1ysinzui: agreed02:26
* thumper does a little dance02:48
=== vladk|offline is now known as vladk
davechen1ythumper: pics or it never happened02:50
=== vladk is now known as vladk|offline
thumperwow... I think I am finally happy with the apiserver tests for this...02:59
* thumper just needs a pile of number eight wire03:06
thumperand we can move this thing forwards03:06
waiganiprovider/local has checks for rsyslog-gnutls. Should this be replaced with a check for juju-local?03:19
thumperwaigani: yes03:45
thumperaxw: do you know if juju-local depends on rsyslog-gnutls?03:45
axwthumper: I raised a but about it a while ago, I think sinzui or jamespage did it03:46
axwthumper: apt-cache says yes03:47
sinzuithumper, It does03:47
thumpercool03:47
thumperwaigani: so, yes, that is your answer03:47
waiganiah, this is what I've done: lp:~waigani/juju-core/1301353-mongodb-dep03:48
waiganijust pushing it up to pull down and test on ppc vm03:48
thumpersimple review for someone:  https://codereview.appspot.com/84290045/03:49
=== vladk|offline is now known as vladk
axwthumper: looking04:04
axwthumper: how do you intend to use StartedTailing?04:08
thumperaxw: I have it in a test where I need to wait until the back looking seeking is done04:08
thumperso I wait on a channel04:09
thumperthat the StartedTailing closes04:09
thumperthen I write more04:09
thumperI wish we had some form of signals and slots built into the language04:09
thumperthat'd work too04:09
thumperbut no04:09
axwyou provide a ReadSeeker - why not just do it there?04:09
axwin the Seek()04:10
thumperbecause I don't seek04:10
thumperand I'm just providing it a real file04:10
thumperAlthough I think I see what you are getting at04:11
axwif there's no seek, fine, but otherwise you can override04:11
axwI don't like exposing things like this for testing04:11
thumperhmm...04:11
thumperok04:11
thumperI think I just got another form of 'no reachable servers'04:12
thumperpanic: interface conversion: interface is nil, not *websocket.Conn,  home/tim/go/src/launchpad.net/juju-core/state/api/apiclient.go:14004:12
thumperI'll look to see if I can rewrite the test04:13
axwthanks04:13
=== vladk is now known as vladk|offline
=== vladk|offline is now known as vladk
=== vladk is now known as vladk|offline
thumperaxw: ok, I got it working, but only because that test doesn't seek backwards from the end04:24
thumperbut I guess it is sufficient04:24
axwthumper: cool. see my comment on the CL, let me know what you think04:25
thumperhmm... I really want to avoid messing around with tailer too much04:27
thumperok, that's it04:53
thumperI'm done04:53
thumpernight all04:53
waiganieod wip(am I on the right track?): https://codereview.appspot.com/8436004305:01
=== tasdomas` is now known as tasdomas
dimiternmorning all06:37
axwmorning dimitern07:13
dimiternhey axw07:13
davechen1yEOW => til next week gentlemen07:22
wallyworldfwereade: instance type constraint https://codereview.appspot.com/8431004407:34
wallyworldfwereade: also, tests fixes for 1.18 https://code.launchpad.net/~wallyworld/juju-core/fix-tools-tests-1.18/+merge/21415907:34
fwereadewallyworld, I'm just reviewing it, but I have to pop out for an hour shortly07:34
fwereadewallyworld, I'll send what I have in a mo, there's one significant thing07:35
wallyworldfwereade: i'm off to soccer so no hurry07:35
wallyworldjst wanted to let you know they were there07:35
fwereadewallyworld, in particular, what instance-type implies varies by provider07:35
wallyworldespecially the 1.18 fix07:35
wallyworldfwereade: sure, it varies, so for ec2 you say instace-type=m1.small, for openstack something else07:35
fwereadewallyworld, eg in ec2 having a root-disk constraint override an inherited instance-type constraint is definitely wrong -- they're independent -- but in ec2 root-disk is part of the instance type07:36
fwereadewallyworld, different vocabularies== np at all, we have varying arches across clouds today07:36
wallyworldoh i see07:36
fwereadewallyworld, we have to delegate fallback handling to the providers I think07:36
wallyworldright, i didn't get that subtlety07:36
fwereadewallyworld, it might be easiest to do this by storing everythying as stacks of constraints and handing over both of those at startinstance time07:37
fwereadewallyworld, but that implies schema changes07:37
wallyworldyeah, was thinking our current approach won't work now07:37
wallyworldwell07:37
wallyworldwe could defer the fallback behaviour07:37
fwereadewallyworld, so axw/waigani's policy stuff might be the way to make those calculations at the time we do currently07:37
wallyworldsure, the provides can always read the env constraints as needed07:38
fwereadewallyworld, we could defer, but we have to capture the inputs at the same time we currently do the fallbacks07:38
wallyworldnp, i'll take a look07:39
wallyworlddo we have the rules documented for how to fall back?07:39
wallyworldfor each rpovider?07:39
fwereadewallyworld, it's pretty much "what does an instance type imply" in this particular context07:39
wallyworldthat's what i'm no sure of. i can read the ec2 docs07:40
wallyworldanyways, gotta run to soccer07:40
fwereadewallyworld, ec2 is potentially misleading07:40
fwereadewallyworld, indeed, we can chat later07:40
wallyworldfwereade: if you want to put a few thoughts down, drop me a line or we can chat07:41
wallyworldbut apprt from the fallbac, i think the approavh works07:41
wallyworldor seems to work fine07:41
wallyworldcode change to use the constraint itself was quite small07:42
fwereadewallyworld, yeah, I don't think it's devastatingly complex07:42
fwereadewallyworld, tyvm for this :)07:42
wallyworldnp, we really need it07:42
wallyworldlike last year07:42
* fwereade winces gently07:43
wallyworldfwereade: highest priority now though is the 1.18 test fix07:43
wallyworldto unblock the release07:43
rogpeppewell, at least i've got my second monitor working again now, kinda08:05
* rogpeppe doesn't trust trusty any more08:05
* rogpeppe tries to work out how to use lubuntu08:09
rogpeppehere's an interesting mongod failure: http://paste.ubuntu.com/7202291/08:18
rogpeppei thought that most of the replicaset test failures were due to socket address clashes, but the above makes it look like mongod crashes might also be a contributor08:18
axwthat doesn't look great08:25
fwereadewallyworld, when you're back, can we talk a bit about upload-tools? as, indeed, a higher priority than the instance-type stuff08:26
axwrogpeppe: I managed to bootstrap local provider with natefinch's branch, with a few modifications - I added some comments to the CL08:27
axwEnsureMongoServer that is08:27
rogpeppeaxw: great, thanks08:28
voidspacemorning all08:42
=== vladk|offline is now known as vladk
=== vladk is now known as vladk|offline
rogpeppevoidspace: morning!09:09
=== psivaa_ is now known as psivaa
dimiternfwereade, hey, just updated https://codereview.appspot.com/83070047/ with your suggestions and I think it should be ready to land if you can take a look09:15
fwereadedimitern, will do09:15
fwereadedimitern, rogpeppe, I would appreciate thoughts on https://code.launchpad.net/~wallyworld/juju-core/fix-tools-tests-1.18/+merge/214159 -- I am concerned that disallowing upload-tools will screw customers in isolated environments -- I guess I'm behind on something here?09:16
rogpeppefwereade: looking09:17
dimiternfwereade, so --upload-tools will be allowed only for dev versions?09:17
evjcastro: you were going to add me to the regular charmers call, but either I lost the invite or never got one. When is it?09:28
fwereadedimitern, it looks like that's already happened but it scares me -- clients use the ehh-just-use-the-local-jujud-it's-probably-good-enough functionality in upload-tools09:42
fwereadedimitern, rogpeppe: do you recall when that changed? I know it's something we're working towards but I'm not sure all the other pieces to support it nicely are in place yet09:43
fwereadeI'll ask wallyworld when he comes back :)09:43
rogpeppefwereade, dimitern, voidspace, mgz, axw: i'd appreciate a review of this fairly involved test that tries to sanity-check our singular worker approach: https://codereview.appspot.com/8447004309:43
dimiternrogpeppe, looking09:44
dimiternfwereade, oww..09:44
rogpeppefwereade: sorry, i got distracted finishing up this proposal. will really look now :-)09:44
=== vladk|offline is now known as vladk
fwereaderogpeppe, I know the feeling09:44
* fwereade is trying to do about three things at once09:45
rogpeppefwereade: it seems weird that upload-tools is disabled for release versions. i hadn't noticed it.09:45
rogpeppefwereade: and i certainly managed to upgrade-juju with --upload-tools recently, although that was from a 1.16 environment (tho using 1.18 juju) so might not count09:46
rogpeppefwereade: my thoughts are that it scares me too09:55
fwereaderogpeppe, I think it'll have to be a standup topic09:56
rogpeppefwereade: yeah09:56
fwereaderogpeppe, please remind me if I forget :)09:56
rogpeppefwereade: have you got a moment to discuss Ping?09:57
fwereadedimitern, LGTM with a couple of tweaks, ping me if anything's surprising09:57
fwereaderogpeppe, I expect so, which one?09:57
fwereaderogpeppe, the keepalive thingy?09:57
rogpeppefwereade: well, as part of the singular worker stuff, we need to be able to ping the state session to make sure that mongo hasn't changed masters09:58
perrito666morning everyone09:58
rogpeppefwereade: for the StateWorker, that's easy because we've got access to the *state.State and thence its mgo.Session09:58
jamfwereade: if we disabled upload-tools, but enable the ability to use the local jujud as a simplestreams source (juju bootstrap --source=/usr/lib/juju/local-tools) ?)09:59
jamI don't think we can just disable it, either.09:59
rogpeppefwereade: but for the APIWorker, there's no easy way, because the api Ping doesn't actually check that the underlying mgo.Session is still alive09:59
rogpeppefwereade: i'm considering making api.State.Ping do a ping of the underlying mgo.Session if the connected agent is an environ manager09:59
jamrogpeppe: I thought you didn't need to ping mongo as we expected the connection to break and bounce the API servers09:59
rogpeppejam: we have to know when the connection breaks10:00
fwereaderogpeppe, yeah, I thought we were relying on operations failing?10:00
jamfwereade: I guess the issue is that since environ-provisioner is on the other side of the API, then every API facade call should technically check IsMaster10:01
jamotherwise between API calls master could change... ?10:01
rogpeppefwereade: we can rely on that for the master, but the secondaries need some way of knowing too10:01
jamthough I thought we also bounce the API server which bounces the provisioner10:01
rogpeppejam: we don't need to check on every call, because if isMaster changes, then the API call will fail10:06
fwereaderogpeppe, sorry, I'm having difficulty swapping context10:09
rogpeppethe problem i'm considering is: when an agent is *not* master, it doesn't run any of the singular workers, but it needs to know when the master has changed, so it can't do exactly nothing10:10
jamrogpeppe: don't all connections get bounced when the master changes?10:10
rogpeppeso i make it ping the connection periodically to make sure that the status is as before. when the ping fails, it knows the master might have changed, so it reconnects10:10
jamcertainly replsetReconfig bounces all connections.10:11
jamrogpeppe: and I thought everything actually just connects to the master to do any Write operation, so it will also bounce10:11
jamit just needs to know if the connection is "local"10:11
rogpeppejam: only if the API server is actually doing something10:11
rogpeppejam: the only way we know if the master has changed is if some operation fails10:11
rogpeppejam: but there might not be any operations happening.10:12
jamrogpeppe: so we don't notice a disconnect by itself?10:12
rogpeppejam: how would we?10:12
jamrogpeppe: Presence pingers are very likely to be triggering all the time10:12
jamthat writes to the Presence DB10:12
jam\10:12
jambut if an API server didn't have any clients10:12
jamit would still have its own pinger?10:12
fwereaderogpeppe, jam: can we force state servers to connect to their own api server? would that resolve it?10:13
rogpeppejam: hmm, it's possible that an agent, by virtue of being connected, has a presence pinger that will kill the connection if it dies10:13
rogpeppefwereade: not really10:13
jamfwereade: I'm pretty sure we already do by writing "localhost" into agent.conf10:14
fwereaderogpeppe, jam: that'd guarantee at least one connection with a presence pinger for each state server?10:14
rogpeppefwereade: hmm, i see what you're getting at.10:15
* rogpeppe thinks10:15
dimiternfwereade, cheers!10:17
voidspacenatefinch: morning nate10:18
natefinchhowdy-ho neighbors10:18
rogpeppenatefinch: hiya10:20
wwitzel3hey natefinch10:20
rogpeppefwereade, jam: i haven't yet found anything that would imply that a presence-pinger failure would cause an api connection teardown10:20
rogpeppeand we might actually have a problem, because i'm not sure that *anything* will cause the API server to fail when the state connection fails.10:23
* rogpeppe wonders about a decent way to do that10:24
fwereaderogpeppe, hmm -- yeah, looks like the pinger's just left lying around -- but it doesn't seem like it would be too bad to have a goroutine waiting for pinger failure, and using that condition to tear down the connection10:26
natefinchaxw: thanks for all the comments on the EnsureMongoServer branch.  It was tested and working last week with the local provider, but we've done some significant refactoring since then, so it's entirely possible we messed some stuff up.  I'll be doing live testing today.  I'll apply your suggestions as we go.10:26
rogpeppefwereade: i wonder about a single goroutine started in apiserver.Server.run which periodically pings the underlying state, and if that fails, kills the Server.10:33
fwereaderogpeppe, that's probably cleaner10:33
fwereaderogpeppe, shorter chain of dependencies to get amusingly broken at surprising times10:33
rogpeppefwereade: yeah10:34
rogpeppefwereade: right, i'll make a ticket for it10:34
rogpeppejam: does that sound reasonable to you?10:35
dimiternrogpeppe, reviewed10:43
dimiternperrito666, standup?10:47
* perrito666 having computer problems, ill be right there10:47
jamrogpeppe: sgtm10:51
rogpeppejam: cool10:52
rogpeppejam: standup?10:52
jamrogpeppe: not working today :)10:52
jam"not" working10:52
rogpeppejam: ah, of course. what are you doing here then? :-)10:52
jamrogpeppe: "not" working, certainly10:52
natefinchhe just misses us10:53
wwitzel3jam: lol10:53
perrito666question, how many lgtms I need on this to merge it? https://codereview.appspot.com/8228004511:07
rogpeppeperrito666: just one, assuming you're happy with the reviewer's knowledge of the code11:09
perrito666rogpeppe: I think you wrote the code originally :) so yours woud be appreciated, you will find it really really short11:11
rogpeppeperrito666: i don't understand the change11:13
rogpeppeperrito666: why is 2 seconds too short?11:13
perrito666rogpeppe: when there is lag, the wait time is 2 sec + whatever it takes for the server to answer11:14
perrito666when you are next to the machine however, that time is almost inexistent11:14
perrito666so the time waited is not enough and the operation times out11:15
rogpeppeperrito666: isn't this script always running on the machine itself?11:15
rogpeppeperrito666: also, this sleep is inside a loop anyway, so i don't see why it makes a big difference11:15
perrito666rogpeppe: it is a seq loop, it will basically wait up to 120 secs, which is not enough in some cases (you make a point on that running remotely, strange)11:16
rogpeppeperrito666: if you want to increase the overall timeout, then it would be better to increase the seq, to say (seq 1 300)11:17
perrito666rogpeppe: I see, why? (I changed the time bc It made more sense to me to wait a bit between retries intead of hitting a lot more times)11:19
dimiternfwereade, updated https://codereview.appspot.com/83070047/11:22
rogpeppeperrito666: it depends how long it usually takes11:24
rogpeppeperrito666: how about a 5 second delay and 100 reps?11:24
perrito666sounds like a good compromise :)11:25
wwitzel3brb11:44
perrito666rogpeppe: thanks for your input man :) I added the change11:44
perrito666s11:44
rogpeppeperrito666: np11:44
=== lazyPower-travel is now known as lazypower-conf
* perrito666 wonders if he can teach his vi to do bash coloring for bash inside go11:45
rogpeppeperrito666: ha ha, that would be a nice trick11:54
voidspacerogpeppe: so this is my basic approach https://code.launchpad.net/~mfoord/juju-core/wrapsingletonworkers/+merge/21420811:56
voidspacerogpeppe: I know you'd *rather* we were calling agentState.Ping() - but that won't work *yet*, right?11:56
rogpeppevoidspace: it will soon. i'd prefer it if this just used that, please.11:57
voidspacerogpeppe: ok11:57
voidspacerogpeppe: in which case, does the agent.State fulfill the singular.Conn interface11:57
voidspacelet me find out11:58
rogpeppevoidspace: hmm, not quite11:58
rogpeppevoidspace: as it doesn't have Ping11:58
rogpeppevoidspace: we could just add Ping to agent.State though11:58
rogpeppevoidspace: alternatively (and perhaps better) just make your type be: type myConn struct {*agent.State; *api.State}11:59
rogpeppevoidspace: and i think *that* should fulfil the interface11:59
voidspacerogpeppe: duplicate field State12:02
voidspaceoh12:02
rogpeppevoidspace: ha12:02
voidspaceanyway, that aside12:02
voidspaceI have a lunch date apparently12:02
voidspaceso I have to go12:02
rogpeppevoidspace: there's a cunning way around it though12:02
voidspaceback in a bit12:02
rogpeppevoidspace: enjoy!12:02
voidspacerogpeppe: I will hear your cunning plan on my return12:02
BjornT_could someone please help me debug why juju can't connect to the bootstrap node when bootstrapping? i'm trying to bootstrap a maas environment (using vms). the bootstrap node comes up, but juju can't seem to be able to connect to it.12:16
BjornT_the debug log is showing that juju is trying to do this: http://pastebin.ubuntu.com/7202991/12:17
BjornT_if i run that ssh command manually, i'm able to connect to the machine, but juju can't for some reason, and i'm not sure how to figure out why12:17
rogpeppedimitern: i responded to your review, BTW:  https://codereview.appspot.com/84470043/12:18
dimiternrogpeppe, http://play.golang.org/p/IVDHjlYPXf12:18
dimiternrogpeppe, that's re your answer to my question about simplifying that line of code12:19
perrito666BjornT_: ist it giving more details on the connetion failure?12:19
rogpeppedimitern: ah yes, i see12:19
dimitern:)12:19
rogpeppedimitern: now i come to think of it, i remember deliberately leaving the +1-1 in there12:20
BjornT_perrito666: the juju log doesn't say it fails, it just keeps retrying all the time, it seems12:20
rogpeppedimitern: otherwise i think the logic is more obscure12:20
rogpeppedimitern: logically, we're adding one to get the next in sequence, subtracting one to make it into a zero-based index, then modulo, then add one again12:21
rogpeppedimitern: so i *think* i'd rather leave that logic explicit12:21
dimiternrogpeppe, ok, but please add a comment12:21
rogpeppedimitern: ok12:21
rogpeppedimitern: (although i'd *definitely* need a comment if i went with your suggestion - it's not that obvious what it's doing :-)12:22
rogpeppe)12:22
rogpeppedimitern: done12:23
dimiternrogpeppe, ta!12:24
BjornT_perrito666: now it finished, and shows this error: http://pastebin.ubuntu.com/7203035/12:25
dimiternrogpeppe, LGTM12:25
perrito666BjornT_: have you tried removing the key from the keyfile?12:25
rogpeppedimitern: ta!12:25
BjornT_perrito666: yes, didn't help12:29
* perrito666 scratches head12:29
BjornT_perrito666: me to :-/ the maas environment i have with real machines seems to work fine, but i can't figure out what's different with this setup12:30
wwitzel3 12:42
perrito666wwitzel3: how eloquent12:42
wwitzel3ignore me!12:42
hazmatdavecheney, pong12:46
wwitzel3ok, there we go, all better :) was having some weird window manager issues12:46
perrito666wwitzel3: ah happens12:47
perrito666BjornT_: well if it is a whole virtual setup, some weirdness might occur in the network config (I am purely guessing here)12:48
BjornT_perrito666: well, i think i've found the culprit. it seems the curtin installer is failing for some reason, so probably not a juju issue12:54
bits3rpentHey, I was just running through the code yesterday, and I didn't understand a part of server.go 100%.13:10
bits3rpentI was wondering in the context of say, a client running the set command, how would bindRequest find out which method to run?13:11
=== tvan-afk is now known as tvansteenburgh
fwereadebits3rpent, hmm, the MethodCaller stuff rings a bell, but rogpeppe will remember the details better than I will13:21
fwereadebits3rpent, I would suggest that digging into the infrastructure is relatively unlikely to directly help you accomplish anything app-level -- what are you working on at the moment?13:21
natefinchrogpeppe: have you had a chance to look at that commented out code in Machineagent's APIWorker?  It needs the StateServingInfo, but it has an api.State not a state.State, and thus doesn't have a StateServingInfo() method on it.13:52
voidspacerogpeppe: https://code.launchpad.net/~mfoord/juju-core/wrapsingletonworkers/+merge/21420813:54
rogpeppenatefinch: will do13:55
rogpeppenatefinch: would you be able to have a glance through https://codereview.appspot.com/84470043/ before i approve it, please?13:58
natefinchrogpeppe: sure thing14:00
rogpeppenatefinch: there's a StateServingInfo method on State.Agent()14:03
mattywfwereade, would you be able to take another look at this: https://codereview.appspot.com/83060049/14:04
natefinchrogpeppe: oh yeah, right, MachineAgent has a state in it.  Sorry, got confused by the local variable in that method14:07
rogpeppenatefinch: i've made the change in my branch (and a couple more, rationalising the use of configChanged). i will push up shortly, when i've run tests14:09
rogpeppepwd14:09
rogpeppenatefinch: we'll want a test that a machine agent started with no state serving info in its config will get it from state, start the api server, and stash the info in its config14:11
natefinchrogpeppe: great, thanks.  Yeah, that test sounds like a pain, but definitely needed.14:13
voidspacerogpeppe: NewEnvironProvisioner is called twice14:13
voidspacerogpeppe: once in cmd/jujud/machine.go14:13
voidspaceah no14:13
voidspacerogpeppe: the second one is container_initialisation_*test*14:13
voidspacemy brain parsed out the "_test" bit on first read14:14
voidspacenever mind14:14
voidspacesorry14:14
rogpeppenatefinch: tests seem to pass. here's the branch for you to merge: lp:~rogpeppe/juju-core/natefinch-030-MA-HA14:15
natefinchrogpeppe: awesome, doing so now14:16
natefinchrogpeppe: is st.Agent().StateServingInfo() better than using MachineAgent's st.StateServingInfo?14:17
rogpeppenatefinch: i don't understand14:18
natefincha.st.StateServingInfo()  in that place14:18
rogpeppenatefinch: oh yeah14:18
rogpeppenatefinch: MachineAgent.st is horribly bogus14:18
natefinchrofl14:18
rogpeppenatefinch: it should not be there14:18
natefinchwow ok14:18
rogpeppenatefinch: and it's not available at that point anyway14:19
rogpeppenatefinch: MachineAgent.st is a really nasty hack to try and get the *state.State from a StateWorker to the APIWorker14:19
rogpeppenatefinch: for the upgrade code14:20
natefinchthat's unfortunate14:20
rogpeppenatefinch: it would be considerably better if the upgrade code made its own connection to the state14:20
voidspacerogpeppe: https://pastebin.canonical.com/107793/14:22
voidspacerogpeppe: now I have to change my monitor orientation!14:28
rogpeppevoidspace: sorry 'bout that14:29
natefinchlol14:30
wwitzel3natefinch: hangout?14:34
wallyworldfwereade: sinzui : tested live on ec2 with version 1.18 and bootstrap --upload-tools https://code.launchpad.net/~wallyworld/juju-core/fix-tools-tests-1.18/+merge/21415914:36
wallyworldthe branch name is now misleading14:37
natefinchwwitzel3: sure14:38
wallyworldfwereade: sinzui : i gotta get some sleep so if it's +1 could one of you please approve so it can land14:39
fwereadewallyworld, many thanks indeed14:39
=== Ursinha-afk is now known as Ursinha
sinzuiwallyworld, thank you very much. I will manage its landing when the time comes14:42
wallyworldfwereade: i took a while cause i went down so many dead alleys trying to get all the tests to pass, and i had to find exactly the right tweaks14:43
fwereadewallyworld, you have gone even further above and beyond than usual14:43
wallyworldnp. i really hope it works, i'll check email with anticipation later :-)14:44
rogpeppenatefinch: did you manage to have a look through https://codereview.appspot.com/84470043/ ?14:46
rogpeppenatefinch: don't worry if not. i'll approve it anyway.14:46
wwitzel3lol14:46
natefinchhaha...14:47
natefinchrogpeppe: sorry, got halfway through and got distracted.  was hoping we could put the unreliable tests somewhere central so other places can use it14:48
rogpeppenatefinch: the flag, you mean?14:48
natefinchrogpeppe: yes, sorry14:48
rogpeppenatefinch: yes, that's not a bad idea14:48
natefinchjuju-core/testing maybe14:49
rogpeppenatefinch: i'll consider it for the future, but if that's the only issue, i'll go ahead with it anyway.14:50
rogpeppenatefinch: when some other test requires it, it can move it into testbase14:50
natefinchrogpeppe: fair enough.14:54
natefinchrogpeppe: not sure I can review the whole thing right now, there's quite a lot of code.14:55
rogpeppenatefinch: np14:55
voidspacerogpeppe: added the singularRunner to StateWorker and removed the now extraneous New functions14:55
voidspacehttps://code.launchpad.net/~mfoord/juju-core/wrapsingletonworkers/+merge/21420814:55
rogpeppenatefinch: it's mainly there to convince myself that the strategy works14:55
* rogpeppe finds it difficult to read diffs without full context...14:58
natefinchrogpeppe: me too14:58
voidspaceI have the same problem with reitveld - I consider the rest of the diff to *be* context...14:58
voidspacerogpeppe: either your microphone is right by your keyboard - or you're typing with a sledgehammer15:00
dimiternfwereade, rogpeppe, mgz, Provisioner API for networks and interfaces https://codereview.appspot.com/84570043 PTAL15:00
rogpeppevoidspace: the problem is the i see the changes, and often the start of the function is missing, so i have to try to infer which function the changes are in15:00
mgzdimitern: looking15:00
rogpeppevoidspace: that all looks great, BTW. i think i'd put the singular conn types at the end of the file though.15:00
voidspaceyeah, good call15:01
rogpeppevoidspace: i'm not sure which extraneous New functions you meant, but i guess it doesn't matter now they're gone :-)15:01
voidspaceI had New functions to instantiate the singular*Conn structs15:01
voidspacebut not needed, can just use singularStateCon{state, machine} (etc)15:01
voidspaceI've muted the hangout by the way15:02
rogpeppevoidspace: also, i have a vague convention that if i'm mocking something, i'll make the name the same as the usual name, but without the dot. so i'd use singularNew to mock singular.New, even though the name reads slightly more awkwardly.15:02
voidspacetempted to say I have a convention to use the best name for the thing being mocked15:02
voidspacebut I will resist15:02
rogpeppevoidspace: well, i've never actually stated that convention; it's just something that i've been doing and seems to work ok15:03
voidspacerogpeppe: that would mean the test would need to be an explicitly whitebox test15:03
voidspacerogpeppe: but I guess it avoids making the alias a publicly exported part of the package under test15:03
rogpeppevoidspace: it *is* an explicitly whitebox test, if you're mocking out function definitions15:03
voidspaceright15:04
rogpeppevoidspace: FWIW the point is moot in cmd/jujud anyway, because all the tests are in the package itself15:04
voidspaceok15:04
rogpeppevoidspace: and i feel that avoiding polluting the public docs is an important thing15:05
voidspaceyep, fair point15:05
rogpeppevoidspace: (not that that's an issue in cmd/jujud though)15:05
fwereadesinzui, I think I'm happy with wallyworld's patch -- if I mark it approved can I leave it in your hands from then on?15:05
sinzuiThank you fwereade15:05
voidspaceI still think in terms of Python, where NewSingularRunner(thing) looks like a constructor function call and singularRunner(thing) doesn't15:05
=== Ursinha is now known as Ursinha-afk
rogpeppevoidspace: yeah, so singularNew doesn't look like either. but it's sufficiently unusual that hopefully people will either a) understand the convention and know it's intended to be an alias for singular.New or b) go and look at the def'n15:07
voidspacecoffee15:10
perrito666voidspace: marvelous idea, Ill have one too, no sugar please15:12
perrito666:p15:12
=== Ursinha-afk is now known as Ursinha
=== hatch__ is now known as hatch
wwitzel3when I set my scrollback buffer to 5000 I didn't know at the time I'd be having to read juju test failures15:31
wwitzel3or I would of set it much larger :P15:31
natefinchwwitzel3: go get github.com/natefinch/nolog  && nolog ./...15:35
natefinchoptionally pass it -f to write out the full log to tests.out in the current directory15:36
dimiternmgz, does it make sense?15:37
dimiternmgz, the CL I mean :)15:37
mgztyping m in now15:38
mgzdimitern: done15:40
dimiternmgz, ta!15:42
mgzdimitern: anything unclear? my normal kind of not-super constructive review.15:53
dimiternmgz, :) it's fine, I'll split some of the larger tests when possible15:53
dimiternfwereade, mgz, next in line - StartInstance() returns network information (but in this CL just the interface is changed, so it's trivial) https://codereview.appspot.com/8447004416:04
mgznil, nil, nil, err16:10
rogpeppenil, nil, nil, nil, nil, err16:18
arosalessinzui: fyi dannf submitted https://bugs.launchpad.net/juju-core/+bug/1302205 this is a critical one for arm16:19
_mup_Bug #1302205: manual provisioned systems stuck in pending <add-machine> <hs-arm64> <manual-provider> <juju-core:Triaged> <https://launchpad.net/bugs/1302205>16:19
arosalessinzui: I see you just traiged it16:19
sinzuiarosales, making changes now16:20
hazmatarosales, that log output is normal16:21
rogpeppewwitzel3: my scroll buffer is infinite...16:21
wwitzel3rogpeppe: well that's just not true16:21
rogpeppewwitzel3: well, it might start struggling at >10GB :-)16:22
wwitzel3haha16:22
rogpeppewwitzel3: although it's disk-backed, so it won't use more RAM16:22
wwitzel3rogpeppe: yeah, I can enable disk based buffer, I've just been lazy16:22
wwitzel3rogpeppe: and I bumped mine up to 10k, which is good enough16:23
rogpeppewwitzel3: ha ha! you haven't been running uniter tests recently :)16:23
wwitzel3rogpeppe: I'm looking forward to that then16:23
arosaleshazmat: stuck in pending, could that be firewalls?16:25
hazmatarosales, not for manuala16:26
natefinchdammit ubuntu, stop losing my damn windows16:26
hazmatarosales, its strange the machine logs there say there connecting back to the state server16:26
wwitzel3natefinch: I can no longer lose a window, even if I want to ...16:26
natefinchsomewhere, invisible to the desktop, I have a google hangout window16:26
arosaleshazmat: ok, re firewall16:27
hazmatarosales, it might be an issue on the state server16:27
hazmatarosales, there's a couple of panics / process restarts there16:27
dimiternmgz, it will eventually get nil, err, but not today :)16:29
arosaleshazmat: thanks for taking a look.16:29
hazmatthat's odd too.. 2014-04-03 18:09:57 ERROR juju.worker environ.go:56 loaded invalid environment configuration: storage-port: expected int, got float64(8040)16:30
* hazmat wonders if this is related to new instance updater code lands16:30
hazmatoh this is arm6416:31
rogpeppedimitern, voidspace, fwereade, wwitzel3, natefinch, mgz: here's the code that kills the api server when the mongo connection goes down: https://codereview.appspot.com/8454004416:34
dimiternrogpeppe, looking16:34
rogpeppedimitern: thanks16:34
voidspacerogpeppe: cool16:42
dimiternrogpeppe, reviewed16:42
rogpeppedimitern: ta!16:42
=== vladk is now known as vladk|offline
* dimitern gives up on trying to land all vlan stuff today :/ it's still couple of branches away16:44
dimiternmgz, but I can at least land the StartInstance CL ;)16:45
mgzdimitern: okay, I'll stamp that one16:46
dimiternmgz, tyvm16:46
mgzdimitern: lgtm16:47
dimiternmgz, ta16:59
natefinchrogpeppe: I've forgotten, what did we do to fix "cannot get replset config: not authorized for query on local.system.replset" when we try to initiate?17:06
natefinch'cause it's back17:06
rogpeppenatefinch: when are you getting it?17:06
natefinchrogpeppe: in bootstrap, just before we initiate state, we're calling ensuremongoserver and then maybeinitiatereplset17:07
natefincher MaybeInitiateMongoServer... it fails in there17:08
rogpeppenatefinch: live or in tests?17:08
natefinchrogpeppe: live17:08
rogpeppenatefinch: local provider?17:08
natefinchrogpeppe: nope, amazon17:08
wwitzel3rogpeppe: and for me on maas17:08
rogpeppenatefinch: are you in a hangout?17:09
natefinchhttps://plus.google.com/hangouts/_/7ecpi12cuupgkah473lbirvs1k17:09
tvansteenburghhey guys, i'm deploying a trusty workload to lxc, and all unit agent-states get stuck in "pending" and never come up. machine-0 log -> http://paste.ubuntu.com/7203724/17:16
tvansteenburghlooking for help on how to proceed if anyone has time17:16
tvansteenburghprecise workload deploys fine17:17
tvansteenburgh$ juju --version17:18
tvansteenburgh1.17.7-trusty-amd6417:18
tvansteenburghthe trusty cloud image isn't even being downloaded:17:19
tvansteenburghroot@trusty-vm:/home/tvansteenburgh# ll /var/cache/lxc/17:19
tvansteenburghtotal 1217:19
tvansteenburghdrwx------  3 root root 4096 Apr  4 11:08 ./17:19
tvansteenburghdrwxr-xr-x 18 root root 4096 Mar 25 12:06 ../17:19
tvansteenburghdrwxr-xr-x  2 root root 4096 Mar 26 14:51 cloud-precise/17:19
tvansteenburghroot@trusty-vm:/home/tvansteenburgh# lxc-ls --fancy17:19
tvansteenburghNAME                   STATE    IPV4  IPV6  AUTOSTART17:19
tvansteenburgh-----------------------------------------------------17:19
tvansteenburghjuju-precise-template  STOPPED  -     -     NO17:19
rogpeppewwitzel3: ~rogpeppe/juju-core/natefinch-030-MA-HA/17:59
wwitzel3rogpeppe: thanks18:01
rogpeppetvansteenburgh: interesting18:07
rogpeppetvansteenburgh: could you paste all-machines.log?18:07
tvansteenburghrogpeppe: http://paste.ubuntu.com/7204338/18:09
rogpeppevoidspace: did you have the code done for your singular worker wrapping changes?18:27
rogpeppevoidspace: (i don't care about the tests, but i'd like the try it out to see if i can get HA actually working live)18:28
rogpeppes/the/to/18:28
voidspacerogpeppe: incomplete18:30
voidspacerogpeppe: and I'm EOW now18:30
rogpeppevoidspace: ok18:30
rogpeppevoidspace: could you push what you've got so far?18:30
voidspacerogpeppe: ok18:31
rogpeppevoidspace: thanks18:31
voidspacerogpeppe: https://code.launchpad.net/~mfoord/juju-core/wrapsingletonworkers/+merge/21420818:32
voidspacerogpeppe: so, I believe this does18:33
voidspaceEnvironProvisioner, Firewaller, MinUnitsWorker, CharmRevisionUpdater and Cleaner18:33
voidspacerogpeppe: assuming they're all done in cmd/jujud/machine.go18:33
=== BradCrittenden is now known as bac
voidspacerogpeppe: Provider Provisioner still needs to be done18:34
voidspaceand maybe some other provisioners18:34
rogpeppevoidspace: lovely stuff18:34
rogpeppevoidspace: i was just about to actually try it for real, then realised that the second instance needs to write its passwords for jujud18:34
rogpeppevoidspace: i think we're *that* close18:35
rogpeppevoidspace: to having it (theoretically) working18:35
rogpeppevoidspace: but eow for me too now18:35
voidspacecool!18:35
voidspaceg'night everyone18:35
rogpeppevoidspace, wwitzel3: thanks for all your work18:35
rogpeppehappy weekends all18:35
wwitzel3rogpeppe: see ya, have a good weekend18:40
tvansteenburghrogpeppe: should i file a bug for my problem you think?18:42
jcastroCharm school at the top of the hour, The topic is Juju Plugins:  http://ubuntuonair.com, we'll be taking questions in #juju18:53
bcsallerlooks like upgrade-charm on current devel release with trusty is spinning on a git failure, looks to be retrying endlessly19:08

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