/srv/irclogs.ubuntu.com/2016/01/15/#juju.txt

lazyPowerbdx yep, $LAYER_PATH and $INTERFACE_PATH00:23
tiagogomesHi all, does JuJu boostrapped on OpenStack requires Swift?09:55
gnuoyjamespage, got a sec for https://code.launchpad.net/~gnuoy/charms/trusty/nova-compute/1515570/+merge/277556 ?10:18
stubtvansteenburgh: Bootstrap is failing in the lxc test runner (ERROR there was an issue examining the environment: cannot use 37017 as state port, already in use)12:20
tvansteenburghstub: thanks, will fix13:22
iceyhas anybody made a custom hook for juju before?13:57
iceyoutside of juju core that is13:57
jrwrenicey: I don't even know what that means. When would it trigger? :)14:12
iceyas a result of juju-run :)14:13
jrwrenicey: how would that differ from an action?14:13
iceyexpanding on an idea that came out of the sprint14:13
iceyit woudn't really, except that the user shouldn't be calling it, another charm would be :-D14:14
jrwrenicey: how would that differ from a realtion? :]14:14
iceythis charm would have no relations14:15
iceyit woulkd interct with potentially every other charm deployed14:15
jrwrenwhy not?14:15
iceyIF the other charm had defined this hook14:15
jrwrenah, there is the implicit relation, right?14:15
iceyin essence, it would be an advanced service health monitor14:15
jrwreni can't see how this differs from a relation.14:15
jrwrenIMO you have just defined relation.14:15
iceycan I have one side of a relation run a command on the other service?14:16
iceythere's relation-joined, relation-departing14:16
jrwrenyes?14:16
iceybut not relation-run?14:16
iceyitr should run every update-status14:16
jrwrenwell, both run.14:16
iceyit*14:16
jrwrenrelation-changed14:17
jrwrenso update-status would change the relation state causing the relation-changed to run14:17
iceythaat could be a lot of bouncing back and forth14:17
jrwrenwhat is update-status? do you mean maintenance status?14:17
iceyupdate-status is a hook that runs regularly14:18
iceyupdate-status provides constant feedback to the user about the status of the service the charm is modeling. The charm is run by Juju at regular intervals, and gives authors an opportunity to run code that gets the “health” of the service or services.14:18
jrwrenah cool, i've not used that. maybe I should :)14:18
iceyyeah, in essence I'm working on a beefed up version of that, and charm authors can define both health checking functionality and potentially remediation for issues14:19
jrwrensounds very interesting.14:19
iceyexamples coming from storage charms: hard drive becomes unhealthy, system can remove the hard drive, run tests against it, and maybe re-add it14:19
iceyif that fails, alert a human to intervene14:19
jrwrenwe are currently using nrpe for health checking and the nrpe subordinate and nrpe module in charmhelpers makes it simple and great.14:20
iceymy coworker has been lightly discussing it with someone on the core team and they like it, we're going to talk about it more but I figure maybe I can hack together a super basic version :)14:20
iceyso far it's working out but I wondered if anybody had done anything similar14:20
jrwrenicey: I think you can. update-status could change relation data which would cause relation-changed to execute. That gives you what you need afaict.14:21
iceyI really don't want to have to add a relation to it; it also works just fine by adding the juju-client layer to the charm14:22
iceyif we have to add relations, it becomes something that the administrator must add all of the relations when it can be done through juju itself14:22
jrwreni see. yeah.14:26
beisnerhi all.  juju 1.25.2 is in ppa:juju/proposed.   today i'll be flipping our openstack charm testing lab to use that version for test automation.14:28
tiagogomesHi all, does JuJu boostrapped on OpenStack requires Swift?14:30
beisnerhi tiagogomes, i don't believe it is expressly required.  two links for reference:14:33
beisnerhttps://jujucharms.com/docs/1.25/config-openstack14:33
beisnerhttps://jujucharms.com/docs/1.25/howto-privatecloud14:33
tiagogomesthanks. I have seen those, but I when I try to bootrap juju I got an "caused by: the configured region "RegionOne" does not allow access to all required services, namely: compute, object-store. access to these services is missing: object-store" error14:36
mgzbeisner: yell if you see anything fun with 1.25.214:49
beisnermgz, thx sir.  i've just done a global force of all uosci jobs to proposed 1.25.2.  it'll get some serious exercise as we're in charm freeze/testing.14:49
mgzsince I added extra validation to our OS-deployer job we've had intermittent failures due to the env not finishing all relations, but that should hopefully just be master14:49
beisnermgz, our automation calls `juju-wait -v` immediately after juju-deployer exits.  that has resolved the testing-too-soon issue for us.14:51
beisnerwe found that arbitrary sleep times are racy, given the undercloud load varies.14:52
beisnerbut i can't point at a single case where juju-wait failed to wait 'til the deployment, hooks, relations, etc., were actually-done.14:52
beisnerso that's a cool tool.  +100 stub14:52
beisner+1000 even14:52
mgzbeisner: my version is similar to that, but also looks at the workload-status reported by the charms14:54
mgzwell, instead really.14:54
beisnermgz, yeah in our amulet tests we don't use juju-wait, we wait for extended workload state as well.  which is arguably the best way.  for the charm to announce: ok, i'm ready now.14:55
mgzindeed, but relies on charm sanity14:55
beisneryep14:55
lazyPoweroi, our charms are sane14:55
mgz:P14:55
lazyPowerwhat are you insinuating mgz? ;)14:55
aisraeltvansteenburgh: Should this merge request be showing up in the queue? It's been reviewed as needs fixing but the original author hasn't responded since then: https://code.launchpad.net/~brad-marshall/charms/trusty/memcached/add-monitors-relation/+merge/27695815:36
aisraeltvansteenburgh: also, item 2391 in the queue is a dead link15:39
tvansteenburghaisrael: 2391 removed15:41
aisraelta15:41
tvansteenburghaisrael: i'll have to look into the other thing, just not right this sec15:41
aisraeltvansteenburgh: No worries. Just wanted to make sure it was on your radar.15:42
iceyanybody have thoughts on testing an action that would require removing parts of a unit and multiple minutes for any differences to become visible16:30
stubicey, jrwren : You don't need update-status. You can call the juju-run tool from a cronjob running on the unit to do stuff in a hook context.16:32
mbruzekcory_fu_: marcoceppi, lazyPower, any other charmers, can I get a review on the charm-helpers update: https://code.launchpad.net/~mbruzek/charm-helpers/host-docstrings/+merge/28278817:26
bdxmarcoceppi: do have a example of layer-django being consumed?17:30
bdxmarcoceppi: I've created `anyapp` to test with here -> https://github.com/jamesbeedy/anyapp17:31
bdxand django-nginx charm here http://bazaar.launchpad.net/~jamesbeedy/charms/trusty/django-nginx/dev/files17:32
bdxmarcoceppi: what I'm wondering is how you are setting up your django project <-> what params you are setting in your django.yaml17:34
lazyPoweri'm pretty sure marco is travelling today bdx, replys may be latent.17:43
lazyPowerthanks for the PR btw :)17:43
bdxlazyPower: ok. cool. yea... about that ... I'm testing it out a bunch as well .... not sure its fully there yet ... but I think I'm making some good headway... http://bazaar.launchpad.net/~jamesbeedy/charms/trusty/django-nginx/dev/view/head:/reactive/django_nginx.py17:49
lazyPowernice17:49
bdxlazyPower: the @when hook will only execute when all states are met right?17:50
lazyPoweryep17:51
bdxlazyPower: but will it execute everytime the states are met?17:51
lazyPoweryep17:51
lazyPowerunless you add a @when_not to prevent it from running17:51
lazyPoweror something to that effect17:52
bdxso then using the only_once hook will ensure that it only runs one time, no matter how many times the states are satisfied in the @when?17:52
lazyPowergood question, i'm not sure :)17:53
lazyPowerI've not used only_once17:53
tiagogomesHi, when JuJu 1.25 will be released? Will it be part of ubuntu 16.04 ?18:01
lazyPowertiagogomes 1.25.0 is already out as stable18:02
lazyPower1.26.0-alpha is the current dev release, with 2.0 on the horizon18:02
tiagogomeslazyPower ah thanks18:03
iceyI'm adding an action to a charm and I'm not entirely sure how to test it; it changes a config in a running program, the easiest way I've thought of testing it is to query that the config value is changed. If I add testing for the functionality exposed by the configuration, I'm testing the underlying software as part of the charm tests, would that be desired?18:14
stubI think it is desired. You do want to test the underlying software, because you need to confirm that the process you are using to change the configuration is correct (eg. you are remembering to send a HUP signal to reload, or that this particular setting requires the daemon bounced)18:19
stubYou could test that you changed the config and maybe issued a reload command, but that doesn't mean it actually works.18:20
stubicey: ^18:20
lazyPowero/ stub18:20
stubo/18:20
stubOff into the night in a tick18:21
iceywell, the program I'm using lets us send in cluster config through the program itself, and I can query the program to validate that the configuration changed stub18:21
iceytesting the underlying functionality would require me removing a disk, waiting (10+ minutes) for the disk to be marked down, bring the disk back up, trigger the action, kill the disk, wait longer than the first time to make sure it is not marked down18:22
iceyso, 20+ minutes of waiting?18:22
iceyand the program, ceph, will report the config to me if it is set18:22
stubRight. Removing disks isn't possible in most automated test frameworks, so that is right out. Setting the config value and reading it back from ceph (not just looking at the config files) seems good.18:23
bdxstub: yes!!!!18:24
iceyyeah, it's not a config file thing, it's literally telling ceph `ceph osd set nodown`18:24
iceystub: thanks~!18:24
bdxstub: you just touched on something near and dear to my heart18:25
bdxstub: removing/replacing ceph disks is a danger zone18:26
bdxstub: this is an area that needs help from the MAAS team18:26
stubThe kernel guys might be able to help you fake a failed disk if you really want (if ln -s /dev/random /dev/sdb2 doesn't do the trick)18:27
bdxstub: if you replace/remove a disk in ceph, maas will assume a different drive for sda18:27
bdxyou also have to reboot the node18:28
bdxbut18:28
bdxstub: ^ is a huge issue for me right now18:29
bdxI have done alot of DR testing with ceph/maas18:29
bdxmaas would need to recommission  the node to be able to account for a new/replaced disk18:31
iceybdx stub we're working on making the ceph experience better with juju, including updating / replacing disks18:31
iceyit's on our roadmap :)18:32
bdxthats a relief18:32
bdxthe CIO of my company keeps bugging me about it18:32
bdxhe knows its not a thing18:32
bdxI have been able to work around it by manually altering maasdb18:33
aisraelstub: Is the cassandra work you've done ready-ready to go? https://code.launchpad.net/~stub/charms/trusty/cassandra/ensure-thrift/+merge/27986918:43
stubaisrael: Yes. Just been resending it to the CI system for laughs.18:44
aisraelstub: CI always needs something to do. :D18:45
stubGood timing if you are reviewing - that branch was about to go into production ;)18:45
aisraelstub: Yup, I am reviewing. So far, so good.18:46
iceyso, I'm noticing that the update-status hook doesn't seem to actually exist in any documentation yet?18:56
stubicey: No, but I already opened an issue on that and it is being added.18:57
iceyok, just wanted to make sure it was ok stub, thanks!18:57
mbruzekbdx: I just got back from lunch and I am going to review your tls/k8s pull requests after my meeting18:59
bdxmbruzek: sweet! its small, just swapped out your local chdir19:06
bdxbut the tls one is a little bigger19:06
iceyis there a recommended way to run actions in a functional test?19:08
tvansteenburghicey: https://github.com/juju/amulet/blob/master/amulet/deployer.py#L36219:10
iceythanks tvansteenburgh, I just found the PR that added that :)19:11
iceyit's funny when google shows the PR before the actual file :-P19:14
pmatulismbruzek: fyi, https://github.com/juju/docs/pull/801 , comments welcome20:08
mbruzekpmatulis: I am taking a look now20:08
mbruzekpmatulis: I see what I was looking for on line 54!20:13
mbruzekstill reading20:13
pmatulismbruzek: thanks for the comments20:54
mbruzekpmatulis: thanks for sending me the link20:54
bdxanyone have luck with GitUrlFetchHandler or install_remote from charmhelpers.fetch ?21:01
natefinchrick_h_: you around?21:06
mbruzekbdx how did you run the tls tests?  http://paste.ubuntu.com/14510918/  I am getting an assertion error on the test_ca() method21:06
mbruzekbdx I see a /tmp/server.crt, but not a /tmp/ca21:07
mbruzek.crt21:07
bdxmbruzek: ooo mbruzek, my bad, here21:46
mbruzekno problem I am fixing it21:46
mbruzekand setting up the repo to run these tests every push21:47
bdxniceee21:52
lazyPower'eating broccoli' ;)21:53
=== ericsnow is now known as ericsnow-afk
lazyPowerbdx: Landed your class + tests with some refactoring22:32
lazyPowergive a look at master22:32
lazyPowerbdx https://travis-ci.org/mbruzek/layer-tls22:33
mbruzekbdx: we had to rewrite the tests to pass.22:33
lazyPowernot really i mean22:34
lazyPowerwe took his high level abstract, and then made it red2green22:34
bdxlazyPower, mbruzek: nice!22:35
bdxI knew the tests would need a little love22:39

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