/srv/irclogs.ubuntu.com/2012/02/08/#juju.txt

=== andrewsmedina_ is now known as andrewsmedina
=== hspencer is now known as hspencer[gym]
_mup_Bug #928624 was filed: cached unit public addresses are problematic when public ip address changes <juju:New> < https://launchpad.net/bugs/928624 >04:59
=== fenris is now known as Guest55400
=== Guest55400 is now known as ejat
Ruetobashi, how do i "de bootstrap" juju ?05:58
Ruetobasor, how do i tell juju that new systems are available for it to use ?05:59
ejatSpamapS:  how to expose the services .. already run juju expose services .. the web services not appear in browser http://paste.ubuntu.com/833602/06:50
ejator can someone help me with that ?06:58
=== asavu_ is now known as asavu
=== nijaba_ is now known as nijaba
=== grapz is now known as grapz_afk
=== grapz_afk is now known as grapz
=== chuck_ is now known as zul
jorgeHi all! I need some help with two issues. I'm trying to use juju charms. I would like to use hadoop-master and hadoop-slave formulas from https://code.launchpad.net/~charmers/. Apparently all is working fine with juju because I can use the mysql and mediawiki charms normally. But, with the hadoop charms the problem is that the service stops at some point.13:22
jorgeSo, I've tried https://juju.ubuntu.com/docs/write-charm.html#debugging-hooks to debug. I could connect to instance and run the install script from charm manually. When I run the script manually at the instance, I get no error! But with juju deploy I get some errors.13:22
jorgeAre there some test to do?13:22
=== grapz is now known as grapz_afk
=== grapz_afk is now known as grapz
=== asavu_ is now known as asavu
* hazmat yawns15:07
koolhead17hi all16:16
gary_posterSpamapS, hazmat, hi.  two questions about units.  (1) if you are talking to a unit, is there a way to identify that other unit uniquely? (2) Can you have different units with different configuration?  I'm guessing no, but that's kinda limiting.16:35
gary_posterFor question 1, I'm interested particularly in relation-changed and relation-joined16:36
SpamapSgary_poster: I don't understand question 1 , but for question 2, that would violate the point of juju.. two separate configurations of a service are two separate services.16:39
hazmatgary_poster, 1) the unit is passed to hooks 2) the units can coordinate among themselves if they need different state (a leader vs slave), but they share the same service configuration,16:41
SpamapSgary_poster: can you perhaps provide a more concrete example of what it is you want to do?16:41
gary_posterSpamapS, for 2, ok, let's step back to use case then.  for the case of a build slave connecting to a build master, you will want to have multiple build slaves each running different tests.  Having different charms for each kind of test config that might run would be annoying--not very lightweight for something that should be lightweight16:43
gary_posterhazmat, so for 1, does unit-get refer to the one on the other side?  It seemed like it was talking about itself.  If not unit-get, how do we get that unit?16:44
SpamapSgary_poster: right, so each build slave is then its own instantiation of each charm as service1, service2, with different config settings.16:45
SpamapSgary_poster: so you'd juju deploy build-slave slave-config1 --config config1.yaml16:45
SpamapSgary_poster: so you'd juju deploy build-slave slave-config2 --config config2.yaml16:45
gary_posterSpamapS, ah!  ok.  perfect thanks16:46
SpamapSgary_poster: note that the master needs to be smart about relationships with > 1 service. Some charms don't do that (like haproxy)16:46
hazmat1) the local unit id is available as an environment variable ($JUJU_UNIT_NAME) to all hooks, and unit-get refers to information about the local unit16:46
gary_posterSpamapS, can you point us to a master that is smart about that kind of multi-relation?16:47
hazmatthe remote unit that triggered a local hook execution is available in the env as JUJU_REMOTE_UNIT16:47
gary_posterI mean, a charm16:47
gary_posterhazmat, got it, https://juju.ubuntu.com/docs/charm.html#hook-environment thanks & sorry for not seeing it16:48
hazmatgary_poster, np16:48
hazmati've been playing with this same topic (build slaves), i ended up having the slaves register with the master with an identity and local env information, and have the master divy out work appropriately to different queues (distro release, arch, etc) which the categorized slaves listen to.. but thats all application level16:50
* hazmat goes back to reviews16:50
gary_posterSpamapS, am I right that in your deploy example you would set up a relation between the master and slave-config1, right?16:50
SpamapSgary_poster: mysql is very smart about that16:52
SpamapSgary_poster: it creates a database based on the related service name.16:52
gary_posterhazmat, yeah, that's cool.  We need to have a custom environment in some cases, so being able to control that at a service level is nice.  Otherwise when the work is divvied out, all of a sudden you have a lot of environment prep work that needs to be done.  having it done once would be good.16:53
SpamapShazmat: please.. tell me you didn't rewrite jenkins16:53
SpamapSin scala16:53
SpamapSblindfolded16:53
SpamapS;)16:53
hazmatSpamapS, of course not ;-) i used go16:53
gary_posterheh16:53
hazmatalthough i was tempted by clojure16:53
* SpamapS knows hazmat is a code ninja16:53
gary_posteryay clojure!16:54
gary_posterSpamapS, awesome, thanks, will look.  FWIW, we do have one small bug we think we have encountered: setting a relation value on a master and then retrieving that relation's value on the next relation-changed on the master fails to get the value we just set.16:55
gary_posterI'll file a bug.16:55
gary_postercoming up with a small charm to dupe may take a bit.16:56
SpamapSgary_poster: relation-get does not fetch the values you just set16:57
SpamapSgary_poster: relation-set exposes it to the other side of the relation.16:57
gary_posterNot even in (immediately) subsequent hook16:57
gary_poster?16:57
SpamapSgary_poster: and it is not flushed and exposed to the other side of the relation until the hook that called relation-set exits16:57
gary_postertransactional-ish--I had figured, yes16:58
SpamapSgary_poster: so if you are seeing that changed is executed on the other side of a relation without the values you just relation-set .. its possible something else caused changed to be executed16:59
SpamapSgary_poster: changed is *always* executed once... and you have to write changd hooks tolerant of not having any values yet16:59
gary_posterSpamapS, here's scenario: service 1 sets relation value in relation with service 2; service 2 gets value and does other stuff, including changing the relation again; service 1 is therefore re-called with a relation-changed, and wants to see if it has already told service 2 that value, so it checks with relation-get.  IIUC, that last usage is unsupported?17:01
gary_poster(in the last step, if we have not told service 2 a value, we generate a new one)17:02
gary_poster(which is why juju doesn't save us from ourselves)17:02
SpamapSgary_poster: ah, I see the confusion17:03
SpamapSgary_poster: there are *two* buckets of values there17:04
SpamapSgary_poster: service1/0 has values, and service2/0 has values17:04
gary_posterah, and the twain don't meet17:05
SpamapSgary_poster: Because relation-get and relation-set are context sensitive, you can't look at your own values.17:05
gary_posterSpamapS, gotcha.  Thank you17:05
SpamapSgary_poster: if you need to avoid repeating an action, keep track of state locally. If you're worried about endless loops of changed hooks with the same values.. you don't have to. Hooks are only fired when the values actually change.17:06
gary_posterSpamapS, yeah, we'll do it locally thanks.  We were changing (generating) the values, which is why we had a problem17:07
=== koolhead17 is now known as koolhead17|zzZZ
=== hspencer is now known as hspencer[afk]
SpamapS!jenkins17:52
juju-jenkinsSpamapS did you mean me? Unknown command ''17:52
juju-jenkinsUse '!jenkins help' to get help!17:52
SpamapShazmat: figured out the problem with the jenkins test failing18:12
SpamapShazmat: juju can't run its tests from a tree with any spaces in it18:12
SpamapS[pid   446] execve("/var/lib/jenkins/jobs/juju", ["/var/lib/jenkins/jobs/juju", "tests/workspace/bin/unit-get", "private-address"], [/* 9 vars */]) = -1 ENOENT (No such file or directory)18:12
=== koolhead17|zzZZ is now known as koolhead17
SpamapSkoolhead17: go to sleep!18:15
koolhead17SpamapS: i can once done with the tiny piece :)18:16
_mup_Bug #929030 was filed: Test suite fails when run from within a directory with spaces in its name <juju:In Progress by clint-fewbar> < https://launchpad.net/bugs/929030 >18:30
gary_posterOK here's something odd18:41
gary_posterin relation-joined on slave we set a value in the relation18:42
gary_posterand that never gets in the log of the master18:42
SpamapSgary_poster: no guarantees it won't be set by then18:43
SpamapSoh wait18:43
SpamapSI read that wrong18:43
SpamapSgary_poster: are you sure the changed hook didn't execute again on the master?18:44
gary_posterSpamapS, it executed twice...ah nm.  We were called but made an error, and expected to see the value in the master logs.  our error, sorry.18:47
SpamapSgary_poster: its ok.. the juju dance can be a bit dizzying at first.. :)18:49
gary_poster:-)18:49
hazmatSpamapS, huh?19:07
hazmatthat's seriously odd19:07
hazmatand worth a bug19:07
SpamapShazmat: ^^ 92903019:11
SpamapShazmat: I'm now tumbling down the twisted spawnProcess rabbit hole to see if it is doing something stupid with the PATH19:12
SpamapShazmat: you showed me once how to run the test suite under pdb19:17
* koolhead17 whistling juju juju loudly !!19:22
hazmatSpamapS, ./test -b19:22
hazmatSpamapS, you have to target a particular test, it catches on all errors (even caught ones)19:23
SpamapSyeah thats cool19:23
hazmatSpamapS, alternatively just adding import pdb; pdb.set_trace() anywhere19:23
SpamapSoh, that sounds better19:23
hazmatbut if you hit a yield the stack is gone19:23
hazmatso you want it as close to the point of inspection as possible19:24
SpamapShazmat: I think its actually create_hook's fault.. its creating a shell script but not escaping the spaces19:24
SpamapSye olde "not escaping the spaces" scurvy dog.. YAR19:25
hazmatArgh!19:25
SpamapS#!/bin/sh19:25
SpamapS/var/lib/jenkins/jobs/juju tests/workspace/bin/relation-get --format=json -19:25
SpamapSyup19:25
SpamapSsimple fix actually.. phew19:30
juju-jenkinsProject juju tests build #4: STILL FAILING in 1 hr 30 min: http://ec2-23-20-64-9.compute-1.amazonaws.com:8080/job/juju%20tests/4/19:33
juju-jenkinsProject juju tests build #5: ABORTED in 1 min 11 sec: http://ec2-23-20-64-9.compute-1.amazonaws.com:8080/job/juju%20tests/5/19:34
SpamapShazmat: http://paste.ubuntu.com/834350/19:35
SpamapShazmat: build #6 should pass.. its applied on the jenkins box. :)19:35
juju-jenkinsProject juju tests build #6: STILL FAILING in 7 min 5 sec: http://ec2-23-20-64-9.compute-1.amazonaws.com:8080/job/juju%20tests/6/19:41
hazmatSpamapS, lgtm19:44
m_3SpamapS: thanks for thjenkins plugins... I'll pull those into charmtester as well20:17
michael_tngood day all,20:27
michael_tni'm trying to spin up some ubuntu orchestra/juju20:28
michael_tni have orchestra/cobbler running20:28
michael_tnjuju bootstrap fails to see my active systems20:29
michael_tncobbler list shows these systems20:29
michael_tnsystems:    node064    node066 systems:    node064    node06620:29
michael_tnjuju bootstrap errors with20:30
michael_tn2012-02-08 15:29:58,775 ERROR Could not find any Cobbler systems marked as available and configured for network boot.20:30
_mup_juju/unit-stop r423 committed by kapil.thangavelu@canonical.com21:59
_mup_clean up stop spec21:59
hazmatmichael_tn, have you setup the orchestra classes in environments.yaml and assigned machines to the $available-mgmt-class22:01
hazmatjuju will use machines only that have the available-mgmt-class applied and are setup for netboot i think.22:02
SpamapShazmat: yes thats how it works22:07
juju-jenkinsProject juju tests build #7: STILL FAILING in 6 min 38 sec: http://ec2-23-20-64-9.compute-1.amazonaws.com:8080/job/juju%20tests/7/22:19
juju-jenkinsProject juju tests build #8: STILL FAILING in 6 min 55 sec: http://ec2-23-20-64-9.compute-1.amazonaws.com:8080/job/juju%20tests/8/22:29
juju-jenkinsClint Byrum: [trivial][r=hazmat] Fix running of test suite inside sub-dirs that have spaces or other special shell chars22:29
SpamapShttp://paste.ubuntu.com/834557/22:30
SpamapShazmat: ^^ .. that test seems to have a race in it22:30
SpamapS        # Do this as late as possible to prevent zk background logging22:30
SpamapS        # from causing problems.22:30
SpamapSThat race seems to be hitting quite often on my little m1.small22:31
SpamapSI'm a little confused why it sets LOG_LEVEL_INFO ..22:32
* hazmat pokes at the source22:33
SpamapSbzr log -c 146.2.122:33
SpamapSask bzr, and ye shall receive. ;)22:33
SpamapShazmat: seems like LOG_LEVEL_ERROR would be more appropriate given that the warnings are not fatal..22:35
SpamapShazmat: its really hard to understand at all what that test even wants to be doing22:39
hazmatSpamapS, there's a race from when it sets the log level to when the operation is done22:39
hazmatSpamapS, that test can be removed imo22:39
SpamapShazmat: it seems like that test is testing txzookeeper, not juju. ;)22:39
hazmatits hard to test without adding a new method to the zk bindings22:39
hazmatits trying to test a juju cli default behavior22:40
SpamapSThat behavior being.. return no output after removing a unit?22:40
SpamapSSo we could also just filter out all ZK log messages. Right?22:40
hazmatSpamapS, by default we do22:40
hazmatSpamapS, that test basically sets it to a level that would log, and then invokes juju since juju will set it to disabled, but there's a race between the two that is outside tests control22:41
hazmatand then it tries to verify that nothing was logged, but that fails since between juju cli being run and the activation of logging, the zk extension/binding io thread does some logging22:42
hazmatall we really want is to verify self.assertEqual(zookeeper.get_debug_level(), 0)  but that method doesn't exist22:43
SpamapShazmat: so its almost by definition a non-deterministic test because the logging is not forced.22:43
hazmatSpamapS, yes, the io thread is outside of python's control.. its basically  setting up a fail scenario, and then trying to assert it didn't fail, but there is  a window for failure22:43
hazmatSpamapS, we could minimize the window by moving the mocker.replay call up, but there will always be a window with that test, and frankly its a test i'd be fine with yanking.. alternatively we patch and upstream the new method call onto the bindings22:45
SpamapShazmat: I'm +1 on just removing the test22:46
SpamapShazmat: and opening a bug on python-zookeeper to add the call22:47
hazmatSpamapS, sounds good to me22:47
SpamapSor is that even further up, to libzookeeper itself?22:47
* hazmat checks22:47
juju-jenkinsProject juju tests build #9: STILL FAILING in 6 min 53 sec: http://ec2-23-20-64-9.compute-1.amazonaws.com:8080/job/juju%20tests/9/22:48
hazmatSpamapS, its libzookeeper as well22:48
SpamapSargh, no JIRA in launchpad still. Bummer.22:49
hazmatSpamapS, ah.. we could just mock it22:54
hazmatthat would work well22:55
_mup_Bug #929187 was filed: juju.control.tests.test_remove_unit.ControlRemoveUnitTest.test_zookeeper_logging_default is non-deterministic and should be removed <juju:In Progress> < https://launchpad.net/bugs/929187 >22:55
SpamapSmock the zookeeper calls?22:55
SpamapShazmat: you want to take that?22:56
SpamapShazmat: I know I could do it, but I'm not so good w/ recording stuff for mocker. :-P22:56
koolhead17so its juju add-unit  wordpress will add extra unit but juju add-unit wordpress --n=522:56
koolhead17add 5 units all toagther22:56
SpamapSkoolhead17: right22:56
hazmatSpamapS,  http://paste.ubuntu.com/834593/23:01
koolhead17Multiple charms can provide the same service and can be easily switched.   Does it mean charm like mysql and pgsql doing same23:01
hazmatbcsaller, jimbaker could you look over this trivial ^23:01
jimbakerhazmat, looking23:02
SpamapShazmat: oh snap :)23:02
SpamapShazmat: I constantly forget about replace. :)23:02
hazmatSpamapS, it still feels a little suspect, mocker matching is a little magic, it doesn't execute just once, nor just twice, but some schrodinger cat polystate23:03
hazmatjimbaker, thanks23:03
jimbakerhazmat, +1, the right approach given this nondeterminism23:04
SpamapShazmat: I'll give you a bug #, since I already started writing it up23:05
SpamapShazmat: err, actually its 92918723:05
SpamapSsaved already23:05
koolhead17SpamapS: yay!! am finally done!! :)23:27
niemeyerhazmat: ping23:36
niemeyerSpamapS: ping23:37
SpamapSniemeyer: a-ding-dong? :) pong23:38
niemeyerSpamapS: :-)23:42
niemeyerSpamapS: Was wondering about the boolean stuff23:42
niemeyerSpamapS: Do you know if it's made its life into juju yet?23:42
SpamapSniemeyer: looks like no, according to bug #88555123:45
_mup_Bug #885551: config.yaml should have boolean types <juju:In Progress by hazmat> < https://launchpad.net/bugs/885551 >23:45
niemeyerSpamapS: Cool, thanks23:45
niemeyerSpamapS: I've just run another import round in the repository23:45
SpamapSniemeyer: much cleaner I hope23:45
niemeyerSpamapS: A lot.. thanks for that23:46
niemeyerSpamapS: It still has the boolean stuff23:46
SpamapSniemeyer: mostly m_3's doing :)23:46
niemeyerSpamapS: and includes just a few new items related to symlinks23:46
niemeyer126 charms total23:46
niemeyerWell.. unique URLs23:46
SpamapSniemeyer: I was just polishing up an edit to charm proof that checks for non-relative symlinks23:46
SpamapSniemeyer: seems like eventually your code should supersede charm proof23:47
niemeyer22 issues only23:47
niemeyerSpamapS: I hope this becomes "juju publish"23:47
SpamapSthough perhaps there is value in having a second implementation of the known rules.23:47
niemeyerSpamapS: Yeah, I think there will always be room for a lint tool23:48
niemeyerSpamapS: Since you can recommend conventions there23:48
niemeyerSpamapS: The repository is black-or-white23:48

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