/srv/irclogs.ubuntu.com/2011/06/03/#ubuntu-ensemble.txt

SpamapSjust fire up a merge proposal for the drafts directory?00:00
jimbakerSpamapS, that would be a normal process. and this info would be really cool to have, and a nice way to integrate w/ puppet too00:01
hazmatSpamapS, write a rest formatted specification, put in docs/specifications of a branch, and propose on list00:16
hazmatSpamapS, alternatively just start the discussion on list00:16
SpamapSI may try my hand at implementing it too... it should be pretty easy, as there's no data storage requirement.. just a proxy to the real info really00:17
hazmatSpamapS, to save time/effort, i'd try'd to start the discussion b4 impl00:37
SpamapShazmat: but I wanna play with my six-guns!00:41
hazmatSpamapS, word.. i've been thinking about plugin apis00:43
hazmatprobably wouldn't help here.. but it would be nice to have00:43
hazmati'd like to keep playing with the auto-resolve  i put together... which might work as a plugin00:44
SpamapSyeah actually thats probably the right way to go since there are some murky aspects of what we actually want auto-resolution to do00:44
hazmatSpamapS, course there's always room for a BFG  ;-)00:44
hazmatSpamapS, minus the remote repo stuff, the one committed, is pretty solid.. takes into account env, pull extra deps and adds any needed relations (including against existing services).. but that's pretty trivial.. multiple providers in the environment and the formula are pretty much random selection.. remote should be straightforward.. still needs some tweaks on the repository lookup order (using the repository found for a dep as the primary lookup f00:46
hazmator the next dep for any formulas from that repo)00:46
hazmatwith the remote repo the sharing store should be pretty nice00:47
SpamapShazmat: I think we need a new way to express "recommends" and "suggests" type relations in formulas. I don't want to force people to use munin, just because mysql supports it.01:01
hazmatSpamapS, i don't think that should be in the mysql formula01:01
hazmatits not core to its responsibilties01:01
SpamapSagreed, its a policy thing :)01:01
SpamapSbut it needs to be *doable* before I can take it out01:01
SpamapSbecause I want to graph stuff, damnit. ;)01:01
SpamapSalso mediawiki works great w/o memcache01:02
hazmateither inheritance, possibly containment based (pull additional stuff from env) or policy formulas.. policy formulas are a little better in avoiding possible tight association to a machine01:02
hazmatyeah.. graphing stuff is required..01:02
hazmatfirst rule of devops.. measure01:02
SpamapSI was thinking maybe the answer to the policy thing is to have a way to model your desired machines much the same way you model your services01:03
SpamapSwhich is sort of like inheritance01:03
SpamapSlike, inherit this class "ubuntu::mymachine" and morph it into ubuntu::mymachine::mysql01:04
hazmatSpamapS, tight machine coupling to units is best avoided01:13
hazmatit makes unit migration much harder01:13
hazmateither for scaling up compute capacity available to a unit.... or resurrection in the case of a dead machine01:14
SpamapShrm, I guess what I mean is, I want to be able to say two things.. 1) I want my machines to look like X, and 2) I want my service to be deployed on my machines.01:15
SpamapSRight now we're saying "I want my machine to look like a bare bones Ubuntu machine"01:15
hazmatSpamapS, true.. the question of what to do with 1) is basically how does ensemble handle machine configuration management01:24
hazmat2) is a little dangerous.. because if the service depends on the machine configuration than we loose reuse01:24
hazmatre 1) we either adopt an existing configuration management system, adopt policy formulas, or grow our own declarative config01:25
hazmatpretty much every corp env.. i've seen has a bunch of policy associated to a machine.. nfs mounts to sans, auth mech integration, monitoring/alerting.01:27
SpamapShazmat: I'd say that we should make sure we have a hand in the machine config, as that way we can at least have a chance at early warning that a formula and a machine policy conflict01:37
SpamapShazmat: most of what is "machine policy" in big corp environments tho, is to get around how hard it is to deploy things. :)01:38
kim0niemeyer: morning :)14:43
niemeyerGood morning!14:43
kim0niemeyer: I noticed your debug-hooks branch .. is it in a useable state ?14:44
niemeyerkim0: It actually is!14:44
niemeyerkim0: I'll be finishing it within the next hour or so, so any input you have will be welcome14:44
kim0niemeyer: well I tried using it 14:45
kim0but it blocks on "connecting to remote machine ... "14:45
kim0I killed it multiple times .. always the same14:45
niemeyerkim0: Have you tweaked your configuration to actually use the branch in the server side as well?14:45
kim0ah :)14:45
kim0nope14:45
niemeyerkim0: Yeah, that won't work14:45
kim0ok I'll do it14:46
kim0thanks14:46
niemeyerkim0: ensemble-branch: lp:~niemeyer/ensemble/debug-hook-fixes14:46
niemeyerkim0: next to type: ec214:46
kim0Yeah thanks .. I did that one before14:46
kim0Q: does relation-get foo, have a non-zero exit status if foo has not been set yet?14:48
niemeyerkim0: IIRC, no.. for relation-get, not setting is equivalent to the empty value14:54
niemeyerkim0: So much so that relation-set foo= will erase the value14:54
_mup_ensemble/debug-hook-fixes r243 committed by gustavo@niemeyer.net15:18
_mup_- Don't overwrite config if it exists.15:18
_mup_- Tests work again, even though a bit difficult to test the shell15:18
_mup_  scripts themselves without a real run.15:18
_mup_Now, for some real world testing.15:18
niemeyerkim0: Just pushed the RC (Review Candidate ;-), if you want to test it15:19
niemeyerI'm doing the same here15:19
kim0great .. pulling15:19
_mup_Bug #792406 was filed: "Will wait" never returns <Ensemble:Confirmed> < https://launchpad.net/bugs/792406 >15:37
niemeyerkim0: There's a bug on it, btw15:42
kim0niemeyer: it's not finish initialization ?15:42
kim0finishing*15:43
niemeyerYep15:44
niemeyerkim0: Am on it15:44
_mup_ensemble/debug-hook-fixes r244 committed by gustavo@niemeyer.net15:45
_mup_Forgot to rename the control import after the rename of15:45
_mup_the debug_hook file to reflect the actual debug-hooks15:45
_mup_command name.15:45
niemeyerkim0: ^15:45
niemeyerPushing15:45
kim0niemeyer: is there some way for drupal/0 to talk to drupal/1 ? 15:46
kim0as in tell it, "I already did the DB setup .. just use it"15:46
niemeyerkim0: That's not a task for them15:53
niemeyerkim0: The mysql units are the ones doing the database setup15:54
kim0niemeyer: I kinda meant .. I populated the DB tables15:55
hallynhey - i'm trying to set up relations between a master and new slave node in jenkins.  Is there a definitive order in which the master and slave's -joined hooks fire?15:55
niemeyerhallyn: Hey Serge!  Very happy to see you're experimenting with it15:56
hallynactually, maybe i'm being silly.  i guess one of the steps i wanted to sync doesn't need to wait15:56
hallynniemeyer: i'm really enjoying it!15:56
niemeyerhallyn: Woot!15:56
niemeyerhallyn: There isn't an order15:56
niemeyerhallyn: On purpose, mostly15:56
hallynok15:57
kim0niemeyer: currently this is done by drupal/0 .. I'd like to tell drupal/1 to skip creating the tables and part and just connect (I could ofc check if the tables exist, just wondering if there's a better way)15:57
niemeyerhallyn: But you can create the ordering by setting/getting relation settings as you see fit15:57
hallynwhat do you mean?  in particular - i think i don't need this after all, but am wondering - waht if i need to do a 5-way protocol between master/server?15:58
niemeyerhallyn: We should document better that feature, actually.15:58
hallynmaster/slave, that is15:58
niemeyerhallyn: That's fine15:58
hallynoh, i can use relation-{set,get} as sync points?15:58
hallynsuddenly i'm using Ada!15:58
niemeyerhallyn: Yeah.. you can do something like this:15:58
niemeyerhallyn: if [ -z "relation-get someinfo" ]; then exit 0; fi # Data isn't there yet15:59
niemeyerhallyn: Ensemble guarantees that when anything on the relation is changed, the hook is called again15:59
hallynaaah15:59
hallynmakes sense15:59
hallynmeanwhile, -joined gets called for both ends, right?  15:59
niemeyerSorry, that should be backticks, but you get the idea15:59
hallynyup :)15:59
niemeyerhallyn: Yeah, joined is a single shot15:59
hallyncool.  thanks.  i'm off to try and finish this then16:00
niemeyerhallyn: That's awesome, please let us know how it goes16:00
niemeyerkim0: There is something for exactly this case, but we haven't put much work on it yet16:01
niemeyerkim0: Besides client/server relations, we have something called peer relations16:01
niemeyerkim0: Their use is precisely for that kind of thing16:01
kim0a ha 16:01
niemeyerkim0: You can talk to the other units of the node16:01
kim0ok np16:02
niemeyerkim0: Be aware though, we need to test it :-)16:02
kim0I'll just interrogate the DB16:02
niemeyerkim0: That's a good way for the moment16:02
niemeyerkim0: peer relations will be perfect for that in the near future16:02
* kim0 proceeding to torture the debug-hooks branch16:02
niemeyerkim0: Sweet :-)16:02
kim0hehe16:02
niemeyerjimbaker: ping16:03
kim0can you guys silence the txaws warning :)16:03
niemeyerkim0: Which warning?16:03
kim0/usr/lib/pymodules/python2.7/txaws/ec2/client.py:223: FutureWarning: The behavior of this method will change in future versions.  Use specific 'len(elem)' or 'elem is not None' test instead.16:03
niemeyerkim0: Weird.. I'm not seeing that16:03
kim0I'm probably using an old version16:03
kim0niemeyer: I though tmux was using screen cli shortcuts ?16:09
kim0thought*16:09
kim0niemeyer: also, is it normal that I don't see ensemble-log messages from install hooks16:11
niemeyerkim0: Which shortcuts are you missing?16:13
kim0Ctrl-A " ?16:13
niemeyerkim0: re. logs, what's the context?16:14
niemeyerkim0: What does that do?16:14
kim0niemeyer: shows a list of windows .. allowing visual selection16:14
kim0it was just the first thing I tried .. I see now it's not that bad :)16:14
jimbakerniemeyer, hi16:15
niemeyerkim0: CTRL-A 1?16:15
niemeyerjimbaker: Hey jim16:15
kim0niemeyer: using deploy drupal .. the install hook fires, calls ensemble-log .. but that doesn't show in my debug-log session16:15
kim0jimbaker: morning o/16:15
niemeyerjimbaker: Ensemble needs some more love on the connection establishment front16:15
kim0any default filters exist ?16:15
jimbakerkim0, beautiful morning here16:15
kim0:) sweet16:15
niemeyerjimbaker: Are you sure you want to continue connecting (yes/no)? yes16:16
niemeyerProviderError: Interaction with machine provider failed: ConnectionTimeoutException('could not connect before timeout after 1 retries',)16:16
niemeyer2011-06-03 12:02:44,706 ERROR ProviderError: Interaction with machine provider failed: ConnectionTimeoutException('could not connect before timeout after 1 retries',)16:16
niemeyeretc16:16
niemeyerjimbaker: It fails in different ways in different cases, doesn't wait properly, etc16:16
kim0Would be awesome if we could reuse connections as well :)16:16
niemeyerjimbaker: After you're done with exposure, it'd be good to spend some time actually trying to use it for real16:16
niemeyerkim0: Just got my time machine.. ensemble open-tunnel16:17
kim0have no idea what does that do ?16:17
niemeyerkim0: What you asked for :)16:17
kim0oh!16:17
jimbakerniemeyer, ok. from what you posted, seems like a matter of tuning, but i'll look at it in depth as you suggest16:17
niemeyerjimbaker: Yeah, tunning/bug fixing/polishing.. whatever we want to call it.. we just need a smoother experience on connection establishment16:18
niemeyerjimbaker: How's that exposure stuff going?16:18
jimbakerniemeyer, agreed. probably bumping the retries would suffice16:18
jimbakerniemeyer, bumping up that is16:18
niemeyerjimbaker: No, it likely wouldn't..16:19
niemeyerjimbaker: I'm pretty sure *1* retry isn't the number we have today16:19
bcsallerbug #792406 sounds like the halting problem ;)16:20
_mup_Bug #792406: "Will wait" never returns <Ensemble:Confirmed> < https://launchpad.net/bugs/792406 >16:20
kim0bin/ensemble debug-log -i '*'   →  still doesn't show ensemble-log messages fired at install/start stage ?!16:20
niemeyerbcsaller: Hey!16:20
jimbakerniemeyer, exposure is going fine - i have hook commands working, just need some more testing; and i'm waiting on the review of the expose-provision-service-hierarchy review16:20
bcsallerhey16:20
kim0bcsaller: hi there16:21
niemeyerjimbaker: You have an open review on the pre-requisite branch16:21
niemeyerjimbaker: I'm waiting for you to address this one before looking at the next one16:21
niemeyerjimbaker: The branch is pretty simple, so I was expecting you'd get through it quickly16:21
jimbakerniemeyer, ahh, ok, i will work on that now then16:21
niemeyerjimbaker: Are you doing debug-log + debug-hooks?16:22
niemeyerSorry16:23
niemeyerkim0: Are you doing debug-log + debug-hooks?16:23
hallynall right, if i have formulas 'x' and 'x-slave', with x providing master: x and x-slave providing slave:x (and each requiring the other), should the forumales be called 'x-relation-joined' or 'master-relation-joined'?16:23
kim0niemeyer: yeah16:23
kim0is there some conflict16:23
jimbakerniemeyer, yes, it is really a matter of determining some code patterns you were asking about to see what's going on - most of that came from the waiting for godot redux work16:23
niemeyerkim0: Yeah, the output from the hook on debug-hooks is your terminal, so you won't see it in the logs16:23
jimbakeras in, presumably already vetted code, i wanted to see if i made some mistake in applying the pattern, and if not, how else is it used16:24
niemeyerkim0: I'm not touching that area on this branch, and I'm not aware of any issues on debug-log, so if you have any known issues on debug-log, please bring them up16:24
kim0niemeyer: sorry, in the install hook stage .. I hadn't opened debug-hooks yet 16:24
kim0niemeyer: Also .. once a window opens in tmux .. it cds to /usr/lib/ensemble/txzookeeper .. not where the hooks are16:24
niemeyerkim0: Do note, however, that today debug log only starts logging after you execute the command16:24
niemeyerkim0: Yes, we talked about that yesterday16:25
kim0should I open a bug on that16:25
niemeyerkim0: As I pointed out yesterday, this is a more general issue.  All hooks are executed in another directory. We have to fix that generically, and put the hooks to execute with curdir set to the formula dir.16:25
niemeyerkim0: I _think_ we already have a bug open for that16:25
kim0ok got you16:26
niemeyerkim0: That said, please do check it out and file if you can't find it16:26
niemeyerkim0: This feels like something I can address right after this is finished16:26
niemeyerkim0: This first one, on debug-hooks, that is16:26
* kim0 nods16:26
kim0cd to hooks dir .. ok16:27
kim0getting strange debug-log output → 2011-06-03 17:22:51,493 unit:drupal/0: hook.output ERROR: /tmp/tmpe7x6qc-db-relation-joined: line 37: kill: (2378) - No such process16:29
jimbakerniemeyer, SSHClient.connect controls this with a timeout parameter. maybe this should be exposed to our commands as a  standard param or env var. right now it defaults to 30s.16:33
jimbakerniemeyer, there is some testing to verify that the timeout actually is effective (and so can have more than one retry), but it is mock testing.16:34
niemeyerjimbaker: Please do finish the expose stuff before working on this16:35
kim0niemeyer: please check that kill error ^ looks weird16:35
jimbakerniemeyer, sounds good16:35
niemeyerkim0: Indeed, that sounds quite interesting16:36
niemeyerkim0: Investigatingt16:36
niemeyerActually, I'll just merge a branch before that16:36
hallynambiguous endpoints16:39
kim0Writing formulas is much fun :)16:41
_mup_ensemble/trunk r240 committed by gustavo@niemeyer.net16:41
_mup_Merge close-zk-port branch [r=jimbaker,hazmat]16:41
_mup_This prevents a very silly security issue which allows external people16:41
_mup_to dial into the zookeeper port.16:41
_mup_The expose+open-port work in progress at the moment will address this16:41
_mup_in a better way, and the follow up work on ZK ACLs will close the door16:41
_mup_more properly.16:41
kim0I am genuinly happy btw :) no sarcasm16:41
SpamapSkim0: +1 .. :)16:42
kim0SpamapS: morning o/16:42
niemeyerhallyn: When establishing a relation?16:43
niemeyerSpamapS: Yo!  Awesome news re. the talk approval16:43
niemeyerkim0: Aha, thanks for the warning re. kill16:44
niemeyerkim0: It wasn't a bug, but rather a message we shouldn't print16:44
SpamapSniemeyer: just a bof, but definitely should be cool. I actually hope the puppet and chef guys will be there (they're all speaking at oscon).16:44
niemeyerkim0: kill -0 was expected to fail at some point there16:44
SpamapSno surprise that puppet labs would be there.. given its in Portland where their home office is.16:44
kim0niemeyer: cool .. another suspicious message would be → 2011-06-03 17:22:51,565 unit:drupal/0: hook.output ERROR: duplicate session: drupal/016:45
niemeyerkim0: Hah, cool, same case16:46
niemeyerkim0: That's actually one of the bugs being fixed16:46
niemeyerkim0: Before it would simply create the two sessions16:46
* kim0 nods16:47
niemeyerkim0: Ok, both fixed locally.. will do a last run after lunch, and then submit for review16:49
SpamapSniemeyer: how do I take advantage of the open-tunnel command btw?16:49
niemeyerkim0: Thanks a lot for your help16:49
kim0niemeyer: aye aye 16:49
niemeyerkim0: Please ping me if you find anything else you feel would need attention16:50
niemeyerSpamapS: Just open it in a different terminal16:50
kim0niemeyer: I'm running it in bg & 16:50
niemeyerSpamapS: While the command is open/executing, every other command will make use of the tunnel if possible16:50
kim0niemeyer: doesn't make status faster ?16:50
SpamapSniemeyer: I was thinking it would give me some sort of indication its working. I tried reading the code and I have *no* idea how it can possibly work. ;)16:50
niemeyerSpamapS: It's actually fairly simple.  We make heavy use of a feature of SSH which is not very explored, which is why you don't find much logic in there.16:51
niemeyerSpamapS: The best indication is that your commands will be blazing fast :)16:51
SpamapSniemeyer: is it using the Master/Slave stuff?16:52
hallynniemeyer: oh, yes.  when establishing relation.  probably my extraneous statements inthe metadata.yaml.  trying again16:52
niemeyerSpamapS: Yeah16:53
niemeyerSpamapS: Check prepare_ssh_sharing, under ensemble/state/sshforward.py16:53
niemeyerhallyn: Ah, that's fine16:53
niemeyerhallyn: In general it just means there are multiple possible ways to make the relation16:53
niemeyerhallyn: You can disambiguate by providing the relation name in addition to the service name16:54
niemeyerhallyn: e.g. add-relation myservice1:therelationname service216:54
niemeyerhallyn: For instance16:54
hallynoh, will try that if it fails again, thaks.  but i was specifying 'provides: slave: x', which probably is confusing16:55
SpamapSthe mediawiki formula has two mysql interface requires relations, so one always has to specify whether they want the 'db' relation or the 'slave' relation.16:55
niemeyerOk, lunch!16:55
niemeyerbiab16:55
kim0niemeyer: is there a good way to "debug-hooks" before "install" hook fires .. other than launching debug-hooks in the nick of time16:58
* SpamapS notes that ensemble should Recommend: python-pydot16:58
_mup_txzookeeper/session-event-handling r42 committed by kapil.foss@gmail.com16:59
_mup_watch wrapper that diverts session events to a session event callback set on a connection.16:59
kim0SpamapS: what does that do16:59
SpamapSkim0: bzr status --format dot17:00
SpamapSerr17:00
SpamapShaha17:00
SpamapSensemble status --format dot17:00
SpamapSI keep mixing those two up. :-P17:00
kim0installing17:01
SpamapShmm doesn't seem to work ...17:01
SpamapSbcsaller: having trouble using ensembl status --format dot ..17:01
SpamapShttp://paste.ubuntu.com/617639/17:02
bcsallerensemble status --format svg --output /tmp/status.svg ; eog /tmp/status.svg17:02
SpamapSOh!17:02
bcsallerthough that error is confusing, it looks like there is some other issue17:03
SpamapSsame error17:03
kim0bcsaller: wow that rox :)17:04
=== deryck is now known as deryck[lunch]
bcsallerSpamapS: can you email me the dot file, it seems like there is some version error happening here, I want to see if I can find it 17:04
SpamapSbcsaller: where would the dot file be?17:05
bcsallerhmm. nowhere if you can't even generate it I guess :-/17:05
SpamapSbcsaller: Here's my status output... http://paste.ubuntu.com/617644/17:07
SpamapSYou can reproduce very easily with the mediawiki test from principia-tools17:07
bcsallerthe first error listed a tmp file, is that left around or cleaned up?17:07
SpamapSbcsaller: if you have a quick answer that would be awesome.. trying to put together a "WTF is ensemble" blog post17:07
SpamapScleaned up17:07
_mup_Bug #792448 was filed: status dot ouput fails with errors <Ensemble:New> < https://launchpad.net/bugs/792448 >17:42
kim0Is it ok to put template files besides hooks .. and use them from the hooks ?17:43
SpamapSyep17:43
SpamapSkim0: the whole formula dir is zipped up and sent to the machine17:43
kim0cool17:43
kim0trying to embed php code in bash scripts is no fun :)17:44
SpamapSYeah I just went ahead and wrote a few hooks in PHP ;)17:52
SpamapSso I could extract stuff from includes/settings files.17:53
SpamapSPHP actually has a quite rich set of capabilities for file manipulation17:53
SpamapSHmm ok so if I wanted to spawn m1.small's instead of t1.micro's ... anybody have a clue how I might do that?17:54
SpamapSI thought changing environments.yaml to add 'default-instance-type: m1.small' would do it, but still seem to be spawning t1.micro's17:54
hazmatSpamapS, hmm17:56
hazmatdefault-instance-type should do it17:56
* hazmat digs17:56
SpamapSenvironments:17:57
SpamapS  sample:17:57
SpamapS    type: ec217:57
hazmatSpamapS, default-instance-type: m1.small after that should do it17:57
hazmathmm.. oh against an existing environment17:58
SpamapSright17:58
SpamapScan I specify it to add-unit/deploy ?17:58
SpamapSthat would be t3h awesome17:58
SpamapSalso before I go and try it, would you expect an instance that reboots to re-join ensemble properly?17:59
SpamapSbecause I can always convert t1.micro's to m1.small's17:59
hazmatSpamapS, no re rejoin.. not until we do upstart integration17:59
SpamapSso on boot up it won't get run?17:59
hazmatSpamapS, yeah18:00
SpamapSdoh18:00
hazmatSpamapS, the config setting change locally to environments.yaml is  propagated to the provisioning agent on deploy18:00
SpamapSso .. that would be something that needs to be overridable at runtime with a cmdline switch18:00
hazmatmaking a provider image identifier part of the machine state would allow for the cmd line switch, to be processed by the provisioning agent.18:01
SpamapSno offense, but all I see there is "eep opp glorp cmd line switch ok gru blorg" ;)18:02
jimbakerhazmat, in the watcher function in this paste (http://paste.ubuntu.com/617670/), is it possible for the connection to be lost between the test in line 13 and the watch in line 16?18:03
SpamapShah, just got my AWS bill for May.. $67 .. a new record!18:03
hazmatSpamapS, i think i got to the 200s playing around with cloudformation.. that was painful18:04
hazmatSpamapS, fair enough re klingon speak18:04
SpamapShazmat: just giving you a hard time because I am too lazy to read the specs. ;)18:04
* niemeyer waves18:05
niemeyerkim0: We have plans for that18:05
niemeyerkim0: We discussed a bit the idea of having something like deploy --debug-hooks18:06
SpamapSYou know.. t1.micro's are really unpredictable for performance at all. :-P18:06
niemeyerkim0: To fire a new unit with debugging on18:06
niemeyerSpamapS: Yeah, I think we should switch back to small by default18:06
SpamapSI have 6 in a mediawiki right now.. sometimes its *FAST* .. then a few of them just *stall*18:06
niemeyerSpamapS: Otherwise Ensemble will end up being blamed for this18:06
hazmatjimbaker, its concievable, but if your getting that, there's background activity when the test closes.. which we're trying to avoid.. typically the teardown closes a client, to kill watches before clearing out the tree18:07
niemeyerSpamapS: Yeah, that's exactly what they advertise them to be18:07
SpamapSniemeyer: agreed, especially since people can't take advantage of the reboot-into-something-bigger game of t1.micro18:07
jimbakerhazmat, this is in reference to https://code.launchpad.net/~jimbaker/ensemble/expose-watch-exposed-flag/+merge/63066, but the specific code is the watch_resolved function, which has the same guard18:07
niemeyerSpamapS: It can spike in performance, at the price of stalling completely18:07
niemeyerSpamapS: Cool, let's do this then18:07
SpamapSI'm going to re-run my tests with m1.small and compare.18:07
SpamapSThey're, what, 2x the price?18:07
niemeyerSpamapS: Sweet, let us know18:07
niemeyerSpamapS: More18:08
hazmatjimbaker, yeah.. its possibly not relevant anymore post godot-redux18:08
niemeyerSpamapS: But it's worth it18:08
SpamapSI was thinking it would be cool if we can also add in spot pricing capabilities...18:08
jimbakerniemeyer, does that make sense to you?18:08
niemeyerjimbaker: What's that?18:08
SpamapSSince we can always add units.. spot priced units would be ideal for expanding beyond a certain level.. if they disappear.. oops, just add a full price unit.18:08
hazmatjimbaker, i added that in when doing looped tests of some of the watch apis18:08
jimbakerhazmat, correct, it's necessary to support such looped tests18:08
hazmatjimbaker, i guess the question is are you seeing a problem?18:09
hazmatand if so what is it18:09
jimbakerniemeyer, this in reference to your review of the expose-watch-exposed-flag branch, and asking why this guard was necessary18:09
jimbakerhazmat, i'm trying to investigate niemeyer'18:09
niemeyerjimbaker: and what's the conclusion?18:09
jimbakers review point18:09
jimbakerhazmat says it is necessary, and that there should not be a scenario where the connection is in fact lost between the guard and the establishment of the watch18:11
jimbakerwhich was my concern18:11
jimbakerit would be nice if we could have the need for this guard tested outside of using -u loops18:12
SpamapSbcsaller: fyi, its something to do with the scale or make-up of the status.. if I do it with just the bootstrap node I don't get the dot error18:12
jimbakermaybe a separate branch for that, so we can do it for all the watches using this guard?18:12
niemeyerjimbaker, hazmat: I don't understand why this is necessary in this specific location, and not everywhere else in Ensemble18:14
bcsallerSpamapS: interesting. The test case for it uses a med. size multi-node topology so this is a little unexpected. I'll try to get to it later today18:14
=== deryck[lunch] is now known as deryck
jimbakerniemeyer, i understand the pragmatic reason for it. the tests otherwise fail. hazmat, anything else you would want to add?18:15
niemeyerjimbaker: Why do they fail?18:15
jimbakerniemeyer, for the same reason they always do - we are still doing something in the background when the tests are being torn down18:16
jimbakerniemeyer, so there is a probably a good solution in this case18:17
jimbakerwrite better tests :)18:17
jimbakerin thinking this through, what's confusing about the guard is that it is making an assertion about being connected which as you mention applies to any code hitting zk18:18
niemeyerjimbaker: Yes, please :)18:18
jimbakerniemeyer, do you want me to fix the other watches with this problem?18:18
niemeyerjimbaker: There shouldn't be background logic happening on tests in unexpected ways18:19
niemeyerjimbaker: Not in this branch18:19
niemeyerjimbaker: Just don't introduce more of it18:19
jimbakerniemeyer, ok18:19
hazmatjimbaker, if you remove the check, can you run the tests looped?18:20
jimbakerniemeyer, actually most of the work i spent on the corresponding branch (expose-provision-service-hierarchy) was cleaning up this problem. so certainly one that has a familiar quality18:20
jimbakerhazmat, no, they will always fail18:21
jimbakerhazmat, but the check should not be there at all, per what niemeyer has said18:21
SpamapSoh yeah, m1.small already just *feels* faster to navigate18:21
jimbakersince it is compensating for bad tests18:21
niemeyerRight18:21
jimbakerthat don't properly clean up18:21
hazmatjimbaker, unless the watch is stopped there is always a chance for background activity on a watch18:21
jimbakerhazmat, what can we do to fix that then?18:22
jimbakerseems like a fundamental thing to get right18:22
niemeyerjimbaker: Don't allow a watch to stay alive after the test has finished, ever18:23
hazmatthe state request protocol have lifecycle methods to control stopping them18:23
hazmatjimbaker, in the interim.. raising a stopwatcher from the callback is an alternative18:23
niemeyerhazmat: What about closing the connection?18:23
jimbakerhazmat, right, that's what i do to control such watches for the provision agent tests18:23
jimbakerniemeyer, that sounds like a good way to test this type of solution :)18:24
niemeyerjimbaker: We do this in several places already18:24
jimbakerniemeyer, sounds good, i will look for that code18:25
niemeyerjimbaker: and it's always worked for me in the places I had such logic18:25
niemeyerjimbaker: See tearDown of StateTestBase18:26
jimbakerhazmat, it seems to me that we are moving to supporting StopWatcher in all the watches. certainly the one that is to be fixed for now that's the case, in fact that's part of the changes in this branch18:26
jimbakerniemeyer, thanks18:26
hazmatniemeyer, that's part of the problem, connection close while the watch is firing in the background18:26
niemeyerhazmat: Well, that means a watch is firing as part of the test action itself18:26
niemeyerhazmat: Which falls back to the conversation we had before18:27
niemeyerhazmat: Currently we sleep in those cases, we need a way to sync up the zk connection18:27
niemeyerjimbaker: StopWatcher is unrelated, IMO18:28
niemeyerjimbaker: StopWatcher means the watch is being fired in the first place18:28
_mup_ensemble/debug-hook-fixes r245 committed by gustavo@niemeyer.net18:31
_mup_Send error output to /dev/null in cases we expect the18:31
_mup_command to fail.18:31
niemeyerOk, I think I'm happy with this branch18:33
niemeyerWill push it for review18:33
hallynjamespage: yay, we're in business.18:37
SpamapSYou guys ready to submit to principia? ;)18:37
hallynnow my only problem is lp isn't letting me create lp:~serge-hallyn/principia/oneiric/jenkins-slave/trunk18:37
hallynit let me create jenkins/trunk...18:38
SpamapShallyn: you have to create a package called 'jenkins-slave' .. bug in LP18:38
SpamapShallyn: why isn't your formula just 'jenkins' though?18:38
hallynSpamapS: the one for jenkins is :)18:38
hallyni used a separate one for slaves18:39
SpamapSI'm curious why18:39
SpamapSI'd think thats just a difference of relations18:39
hallynuh18:39
hallynwell i install different packages18:39
hallynat init18:39
hallyni probably could just install all everywhere...18:39
SpamapSRight, or you could just install the packages you need at the time that the relationship is established.18:39
hallynmeh18:40
SpamapSI'm guessing a jenkins slave is way simpler than a jenkins master18:40
hallynso, wehreas i now have 'jenkins-relation-joined' in both jenkins and jenkins-slave,18:40
hallynwould i call them master/slave?18:40
hallynok first step18:40
SpamapSthats what I did in the mysql formula18:40
hallynhow do i 'create the package'?18:40
hallynok.18:41
SpamapSupload a dummy package to a ppa anywhere on lp18:41
hallyni'll try consolidating18:41
hallyngot it18:41
SpamapSthe benefit of consolidating is that you have one place to gather all of the operational knowledge for jenkins18:41
hallynyeah18:41
kim0niemeyer: relation-get in "upgrade-formula" seems to blow up spectacularly18:41
hallynwill do and get bck to you18:41
SpamapSthe benefit of not consolidating is you have two simpler formulas instead of one possibly more complex formula18:41
SpamapSkim0: probably same problem as the blow up in install18:41
niemeyerkim0: I've reported this bug yesterday18:42
* kim0 nods18:42
SpamapShallyn: its been working great for mysql... I deploy a master-db, then slave-db .. then relate them18:42
niemeyerkim0: upgrade-formula is not part of a relation, so it doesn't make sense to call relation-get18:42
hallynhow do you deploy them?18:42
niemeyerkim0: relation-get shouldn't break that way, though18:42
kim0yeah exactly18:42
SpamapSlp:principia-tools/tests/wiki-slave.sh is an example18:42
hallyni've not gotten around to using multiple instances of a formula, dunno how to name them :)18:42
SpamapSensemble deploy mysql master-db  names the service master-db18:43
hallynjamespage: so if a slave first does 'sudo apt-get install jenkins' that shouldn't be a big deal right?  do you think it's wroth doing apt-get remove jenkins before installing jenkins-slave when it gets related to a master?18:46
hazmatkim0, the relation cli api only works currently in relation hooks18:47
hallynoh, why not18:47
kim0hazmat: yeah got that .. still a more graceful error would be nicer :)18:47
hazmatindeed18:48
SpamapShallyn: is jenkins-slave way way simpler than jenkins?18:53
_mup_ensemble/debug-hook-fixes r246 committed by gustavo@niemeyer.net18:53
_mup_Self review:18:53
_mup_- Some additional comments.18:53
_mup_- Add new valid hooks on debug-hooks to tests, even though those tests18:53
_mup_  aren't really great. They will not break once we have more hooks.18:53
SpamapShallyn: I mean, if you have to jump through hoops to morph it into something completely different, then I may say that its better to split them.18:53
_mup_ensemble/debug-hook-fixes r247 committed by gustavo@niemeyer.net18:56
_mup_Minor comment fix.18:56
jamespagehallyn: well you will end up with another running jenkins master node in that case19:03
SpamapShrm.. wordpress's "<code>" tag kind of sucks in my theme. :-/19:09
hallynjamespage: right so i'm just doing apt-get purge19:09
_mup_ensemble/micro-is-slugish r241 committed by gustavo@niemeyer.net19:11
_mup_Switch default instance type to t1.micro.  Does that work?19:11
niemeyerErm19:11
_mup_ensemble/micro-is-slugish r241 committed by gustavo@niemeyer.net19:11
_mup_Switch default instance type to m1.small.  Does that work?19:11
hallynSpamapS: gr.  well it shoudl be pretty simple, it just forces me to become more familiar with the terminology.  So, the consolidated version isn't working yet for me...  working on it19:14
SpamapShallyn: what I mean is, if jenkins-slave is an entirely different piece of software than jenkins, I may have been wrong that they should be consolidated.19:14
jamespageSpamapS, hallyn19:15
* hallyn listens up19:15
jamespageI was thinking that once we have this working well I might that a look at writing a Jenkins plugin to automagically add and remove slaves depending on demand19:15
jamespageusing ensemble19:16
SpamapSNICE19:17
niemeyerSweet!19:18
kim0niemeyer: btw the open-tunnel isn't really working for me19:18
niemeyerjamespage: ensemble add-unit jenkins FTW!19:18
niemeyerkim0: What happens?19:18
kim0niemeyer: I think it's just equally slow19:18
niemeyerkim0: When doing what?19:18
kim0status19:18
kim0niemeyer: status takes 5.4s 19:19
niemeyerkim0: status should definitely improve with the tunnel open19:19
niemeyerkim0: Let me try here19:20
kim0niemeyer: could u launch as enseble open-tunnel &19:20
* niemeyer cranks another environment.. Amazon says Katching!19:20
kim0hehe19:20
niemeyerkim0: I'd recommned against it19:21
niemeyerkim0: Keep it open in the forefront19:21
niemeyerkim0: and put a warning in your wall saying "MY ENVIRONMENT IS EXPOSED"19:21
kim0the 2 times I tried it .. I bg'ed it19:21
kim0exposed ?!19:21
kim0isn't it only to my user?19:21
niemeyerkim0: You have a root tunnel to your environment's control machine19:22
niemeyerkim0: That's why we don't just do that magically for you19:22
kim0niemeyer: got it .. so no technical reason not to background, but a security one19:22
niemeyerkim0: It's neat and all, but be aware :)19:22
kim0hehe yeah :)19:22
kim0ok I'd love to have this working19:22
niemeyerkim0: It should be working.. trying right now19:23
niemeyerWith tunnel:19:24
niemeyerbin/ensemble status  0.29s user 0.08s system 8% cpu 4.309 total19:24
niemeyerWithout tunnel:19:24
niemeyerbin/ensemble status  0.34s user 0.05s system 5% cpu 7.033 total19:24
niemeyerkim0: Seems to work19:24
niemeyerkim0: If you want to be sure:19:24
kim00.3s! something must be wrong on my box (it's 5s)19:24
niemeyerkim0: 1) Open the tunnel19:24
kim0it's open19:25
niemeyerkim0: On another terminal, run this:19:25
niemeyerkim0: ensemble ssh 019:25
niemeyerkim0: Then, close the tunnel with CTRL-C19:25
niemeyerkim0: What happened to your ssh?19:25
niemeyerkim0: You were looking at the wrong number.. it's 4.3s19:26
kim0niemeyer: it was terminated19:26
niemeyerkim0: Bingo19:26
niemeyerkim0: It was going through the tunnel19:26
kim0ah yeah .. You'd think the tunnel would make it even faster19:27
niemeyerkim0: That's the penalty of living at thousands of km from the DC19:28
kim0is it bandwidth limited19:28
niemeyerkim0: Latency19:29
niemeyerOkay!19:31
niemeyerm1.small works..19:31
niemeyerhazmat++19:31
_mup_Bug #792491 was filed: t1.micro is too sluggish <Ensemble:In Progress by niemeyer> < https://launchpad.net/bugs/792491 >19:34
niemeyerIn review19:35
niemeyerkim0: I'll look at the problem of the default directory now19:35
niemeyerActually.. standup..19:36
niemeyerWho's up for it?19:36
niemeyerhazmat, jimbaker, bcsaller: Yo?19:36
hazmati'm game if need be.. almost done with session work19:36
bcsalleralmost done addressing review19:37
* hazmat parks in mumble19:37
jimbakerniemeyer, sounds good to me19:38
niemeyerjimbaker: We're all there19:39
jimbakeryeah, my laptop just needed to reboot... unity issues ;)19:39
niemeyerjimbaker: Heh, sure, blame unity :)19:39
jimbakerwhich features a need for daily reboots it seems, otherwise everything else is great19:39
jimbakerfortunately i know about alt-f119:40
jimbakerso fewer reboots required19:40
hallynSpamapS: lp:~serge-hallyn/principia/oneiric/jenkins works for me19:40
hallyn(jenkins/trunc, that is)19:40
SpamapSright19:40
hallynstill have some jenkins usage to learn to figure out how to use this to test kernel compiles19:41
jimbakerwell it looks no sound for me19:41
SpamapShallyn: for new formulas, I'm going to put together a "how to propose a new formula" document at some point. Right now I think you can just bug me.. eventually we'll need a "NEW" queue like thing.19:41
hallynif it was all one bzr tree we could do merge requests...19:41
hazmatjimbaker, unity again19:43
jimbakerjust one more reboot, now i have sound!19:44
niemeyerhttps://code.launchpad.net/~jimbaker/ensemble/expose-watch-exposed-flag/+merge/6306619:54
SpamapShttp://fewbar.com/2011/06/so-what-is-ensemble-anyway/19:55
hazmatSpamapS, woot!19:57
SpamapSgraph porn at the bottom. ;)19:59
bcsallerSpamapS: now I'm extra sorry status didn't draw properly for you19:59
niemeyerSpamapS: WOAH20:02
SpamapSbcsaller: I can always add it back in. ;)20:03
niemeyerSpamapS: Have you tweeted it yet?20:03
SpamapSniemeyer: my blog auto-tweets. :)20:03
niemeyerSpamapS: What your username there?20:03
SpamapSniemeyer: guess! ;) spamaps20:03
niemeyerSpamapS: Cool :)20:04
koolhead17SpamapS: is it your blogpage :D20:45
* koolhead17 just did niemeyer RT :P20:45
niemeyerkoolhead17: It is indeed20:47
niemeyerAn awesome intro20:47
* koolhead17 reading it20:47
_mup_Bug #792540 was filed: example mysql formula should publish details of precreated databases <Ensemble:New for kim0> < https://launchpad.net/bugs/792540 >20:53
koolhead17kim0: that website bug has been confirmed and assigned!! :D20:55
kim0koolhead17: Yeah it's important ! thanks :)20:55
koolhead17kim0: karma ++ :D20:56
kim0haha :) enjot20:56
kim0enjoy*20:56
koolhead17http://www.youtube.com/canonicalmatters  it needs to be populated :F20:57
koolhead17:D20:57
kim0Just fixed the mysql example formula to make it publish DB details of precreated formulas .. yaay21:01
kim0precreated DBs I mean .. yaay :)21:01
robbiewSpamapS: so when can we get the narrated screencast version?21:09
robbiew:P21:09
SpamapSkim0: how did you manage that, given that the password is encrypted?21:15
kim0SpamapS: caught it as it's being created and saved it in file like how the master password is?21:16
SpamapSkim0: ah, I went through great pains to avoid that in principia. ;)21:16
SpamapSkim0: but I'm not really sure why. ;)21:16
kim0hehe :)21:16
kim0I'm using those example formulas in tutorials .. so I value simplicity above all21:17
SpamapSThe reality is you shouldn't ever have to re-use those users. You just have to keep track of two things. 1) does the db exist yet or not, and 2) has the relationship been completely severed or not.21:20
SpamapSas long as there is a relationship, the username/db doesn't have to change21:21
_mup_ensemble/expose-watch-exposed-flag r241 committed by jim.baker@canonical.com22:40
_mup_Removed unnecessary guard and separated out ports tests from ServiceStateManagerTest megatest22:40
_mup_ensemble/expose-watch-exposed-flag r242 committed by jim.baker@canonical.com22:47
_mup_PEP822:47
_mup_ensemble/expose-provision-service-hierarchy r264 committed by jim.baker@canonical.com22:49
_mup_Merged upstread expose-watch-exposed-flag22:49
kim0SpamapS: I've written a drupal formula at https://code.launchpad.net/~kim0/+junk/drupal .. Mind importing to principia ?22:50
SpamapSkim0: reading now22:52
kim0cool22:52
SpamapSkim0: we had another guy submit one recently too.. ;)22:52
kim0it's pretty basic :)22:52
kim0oh np though :)22:52
SpamapSkim0: I love how all formulas start with at least 5 - 10 revisions. :-p22:54
kim0hahah :D22:54
kim0even as basic as this one22:54
SpamapSThe other one had a good idea.. his was 20110601120022:54
kim0a ha .. yeah like DNS zone versions22:54
SpamapSOk first off, descriptions shouldn't say what it "does", they should say what it "is".22:54
kim0It's a blant copy from the wordpress example .. so we probably should change both of em22:55
SpamapSYeah22:55
SpamapSBeen thinking about writing up a basic set of guidelines and sending it out for comment22:56
SpamapSdrush?22:56
kim0drupal shell 22:57
kim0nice little tool that automates lots of things22:57
SpamapSkim0: right.. I'm not sure we're going to accept stuff in Principia that pulls things from archives other than Ubuntu...22:57
kim0it doesnt ?22:58
kim0drush is packaged22:58
SpamapSensemble-log "Using drush to download latest Drupal"22:58
SpamapS1022:58
SpamapScd /var/www && drush dl drupal --drupal-project-rename=ensemble22:58
kim0ah ..22:58
kim0hmm22:58
SpamapSThe reason being, then we lose the security updates of the Ubuntu release.22:58
SpamapSEverything else looks fine for importing.22:59
kim0althogh I'd argue a deployed ensemble, won't upgrade itself yet :)22:59
SpamapSThe drush stuff is *awesome* though.22:59
kim0It can auto-update core drupal 23:00
kim0and all modules/plugins/themes ..etc23:00
SpamapSkim0: one can at least ssh to it and upgrade, but yeah, this goes back to being able to enforce policy across the machines.23:00
kim0if ensemble would give me a hook to check/apply updates23:00
kim0it would probably be better than apt :)23:00
SpamapSwe don't need a hook for that23:00
SpamapSinstall a cron job23:00
SpamapSBut then you get into, why not just enable unattended upgrades23:01
kim0ok I'll probably tweak it later for apt .. 23:02
SpamapSWe need to discuss this though23:05
kim0Yeah .. 23:05
SpamapSI don't feel adamantly opposed to having formulas that deploy software outside Ubuntu's archives in Principia.. but I do think we need to think about it.23:06
kim0agreed 23:06
kim0maybe start a thread23:06
kim0SpamapS: if I were to deploy a drupal cluster, I'd need a shared filesystem across all nodes ... what's your take on implementing this in ensemble ? an NFS formula ?23:07
kim0what about gluster on the same nodes23:07
SpamapSI want to do it with several options23:07
SpamapSgluster and NFS would be the simplest/safest23:07
SpamapSNFS would need to be failover/drbd or something like that.23:07
SpamapSgluster w/ a peer formula would be *pimp*23:08
kim0I suppose that's good :)23:08
SpamapSwordpress and mediawiki have the same needs23:08
SpamapSTho.. I'd bet all 3 have S3 plugins23:08
SpamapSactually I *know* wordpress does because I use it23:08
kim0yeah, having one formula per instance sounds a bit limiting ? wish I could group more than one formula on a single instance23:09
SpamapSi totally agree23:09
SpamapSlike as long as neither of them provide the same interface, it should be no problem23:09
kim0yeah23:09
kim0and while we're at it .. I think we'd need a documented "interface" for a formula23:10
kim0for example to write that drupal formula .. I had to read the mysql formula source, which doesn't sound scalable23:10
kim0basically documenting the wire protocol .. nothing more23:11
SpamapSAgreed, I think the providing formula should always document it. It would be great if ensemble even enforced/warned when something didn't follow the documented semantics.23:11
* kim0 nods23:11
SpamapShttp://pastebin.com/TqwWjgEB23:13
kim0will we need "gets" as well23:14
SpamapShttp://pastebin.com/KaBHLnX923:14
kim0and will we need "when" .. which hook .. does that make a difference23:14
SpamapSYeah... s/expects/gets/23:14
SpamapSMaybe23:15
kim0good start though23:15
kim0It will need a description .. like memcached gets/sets "ip" which is totally different afaict23:16
kim0I was also thinking about the need to have "joined" when we have "changed" .. knowing that changed always fires after joined, and pretty much always has to detect whehter or not this is its first run!23:18
SpamapShmm23:18
SpamapSI tend to find it easy.. if relation-get has values, configure things. If not, don't.23:19
kim0Yeah23:19
SpamapSthen joined can just create data/etc. if need be23:19
SpamapSand departed/broken can clean up23:20
SpamapSthough broken needs something to tell us which relation broke.23:20
kim0I feel like everything is still possible without joined23:21
kim0will think about it a bit more23:21
SpamapSwell the idea is that joined *only* gets called when a new member arrives23:22
kim0changed, would still be called, so it'd need to do the right thing as well23:23
kim0any way .. it's past midnight for me .. nightie everyone23:24
kim0enjoy your weekend23:25
SpamapSkim0: will do, thanks for the formula work/ideas/everything :)23:25
kim0SpamapS: thanks man :)23:26

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