/srv/irclogs.ubuntu.com/2011/11/17/#juju.txt

niemeyerAaaaand, that's it.. lbox is ready for inline reviews on Launchpad.02:36
niemeyerNow, package and docs..02:36
hazmatniemeyer, nice02:46
hazmatSpamapS, thanks for doing the bug weeding03:05
noodles775Hi, any reason why I'd start seeing the following on juju units? http://paste.ubuntu.com/741073/11:26
* noodles775 checks the mail list for api changes.11:26
noodles775seems JUJU_AGENT_SOCKET is no longer set?11:27
hazmatnoodles775, the juju cli api is only setup for automatic usage from a hook or a debug hook terminal.. other uses need to setup variables to connect to the remote end12:17
hazmatwe should probably default these though to their common known values12:18
fwereadehazmat, may I borrow you for a quick pre-review?12:25
fwereadehazmat, http://paste.ubuntu.com/741112/ has the changes I've made for upstartification; they're verified but not yet tested and I wanted to check if there were any serious issues before I go too much further12:26
fwereadehazmat, the first 270 lines are the important ones, the rest are consequential changes to test data12:26
fwereadebbs lunch12:29
=== mainerror_ is now known as mainerror
rogniemeyer: mornin'13:28
mainerrorHello.13:29
hazmatfwereade, functionally it looks fine, except the stop handling needs better, i'm still wondering if it wouldn't be better served by a more complete abstraction of upstart config13:30
hazmater .. stop needs error handling13:30
fwereadehazmat, good point re stop13:31
hazmatsome of the use cases are pretty general purpose outside of existing agents, starting containers, zookeeper, webservers.. etc.13:31
fwereadehazmat, I'm reluctant to do that until those use cases are actually in play13:32
fwereadehazmat, although that makes me think13:32
hazmatfwereade, those cases exist now, and could be simplified via upstart13:32
fwereadehazmat, actually no it doesn't13:32
hazmatfwereade, much of the local provider code is really just process management stuff that could go away13:32
fwereadehazmat, ah, ok, I haven't really dug very deep into that13:33
fwereadehazmat, I'll poke around for further opportunities to use it then, better abstraction should come from that quite naturally13:33
fwereadehazmat, thanks13:34
hazmatfwereade, a straight conversion of http://upstart.ubuntu.com/cookbook/#id119 would look alike the bootstrap, with a **kw constructor for convience13:35
hazmatits not a direct 1-113:35
hazmatbut it would cover all our use cases13:36
hazmatmaybe13:36
niemeyerrog: Yo13:36
hazmatwell definitely.. but not clear we really need it13:36
niemeyerhazmat, fwereade: Mornings as well13:37
hazmatniemeyer, greetings13:37
niemeyerfwereade: Well, aft. for you :)13:37
fwereadehi niemeyer13:37
fwereade(details, details)13:37
niemeyerrog: Thanks for the log.. I think there's much better heuristic I can use to find out the proper URLs13:37
niemeyerrog: I'll try that now13:37
rogniemeyer: cool.13:42
jcastrohazmat: nice graphs, <314:27
* niemeyer => lunch15:18
* mpl <- cookies15:34
mpl:)15:34
fwereadehey guys, cath's stuck in the lift and laura is somewhat distraught, back later16:23
niemeyerfwereade: Ouch16:26
SpamapShttps://blueprints.launchpad.net/ubuntu/+spec/servercloud-p-juju-charm-testing17:24
SpamapSThis has the juju team as the drafter..17:24
SpamapSI went ahead and added a few work items that I think will be part of it, but it would be good for somebody from the juju team to review them and change the Definition from Discussion to Review once that is done.17:25
niemeyerrog: Alright, I think I'm done with lbox..18:01
rogniemeyer: yay!18:01
niemeyerUnfortunately codereview seems down for maintenance.. *now* from all times18:01
rogniemeyer: damn, i remember it was announced.18:02
niemeyerrog: The heuristics are much better now18:02
niemeyerSimpler too..18:02
rogniemeyer: good. nothing like someone actually using some heuristics to sort 'em out...18:02
niemeyerrog: Yeah, definitely18:02
=== wckd_ is now known as wckd
rogniemeyer: BTW currently i'm trying to get one of the simplest tests in ec2 to run against my test server.18:03
niemeyerrog: Cool, that's awesome18:03
rogniemeyer: it's by no means awesome yet :-)18:04
niemeyerrog: Ugh :)18:04
rogniemeyer: and the code is grungy18:04
rogniemeyer: here's a current snapshot of the server code: http://paste.ubuntu.com/741436/18:05
niemeyerrog: This is quite involved already18:07
rogniemeyer: all it does currently is allow a client to induce a failure (FailNow) and to inspect the set of actions afterwards.18:07
rogniemeyer: i know, i'm not entirely happy18:07
rogniemeyer: i can't think of a way of making it simpler though, while keeping our current approach18:07
niemeyerrog: I mean, even in terms of features18:07
niemeyerrog: We should be able to have a simpler test case that doesn't involve all of those calls18:08
niemeyerrog: To get started18:08
niemeyerrog: E.g. whatever call reads the machine state18:08
rogniemeyer: most of those calls are currently unimplemented18:08
rogniemeyer: i was after getting instance starting and stopping working18:09
niemeyerrog: The overall direction looks interesting, though18:09
rogniemeyer: i need DescribeInstances and then i think i'll have enough for a juju machine18:10
niemeyerrog: // Address returns the URI of the server.18:10
niemeyerrog: I wonder about this one18:10
rogniemeyer: is that a problem?18:11
niemeyerrog: It feels useful for sure18:11
rogniemeyer: i don't want to clash with other potential services18:11
niemeyerrog: But we can't expose that to the tests, otherwise we're binding them to a particular implementation18:11
jcastrom_3: ~45 minutes until that call18:11
niemeyerrog: The backend semantics may need multiple URLs, etc18:11
rogniemeyer: i don't think so - we just make an environments.yaml that includes that string18:11
niemeyerrog: Right, something like that should be cool18:12
rogactually, we allow registration of a new region18:12
rogwhich includes the url18:12
niemeyerrog: FailNext may not be enough..18:12
niemeyerrog: interactions will generally take several roundtrips18:13
rogniemeyer: yeah, it's just my placeholder for whatever is needed18:13
niemeyerrog: The first one may not be interesting to fail18:13
rogniemeyer: it's enough for my first test18:13
niemeyerrog: Cool18:13
niemeyerrog: +118:13
niemeyerrog: Looks nice overall18:13
rogniemeyer: but in general it's an interesting question18:13
rogniemeyer: the testing code can't know how many requests will be generated18:13
niemeyerrog: Some nastiness will go away when Go is fixed18:13
niemeyerGo's xml, that is18:14
niemeyerrog: That's right18:14
niemeyerrog: We'll need to think through that one a bit18:14
rogniemeyer: yeah, i think xml could do with a thorough rethink18:14
niemeyerrog: It sounds like failure scenarios are too bound to the backend18:14
rogniemeyer: yes18:15
niemeyerrog: We'll probably need a richer interface on the fake server, and provider-specific tests18:15
niemeyerrog: Otherwise we'll be spending years on that framework creating something extremely involved18:15
rogniemeyer: for example ec2 generates errors in a particular form18:15
niemeyerrog: yeah, and on particular calls, etc18:15
rogniemeyer: hmm. a possible idea:18:16
rogniemeyer: given that hardly any code reacts to the actual content of an error18:16
rogniemeyer: and that most of the stuff we're testing will be single threaded and therefore deterministic18:16
niemeyerrog: Both of these assumptions don't seem necessarily valid, FWIW18:17
rogniemeyer: you could have a scheme where you run a test once, record the number of operations, then run it again several times failing at a different place each time18:17
rogtrue..18:17
niemeyerrog: See the "spending years" comment above.. :)18:17
rogyeah18:18
roghmm. anyway,  i think the important thing is the constructive tests.18:20
rogwe can do provider specific tests for provider specific error scenarios18:20
jcastroyep18:23
niemeyerrog: Agreed18:25
m_3petecheslock: great talking to you guys again... I'll get portertech some examples19:48
petecheslockm_3: sounds great - we're excited to bring sensu to more automation platforms.19:48
hazmatthis is cool http://news.opensuse.org/wp-content/uploads/2011/11/snapper.png20:21
hazmatbtrfs snapshot visualization20:21
hazmatimagine hooks doing btrfs snapshots, with introspectable  diffs20:22
hazmatnot quite dry run, but a different level of introspection20:22
jrgiffordi do **not** need to do `sudo juju bootstrap`, correct?20:48
jrgiffordjust a normal juju boostrap, from my normal user?20:48
m_3jrgifford: correct, ordinary user20:57
marcoceppijrgifford o/20:57
jrgiffordm_3: thanks20:58
jrgiffordmarcoceppi: ?21:00
mainerrorHe meant that there is no such thing as a normal user since it would imply the existence of an abnormal user which doesn't make sense. :)22:01
portertechdue to being a ruby whore, I require ruby to be present in order to write my hooks in ruby22:51
portertechis there a common solution in this case, for charms?22:51
portertechcheck if installed, if not, install, a ruby charm out in the wild?22:52
portertechjust do an apt-get install then? ;)22:53
brunopereira81hello, I need some help setting up a install script for a juju charm22:54
jrgiffordportertech: hey, another ruby charmer. :P22:59
jrgiffordi was actually wondering the same thing...23:00
fwereadeportertech, an apt-get install in your install hook should be fine23:00
fwereadebrunopereira81, I'll help if I can, but I know a lot more about the code than about the charms23:00
portertechjrgifford fwereade: yeah, doing a quick which & $? to determine if it's present, installing if not, then go have a ruby party23:00
fwereadeportertech, perfect23:01
jrgiffordportertech: thanks for the suggestion23:01
brunopereira81fwereade, I think I got it, thx23:01
fwereadebrunopereira81, cool23:01
portertechtricky way: [[ ! `which ruby` ]] && apt-get -y install ruby23:04
portertechso is the install hook the default? what's the standard way to call another hook from it?23:05
brunopereira81I have a config.yaml file in my charm folder, how can I read an key from it to use in my install hook?23:10
portertechfwereade: would I "$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"/ruby_hook from within the install hook?23:15
portertechmust be a sexy way of doing it23:15
fwereadesorry guys, distracted23:15
fwereadeyou should be able to get your config stuff via relation-get23:17
fwereadewhich is available to all relation-related hooks23:18
brunopereira81so for instance if I want to get a token string from my config.yaml i just need call 'relation-get token'?23:20
fwereadebrunopereira81, sorry, needed to refamiliarise myself23:21
fwereadethat should be config-get23:21
fwereadeand that should be available in all your hooks including start and install (which aren't anything to do with relations)23:21
brunopereira81fwereade, thx23:22
fwereadesorry brainfart :)23:22
brunopereira81lol, np23:22
fwereadeportertech, my bash-fu is weak :)23:23
fwereadeportertech, as a suggestion, you *probably* don't need to do a great deal of work in the install hook; and if the install hook is just a bunch of "apt-get install"s, subsequent hooks (like start) can just be ruby23:24
portertechyeah, since install only runs once23:25
portertechnothing special23:25
fwereadeportertech, indeed, you'll get an "install" and a "start" and then it's all about the relations23:25
fwereadeoh, I think there's a config-changed one as well, let me check23:26
fwereadeyep, it's "config-changed"23:26
portertechdoes anyone use facter or ohai w/ there charms? :P23:29
portertechwhere a large amount of system info is required23:29
fwereadeportertech, we're very deliberately agnostic about what tools you use within the hooks23:30
fwereadeportertech, I don't know for sure what people are using though23:30
portertechlots of freedom23:31
portertechi dig it23:31
fwereade:D23:31
* hazmat catches up23:33
SpamapSportertech: yes there are charms that use facter already23:34
brunopereira81after creating a charm what is the easiest way to test it?23:34
SpamapSportertech: btw, for the "run another hook" case I use this23:34
SpamapShome=`dirname $0`23:34
SpamapS$home/hookname23:34
hazmat$CHARM_DIR is defined as well23:34
portertechSpamapS: cool23:34
* SpamapS is all about self reliance :)23:35
* SpamapS heads off to do some of the wife's bidding23:36
brunopereira81(nvm, found how)23:36
hazmatmost of these formulas use facter.. http://charms.kapilt.com/~negronjl23:37
hazmatalbeit just as a k/v store, which could be done with just about any tool..23:37
_mup_Bug #891868 was filed: juju cli api should be invokable outside of units  <juju:New> < https://launchpad.net/bugs/891868 >23:39
portertechhazmat: is $CHARM_DIR the current charm dir absolute path?23:42
portertechor just a user specified var23:43
m_3portertech: that's the charm path (/var/lib/juju/units/<unit-name>/charm/ on the deployed nodes)23:49
portertechm_3: ah, ok, thanks23:50
m_3and CWD druing hook exec23:50
m_3I usually just use relative23:50
m_3portertech: incidentally when debugging... /var/lib/juju/units/<unit-name>/charm.log is useful (along with /var/log/juju/unit-agent.log)23:51
m_3(from memory, but something like that)23:52
portertechso if i call another script in the current dir from within install, i could do $CHARM_DIR/script?23:53
portertechor ./23:53
m_3I guess I use [[ -f "$(dirname $0)/common.sh" ]] && source "$(dirname $0)/common.sh"23:55
m_3but that's probably easier with CHARM_DIR now23:56

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