/srv/irclogs.ubuntu.com/2013/02/07/#juju-dev.txt

=== slank is now known as slank_away
rogpeppe1davecheney: ping01:37
davecheneyhey01:37
davecheneysorry, is it too late ?01:37
rogpeppe1davecheney: no, it's good01:49
jamhi rogpeppe206:23
jamwallyworld: poke06:27
wallyworldjam: hi06:48
jamwallyworld: looks like you accidentally broke a test when your generate-config patch landed06:48
wallyworldoh :-(06:48
jamcmd/juju/main_test.go06:48
jamtests what commands are listed by 'juju help'06:48
jamand you added one.06:48
wallyworldah bugger. ok, i'll fix it06:49
jamPretty easy to fix, but you'll want to make sure you run "go test ./..." when landing to juju-core. (No bot to help us there)06:49
wallyworldi tried to but it hung06:49
wallyworldso i ran stuff by hand06:49
jamwallyworld: because of the mongo stuff?06:49
wallyworldyeah06:49
jamwallyworld: https://code.launchpad.net/~jameinel/juju-core/main-test/+merge/14702306:49
jam(I still can't get lbox to work without giving unsupported protocol)06:49
jamwallyworld: do you have bigjools's ppa ?06:50
wallyworldno06:50
jam(I personally just put the mongo files into $GOPATH/bin, but the ppa is a good idea too)06:50
jamtechnically, it doesn't hang forever, it just takes 5min to timeout and FAIL :)06:51
wallyworldok, i'll have to get all that working i think06:51
jambut that is for each test package that uses mongo, which is about 5-6, so it takes a pretty long time to run the whole suite.06:51
jamwallyworld: anyway, it is clear that dimitern didn't run the full test suite after merging either, since he landed code after you did. But it is something we need to remember as long as we are manual gatekeepers.06:58
wallyworldyeah06:58
jam(lbox submit *doesn't* run the test suite as near as I can see, which might be a reasonable way around it?)06:58
wallyworldif they didn't hang i would have06:59
jamwallyworld: install newer mongo :)06:59
jamthen it won't hang06:59
wallyworldi'll have to get mongo sorted06:59
jamwallyworld: on the list bigjools mentioned how to disable it (echoing the right disable into a file in /etc), but it isn't something I know offhand.07:01
jamI'm personally happier not installing mongo and just having the binary in my $PATH07:01
wallyworldi'll search for it07:02
jambut I can appreciate the chain-of-authentication stuff07:02
bigjoolsecho ENABLE_MONGODB=no | sudo tee -a /etc/default/mongodb07:02
wallyworldthanks07:02
bigjoolspart payment for the cricket tickets to Australia C on Weds07:03
jamwallyworld: "Mongo packaging" is the thread on juju-dev if you need any of his other bits of wisdom.07:08
wallyworldok, thanks07:09
bigjoolshow are you managing package versions?07:09
jambigjools: how do we package juju-core? dave cheney :)07:09
jamHe mentioned he just set up a daily build of juju-core07:10
jamI don't know much more than that for his final releases.07:10
bigjoolswell, I was thinking of go get07:10
jambigjools: have you seen mythreads on it? Poorly07:10
bigjoolsI read them but that was before I starting understanding Go :)07:10
bigjoolsI got the impression it was bad07:10
jambigjools: essentially "trunk always passes because we manage the race condition of updating the dependency and the master project at the same time"07:11
jambut old versions of trunk aren't guaranteed to pass (are expected not to build because we can't trivially rollback the version of the deps)07:11
jamonce we are stable, we will probably go with a version number in the import string07:11
jamwith the cost that if we have to bump stability, the branch we land on will change location.07:12
bigjoolsyeah, I was thinking about how to handle rollbacks etc07:12
bigjoolsI guess it will come when the language matures07:12
jambigjools: essentially, we cannot do it easily, the tools don't support it, the powers that be don't want to write new tools.07:12
jamthough I might be jaded in my interpretation of the situation.07:13
jamhttps://docs.google.com/a/canonical.com/document/d/1HaVHWyERiPOJgcIQ2W2jc9I7MZQ5OAVNB7m0nMr0oPw/edit#heading=h.dez8xb2t49nj was my attempt at trying to document it all07:13
jamI petered out a bit rather than just living with the status quo07:13
bigjoolsthat's a recipe to have other tools reinvent the wheel and do it07:13
bigjoolsyeah I can understand07:13
jambigjools: "Handling Active Dependencies in Go" is the rather large thread about it. https://groups.google.com/d/topic/golang-nuts/0avuiWURSQk/discussion is the only link I could find on golang-nuts07:14
bigjoolsthanks07:14
jamwhich is still "we could put the version in the import string"07:14
jamwhich breaks lots of other bits07:14
jambigjools: specifically, the big problem with the import string, is that the *library* needs to also use the same import string07:15
jamotherwise they are 2 different packages07:15
bigjoolsyeah07:15
jamso when you do a release, you now have a different URL, and different library source code.07:15
jamand different place in your local dir07:15
jamso all your tools need to move over there, etc.07:15
jamso doing it for *every* bump of a lib that lands in juju-core07:15
bigjoolsthis is the price for putting it in the import07:15
jamis too painful for devs07:15
jambigjools: right, and there isn't an abstraction point in go07:16
jamThey conflated them with probably some good intent (try not to repeat yourself)07:16
jambut then end up mixing essentially runtime information with build time information.07:16
bigjoolsyes07:16
bigjoolsbut it's great if you want to work on trunk :)07:17
jamOne proposal I mentioned was a tool that does the build-time information, and configures GOPATH (which is close to how LP does it with eggs and site.py)07:17
bigjoolsright07:17
jambigjools: except for landing change to goose's trunk breaks juju-core from building.07:17
jamunless you land patches "simultaneously"07:17
jamwe need to add 2-phase-commit to bzr :)07:17
bigjoolsincompatible goose changes or some other reason?07:18
jambigjools: change anything that isn't directly source compatible.07:18
jam'go get' always grabs the latest tip of both branches.07:18
jamso, rename a public variable, etc.07:18
bigjoolsright - I was wondering if it was some language internal to do with compiling it07:18
jamwhich truly isn't "stable"07:19
jambut is very much in the "we don't know what the ideal API is yet, so let us not have cruft *before* we hit 1.0"07:19
bigjoolsdo we know how Google manages this problem?07:19
jambigjools: the thread above mentions 'goven' which is the CVS "vendor" model.07:20
jamTrack an upstream branch in your own repository07:20
jamand use a tool to rename all of your "import launchpad.net/goose" code to be "import launchpad.net/juju-core/launchpad.net/goose"07:20
bigjoolsI guess repository revnos become super important07:20
jambigjools: not quite sure I follow07:21
jamEssentially you just put all possibly-unstable dependencies into your source tree.07:21
bigjoolsif the packages don't have inherent versioning, you need to rely on repo versions to know what you have07:21
jamwith some tool helpers to make it a bit easier to update them to newer versions when you choose.07:21
bigjoolsor am I missing something?07:21
jambigjools: go get doesn't have repo versions, it has repo locations.07:22
jamSo while *I* would have a tool more like launchpad's sourcedeps which lets you say "use launchpad.net/foobar@1234"07:22
bigjoolsyes, but can you not fix the revno?07:22
jambigjools: you cannot put the revno into go get07:22
bigjoolsyes, I mean pulling manually07:22
jambigjools: you can do your branches manually and not use 'go get -u'07:23
bigjoolsor does it always refresh the branches?07:23
jambigjools: -u always refreshes the branches, but you could do all the work yourself07:23
bigjoolsok07:23
jamwith the major caveat that nobody else would do that until everything broke07:23
bigjoolsthis is messy :(07:23
jamso you certainly can make your local development "work"07:23
jamif I grab your code, it will break until I find your magic sauce.07:23
jamwhich was the objection to writing a tool that did it07:23
jambecause then you need this new tool.07:24
jamSo version numbers in the import paths is sort of the way to go, except we aren't stable enough to pay the cost of creating a new branch for every change we want to land in juju-core.07:24
bigjoolsright07:24
wallyworldbut even with version numbers in imports, you still pull from tip :-(07:25
bigjoolsok, EOD here. Bye all.07:25
jamwallyworld: which is why you have to only use 1 branch per version you want to land07:26
jamessentially, make a full release for anything you want to pull into juju-core07:26
wallyworldwhich sucks :-(07:26
jamWhich is heavyweight but feasible once we are stable.07:26
wallyworldbut anyway, we've had that discussion07:26
* wallyworld late for soccer, back later07:27
jamwallyworld: good luck!07:27
TheMuefwereade_: Hiya and thx for the review. Regarding the non-existing path my solution creates nothing, so maybe less cost. But your is more elegant so that I'll take it.09:38
fwereade_note also that your solution doesn't address the possibility that a file might be created after you check but before you run the test09:39
fwereade_TheMue, thanks :)09:39
TheMuefwereade_: Yeah, the little rest risk would exist, you're right. Even if the chance would be very low. ;)09:43
fwereade_TheMue, million-to-one chances come up most days ;)09:43
TheMuefwereade_: If one is running the tests each day and every minute, yes. :D09:44
fwereade_TheMue, forgive my professional paranoia ;)09:44
TheMuefwereade_: I appreciate it.09:46
TheMuefwereade_: So I will now take your feedback and submit afterwards, so that we don't have those two parallel branches.09:47
fwereade_TheMue, great -- tyvm, and thank you for bearing with me on these09:48
TheMuefwereade_: I've got to thank you, great results need good reviews.09:51
* fwereade_ blushes09:51
TheMue:D09:51
fwereade_TheMue, rogpeppe2, jam, mgz: is juju-core also failing to build for you? I think I have the latest goose; it's complaining about identity.AuthMode and fip.InstanceId10:04
jamfwereade_: the failure wasn't related to that. I'm pretty sure you need to cd ../goose; bzr pull --remember lp:goose10:12
jamWe moved where trunk was, so refreshing it should get you the latest goose.10:12
jam"lp:goose" didn't change10:12
jambut the exact branch it mapped to did, and "go get" expands the branch (I think)10:12
fwereade_jam, thanks, that seems to have sorted it; I did try a go get -u, (and also tried a bzr update) then came complaining here10:13
wallyworldjam: what problem were you having with reitveld - for some reason it all of a sudden won't authorise me anymore when I use lbox. is this what you saw?11:09
dimiternwallyworld: the authorization expires after 30 days I think - it happened to me before11:09
wallyworldi typed in my password and user id11:09
dimiternwallyworld: just sign in in rietveld again and authorize your google account to use it11:10
dimiternwallyworld: and then use lbox again11:10
wallyworldi signed in via the command line but didn;'t authorise google11:10
wallyworldi'll try that thanks11:10
dimiternjam, mgz: standup?11:34
mgzne\rly there...11:35
TheMuelunchtime11:45
rogpeppe2fwereade_: does this error just imply that the charm isn't in the charm store?12:38
rogpeppe22013/02/07 12:37:35 JUJU juju deploy command failed: cannot get latest charm revision: charm info errors for "cs:precise/logall-subordinate": entry not found12:38
=== rogpeppe2 is now known as rogpeppe
rogpeppefwereade_: hmm, scratch that, i'm not using the right url.12:44
rogpeppefwereade_: it's interesting, the charm store doesn't print urls that are acceptable to go juju12:45
rogpeppego juju rejects this as invalid:  ~ju-jistics-hackers:precise/logall-subordinate12:45
rogpeppeit also rejects  cs:~ju-jistics-hackers:precise/logall-subordinate12:45
niemeyerHello world!12:51
rogpeppeniemeyer: yo!12:51
rogpeppeniemeyer: i just discovered that the charm URLs printed by the charm store aren't valid for use with go juju. is that a problem on our side or theirs?12:52
niemeyerrogpeppe: Slightly hard to tell given that summary :-)13:08
rogpeppeniemeyer: here's an example of a URL shown by the charm store web site: ~ju-jistics-hackers:precise/logall-subordinate13:08
niemeyerrogpeppe: That's not a valid URL13:09
rogpeppeniemeyer: that's what i thought13:09
rogpeppeniemeyer: i wonder if py juju is accepting it though13:10
niemeyerrogpeppe: I don't think so13:10
niemeyerrogpeppe: This is unlikely anything else we've ever talked about13:10
niemeyerrogpeppe: URLs are prefixed by lp:13:10
niemeyerErm, sorry13:10
niemeyercs:13:10
rogpeppeniemeyer: yeah, but it's invalid even when prefixed by cs:13:10
niemeyerrogpeppe: Yeah, the : there should be /13:11
rogpeppeniemeyer: yup13:11
rogpeppeniemeyer: i'll try to find the appropriate place to raise an issue13:11
niemeyerrogpeppe: Thanks13:12
niemeyerrogpeppe: Good catch13:12
jamwallyworld: note that the types will now have methods on them that they didn't before, so it isn't that much 'less' poluted (imo). If I could, I would make them private, but then JSON couldn't unmarshal into them.13:13
jamI wasn't worried about pollution, because I thought these were supposed to be the types-for-json objects not the public-api objects.13:13
wallyworldjam: the state that the user can access though is cleaner13:13
wallyworldat  the moment, the objects eg Entity, ServerDetail etc are used in juju-core13:15
wallyworldso they are being used as the public api objects for better or worse13:16
rogpeppeniemeyer: https://bugs.launchpad.net/charmworld/+bug/111835113:17
_mup_Bug #1118351: Charm URLs shown with invalid URLs in search <charmworld:New> < https://launchpad.net/bugs/1118351 >13:17
=== slank_away is now known as slank
Pavel_Hi guys. Is there a way that I can add a local repository to juju-gui so I will be able to deploy my local charms directly from it?14:46
hazmatPavel_, not yet14:58
hazmatPavel_, we've been thinking to support local charms, we'll have the user run a program on their machine to expose the local repo via api on localhost that the gui can connect back to14:59
Pavel_Can't it just accept e.g. git repo as an setting and fetch it to it's own instance and then look through it?15:01
hazmatPavel_, that's much less generic.. we'd have to support arbitrary numbers of arbitrary vcs, and authenticated access to those..15:06
hazmatto get to equiv functionality15:07
Pavel_yeah seems like it's not best option15:12
Pavel_but still if you want to run juju on the same node as juju bootstrap, then you already have this local repo available15:14
Pavel_*juju gui15:14
Pavel_but of course it's not common case15:14
mrammoops, lost track of time writing15:16
Pavel_And isn't "juju scp" an another option? Can't you copy local repo from juju bootstrap node to juju GUI node?15:17
Pavel_Sorry if I get something wrong15:18
hazmatPavel_, there isn't a local repo per se on disk for either the bootstrap or gui node. the gui is searching through rest api endpoints of a charm store frontend, which is what we should replicate in the locally run program. the env has a cache of deployed service charms, but those are in provider storage, not on any given machine. ie there is no repo on disk to simply copy files to.15:33
Pavel_Yes, I understand. But do you think that replicating API is easier then reading repo from a local storage?15:40
hazmatPavel_, simple answer yes.. what's local storage in a  multi-node ha system?15:48
Pavel_but juju bootstrap is always one node, isn't it?15:48
hazmatPavel_, that's being worked on15:48
Pavel_hazmat, hot it15:49
Pavel_*got )15:49
hazmati agree though at some point we'll have to explore answering questions from what local charms the environment has deployed .. but even then wouldn't be answering questions from disk. its not simply reading the charms on disk.. not just because there not on disk, but because its quite a rich search interface.. ie you can do full text and fielded queries like requires:mysql and conjunctions.15:51
hazmatspeaking of which i was looking around for full text solutions for golang.. i found some n-gram/codesearch content.. but afaics there isn't any equivalent to xapian/lucene in golang.. best i could find was sqlite fts.15:52
Pavel_hazmat, I think that usually all you want is just to run more instances of existing services or deploy one which name you already know.15:57
hazmatPavel_, that's fair.. but the search also helps drive richer ui interfaces, suggested relations, discovery, etc.16:00
Pavel_hazmat, but for local repo you could have simplier version of this16:01
Pavel_hazmat, actually you already know what is there and what you want to deploy16:01
Pavel_Generally I'm newbie in using juju, but my vision is that it can really play well for deploying domain based charms written for particular service.16:02
hazmatPavel_, yes it could be simpler and likely will be, but local doesn't mean the deployer wrote it  or that the repo doesn't contain lots of charms, ie. search is still useful. hmmm.. i think i see what your saying for the use case though and why the local program for local charms doesn't suffice for it16:08
hazmateffectively you want to put local charms to the env, and have them available for deploy in the gui16:08
Pavel_yep16:09
hazmatPavel_, sounds good16:33
Pavel_I really miss this feature16:36
Pavel_one more question, is there a way to set user name when run juju debug-hooks ?16:38
Pavel_I get ssh error when try doing this16:38
hazmatPavel_, no.. it should be using the same key used to populate the env.. default it sniffs and injects the public key, but it can be specificied explicitly in environments.yaml as well .. it always goes to the ubuntu user which juju injects the public key as authorized key.. also this sort of question is better on #juju16:46
Pavel_ah, ok16:47
=== slank is now known as wedgwood
rogpeppeafk for a little17:27
rogpeppeback17:42
dimiternrogpeppe: quick question?18:14
rogpeppedimitern: ask away!18:15
dimiternrogpeppe: what do I need to support for := range over my own type?18:15
rogpeppedimitern: you can't do that18:15
rogpeppedimitern: range always ranges over maps, slices or channels18:15
dimiternrogpeppe: really? damn..18:15
rogpeppedimitern: what kind of type is it?18:16
dimiternrogpeppe: so I need something like a while loop with Next()18:16
rogpeppedimitern: there are various possibilities for iteration18:16
rogpeppedimitern: it totally depends what the semantics of your type are18:16
dimiternrogpeppe: well I'm trying to replace an embedded url.Values and provide the same interface - Add, Del, Set, Encode, etc. and still be able to iterate over18:17
rogpeppedimitern: do you know in advance how many elements there are?18:17
rogpeppedimitern: what semantics do you want to add?18:17
dimiternrogpeppe: because I need range to iterate in the order added and url.Values is map[string][]string18:17
rogpeppedimitern: why not just provide a method that returns a sorted slice of all the entries in the map?18:18
dimiternrogpeppe: i.e. f.Add(x, ..); f.Add(y, ..) -> range x, then y18:18
dimiternrogpeppe: hmm yeah, that could work18:18
rogpeppedimitern: you could just return the keys18:19
rogpeppedimitern: and leave your type as a map18:19
dimiternrogpeppe: but not good enough - I don't need them sorted, but in the order added18:19
rogpeppedimitern: out of interest, what's this to be used for?18:19
dimiternrogpeppe: maybe leave the embedded and override Add to keep ordered slice of keys aside and a method Keys() to return them in proper order18:20
dimiternrogpeppe: because openstack is sensitive with the order in which you specify multiple value filters18:20
dimiternrogpeppe: so status=A&status=B is not the same as status=B&status=A18:21
rogpeppedimitern: ah18:21
rogpeppedimitern: so it's not like ec2 that numbers all attributes sequentially?18:21
dimiternrogpeppe: no, it's a weird lax url encoded stuff with duplicates, but some logic to parse them in order18:22
rogpeppedimitern: hmm, so for the double you won't be able to use any of the stock form parsing stuff18:22
rogpeppedimitern: that's quite bad18:23
rogpeppedimitern: what a shitty interface18:23
rogpeppedimitern: so what *is* the difference between status=A&status=B and status=B&status=A ?18:24
dimiternwow, my machine died on me18:27
rogpeppedimitern: :-|18:27
rogpeppedimitern: what was the last message you saw from me?18:28
dimiternrogpeppe: can't see - had to cold boot18:28
rogpeppedimitern: you need a better irc client :-)18:28
rogpeppehere are the last few things is said18:29
rogpeppei said!18:29
rogpeppe18:22:37] <rogpeppe> dimitern: hmm, so for the double you won't be able to use any of the stock form parsing stuff18:29
rogpeppe[18:23:36] <rogpeppe> dimitern: that's quite bad18:29
rogpeppe[18:23:49] <rogpeppe> dimitern: what a shitty interface18:29
rogpeppe[18:24:46] <rogpeppe> dimitern: so what *is* the difference between status=A&status=B and status=B&status=A ?18:29
dimiternrogpeppe: right, so the difference is this18:29
dimiternrogpeppe: I'll paste my code to see18:29
dimiternrogpeppe: http://paste.ubuntu.com/1621741/18:30
rogpeppedimitern: oh BTW, there shouldn't be a problem with status=A&status=B - the same attribute is used both times18:30
dimiternrogpeppe: the problem is they are combined18:31
dimiternrogpeppe: oh... you know what, I think you're right - it's simpler18:31
rogpeppedimitern: yeah, i don't think you're ranging over a map there18:31
dimiternrogpeppe: I managed to debug the name gets replaced by the last value specified, but for status wasn't that obvious18:32
rogpeppedimitern: all the names are still available18:32
rogpeppedimitern: that's why it's map[string][]string18:32
dimiternrogpeppe: my original thought was specifying status twice will get me both statuses18:32
rogpeppedimitern: (note the []string)18:32
rogpeppedimitern: it should do, yes18:32
dimiternrogpeppe: but my tests so far show:18:33
rogpeppedimitern: i mean... what?18:33
rogpeppedimitern: it depends what level you're talking about18:33
dimiternrogpeppe: S=A&S=B -> 0 (assuming 3 servers in A)18:33
dimiternrogpeppe: S=B&S=A -> 3; S=X&S=Y&S=A -> 3; S=X&S=A&S=Y -> 018:34
rogpeppedimitern: those are the semantics that openstack gives you?18:34
dimiternrogpeppe: it's very frustrating to actually create several machines with different status to test this properly18:34
dimiternrogpeppe: those are my findings after running a lot of queries with filters against canonistack18:35
rogpeppedimitern: so it's just ignoring all but the last value for a given attribute, right?18:35
dimiternrogpeppe: and the problem is, in juju you'd like to get all machines in either build or active, but this seems impossible with as single API call18:35
dimiternrogpeppe: seems so yes18:36
rogpeppedimitern: they could've learned something from ec2's filtering semantics18:36
dimiternrogpeppe: i tried to replicate ec2 way, but i guess we'll have to get only active machines and until the status changes from build to active, Instances() won't return anything18:36
rogpeppedimitern: yeah, sounds like you need two queries18:36
rogpeppedimitern: and combine the results of both18:37
rogpeppedimitern: you can run 'em both concurrently though, so it shouldn't be much slower18:37
dimiternrogpeppe: yes, unless getting only active suffices18:37
rogpeppedimitern: so... i don't see that there's any particular difficulty here18:37
rogpeppedimitern: we don't care about map ordering18:38
dimiternrogpeppe: yeah18:38
dimiternrogpeppe: I wish I could've seen that yesterday more clearly :)18:38
dimiternrogpeppe: and to actually test whether in fact multiple status filters work at all18:39
rogpeppedimitern: to implement the double you can just have a function: func GetLastValue(v url.Values, attr string) string {x := v[attr]; if len(x) > 0 {return x[len(x)-1]}; return ""}18:39
dimiternrogpeppe: is it important to get pending machines from the provider as well? even with the eventual consistency attempts/retries?18:39
rogpeppedimitern: yes18:40
dimiternrogpeppe: why?18:40
rogpeppedimitern: because we assume that if we've called StartInstance we can retrieve information about it soon afterwards18:40
rogpeppedimitern: if openstack is anything like ec2, pending machines can remain pending for quite a long time18:41
dimiternrogpeppe: if it's only about getting result out of StartInstance, you always get this18:42
rogpeppedimitern: what's the significance of "build" and "active" with regard to juju, BTW?18:42
dimiternrogpeppe: and it's correct, the problem could be if you want to list them later18:42
rogpeppedimitern: exactly18:42
rogpeppedimitern: or get an Instance18:42
rogpeppedimitern: from the instance id18:42
rogpeppedimitern: what's the issue you have with returning pending instances?18:43
dimiternrogpeppe: build means basically booting, setting up network, etc., which becomes available shortly before the machine switches to active18:43
dimiternrogpeppe: getting instance by id is again not a problem18:43
dimiternrogpeppe: only Instances() and AllInstances() are affected18:44
dimiternrogpeppe: which will use the filtering and ideally do it with a single API call, filtering by inst name (environment) and active status18:45
dimiternrogpeppe: if you need a specific instance and you know it's id you can get it directly, no filtering involved18:45
rogpeppedimitern: i think only AllInstances is affected18:46
dimiternrogpeppe: the idea of filtering arose from the need to get only this environment's machines (by name) - so both Instances() and AllInstances() use it18:47
rogpeppedimitern: Instances only does it so it doesn't return machines which have been stopped18:48
dimiternrogpeppe: but how about the ones about to become active?18:49
rogpeppedimitern: yeah, it needs to return those18:49
rogpeppedimitern: as far as juju is concerned, they're active already, just not ready.18:49
dimiternrogpeppe: ok I can do it in 2 goroutines then, fetching both active and build and returning the merged18:50
dimiternrogpeppe: the thing is, machines in build state cannot be tackled the same as active ones18:50
rogpeppedimitern: yup. or, even better, just don't filter by status at all18:50
rogpeppedimitern: and filter that client side18:50
dimiternrogpeppe: some things fail (like assigning a floating IP)18:51
dimiternrogpeppe: that's even better actually - I'll just filter out the ones with bad status18:51
rogpeppedimitern: yup18:51
dimiternrogpeppe: the problem is you can have 100K machines to process there18:51
rogpeppedimitern: we only do the filtering server-side in ec2 'cos it's easy to do18:51
rogpeppedimitern: that's true of AllInstances in general18:52
rogpeppedimitern: i don't think returning dead machines is going to add too much load18:52
dimiternrogpeppe: actually the machines that need filtering will be a lot less than the active ones18:53
rogpeppedimitern: exactly18:53
dimiternrogpeppe: ok then, I'll filter client-side for status18:53
rogpeppedimitern: +118:53
dimiternrogpeppe: thanks :) it really helped me clear it up for myself18:54
rogpeppedimitern: then you can ignore the whole url.Values thing :-)18:54
rogpeppedimitern: np, it's a pleasure to help18:54
dimiternrogpeppe: yeah, or at least make it much simpler18:54

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