[07:31] <dimitern> charmers o/
[07:31] <dimitern> anyone around?
[07:31] <dimitern> I'm thinking of creating a simple subordinate charm that has actions returning various networking settings - iptables, routes, etc.
[07:31] <dimitern> So, can a subordinate have actions of its own?
[08:00] <lazyPower> dimitern: it can
[08:01] <dimitern> lazyPower, yeah, I've even found a good example with the chaos monkey
[08:01] <dimitern> :)
[08:02] <lazyPower> +1 for that
[11:05] <dimitern> lazyPower, hey, still around?
[11:05] <lazyPower> o/ dimitern
[11:06] <dimitern> lazyPower, I have a couple of actions questions if you have some time
[11:06] <lazyPower> surely
[11:07] <dimitern> lazyPower, so is there an accepted way to implement an action like "run something and get me the output" ?
[11:07] <dimitern> lazyPower, like, should the output be a param? or it could be dumped (without extra YAML) by action do / fetch
[11:08] <lazyPower> i dont think the output necessarily needs to be a param unless you need dynamic output data. action-set will take care of giving you the data points you care about.
[11:08] <lazyPower> a really good overview of this can be seen by the benchmark actions marco's team implemented. let me fish up one, 1 sec
[11:08] <dimitern> ah, that'll definitely help
[11:08] <lazyPower> https://github.com/juju-solutions/siege
[11:09] <lazyPower> notables: siege is paramterized, the output is parsed from json and stashed in the action dictionary for the run
[11:09] <lazyPower> that should get you a good start w/ how to implement a well-defined action, and have meaningful results available to consume outside of your env.
[11:10] <dimitern> thanks a lot! I'll look at that in detail
[11:11] <marcoceppi> dimitern: you should never just dump yaml
[11:11] <marcoceppi> dimitern: use action-set instead to relay data back
[11:12] <lazyPower> morning marcoceppi
[11:12] <dimitern> marcoceppi, but action-set returns YAML (or JSON I guess) - is there a way to dump a given param as-is?
[11:13] <lazyPower> action-set returns something? thats news...
[11:13] <dimitern> lazyPower, sorry, I meant juju action fetch <ID>
[11:13] <lazyPower> dimitern: did you mean juju action fetch?
[11:13] <lazyPower> ok
[11:13] <lazyPower> :)
[11:13] <dimitern> :)
[11:13] <lazyPower> i was like "uh oh, what changed"
[11:14] <lazyPower> yeah, no the fetch aiui returns the full data  feed, you cannot narrow it down to specific keys without parsing it
[11:14] <lazyPower> maybe in a future revision?
[11:14] <dimitern> right, well if it does - it does, I'll parse it then :)
[11:14] <lazyPower> some fancy jq combined with --format=json
[11:15] <dimitern> yeah, it'll help to have "juju action fetch <ID> [param], returning only that part of the results
[11:16] <dimitern> lazyPower, so no concept of "output params", e.g. in that example doing a db backup and taking outfile=foo.tar.bz2
[11:17] <dimitern> this won't actually mean foo.tar.bz2 will be created in the $PWD where you run juju action fetch
[11:17] <lazyPower> i would suggest you provide fullpath to foo.tar.bz2, that way you can parse that key and pipe that to juju scp
[11:18] <dimitern> right
[11:18] <lazyPower> But i dont think its possible to set file contents like that and have it automagically fetched. its a 2 step process
[11:18] <lazyPower> run proc, get data, action on data.
[11:19] <dimitern> yeah, unless fetch provides the sync-point where the foo.tar.bz2 gets created when fetch is called in a certain way
[11:21] <dimitern> lazyPower, the tip about jq is awesome though!
[11:21] <dimitern> thanks :)
[11:25] <lazyPower> np happy to help dimitern :)
[12:39] <lazyPower> marcoceppi: silly question, i know how to trigger relations on another host out of band, eg: mysql:17 - but if i'm same host, and in a different relationship context - are there any amenities to help me kick off a *-relation-changed event aside from caching relation data thats missing, and stuffing that in a direct execution to the hook?
[12:40] <marcoceppi> lazyPower: you mean, kick off a relationship on the same unit that you're currently running a hook?
[12:41] <lazyPower> yeah. I'm in a position to proxy data between hook contexts
[12:41] <marcoceppi> lazyPower: like, service foo has  a bar and baz relation, kick off bar from the baz relation?
[12:41] <lazyPower> yep
[12:41] <marcoceppi> not really, just need to abstract away the underlying code for bar so that it's invokable from baz, like a pyhton method
[12:41] <lazyPower> when i relation_set(baz, mydata) - it triggers execution on the remote host, not the same host.
[12:41] <marcoceppi> right
[12:42] <lazyPower> ok, i figured taht would be the case
[12:42]  * lazyPower snaps
[12:43] <lazyPower> fg
[12:47] <marcoceppi> bg
[21:08] <marlinc> Is it possible to take advantage of OpenStack security groups when using Juju to deploy services?
[21:14] <jrwren> marlinc: to what end?
[21:14] <marlinc> Well I would like to setup security groups to firewall off some machine parts
[21:15] <marlinc> Like giving a webserver only access to the ports that NFS uses for storage
[21:15] <marlinc> And its only possible to for example access the webserver on port 80
[21:18] <jrwren> marlinc: i cannot answer. sorry.
[21:19] <marlinc> No problem