/srv/irclogs.ubuntu.com/2011/09/28/#juju.txt

SpamapShazmat: anyway, I have some other stuff to wrap up so I'm punting the upload until later tonight or tomorrow morning.00:00
SpamapShazmat: would be great if I could re-enable that test then though.00:00
hazmatSpamapS, cool, thanks, i'm still looking. i haven't played with this part of the codebase in a while. still trying to understand the interaction.00:01
hazmatwith the path information the error comes out as ..00:01
hazmatFailure: zookeeper.ClosingException: zookeeper is closing /units/unit-000000000000:01
hazmatwhy the unit is being touched at all is not clear00:01
niemeyerhazmat: Checking it out00:02
niemeyerhazmat: Very nice00:03
niemeyerhazmat: I suggest adding a colon here:00:03
niemeyer+                error_msg += " %s" % path00:03
niemeyererror_msg += ": %s" % path00:03
niemeyerhazmat: +1 either way00:03
hazmatniemeyer, sounds good, i'm wondering now, if it should also have the op name00:03
hazmatlike it would be nice to know what was happening here when the client was interacting with the unit state and zk closed00:04
niemeyerhazmat: Not sure.. I'd hope the error message + the traceback would make that clear00:04
hazmattwisted traceback is a general fail00:04
niemeyerhazmat: Hmm, true00:04
hazmatwhen the reactor is involved between call and result00:05
hazmatsometimes it works00:05
niemeyerhazmat: "%s %s: %s" % (op, path, msg)00:05
niemeyerhazmat: sound sgood00:05
hazmatyeah00:05
hazmatcool00:05
SpamapSis it possible there needs to be some kind of wait after some operation done earlier?00:05
niemeyerhazmat: as in "stat /foo/bar: blah blah"00:05
hazmatSpamapS, typically in the past its because there's a watch reset00:06
hazmatwhile the test is closing.. but here00:06
hazmati can't think of any reason there'd be interaction with unit state node00:06
hazmatas part of hook execution00:07
hazmatoh.. unless its a workflow state change00:07
hazmataha00:07
hazmatbut config hooks don't modify workflow state..00:08
* hazmat tries to go back to rambling silently00:08
SpamapSriveting, really00:09
* SpamapS pushes back for a bit00:09
hazmatah.. that's the problem00:09
hazmatwe started doing config-changed before start00:10
hazmatin addition to when it actually changed00:10
hazmatmaybe00:10
hazmatnope.. the tests waits for start to complete before modifying the config00:14
_mup_juju/ftests-new r4 committed by gustavo@niemeyer.net01:10
_mup_A number of improvements, making ftests actually work for real:01:10
_mup_- Prepare environment for tests to run juju01:10
_mup_- Implemented support for test setup/teardown.01:10
_mup_- Added ec2-wordpress test and relevant setup/teardown.01:10
_mup_- Added unittests test.01:10
_mup_- Other trivial stuff (changed file names, README, etc)01:10
hazmatso the op is get on the unit state when zk is closing01:12
niemeyerbcsaller: ping01:34
bcsallerniemeyer: hey01:34
niemeyerbcsaller: Hey!01:34
niemeyerbcsaller: Just having a last look in lxc-omega01:34
niemeyerbcsaller: What's this about:01:34
niemeyer+hostname=`ip -f inet addr |grep 192.168| grep -v '192\.168\.1\.' | awk '{print $2;}'|cut -f 1 -d '/'`01:34
bcsallerkapil and I were just talking through what I think is the last test failure there01:34
bcsallerniemeyer: you can use a name like bcsaller-laptop-wordpress-0 if you change resolv.conf01:35
bcsallerbut we don't want to change the host level networking01:35
bcsallerso we went back to getting the ips and passing those to the relations01:35
bcsallerthey can find eachother either way01:36
hazmatniemeyer, we can change back to something that will  use hostname on those platfroms that support it when we add something like `unit-info --public-address`01:36
bcsallerbut the host can't address the wordpress node by its symbolic name w/o the change01:36
hazmatelse we end up with something that we can't resolve in the browser by name, and if we use ip, we hit the wrong vhost in apache01:37
niemeyerbcsaller: Besides looking very cryptic (not sure why all the greps and awks are needed there), doesn't that mean the example formulas won't work on ec2 anymore?01:37
hazmatsigh.. it does01:37
hazmati guess i need to make unit-info happen tomorrow01:38
niemeyerNow that we just got http://wtf.labix.org/ working! ;-)01:38
hazmatstill no luck in tracking down this bug SpamapS reported01:38
hazmati don't see anything doing a 'get' op on the unit state01:38
niemeyerhazmat: Either that or injecting the ip.. not sure about what would be easier01:39
niemeyerhazmat: Injecting the ip has the advantage that we can maintain it automatically in the future01:39
niemeyerWell, somewhat01:40
hazmatniemeyer, injecting the ec2 public ip ?01:40
hazmatthat needs the md server01:40
hazmatand charm specifivity to the provider01:40
hazmatawareness at least01:40
niemeyerhazmat: That's the internal ip, I think01:40
niemeyerhazmat: I mean, the one used in the relations01:40
hazmatniemeyer, yeah.. i was just going to inject the private address into all unit relation nodes01:41
hazmatbut that doesn't help here01:41
niemeyerhazmat: For that line above I think it does01:42
niemeyerhazmat: It's replacing the internal ip trick01:43
niemeyerhazmat: There's another one that may not help01:43
_mup_juju/lxc-omega-base r364 committed by gustavo@niemeyer.net01:45
_mup_Preparing lxc-omega-base for review of lxc-omega.01:45
hazmatniemeyer, hmm... so instead it would grab its own address from the relation data01:46
hazmatyeah.. that works01:46
niemeyerhazmat: Its own address?  I think the only reason it gets its own address is to provide to the other side, isn't it?01:47
hazmatniemeyer, not in this case01:47
* niemeyer reads the example charms again01:47
hazmatits setting up its own address for an apache vhost01:47
niemeyerhazmat: It is01:48
niemeyer        relation-set database="$service" user="$service" password="$service_password" host="$hostname"01:48
niemeyerhazmat: These are the only places where the value is used01:48
niemeyerhazmat: In db-config-joined01:48
* niemeyer looks at another one01:48
niemeyerServerName is an interesting one.. I think this needs hostname support or similar01:51
niemeyerhazmat: Yeah, I think that's the only case there01:52
niemeyerThere's a bogus one as well01:52
niemeyer-hostname=`curl http://169.254.169.254/latest/meta-data/public-hostname`01:52
niemeyer+hostname=`ip -f inet addr |grep 192.168| grep -v '192\.168\.1\.' | awk '{print $2;}'|cut -f 1 -d '/'`01:52
niemeyerThis isn't going to work I believe.. it's replacing the hostname by an ip01:53
hazmatniemeyer, it will work01:57
hazmatits still a valid server name01:57
niemeyerhazmat: How come?01:57
hazmatbecause an ip is a valid address for the server01:57
hazmatwhich is what the servername needs01:57
niemeyerhazmat: config-changed and db-relation-changed in wordpress disagree on the content01:57
niemeyerhazmat: I don't think that's generally the case.. if the server is a virtual server, the ip doesn't resolve properly01:58
niemeyerhazmat: and then config-changed and db-relation-changed disagree with each other either way01:58
hazmatthe ip isn't used for resolving (its the server) its used for matching a vhost against the host heaader which works fine01:58
niemeyerhazmat: "Additionally, ServerName is used (possibly in conjunction with ServerAlias) to uniquely identify a virtual host, when using name-based virtual hosts.02:00
niemeyer"02:00
hazmatindeed02:00
hazmatbut given a unit usage its not really germane afaics02:00
hazmatwe can't alias to the ip even though it would match, since the redirect goes to the name which is non routable02:01
hazmatin the local provider case02:01
hazmatand the apache is dedicated to the unit02:01
niemeyerhazmat: and then02:01
niemeyerln -s /usr/share/wordpress "/var/www/$hostname"02:01
hazmatso the ip serves as a unique identifier to the named vhost02:01
niemeyerhazmat: That points to a different path than what config-changed points to02:02
niemeyerhazmat: I'm really confused about how that could possibly work02:02
hazmatugh.. yeah.. that needs to be fixed02:02
hazmatbcsaller, you've tried out with the ip based addressing?02:02
bcsallerniemeyer: in that case there might be an error in the config hook post the change back to ip02:02
bcsallerhazmat: I had tested it yesterday, yes02:02
hazmati'm going to head out.. its been a long day.. have fun folks02:03
bcsallerbut never set the config setting02:03
niemeyerhazmat: Enjoy the resting!02:04
niemeyerhazmat: are you off yet?  Had a quick question02:06
niemeyerbcsaller: Just sent a (probably last) review02:16
niemeyerbcsaller: I suggest reverting the example changes so we can get lxc-omega in sooner02:16
niemeyerI'll step out for the day too02:17
niemeyerHave a good time all02:17
bcsallerniemeyer: and recommending the host level resolv.conf change?02:17
hazmat niemeyer shoot03:01
hazmattoo late03:01
hazmatbcsaller, yeah.. that's fine for now, i don't see an alternative till we have tools that expose provider specific addresses better03:13
hazmatre revert to host03:13
hazmatname03:13
bcsallerk03:14
_mup_juju/env-origin r367 committed by jim.baker@canonical.com03:28
_mup_Removed code path going through get_default_origin in tests that do not need this; began refactoring of get_default_origin for its own separate testing03:28
hazmatthink i've got this error nailed SpamapS03:42
hazmatits unfortunate though03:43
hazmatsome very small percentage of the runs the second config hook seems to run and complete b4 the workflow state has been fully recorded for the initial transition03:46
SpamapShazmat: sounds like its a real error and there's some lack of synchronization going on.03:49
_mup_juju/env-origin r368 committed by jim.baker@canonical.com04:04
_mup_Inline generation of alt apt-cache script in test04:04
hazmatits still not clear to me how its possible, even though async my understanding is we'd get back results in execution order04:13
hazmatperhaps not04:13
hazmatah ic04:20
hazmatreconfigure does a circle state transition04:23
hazmatand we just wait on the hook execution, but the state transition is still happening04:24
hazmatafter the hook04:24
hazmati can probably just optimize away the state transition when cur state == next state04:24
hazmatalthough state variables may have changed04:24
hazmater. optimize the storage of the new state04:28
hazmatyeah.. that seems to work without ill effects04:29
hazmatSpamapS, its not a real error, but it is a lack of sync as regards the test04:30
hazmatthe options are put the sync into the test, or obviate away the need for the sync, since in this case the additional activity is superflous to the overall state04:31
hazmatwe have quite a few circular transitions, transitions from a state that lead back to the same state04:31
hazmatboth work well04:32
hazmatprobably safer to add the sync in04:35
hazmatthe other works well but has implication on state variables becoming stale, which we only use for error states04:35
hazmatsomething to sleep on04:36
_mup_juju/env-origin r369 committed by jim.baker@canonical.com04:48
_mup_Parse tests04:48
_mup_juju/env-origin r370 committed by jim.baker@canonical.com04:49
_mup_Removed unnecessary files04:49
_mup_juju/env-origin r371 committed by jim.baker@canonical.com04:53
_mup_PEP804:53
_mup_juju/env-origin r372 committed by jim.baker@canonical.com05:22
_mup_Docs and additional test suggested by doc revision05:22
_mup_juju/env-origin r373 committed by jim.baker@canonical.com05:25
_mup_Merged trunk05:25
_mup_Bug #861225 was filed: Unit relations should be prepopulated with the unit address <juju:In Progress by hazmat> < https://launchpad.net/bugs/861225 >08:27
_mup_Bug #861376 was filed: cannot download charms from remote repositories <juju:New> < https://launchpad.net/bugs/861376 >12:42
jamespagehi all14:24
jamespageis there a nice way that I can pickup provider information from within a charm14:24
jamespageI have a couple that can optimize for running in/out of ec2 for example14:24
jamespageI could pass it as config - but that does not feel like good juju :-)14:25
rogis niemeyer around today?15:11
jimbakerrog, niemeyer is at the brazilian python conference today & tomorrow15:13
jimbakerhttp://www.pythonbrasil.org.br/15:15
rogjimbaker: thanks. i'll just have to keep on with destroying his zk interface then...15:18
jimbakerrog, sounds like a good plan!15:18
jimbakerrog, so how do things change in zk interface 2.0 ?15:19
rogjimbaker: i'll show you a paste of the current godoc output for it if you like15:22
jimbakerrog, cool, thanks15:22
rogjimbaker: http://paste.ubuntu.com/698558/15:24
rogjimbaker: the Server stuff is new. the event changes i've just made and think they're a good thing, but Gustavo may easily think they're horrible :-)15:25
jimbakerrog, re Server, sounds nice. so now i understand your interest in log4j/the managed zk in python. it will be good to look at this code, since managing processes properly (especially misbehaved ones) will be important for porting to juju15:29
hazmat jamespage what sort of provider info15:30
rogjimbaker: it doesn't do much managing - though perhaps it should. it assumes that it takes a single process only.15:31
jamespagehazmat: for example, tomcat7 has some neat automagic clustering features - but they rely on multicast15:31
jamespageso they don't work in ec2 - but no reason why they would not if the charm was deployed on hardware or another cloud type15:32
jamespageor Cassandra as a snitch which sets up the ring based on ec2 avaliability zones for example15:32
jamespagebut you would not run the same thing outside of ec215:32
hazmatjamespage, good stuff15:33
hazmatjamespage, we'll be introducing some mechanisms for units to get additional about their environment15:33
jimbakerrog, does the Exec package ensure that any pending output to stderr/stdout is flushed and available? just curious, since this as bitten us in terms of distinguishing - we could see a program exit before all output was ready15:36
rogjimbaker: if you read from stderr or stdout, you read until eof. program exit is independent of that.15:40
jimbakerrog, cool, that's what i would expect15:40
rogso the best course would be to read all the output, then wait for the program15:40
jimbakerrog, exactly what we do now in hook invocation, except we also need to timeout. that's a lot easier to do (and test) in go, of course, so looking forward to that15:41
rogjimbaker: hmm, looks like exec.Output is flawed in that respect.15:42
jimbakerrog, hmm... the reason this is important is that some executables are flawed in how they background (they don't properly daemonize), so the parent can exit, but children hold onto file descriptors15:43
rogyeah. it's not actually a possible problem to solve properly.15:44
jimbakerrog, can you characterize what the issues are with go for this problem?15:45
jimbakerbecause i would assume i could simply have a timeout participate in the select on the output channel. but i'm a complete go novice15:45
SpamapSWow.. changing the default from _PPA to _DISTRO breaks about 16 tests.15:46
jimbakerSpamapS, it's no surprise to me15:46
jimbakerSpamapS, although env-origin is waiting for review again, i  think it's ready. you might want to give it a try15:47
SpamapSI think a few of them might be a little too broad in scope15:47
jimbakerSpamapS, those tests are assuming that a ppa will be installed by cloud init, and so are looking for that in the corresponding cloud init yaml15:48
SpamapSyeah exactly, that seems heavy handed to me.15:48
rogjimbaker: a timeout is quite possible. but it's not a great solution - you either risk losing legitimate output or you introduce an artificial delay each time.15:48
jimbakerso they are being very fussy, but that's actually important15:48
rogjimbaker: there's no specific Go problem here, i think.15:48
jimbakerrog, this is for bad code. i don't know of any good options because of that15:48
jimbakerbad *external to us* code, that is15:49
SpamapSjimbaker: I tend to agree with that for full end-to-end integration tests.. but for unit tests.. if the individual bits are tested, I don't see why the whole has to be so rigid.15:49
SpamapSBut, I digress15:49
jimbakerrog, so it sounds like go should work just fine. thanks for the feedback, it was very helpful!15:49
SpamapSI think I'll just upload w/o the DISTRO change, and we'll change it and turn off the test suite if we can't get the origin branch into 11.1015:50
jimbakerSpamapS, sounds reasonable15:50
rogjimbaker: why do we have to stop reading the output from a program anyway? it's useful to keep collecting stdout/stderr - it might not be correctly being sent to a log file.15:51
SpamapSIt can't ship w/ the PPA linking.. thats just not going to work.. but it can ship w/o the test suite.15:51
jimbakeralthough i do hope it makes it, because otherwise the ppa setting will not be user available there15:51
jimbakerok, well that makes me feel better15:51
SpamapSjimbaker: if they want the PPA... they should.. use the PPA. ;)15:51
jimbakerSpamapS, a perfectly valid point15:51
SpamapSfor the 0.001% of users who will be running juju without root on their own machines.. they can use juju-branch15:52
rogBTW, it seems that Output doesn't have the problem i thought it did. i did exec.Command("sh", "-c", "(sleep 3; echo hello) &").Output() and it waited for 3 seconds.15:53
rogdunno quite how it does it though. i'll look more closely.15:54
jimbakerrog, that's a good question, it seems more likely this is a test determinism issue that is bubbling up to how we do things15:54
jimbakerrog, so go allows us to change the parameters of this. it may be still desirable to wait around, but much less aggressively15:55
rogjimbaker: yeah. in fact for the purposes of this kind of thing, i'd prefer it if programs wrote log messages to stdout, because then they can be easily made available remotely, rather than having to delve into app-specific log files.15:58
rogbut i'm not sure that's gonna happen in general15:59
SpamapShazmat: is there a bug # for that test fail? I'd like to document it in the package so we can check on its progress and re-enable the test when it is fixed.15:59
jimbakerthe precedent is certainly to do the daemonization + log to file, but for charms we are going the direction you suggest16:00
hazmatSpamapS, i'm just going to do the trivial fix on trunk doing the obvious thing, sync primitives for the test16:00
rogjimbaker: ah, i see how the exec package does it now. it's quite neat.16:01
jimbakerrog, ?16:01
SpamapShazmat: ahh ok. Thanks!16:03
rogjimbaker: http://golang.org/src/pkg/exec/exec.go#L244 and one c.goroutine in this case is doing the io.Copy (until EOF), and c.Wait waits for the results of each goroutine.16:04
_mup_Bug #861539 was filed: remote charm revision checking extremely inefficient <juju:In Progress> < https://launchpad.net/bugs/861539 >16:04
hazmatjimbaker, bcsaller, fwereade... could i get a +1 on this trivial.. http://paste.ubuntu.com/698569/16:04
rogjimbaker: there's nothing to stop one doing a custom timeout too if that's desired16:04
bcsallerhazmat: lgtm16:05
jimbakerhazmat, +116:05
hazmatthanks guys16:06
_mup_juju/trunk r364 committed by kapil.thangavelu@canonical.com16:09
_mup_[trivial] fix config-changed test sync primitive to wait on workflow transition instead of hook execution.[r=bcsaller,jimbaker]16:09
hazmatSpamapS, that should fix it16:09
SpamapShazmat: sweet thanks!16:16
SpamapSjimbaker: remind me again.. your new branch will set its origin based on where the 'juju' package came from, right?16:17
jimbakerSpamapS, correct16:17
SpamapSCool. Really looking forward to testing that out soon.16:17
SpamapSSOON. :)16:17
SpamapSThis actually makes perfect sense.. there has to be a 'juju' package in the archive before the distro method can even be tested. :)16:18
jimbakeror to use lp:juju, if installed from a branch. maybe it should use the actual branch, but this returns to what it was before16:18
SpamapSjimbaker: people using branches are on their own. :)16:18
jimbakerSpamapS, apparently we are ;)16:19
jimbakerSpamapS, correct about the distro dependency. i have pseudo mocked it (i could explain the distinction from using our standard mocker lib), but it waits until it gets in the distro before it can be truly tested16:20
jimbakerSpamapS, another outcome is that you do insist in environments.yaml that juju-origin be distro, you will get a unusable ec2 instance16:21
jimbakeruntil that change is made ;)16:21
SpamapSjimbaker: there's another way to test it which is to create an AMI that adds an apt source which has the package already.16:22
jimbakerSpamapS, ahh, stub it the other way. sounds good16:22
SpamapSjimbaker: better tho.. is to just have it in the distro. :)16:23
SpamapSI do think we may need to explore the idea that there's a need to be able to add arbitrary cloud-config data...16:24
SpamapSwe can't possibly think of everything that people might want to do before juju starts.16:25
jimbakerSpamapS, that does make sense16:25
SpamapSBut that may be too low level.. not sure.16:25
rogjimbaker: here's an example of a way you might do the timeout thing in Go16:26
jimbakerbut at least it's centralized16:26
roghttp://paste.ubuntu.com/698580/16:26
jimbakerrog, thanks!16:27
rogjimbaker: and here's a version without the concurrent writer nastiness16:30
roghttp://paste.ubuntu.com/698581/16:30
SpamapSwe need to add go to paste.ubuntu.com16:31
rogpersonally, i don't like syntax highlighting, so i'm not sad it's not there :-)16:34
SpamapSwow16:41
SpamapSI like, can't live without it anymore.16:41
rogi spent about 10 minutes earlier today working out how to turn it *off* in a diff tool i was using. i find it so distracting!16:43
SpamapSI think thats a global vs. details thing.. if you're global like me, it helps bring order to the big picture. if you're detail oriented, I can see where it would be distracting16:44
jimbakerat least there's the /plain option on the pastebin16:45
jimbakerbut i prefer the syntax highlighting16:45
rogi think when the syntax is nice, the program structure itself is quite evident. the only caveat is long multi-line quoted strings, where i've been caught out before16:46
rog(but this is definitely a religious issue :-])16:47
SpamapSrog: the best syntax formatting in the world just looks like a mass of gray gravy to me. :-P16:51
SpamapSI think this is less religious than editors and stuff.. its binary.. you like it or you don't. :)16:52
=== med_out is now known as medberry
Aramhi.17:44
Aramso, niemeyer won't be here today?17:45
Aramregarding the syntax hilight thing above, don't care about it :-).17:46
Arammy editor doesn't support it.17:46
adam_ghey! so if a juju node (runnig a service unit, not the bootstrap node) reboots, what needs to be run to get juju back up and communicating with the bootstrap node so that future hooks execute?17:46
SpamapSadam_g: Thats actually a massive problem that has no good solution IIRC17:48
adam_g''17:48
SpamapSadam_g: you can reconstruct the startup args from the cloud-init data17:48
adam_gSpamapS: thats what ive been trying to do17:49
hazmatwell we can drop an upstart file down for the unit and machine agents17:49
hazmatwhich solves the structural issue17:49
SpamapSadam_g: hazmat has a better handle on this, but there's also a problem where any events that happened while the agent was gone will be missed17:49
hazmatthe problem is we lose some state and end up with redundant and missed hook executions17:49
adam_gright17:49
SpamapSThis is one of those production gotchyas of a critical nature. :-/17:50
hazmatie. we have some undefined behavior, till the unit agent suppor disk persistence17:50
hazmatits a very critical prod issue17:50
adam_gim just trying to reconstruct the services to a point where i can remove the relations and readd them, but so far those aren't even firing17:50
SpamapShazmat: I still think you're better off making that persistence happen in zookeeper17:50
hazmatSpamapS, adam_g i didn't see any comments on the merge proposal for resurrect --placement, in the absence of that i'm going to let it drop17:50
hazmatSpamapS, true17:50
SpamapShazmat: don't let it drop.. its desperately needed.. we're BUSY17:50
adam_ghazmat: ^17:51
hazmatSpamapS, i need some firepower/reinforcements on it17:51
SpamapShazmat: understood..17:51
hazmatunderstood re busy17:51
SpamapSr361 is about to land in 11.10 btw17:51
* rog is calling it a day. see ya tomorrow.17:52
hazmatrog, have a good one17:52
hazmatSpamapS, my schedule is pretty clear outside of testing next week, i'll start addressing the restart issue then17:52
SpamapShazmat: that would be pretty awesome. :)17:52
SpamapSadam_g: so I think right now the answer is "reinstall" ;)17:53
adam_gi know ive run into this before and got it to work after beating up the agents on every node17:54
robbiewbcsaller: hazmat: SpamapS: can one of you tell me how likely the LXC stuff will land in time for 11.10? or is it already too late, headed for SRU/PPA18:48
hazmatrobbiew,  i think we got the lost of the critical branches approved yesterday, we've got about 4 branches pending merges which can probably get done by end of day, that will at least allow usage, but their will be some usage caveats18:50
robbiewhazmat: ack18:50
robbiewthx18:50
hazmatbcsaller, can you go ahead and merge the lxc-lib-clone and omega?18:51
hazmati guess i'm supposed to do another look at omega per the review comment18:51
hazmatbcsaller, it doesn't look like the fixes for the test failures have been pushed18:53
hazmats/lost/most19:03
hazmati'm going to head out in an hr to get to the conference19:09
* hazmat heads out to the conference19:46
_mup_Bug #861821 was filed: setup.py needs to include some package_data <juju:New> < https://launchpad.net/bugs/861821 >20:56
fwereadebcsaller, hazmat, jimbaker: quick opinion21:13
fwereade__repr__ returning a string that isn't obviously a <FancyType object at 0xdeadbeef>, but still doesn't eval to the original object21:14
fwereadeevil?21:14
bcsallerfwereade: something that __str__ can't do?21:15
fwereadebcsaller: hm, I may have wasted your time, I misread some context, it turns out the object in question will always be a str anyway21:17
* fwereade looks embarrased21:17
fwereadehazmat, jimbaker: ignore me21:17
jimbakerfwereade, no worries21:20
jimbakerbut now that you mentioned repr vs str, i wonder if we have some lurking bugs with unicode21:21
jimbakeranyway, we will get to them. or perhaps not, go washes this issue away21:22
jimbakerfwereade, it's also possible that we can control the logging formatting process better - that's where of course i'm concerned21:23
fwereadejimbaker: that's a very nice point about go, and a very nice feature of go that hadn't really crossed my mental horizon21:24
jimbakerfwereade, yes, the standardization that everything is utf8 when serialized, that's the right one21:24
fwereadejimbaker: I'm sure we have some lurking unicode bugs, but most of the stuff I'm working with is rather restricted in character set anyway, so I don't *think* I'll be making anything worse, at least ;)21:24
jimbakerfwereade, yeah, if you can control those names. i'm thinking of charms with unicode paths, or stuff coming from environments.yaml21:25
fwereadejimbaker: unicode names are considered invalid ATM21:25
fwereadejimbaker: charm names21:26
fwereadejimbaker: environments.yaml scares me a lot more ;)21:26
jimbakerfwereade, so one test we could try is just to name an environment something in chinese. would juju break?21:26
fwereadejimbaker: probably :/21:27
niemeyerYo!21:42
niemeyerbcsaller: ping21:44
bcsallerniemeyer: hey21:44
niemeyerbcsaller: Heya21:44
niemeyerbcsaller: 365 seems to have broken trunk tests: http://wtf.labix.org/21:44
bcsallerniemeyer: omega will fix that21:46
bcsallerits api drift from pre/post reqs21:46
niemeyerbcsaller: When is it going in?21:46
bcsallerstill working on a test case thats causing issues, but soon21:46
niemeyerbcsaller: Ok.. having trunk broken is a big deal, so if it's going to take a while we need to fix the tests in trunk or revert the change21:48
bcsallerunderstood, but those features are useless, inaccessible and never used w/o the stuff in omega21:49
bcsallerand should be fixed soon21:49
niemeyerbcsaller: The point isn't that the features are useless, but just that we have trunk broken and other people cannot trust on the tests anymore21:51
niemeyerbcsaller: Such large changes should have a test run before committing, so that we never get in such a situation21:52
bcsallerI'd only been running the branch tests in isolation not thinking that some of the depends on the branch had been merged already21:52
niemeyerHmm.. I'm going to link revision numbers to Launchpad in the wtf to be easier to follow it up21:53
fwereadeniemeyer, wb21:55
niemeyerfwereade: Thanks!21:55
niemeyerfwereade: Sorry for the reviews chunked up21:55
fwereadeniemeyer: np, much appreciated21:55
fwereadeniemeyer: there's one quibble I have21:56
fwereadeniemeyer: charm url/id21:56
niemeyerfwereade: I imagined ;)21:56
fwereadeniemeyer: I'm fairly sure that a charm id is a *string* that can be parsed into a CharmURL with a revision21:56
fwereadeniemeyer: if we pass CharmURLs throughout, we need to do a slightly annoying amount of str-ing/parsing when we yaml/unyaml them21:57
niemeyerfwereade: So is cs:~user/oneiric/wordpress-1 a charm URL, or is it not?21:57
fwereadeniemeyer: it's a charm url, but not an instance of CharmURL21:57
niemeyerfwereade: Exactly21:57
fwereadeniemeyer: does that make any sense?21:57
niemeyerfwereade: It does, and I agree..21:57
fwereadeniemeyer: cool :)21:57
fwereadeniemeyer: so I feel that when we're workingwith charm ids, they should be strings21:58
fwereadeniemeyer: when we need them to be urls, we can parse them21:58
niemeyerfwereade: The point I was making is just that a string representation of a charm url is still a charm url21:58
fwereadeniemeyer: I'm happy about losing CharmIdError21:58
niemeyerfwereade: What's a charm id?21:59
fwereadeniemeyer: it's a string, IMO, that parses to a CharmURL with a non-None revision21:59
niemeyerfwereade: If it's a string that parses into a charm url with a non None revision, it's simply a charm URL with a non-None revision22:00
fwereadeniemeyer: I think we may be in violent agreement again then :)22:01
fwereadeniemeyer: I have formed the impression, which may be mistaken, that you'd prefer to represent charm ids as CharmURL objects wherever possible22:01
fwereadeniemeyer: is this correct?22:01
niemeyerfwereade: The only point of contention is that there's no reason to name this a "charm id".. it's already a charm url..22:01
niemeyerfwereade: Yeah, I certainly think it'd be better to use charm urls throughout the code22:02
fwereadeniemeyer: including string/parsing them when they go into and out of yaml when stored in zookeeper?22:03
fwereadeniemeyer: ("str-ing/parsing" might be clearer)22:03
hazmat jimbaker the unicode issue isn't actually a problem for juju atm, its a problem when we interact with external systems like aws22:04
niemeyerfwereade: I hadn't thought about that, to be honest, but doesn't sound like a bad idea.. feels easy enough to have an internal schema time within juju.charm.url that would do that for us22:04
niemeyerfwereade: What do you think?22:04
fwereadeniemeyer: I'm ambivalent: I tried it as part of the stuff I ended up reverting (with manual str-ing/parsing, and *that* was quite nice, but then having to explicitly str them again when do juju status felt wrong22:06
niemeyerfwereade: My main previous grip was about the distinct terminology for what is a single thing22:06
niemeyerfwereade: Hmm.. that sounds like a particularity of juju status only, and IIRC it's trivial to add support for stringifying them globally throught the yaml mechanics22:07
niemeyerthrough22:07
fwereadeniemeyer: cool -- I'd got the impression that the occasional use of yaml.safe_dump was an explicit disavowal of that technique's legitimacy22:08
niemeyerfwereade: Hmm.. that's different22:08
niemeyerfwereade: I'm suggesting the precise opposite22:08
niemeyerfwereade: IOW, turning a charm url into a plain string22:08
niemeyerfwereade: safe_dump avoids dumping Python-specific information into the yaml output22:09
niemeyerfwereade: WIth all that said, I'm not specially concerned about this right now, to be honest22:09
fwereadeniemeyer: indeed, I think I've derailed again :/22:09
niemeyerfwereade: The only thing I'd like to reach agreement right now, and that impacts the branch, is the terminology and concepts we're agreeing to22:09
niemeyerfwereade: I want to kill the idea that cs:~user/series/foo-1 is both a url and an id, since it's the same thing22:10
fwereadeniemeyer: yep, but cs:~user/series/foo is a url but not an id22:10
fwereadeniemeyer: and therefore, IMO, there's a useful distinction to be maintained22:10
niemeyerfwereade: It's just a url, because there's no such thing as a charm id! :-)22:10
niemeyerfwereade: The former is a url with a revision.. the latter is a url without a revision22:11
niemeyerfwereade: Then, we can have curl.with_revision(n).. and curl.assert_revision()..22:11
niemeyerfwereade: To make the problem easier to deal with, if I understand your concerns22:11
fwereadeniemeyer: that I'm 90% sure I like :)22:12
fwereadeniemeyer: cool :)22:12
niemeyerfwereade: Woohay agreement! :-)22:13
fwereadeniemeyer: and just to clarify: whenever we're loading yaml that contains a charm url, we pipe it through a schema that ensures it comes out the other side correctly22:13
fwereadeniemeyer: and when we're yamling one, we automatically turn it into a string22:14
niemeyerfwereade: This _sounds_ like a good idea, but IMO it doesn't have to be done in that branch necessarily22:14
niemeyerfwereade: I don't know how much trouble it'd be to revise all code so that all charm urls are passes as objects rather than strings22:14
* hazmat ponders22:15
hazmatupgrade and deploy are the main ones22:15
fwereadeniemeyer: it's not *that* much work to do it manually, and it does make some things simpler22:15
niemeyerfwereade: It sounds ok to have charm urls strings and values mixed up, and then clean it up as we go, in case you feel it would be painful22:15
niemeyerfwereade, hazmat: Cool, sounds awesome then22:15
fwereadeniemeyer: but I'd rather get these branches put to bed in a *working* state asap22:16
* hazmat goes back to practicing talk22:16
niemeyerfwereade: I know that the schema coercer couldn't be more trivial since we already have parse..22:16
niemeyerfwereade: +1!22:16
hazmatfwereade, so your talking about doing a custom yaml marshaller for charm urls?22:16
fwereadehazmat: yeah22:16
niemeyerhttp://wtf.labix.org/  is in a proper order, and has links to the revisions now..22:16
hazmatfwereade, sounds good.. keeping safe_dump usage is also good, else pyyaml.. will take any random python object..22:17
fwereadehazmat: I must have misread something -- I had the impression that safe_dump disallowed non-yaml-native types, even if there were custom marshallers22:18
=== Aram2 is now known as aram
=== aram is now known as Aram
hazmatfwereade, ah.. perhaps i'm not sure.. but without safe_dump.. it will pickle anything even without custom marshallers22:18
fwereadehazmat: I'll double-check and figure it out22:19
fwereadehazmat: it's not for a *current* branch anyway22:19
fwereadehazmat: not quite ;)22:19
fwereadeniemeyer: another thing, hopefully quick22:20
fwereadeniemeyer: resolve() is indeed not quite right22:20
fwereadeniemeyer: CharmURL.infer and some sort of get_repository(url) are distinct22:21
niemeyerfwereade: Is this about my review point?22:21
fwereadeniemeyer: but it would be much more convenient to do that in the check-latest-formulas branch, where resolve() changes anyway22:21
fwereadeniemeyer: yep22:21
niemeyerfwereade: In that specific case, I was complaining more about location than anything else22:21
fwereadeniemeyer: ah, ok, cool22:22
niemeyerfwereade: IMO, the charm url management should be within something like juju.charm.url22:22
niemeyerfwereade: and it should be fairly self-contained22:22
niemeyerfwereade: resolve() knows about the interface of repositories etc22:22
niemeyerfwereade: So it feels like it should be close to them22:23
niemeyerfwereade: Otherwise we get in a situation where we have repositories using urls that use repositories22:23
fwereadeniemeyer: yep, they;re a bit mixed up22:24
fwereadeniemeyer: I'll sort it out :)22:24
niemeyerfwereade: Thanks man22:24
fwereadeniemeyer: thank you, I think I'm happy with everything now22:25
niemeyerfwereade: Woot22:25
fwereadeniemeyer: although you'll no doubt hear from me about *something* :p22:25
niemeyerfwereade: Rest assured I take that _very_ positively! ;-)22:25
* niemeyer orders some food in the hotel room22:26
hazmatsweet 15s to spare on my talk, must talk fast :-)22:26
niemeyerhazmat: Wow.. that's being _precise_ ;-)22:33
niemeyerbrb22:33
=== medberry is now known as med_out
niemeyerDinner.. biab23:01
SpamapShazmat: where are you speaking?23:19
SpamapShttps://launchpad.net/ubuntu/+source/juju23:35
hazmatSpamapS, surge 201123:36
jimbakerSpamapS, looking good23:36
hazmatbaltimore23:36
SpamapShazmat: oh cool! I'm a Schlossnagle fanboi.. so ^5 them from one of their first customers. ;)23:37
hazmatstepping out.. their starting23:39
hazmatSpamapS, yeah.. me too. i just saw a new presentation he gave earlier this year in paris on async architectures23:40
hazmatSpamapS, http://www.infoq.com/presentations/Building-Scalable-Systems-Asynchronous-Approach23:42
_mup_Bug #861928 was filed: provisioning agent gets confused when machines are terminated <juju:New> < https://launchpad.net/bugs/861928 >23:59

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