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

=== Ursinha-afk is now known as Ursinha
thumpermenn0: thanks for that bomb00:10
thumpernot00:10
menn0thumper: sorry :)00:11
waiganimenn0: funny man :)00:11
* thumper -> lunch00:11
menn0thumper, waigani: I initially going to make my email an "isn't it interesting that Dropbox is using Go too" email but couldn't resist when I saw that they had an errors package too.00:12
menn0from my brief look, juju/errors seems far more complete00:13
jcw4anyone comfortable answering fairly specific watcher implementation questions right now?00:16
davecheneywaigani: you're OCR00:20
davecheneyhttps://github.com/juju/testing/pull/1900:20
davecheney+1, or -100:20
waiganidavecheney: why not: MgoServer *MgoInstance ?00:23
davecheneywhy make a pointer when we don't need to ?00:27
davecheneyMgoServer = &MgoInstance{}00:27
davecheneyis the same as00:27
davecheneyvar MgoServer MgoInstance00:27
jcw4what is Aram Havarneanu's irc nick?00:33
jcw4(I'm going down the committer list for state/watcher.go, sorted by total commits)00:33
davecheneyjcw4: aram doesn't work for canonical any more00:33
jcw4davecheney: thanks... you're coming up :) you're 7th in the list00:34
davecheneyjesus00:34
davecheneythat's scraping the bottom of the barrel00:34
davecheneyreminds me of a friend00:34
jcw4haha00:34
davecheneywho bills himself as Canberra's 7th best Blues DJ00:34
jcw4git log --format=%an state/watcher.go | sort | uniq -c | sort -nr00:34
jcw4davecheney: lol00:35
jcw4It looks like rogpeppe1 is offline for the last hour00:35
jcw4TheMue: online?00:35
davecheneyjcw4: rog is in the UK00:35
davecheneythemue is in germany00:35
jcw4davecheney: can you feel the cold breath?00:35
davecheneyjcw4: maybne you should just ask your question :)00:35
jcw4okay...00:36
davecheneyjcw4: it's winter in australia, i have my own cold breath00:36
jcw4davecheney: in the state watchers we have a common idiom00:36
jcw4w.out is some sort of changes channel00:36
jcw4in the watcher loop we have a local var of the same channel type00:36
jcw4we expose w.out via a (w* ..Watcher) Changes() api00:37
davecheneymmm00:38
jcw4when new changes are detected, we assign w.out to the local out var00:38
davecheneyjcw4: can you point me to an example in the source ?00:38
jcw4in state/watcher.go, any loop() implementation00:39
jcw4I happen to be looking at actionWatcher around line 159600:39
jcw4one of the select cases in the loop detects a read from the out channel00:40
davecheneyhttp://dave.cheney.net/2014/03/19/channel-axioms00:40
davecheneythe trick is here00:40
davecheney                case out <- ids.Values():00:40
davecheney                        ids = &set.Strings{}00:40
davecheney                        out = nil00:40
davecheneythe last line basically says,00:40
jcw4davecheney: right, that's what I'm getting to00:40
davecheneyremove this case from the select loop00:41
jcw4davecheney: until a new change comes in right?00:41
davecheneyuip00:41
davecheneyyup00:41
jcw4k.00:41
jcw4so that's all context00:41
davecheneythat is the only place that assigns out again00:41
jcw4my problem is00:41
jcw4Changes() reads directly from w.out00:41
davecheneymmm00:42
jcw4so, for some reason, if I initially load the changes collection, the first read doesn't hit the out <- changes.Values() case00:42
waiganidavecheney: var MgoServer MgoInstance: MgoServer has type MgoInstance (not *MgoInstance) - it is a zero initialised value, not a pointer. Correct? And arn't pointers cheaper to pass around than values?00:42
davecheneywaigani: we're never passing it around00:42
waiganioh00:43
jcw4and then the consumer of the watcher gets the same changes the second time it reads w.Changes()00:43
davecheneyjcw4: ok00:43
jcw4thereafter it works as expected00:43
jcw4(I believe)00:43
davecheneyyou're probably right00:43
davecheneyi don't know what "if I initially load the changes collection"00:43
davecheney means00:43
davecheneywaigani: nobyd is passing MgoServer around, it's a package level variable00:44
davecheneya singleton (if we used that word)00:44
jcw4before the for { select {...}} loop I pre-load changes that occurred before the watcher was started00:44
jcw4into the local changes set.Strings collection00:44
jcw4davecheney: i.e. the expectation is that when you start a new Actions collection, you'll get an initial event notification of all the pending actions, and thereafter you'll be notified when new actions are added00:45
davecheneyjcw4: that sounds like the expected watcher pattern00:46
jcw4what's happening is the pending actions are getting sent twice00:46
thumperdavecheney: you are in error (a little)00:46
thumperdavecheney: sorry, missed some context00:46
* thumper steps away00:46
jcw4davecheney: I just wonder if the local out var that we're using for signalling by setting to nil when the event is read shouldn't be an actual member on the watcher, and *that* is the channel exposed by Changes()00:48
jcw4davecheney: otherwise we just say; duplicate initial events are to be expected... deal.00:48
davecheneyjcw4: can you show some code ?00:49
davecheneyi'm just not feeling it00:49
jcw4davecheney: :)00:49
jcw4davecheney: I don't blame you00:49
jcw4davecheney: gimme a couple minutes00:49
waiganidavecheney: right. So the definition of passing something = having a receiver for it in a func sig? Why are there no benefits to making a package level var a pointer?00:50
davecheneyok, i'll answer the second part first00:50
davecheneythere is no justification for making it a pointer00:51
davecheneyso why ?00:51
davecheneywhy allow the possiblity for someone to set it to nil00:51
davecheneywhen we don't need to00:51
davecheneythe first part00:51
davecheneyi don't follow00:51
davecheneycan you say your first question again pls00:51
waiganidavecheney: when do we get value from using a pointer instead of the value?00:52
davecheneyif I want to give you a copy of something, i pass by value00:54
davecheneyif I want to give you a reference to my thing, I pass a pointer00:54
waiganiyep00:54
davecheneybut this is not entirely related to the receiver of a method00:54
davecheneytype V struct {}00:55
davecheneyfunc (v *V) F() { fmt.Println("%p", v) }00:55
davecheneyfunc main() { var v V ; v.F() }00:55
davecheneyF is defined on a *V, not V00:55
davecheneybut Go will altomatically take the address of v if needed,00:56
davecheneyso if you have a V and that V is addressable, go will do this00:56
davecheney(*v).F()00:56
davecheneyin short: you don't need to declare everything as a pointer type just to call pointer methods on it00:56
davecheney(there are exceptions, but they do not apply in this case)00:56
waiganioooh00:56
jcw4davecheney: fwiw, my test code seems to deadlock00:57
waiganiI didn't realise, I thought v.F() would fail because it's the wrong type00:58
davecheneywaigani: so, back at the change00:58
davecheneywhere we had00:58
davecheneyvar MgoServer = &MgoInstance{}00:58
waiganiyep00:59
davecheneythat is declare a new MgoInstance value, take it's address and assign that to MgoServer00:59
davecheneyvar can write00:59
davecheneyvar MgoServer MgoInstance00:59
thumperdavecheney: alternatively though, if you have a *V, it will not dereference to pass to a receiver of type (v V)00:59
thumperdavecheney: right?00:59
davecheneythumper: false01:00
thumperoh?01:00
davecheneythat is the same as saying01:00
davecheneyv1 := *v01:00
davecheneyv1.SomeValueMethod()01:00
thumperhmm...01:00
davecheneylemmie check that01:00
thumperI thought it didn't01:01
davecheneyhttp://play.golang.org/p/VrpMKUYmwe01:01
jcw4davecheney: I'm going to think more on these things... thanks for your help; I know I didn't articulate my question clearly :)01:02
davecheneyjcw4: show code, receive clarity01:03
waiganidavecheney: So, just to check I've got the point: There is no point making MgoServer a pointer because, being a package level var, we are by default always referencing the same value whenever we use the var?01:12
davecheneyyes, that is true01:13
davecheneybut I don't think explains the point01:13
jcw4davecheney: the more I look at it the more I'm convinced the problem is elsewhere http://paste.ubuntu.com/776285701:14
davecheneythere is no point in making the MgoServer a pointer, because there is no point in making it a pointer01:14
waiganilol01:14
davecheneyjcw4: as i read it01:15
davecheneyline 3 is ht eonly place where you can take things out of w.out01:15
davecheneyand line 36 is the only place you can put them into w.out01:15
jcw4davecheney: okay; I kept reading line 36 as the case when w.out was being read01:16
davecheneyjcw4: you can write line 17 as01:16
davecheneyvar out chan<- []string = w.out01:17
davecheneyif you like01:17
davecheneythat may make it clearer01:17
waiganidavecheney: btw what is OCR? I think image parsing when I read that01:17
davecheneyOn Call Reviewer01:17
davecheneyi didn't make that one up01:17
davecheneyblame, fwre01:17
jcw4davecheney: I see to explicitly state it as a write only channel?01:17
waiganioh shit, am I OCR?01:17
davecheneywaigani: yup01:17
waiganiman...01:18
davecheneyjcw4: if that helps explain what is going on01:18
davecheneythe watcher code is subtle and confusing01:19
jcw4davecheney: it does clarify my understanding of that loop, but I'm still baffled as to how two calls to Changes() can return the same initial set of id's01:19
jcw4davecheney: only the first two calls01:19
davecheneythe most subtle bit is the way we only allow one change event to escape the watcher at a time01:19
davecheneyjcw4: does your merge function work ?01:20
jcw4davecheney: yes01:20
jcw4I'll show code01:20
jcw4davecheney: http://paste.ubuntu.com/776287201:21
davecheneywhy is everyone passing *set.Strings ?01:23
davecheneyunrelated01:23
davecheneybut sort of related01:23
davecheneya set.Strings is a map01:24
davecheneyand maps are already refernce values01:24
jcw4davecheney: I thought of that when I read your other comments01:24
davecheneyunrelated01:24
davecheneysave it for another day01:24
jcw4davecheny :)01:24
davecheneyjcw4: are you sure line 43 is every true ?01:25
jcw4davecheney: ever true?01:25
davecheneyif id, ok := id.(string); ok {01:26
davecheneyif id isn't a string01:26
davecheneythen your merge function won't behave as expected01:26
davecheneyoh01:26
davecheneythere is a check01:26
davecheneygood01:26
davecheneyid' write that as01:26
jcw4davecheney: afaik it is *always* a string, but if not it should die01:26
davecheneyswitch id := id.(type) {01:27
davecheneycase string:01:27
davecheney // do string things01:27
davecheneydefault:01:27
jcw4davecheney: +101:27
davecheney  fmt.Errorf("id is not of type string, got %T", id)01:27
jcw4davecheney: my tests that pass : http://paste.ubuntu.com/776288201:27
davecheneybarf01:28
davecheneyhow about just testing the function in isolation01:28
davecheneyyou don't even need to make it a method01:28
davecheneyit can just be a function01:29
jcw4you mean testing the merge() ?01:29
davecheneyyup01:29
jcw4davecheney: that test is the overall watcher test, which seems to correctly handle queued actions before the watcher is started01:29
jcw4this whole issue came up because bodie_ 's tests were failing: https://github.com/binary132/juju/blob/752f0b9232f7ef05b45a0efde7ba40cc4578409e/state/apiserver/uniter/uniter_test.go#L803-L82501:30
jcw4davecheney: I feel like I'm sucking you into my mess, and I need to isolate the problem further first01:31
davecheneyjcw4: the solution to that problem is to01:31
davecheneylog and issue, one per open question01:32
jcw4davecheney: like a launchpad bug issue?01:32
davecheneyjcw4: yup01:32
davecheneyif there isn't an isue01:32
davecheneythen it never happene01:32
davecheneyafaiac01:32
jcw4davecheney: okay - your clarification on the channels helped; thank you!01:33
davecheneyjcw4: np01:34
davecheneyi don't think i helped01:34
jcw4davecheney: it did help; but I think I am looking in the wrong place for the problem01:37
davecheneywaigani: jcw4 https://github.com/juju/juju/pull/26201:44
davecheneythumper: OH MY GOD01:49
thumperdavecheney: whazzup?01:49
davecheneystate/watcher.go +75101:49
jcw4davecheney: that actually is related to my problem I think01:50
jcw4davecheney: if I do var out chan []string = nil, then bodie_'s tests actually pass, but my state ones fail, and I'm pretty sure my state ones are right01:51
jcw4davecheney: (in actionsWatcher, not relationUnitsWatcher)01:51
jcw4davecheney: I assume your deity name in vain use was about using out:=w.out and then immediately assigning it to nil?01:52
davecheneyjcw4: yup01:53
jcw4:)01:53
davecheneyif that is actually part of the code01:53
davecheneyrather than just being lazy and not figuring out the right declaration for out01:53
davecheneyi'm a monkey's uncle01:53
jcw4davecheney: I assumed it was just being lazy; hence my attempt to copy it used the var out chan []string = nil instead  :)01:54
davecheney:emoji hmmm01:56
davecheneywaigani: jcw4 https://github.com/juju/juju/pull/26302:17
thumperdavecheney:  this assignment: id := id.(type)02:22
thumperdavecheney: can you explain what it does exactly?02:22
thumperwhy does it reassign back into id?02:22
davecheneythe id inside the scope of the switch _case_ will be the asserted type02:23
davecheneyso the inner id shadows the outer id02:24
thumperI find that a little confusing that you are effectivly changing "id" to mean the "type of id"02:24
thumperI'd rather have a different name for it02:24
davecheneytrue, but consider the alternative02:24
davecheneyswich id1 := id.(type) {02:24
davecheneycase string:02:24
davecheney // do something with id102:24
davecheney // do something else with id102:24
davecheney // copy some code from another place an use id by mistake02:25
davecheney // oh fuk02:25
thumperhang on...02:25
thumperI think I get it now02:25
davecheneyid inside the switch case shadows the original declaration of id02:25
thumperok02:25
thumperright, id is still id02:25
thumperbut it has a defined type02:25
thumpernot interface02:25
davecheneyyup02:25
davecheneyyup02:25
thumperok02:25
thumperI'm good then02:25
davecheneycool02:26
davecheneyi agree it is a bit gross to deliberably shadow id02:26
davecheneyshadowing is contentious02:26
thumperI agree it is better than the alternative02:26
davecheneybut in this case, when you _want_ id to be of type string, or whatever02:26
davecheneyby shadowing the outer declaration you avoid the footgun of having that other id declaration floating around02:26
thumperI found it mildly confusing to work out what was the actual switch on02:27
thumperas it doesn't appear clear02:27
thumperto start with02:27
davecheneyyou can also say (a bit piously)02:27
davecheneyi've asserted that id _is_ a string, so it should act like a string02:27
davecheneybut that sort of statement isn't helpful02:27
davecheneyok, time for some lunch I think02:28
menn0thumper: thanks for the review. Comments addressed: https://github.com/juju/juju/pull/21403:02
thumperkk03:03
thumperlooking03:03
lifelessif that case was a separate function, you wouldn't blink twice about the id parameter being a specific type03:05
menn0thumper: thanks very much03:07
thumpernp03:07
davecheney[LOG] 0:25.779 DEBUG juju.testing starting mongo in /mnt/tmp/test-mgo28391008003:23
davecheney[LOG] 0:25.780 DEBUG juju.testing found mongod at: "/usr/bin/mongod"03:23
davecheney[LOG] 0:25.797 DEBUG juju.testing tls.Dial(127.0.0.1:60070) failed with dial tcp 127.0.0.1:60070: connection refused03:23
davecheney[LOG] 0:25.798 DEBUG juju.testing tls.Dial(127.0.0.1:60070) failed with dial tcp 127.0.0.1:60070: connection refused03:23
davecheney[LOG] 0:25.865 DEBUG juju.testing started mongod pid 15989 in /mnt/tmp/test-mgo283910080 on port 3429003:23
davecheney[LOG] 0:25.871 DEBUG juju.testing starting mongo in /mnt/tmp/test-mgo18823734303:23
davecheney[LOG] 0:25.872 DEBUG juju.testing found mongod at: "/usr/bin/mongod"03:23
davecheney[LOG] 0:25.959 DEBUG juju.testing started mongod pid 16032 in /mnt/tmp/test-mgo188237343 on port 3285903:23
davecheney[LOG] 0:25.965 DEBUG juju.testing starting mongo in /mnt/tmp/test-mgo15758411403:23
davecheney[LOG] 0:25.966 DEBUG juju.testing found mongod at: "/usr/bin/mongod"03:23
davecheney[LOG] 0:26.053 DEBUG juju.testing started mongod pid 16076 in /mnt/tmp/test-mgo157584114 on port 5800003:23
davecheney[LOG] 0:26.058 DEBUG juju.testing s03:23
davecheneythe test is using the WRONG versino of mongodb03:23
davecheneyunless I am mistaken, the test should be using03:23
davecheneyour special juju-mongodb, right ?03:26
thumperum...03:31
thumperI think it looks for either03:31
* thumper shrugs03:31
davecheneythe replica set tests are getting worse04:27
davecheneyreplicaset_test.go:69:04:27
davecheney    c.Assert(err, gc.IsNil)04:27
davecheney... value *mgo.QueryError = &mgo.QueryError{Code:0, Message:"couldn't initiate : can't find self in the replset config my port: 60785", Assertion:false} ("couldn't04:27
davecheney initiate : can't find self in the replset config my port: 60785")04:27
davecheney[LOG] 0:12.884 DEBUG juju.testing killing mongod pid 27146 in /tmp/test-mgo432122435 on port 60785 with killed04:27
davecheney[LOG] 0:12.891 DEBUG juju.testing killing mongod pid 26447 in /tmp/test-mgo041410420 on port 40386 with killed04:27
jcw4davecheney: fwiw, my problem earlier is related to the fact that in the state/apiserver/uniter tests the StartSync() method is called on the watcher which forces the watcher to load new events from the database, rather than waiting for notifications from the transaction log05:33
davecheney:\05:34
davecheneyi'm not sure either of those is a correct solution in the formal sense of the word05:34
davecheneysounds like choosing the right hammer05:34
jcw4:)05:34
jcw4davecheney: I remember fwereade saying handling duplicate events should be expected05:34
jcw4but when you're trying to write tests that are deterministic it's good to know all the paths that cause events05:35
jcw4:)05:35
=== vladk|offline is now known as vladk
=== uru-afk is now known as urulama
TheMuemorning07:34
jammorning TheMue07:53
jamthanks for updating the calendar dimitern, I was running to eat before the alternate meeting time, but now I can relax a bit.07:53
dimiternjam, :) yeah, some mix-up happened07:53
TheMuejam: heya,I’m fighting with the bootstrap/endpoints bug. have been able to simulate it exactly once (first run), all other tries, even when removing everything, succeeded ???07:55
jamTheMue: I feel like its a race condition, so I would put sleeps in with what seems appropriate times. (either delay starting the API server, or delay the mongo start, or... ?007:56
jamTheMue: were you able to get a traceback or any more information from the first failure?07:57
TheMuejam: yep, that’s my current approach. I once had troubles with the dbus too, error seems to come here from mongo.07:57
TheMuejam: no, only the wonderful output: ERROR EOF :(07:58
jamTheMue: so if you grep labix.org/mgo/v2 for "EOF" you can see a bunch of tests that assert it:07:58
jam        // With strong consistency, it fails again until reset.07:59
jam        err = session.Run("serverStatus", result)07:59
jam        c.Assert(err, Equals, io.EOF)07:59
TheMuejam: thanks for the hint, will take a look here too08:00
jamTheMue: so it appears that EOF happens when the connection to mongo is broken, and you must issue a session.Refresh() in order to recover from it.08:01
jamnow... *what* would be causing us to disconnect from mongo? Maybe the new ensureMongoServer code?08:01
jamMaybe ensureMongoServer is running while the API server is already up?08:01
jamcausing us to reset our connections.08:01
jamIf that seems true at all, then I would say we should not be starting the API server until ensureMongoServer has been run.08:01
jamTheMue: Nothing concrete here, but IIRC, ensureMongoServer restarts the mongo db into single-user mode so that it can set up proper admin credentials before restarting again.08:02
=== vladk is now known as vladk|offline
=== vladk|offline is now known as vladk
vladkdimitern: what do you think about https://github.com/juju/juju/pull/25508:26
dimiternvladk, looking08:27
=== rogpeppe2 is now known as rogpeppe
dimiternvladk, that looks fine, but we need the networker in place08:31
rogpeppelooking for a review of this, please. anyone able to take a look? https://github.com/juju/charm/pull/1108:32
rogpeppedimitern, jam, TheMue, urulama: ^08:33
=== rogpeppe is now known as rogpeppe1
dimiternrogpeppe, how about peer relations?08:35
rogpeppedimitern: you can't make peer relations explicitly08:35
rogpeppedimitern: so i *think* it's ok to just ignore them08:36
dimiternrogpeppe, so there can be no case in which the peer relation definition won't work?08:36
rogpeppedimitern: yeah08:37
TheMuerogpeppe: reviewed08:49
=== urulama is now known as uru-brunch
rogpeppeTheMue: thanks!08:49
TheMuerogpeppe: yw08:50
rogpeppedimitern: are you reviewing the branch, BTW?08:54
dimiternrogpeppe, sorry, got distracted and now i need to be in a call08:55
rogpeppedimitern: ok08:55
jamdimitern: maas call08:59
jam?08:59
jamdimitern: sorry I have to go pick up my son, apparently my wife didn't realize I had a call, bb in about 30 min...09:13
dimiternjam, sure, np09:13
jamdimitern: back09:41
=== uru-brunch is now known as urulama
tasdomasdoes the firewaller run on the machine agent only or on the state server as well?09:53
rogpeppedimitern, TheMue, jam: next one in the sequence, review appreciated: https://github.com/juju/charm/pull/1210:00
TheMuerogpeppe: will take a look10:05
rogpeppeTheMue: thanks!10:05
TheMuerogpeppe: reviewed10:17
rogpeppeTheMue: thanks!10:20
Egoistwhy juju when i try to deploy charm from local, takes somekind of old code, no the new one, that I changed?10:30
dimiternEgoist, what commands are you running exactly?10:31
Egoistjuju deploy --repository="path to repo" local:precise/"charm name"10:32
Egoistfull example:10:33
dimiternEgoist, it will help if you do $ tree /path/to/local/repo10:33
Egoistdimitern: Why tree?10:33
dimiternEgoist, the revision to deploy is discovered from the local repo dir by walking it recursively10:34
dimiternEgoist,  if the subdirs in the repo are in an unexpected order, the wrong revision will be picked, but you can always specify an explicit revision10:34
dimiternEgoist, i.e. juju deploy --repository /path/to/repo local:precise/mycharm-510:35
Egoistwhat do you mean by unexpected order?10:35
dimiternwill pick mycharm with revision 5 from the repo10:35
Egoistwhat with something like this:10:35
Egoistjuju deploy --repository="charms" local:precise/mongodb10:36
dimiternEgoist, unexpected, as in you might have multiple copies of the charm in the repo, some with duplicated revisions but different code inside10:36
Egoistbut i have only one copy of the charm10:37
Egoistdoes it matter?10:37
dimiternEgoist, when you run that, it should tell you Added charm local:precise/mongodb-4210:37
dimiternEgoist, that's why I asked to see a paste of the repo structure10:37
Egoistwhait i past you it10:38
Egoistwait*10:38
dimiternEgoist, thanks10:38
dimiternplease use paste.ubuntu.com or something similar, not directly in the channel :)10:38
Egoistcharms/10:40
Egoist└── precise10:40
Egoist    └── mongodb10:40
Egoist        ├── charm-helpers-sync.yaml10:40
Egoist        ├── config.yaml10:40
Egoist        ├── copyright10:40
Egoist        ├── hooks10:40
Egoist        │   ├── charmhelpers10:40
Egoist        │   │   ├── core10:40
Egoist        │   │   │   ├── hookenv.py10:40
Egoist        │   │   │   ├── host.py10:40
Egoist        │   │   │   └── __init__.py10:40
Egoist        │   │   ├── fetch10:40
Egoist        │   │   │   ├── archiveurl.py10:40
Egoist        │   │   │   ├── bzrurl.py10:40
Egoist        │   │   │   └── __init__.py10:40
Egoist        │   │   └── __init__.py10:40
Egoist        │   ├── config-changed10:40
Egoist        │   ├── configsvr-relation-changed10:40
Egoist        │   ├── configsvr-relation-joined10:40
Egoist        │   ├── database-relation-joined10:40
Egoist        │   ├── hooks.py10:41
Egoist        │   ├── install10:41
Egoist        │   ├── mongos-cfg-relation-broken10:41
davecheneynooooooooooooooo10:41
Egoist        │   ├── mongos-cfg-relation-changed10:41
Egoist        │   ├── mongos-cfg-relation-joined10:41
Egoist        │   ├── mongos-relation-broken10:41
Egoist        │   ├── mongos-relation-changed10:41
Egoist        │   ├── mongos-relation-joined10:41
Egoist        │   ├── replica-set-relation-changed10:41
Egoist        │   ├── replica-set-relation-joined10:41
Egoist        │   ├── start10:41
Egoist        │   └── stop10:41
Egoist        ├── icon.svg10:41
Egoist        ├── Makefile10:41
Egoist        ├── metadata.yaml10:41
Egoist        ├── README.md10:41
Egoist        ├── revision10:41
Egoist        ├── scripts10:41
Egoist        │   └── volume-common.sh10:41
Egoist        ├── templates10:41
Egoist        │   └── backup.py.tpl10:41
Egoist        └── tests10:41
Egoist            ├── 00-setup10:41
Egoist            ├── 100_configs.test10:41
Egoist            ├── 10-unit.test10:42
Egoist            ├── 200_deploy.test10:42
Egoist            ├── get-unit-info10:42
dimiternthat'll take a while..10:42
Egoist            └── test_write_log_rotate_config.py10:42
Egoistdimitern: tree with charm10:42
Egoistwhy10:42
TheMueouch10:42
Egoist"nooooooooooooooo"?10:42
dimitern<dimitern> please use paste.ubuntu.com or something similar, not directly in the channel :)10:42
TheMueEgoist: use pastbin or similar10:42
Egoistok, sorry10:42
dimiternEgoist, right, so now what's in the revision file?10:42
Egoist3010:43
dimiternEgoist, and when you run juju deploy --repository charms local:precise/mongodb what's the output?10:45
dimiternEgoist, try adding --debug before --repository as well and paste the full output please10:45
dimiternvladk, jam, standup?10:46
jamdimitern: brrt10:47
Egoistdimitern,10:47
Egoistdimitern, http://pastebin.com/9XDmiEyq10:47
dimiternEgoist, so what's the problem?10:49
dimiternEgoist, it seems you've deployed this charm 7 times in the same environment10:49
dimiternEgoist, each time you deploy from a local repo, the revision in the charm is used, if possible, if not an unique revision for the environment is picked10:50
Egoistbut when i make changes in code, juju don't see it, and use some kind of old code10:51
dimiternEgoist, that's right, because you need to run juju upgrade-charm10:51
Egoistlike i add log("something") to code, it doesn't appear10:51
dimiternEgoist, not deploy, after you change the charm code in the local repo10:51
Egoistif not deploy then what?10:52
dimiternEgoist, juju upgrade-charm10:53
dimiternEgoist, try juju help upgrade-charm10:53
dimiternEgoist, you deploy once, and then upgrade when you need to, otherwise, you can run juju destroy-service mondodb && juju deploy --repository charms local:precise/mongodb10:55
dimiternEgoist, but the latter takes more time and it's generally not recommended over using upgrade-charm10:56
jamdimitern: Egoist: if you want to use deploy (because you want to wipe what you have/are testing your deployment/etc) does "juju deploy --upgrade" work better at seeing the newer code?11:00
dimiternjam, deploy --upgrade is deprecated and useless right now with the api11:01
Egoistdimitern: Even if I make juju upgrade-charm i still don't see newer code :/11:13
dimiternEgoist, try running juju upgrade-charm --debug mongodb and paste the output?11:14
=== vladk is now known as vladk|offline
dimiternEgoist, use the same --repository charms argument to upgrade-charm as well11:15
Egoistdimitern, http://pastebin.com/JsTHXsyh11:15
dimiternEgoist, what's test?11:15
Egoistit's mongodb i just call it test11:15
dimiternEgoist, is that the name of your service running the mongodb charm>11:16
dimiternok11:16
Egoist yes11:16
=== vladk|offline is now known as vladk
dimiternEgoist, ok, so does juju status show any errors or issues?11:16
Egoisti remove every service i have, and deploy mongodb charm with new code, and it still dont see newer code11:18
Egoistand i have relation problem, that i want to fixed using this newer code11:18
dimiternEgoist, can you paste the unit-test-0.log to see what's going on during upgrade-charm and deploy? you can use juju scp 0:/var/log/juju/unit-test-0.log .11:19
EgoistERROR exit status 1 (scp: /var/log/juju/unit-test-0.log: No such file or directory)11:23
Egoisti have something like this, but when i ssh to machine, this file is exists11:23
dimiternEgoist, try juju ssh 0 and then go to /var/log/juju - see what logs are in there (if you removed the service the log might be missing, so in that case can you repeat the steps you did before and get the unit log?)11:24
Egoistdimitern, http://pastebin.com/bsrE7deT11:26
dimiternEgoist, is this the log after running just deploy?11:30
Egoisti think yes11:31
Egoistshould i execute juju upgrade-charm?11:31
dimiternEgoist, so yes please, and paste the log again - but before that, add a log message in config-changed hook to make sure the code has changed or not11:32
Egoistdimitern: Look, this is after code changed http://pastebin.com/msGX03VP11:36
Egoistnothing changed, i add log("Fresh Code")11:37
dimiternEgoist, that can't be the full log11:39
dimiternEgoist, I can't even see the upgrade process starting11:39
Egoistthis is log i've got after execut juju upgrade-charm ...11:40
dimiternEgoist, ok, but it's not the full log, where's the rest?11:42
Egoistdimitern: http://pastebin.com/6CqS7Aup11:44
dimiternEgoist, and what were the exact juju commands you run on your machine locallly?11:48
=== vladk is now known as vladk|offline
Egoistjuju upgrade-charm --repository=charms/ test12:04
dimiternEgoist, ok, it seems the issue is deeper, can you please file a bug against juju-core and attach the logs and the output of juju deploy --debug and juju upgrade-charm --debug and juju status to the report?12:06
=== urulama is now known as uru-afk
=== uru-afk is now known as urulama
=== vladk|offline is now known as vladk
Egoistdimitern: yes, of course12:33
perrito666morning people12:33
dimiternEgoist, thanks!12:34
Egoistdimitern: you mean report bug on launchpad? right?12:34
dimiternEgoist, yes, https://bugs.launchpad.net/juju-core/12:36
=== wwitzel3_ is now known as wwitzel3
wwitzel3wallyworld_: http://gitfu.wordpress.com/2008/04/20/git-rerere-rereremember-what-you-did-last-time/13:30
stokachuwhat is the use case for setting up mongo replication with a local provider?13:44
perrito666hey people, our licence is LGPL but most of our files (all but 3) have a header that say AGPL, this is something to be fixed right?13:51
rogpeppenext stage in bundle support - bundle directory reading. anyone fancy taking a look? https://github.com/juju/charm/pull/1313:56
EgoistI have a question about openstack and juju14:01
rogpeppedimitern, TheMue, perrito666, wwitzel3, natefinch: ^14:01
Egoistwhy juju create security groups for everyu instance14:01
Egoist?14:01
rogpeppeEgoist: it's so that it can manage the exposed ports for each instance individually14:02
rogpeppeEgoist: because ec2 does not allow changing the security groups of an instance after it has been started14:03
rogpeppeEgoist: you can work around this if you need to14:03
rogpeppeEgoist: there's an environments.yaml setting called "firewall-mode", which you can set to "global" which will cause juju to use only a single security group for all instances14:03
rogpeppeEgoist: it will mean though that some instances may expose a port that you don't want to be exposed14:04
tasdomasnatefinch, could you take a look at https://github.com/juju/juju/pull/239 ?14:08
Egoistrogpeppe, thank you14:10
stokachuhttps://bugs.launchpad.net/juju-core/+bug/1338179 <- took me 4 minutes to bootstrap with local provider14:11
_mup_Bug #1338179: juju 1.20.x hangs at bootstrap <bootstrap> <cloud-installer> <local-provider> <juju-core:New> <https://launchpad.net/bugs/1338179>14:11
=== hatch__ is now known as hatch
TheMuerogpeppe: btw, doing your review14:23
rogpeppeTheMue: tyvm14:23
perrito666natefinch: could you review my tar push so I can merge it?14:24
perrito666since its your repo :p14:24
natefinchperrito666: haha ok14:25
TheMuerogpeppe: btw, did we agrred on the multiline arguments with return values in the next line notation? seen it several times in your code today, just wondering.14:26
rogpeppeTheMue: i don't think there was eventual consensus. i just try to write nice looking code14:27
TheMuerogpeppe: it still feels strange :)14:27
rogpeppeTheMue: the lines were getting too long otherwise14:28
TheMuerogpeppe: multiline args are ok for me too, but I still put the return values on the same line as the last arg14:28
TheMuerogpeppe: seems I need to familiarize myself with that notation14:29
rogpeppeTheMue: doing it this way means you can edit all arguments the same way (similar to the way we'd format a multiline slice)14:30
TheMuerogpeppe: yep14:31
TheMuerogpeppe: it’s only new, so it catched my eye’s14:31
rogpeppeTheMue: are you still reviewing?14:43
TheMuerogpeppe: almost done14:47
perrito666natefinch: I am sort of blocked by that review :p14:47
* perrito666 adds pressure14:47
* rogpeppe sympathises with perrito66614:47
* rogpeppe wishes github understood prereqs14:47
perrito666rogpeppe: I have nate next to me, beats prereqs14:48
wallyworld_don't you mean "beat up" nate?14:48
rogpeppewallyworld_: :-)14:48
perrito666wallyworld_: not yet14:49
wallyworld_oh, but it will be fun14:49
perrito666wallyworld_: well I feel sort of in debt, I could not be typing without his help14:50
wallyworld_yeah, but that was yesterday, today is a new day14:50
=== vladk is now known as vladk|offline
TheMuerogpeppe: you’ve got a review14:52
rogpeppeTheMue: ta!14:52
perrito666wallyworld_: well he saw what I did with the old kb, he can figure what is in it for him14:53
wallyworld_lol14:53
=== vladk|offline is now known as vladk
rogpeppenext in line for BundleArchive - some stuff so that we can more easily reuse some code that was in CharmArchive: https://github.com/juju/charm/pull/1415:20
rogpeppeTheMue, dimitern, perrito666, wallyworld_: review appreciated15:20
wallyworld_rogpeppe: in the middle of some hacking/reviewing here at the sprint, but can review soonish if no one gets to it15:22
rogpeppewallyworld_: ta!15:22
wwitzel3natefinch, axw, wallyworld_: https://github.com/juju/juju/pull/26915:26
axwwallyworld_: https://codereview.appspot.com/10649004315:46
rogpeppewallyworld_: change made as requested (i think)16:18
rogpeppewallyworld_: are you still reviewing?16:21
=== urulama is now known as uru-afk
natefinchrogpeppe: we were at lunch, he'll be back at his laptop in a minute16:30
rogpeppenatefinch, wallyworld_: np16:31
wallyworld_rogpeppe: +1, thanks for making the changes16:45
rogpeppewallyworld_: ta16:45
=== vladk is now known as vladk|offline
rogpeppewallyworld_: last remaining branch, if you have some time to look: https://github.com/juju/charm/pull/1517:31
wallyworld_rogpeppe: sorry, busy pairing right now, can try and look later17:32
perrito666go complains when I try to use bytes.Buffer as a writer, I suspect I chose the wrong type or am missing something, ideas?17:41
rogpeppewallyworld_: thanks17:53
perrito666fixed17:53
rogpeppeperrito666: *bytes.Buffer17:53
perrito666rogpeppe: yup17:53
rogpeppeperrito666: usual idiom is: var buf bytes.Buffer; foo(&buf)17:53
perrito666rogpeppe: that is the way I took17:53
perrito666voidspace: link?17:54
voidspaceperrito666: link to what?18:03
perrito666the xkcd/nasa thing18:03
voidspaceperrito666: http://xkcd.com/1337/18:05
katcohttp://xkcd.com/378/18:05
katcobe a real programmer.18:06
voidspaceperrito666: http://blog.xkcd.com/2014/05/30/isee-3/18:06
wallyworld_axw: https://bugs.launchpad.net/juju-core/+bug/133817918:42
_mup_Bug #1338179: juju 1.20.x slow bootstrap <bootstrap> <cloud-installer> <local-provider> <status> <juju-core:Triaged> <https://launchpad.net/bugs/1338179>18:42
=== vladk|offline is now known as vladk
wallyworld_natefinch: https://bugs.launchpad.net/juju-core/+milestones19:21
=== vladk is now known as vladk|offline
=== vladk|offline is now known as vladk
wallyworld_sinzui: ping20:29
perrito666natefinch: https://github.com/juju/utils/pull/9 last time I move it :p20:30
sinzuihi wallyworld_20:31
wallyworld_sinzui: hey, we're almost in the same timezone this week :-) we need to cut a 1.20.1 release this week if possible. can i schedule that with you?20:31
wallyworld_we still need to verify some fixes, and assign bugs to milestone etc20:32
wallyworld_just wanted to give you a heads up20:32
wallyworld_we will be committing fixes to the 1.20 branch20:32
sinzuiwallyworld_, I can do it any day this week.20:33
wallyworld_sinzui: is CI set up still to run the tests on the 1.20 branch for when we commit to it?20:33
sinzuiwallyworld_, yes...it have been testing the branch since last week20:34
wallyworld_sinzui: great thank you, i'll ping you in X days when we are ready to look at cutting the release20:34
=== vladk is now known as vladk|offline
ericsnowvoidspace: http://mumak.net/stuff/your-code-sucks.html20:55
voidspaceaxw: https://code.launchpad.net/~mfoord/juju-core/slow-replset/+merge/22170921:01
wallyworld_perrito666: https://bugs.launchpad.net/bugs/133696721:19
_mup_Bug #1336967: Restore doesn't <backup-restore> <ec2-provider> <openstack-provider> <regression> <juju-core:Triaged> <juju-core 1.20:Triaged> <https://launchpad.net/bugs/1336967>21:19
thumperwaigani, menn0, davecheney: I'm about to get a call for a reference check, hoping it will be done by 1122:49
thumperI told them to call back in 15 minutes 20 mintues ago22:49
thumpernot sure when they are going to call22:49
menn0thumper: np.22:50
thumperwaigani, menn0, davecheney: although they still haven't called, so lets do the standup on time, and if they call I'll just drop off22:57
thumperhere is the call22:57
thumperdone23:13
davecheneythumper: waigani menn0 I have two PR's for names.Tag changes waiting for revie23:45
davecheneyif you have the time today23:45
menn0davecheney: I will try to get to them soon. I might have to head out for a bit soon though.23:46
waiganidavecheney: I'll also put it on the list to do today - if someone does not beat me to it23:47
davecheneykk23:48

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