[00:38] when adding a relation to 2 services, events "joined" and "changed" are not synchronized between the 2 services. For instance my hooks execute in that order : [00:38] service1-relation-joined > service1-relation-changed > service2-relation-joined > service2-relation-changed, but what I was expecting would be to have both "joined" hooks completed before running "changed" hooks. [00:42] the issue here is that "joined" hooks execute 'relation-set' commands so we have missing entries in the relation list when running "service1-relation-changed" [00:42] I'll try to ask you guys this during the day ;) [00:43] Tug: this is covered in the docs here: https://juju.ubuntu.com/docs/authors-relations-in-depth.html [00:43] "In one specific kind of hook, this is easy to deal with. A relation-changed hook can always exit without error when the current remote unit is missing data, because the hook is guaranteed to be run again when that data changes -- and, assuming the remote unit is running a charm that agrees on how to implement the interface, the data will change and the hook will be run again." [00:44] so in your relation-changed hook, do a relation-get, and if the value is empty (not there), just exit 0, knowing that your hook will be run again when the data /is/ there [00:44] thx tvansteenburgh, yeah I skipped some parts of the docs [00:44] ;) [00:45] Tug: no worries [00:46] well I did that (actually the mongodb charm does that) but I think it fails [00:46] I mean it is not run again [00:47] O_o [00:48] the mongos/0 unit is in error state 'hook failed: "mongos-cfg-relation-changed"' [00:48] running resolved -r indeed works [00:48] Tug: yeah ok, if a hook fails all events are paused until the failure is resolved [00:49] do you know what caused the failure? [00:49] ok [00:49] yeah the relation-set [00:49] I mean get [00:49] mongos_relation_changed: relation data not ready. [00:49] mongos_relation_changed returns: False [00:50] ERROR juju.worker.uniter uniter.go:490 hook failed: exit status 1 [00:50] Tug: if you pastebin the code i can try to help [00:51] yep [00:51] but in general, don't use `relation-get` in a config-changed hook [00:52] b/c you can't be sure that the relation is established [00:52] only use it in relation hooks [00:54] http://bazaar.launchpad.net/~dekervit/charms/precise/mongodb/trunk/view/head:/hooks/hooks.py [00:55] http://bazaar.launchpad.net/~dekervit/charms/precise/mongodb/trunk/view/head:/hooks/hooks.py#L1329 [00:55] I did not change too much the original script [00:56] but what we see here is that configsvr_relation_joined() can happen after mongos_relation_changed() [00:56] thus causing relation_gets to return None [00:56] line 1337 (^^) [00:57] Tug: yep, that is a normal scenario [00:58] would a correct fix be to add a new line after 1338 that sets retVal = True ? [00:58] sarnold: yes [00:58] \o/ [00:58] nice :) [00:58] really ? [00:59] Tug: yep [00:59] I have to try ! [01:00] Tug: it's not an error for relation data to not be ready. if that it the case you must return True (exit 0) so that juju will continue processing events, and eventually run your hook again when it does have the data [01:02] (exit 1 you mean ?) [01:02] alright, I'm running the fix :) [01:04] Tug: no, exit 0 [01:04] :P [01:05] exit 0 = success, exit > 0 = fail [01:05] really ? I always type exit 1 with debug-hook to say it ended correctly [01:05] see lines 1660 - 1663 [01:05] ok I was wrong then, good to know :) [01:06] ah yes [01:06] Tug: glad to hear you've discovered the joy of debug-hooks though! [01:07] yeah thanks to lazyPow3r a few weeks ago [01:08] tvansteenburgh: how do i get root path system independently? i thought os.path.abspath() would return it... [01:08] btw, I just spent a few days improving the mongodb charm, it might help the community later ;) [01:08] but its including the CWD [01:08] which i do not want. [01:09] lazyPower: i don't understand what you want it to return [01:09] Tug: that's awesome! [01:09] tvansteenburgh: if i say os.path.join('foo','bar') using abs path, iw ant '/foo/bar' to be the return path. [01:10] lazyPower: yeah, you'd have to os.path.join('/', 'foo', 'bar') [01:10] that kind of defeats the idea of using os.path.join though... [01:10] there must be a better way, that's not portable [01:10] yeah [01:10] well do abspath on foo first [01:11] http://paste.ubuntu.com/7460299/ [01:11] nope.xls [01:11] thanks tvansteenburgh, sarnold it worked [01:11] i think abspath always returns from CWD [01:12] lazyPower: now that you're on review, I've got a charm that got a +1 from a charm-contributor and a non-reviewing charmer [01:12] Tug: great! [01:12] jose: offduty :P [01:12] i've been on duty when when not duty'ing [01:12] * lazyPower takes a vacation to work on other projects [01:12] Tug: nice :) [01:13] * jose flips table [01:13] bwahahahaha [01:13] * lazyPower dangles carrots in front of jose [01:13] * tvansteenburgh laughs and points [01:13] jose: which charm? i'll look at it tomorrow [01:13] i'm assuming seafile? [01:13] you got it right [01:13] i figured, i saw extra work in that one this week [01:13] looks like you've read your emails [01:13] butofcourse [01:14] half hour in the morning, half hour at the end of the day [01:14] lazyPower: i still don't get what you're trying to achieve. are you making a path to a dir that doesn't exist? [01:14] tvansteenburgh: yep [01:14] i want to make /vagrant/charms/precise [01:14] whcih will not exist by default [01:15] i mean, i could get cheap, and just make it on the host... but thats not a fair assumption to make. the script should drive all actions and make assertions. [01:15] sudo mkdir /vagrant [01:15] this is the equivalent of a nose test for testing the juju vagrant image. [01:15] http://stackoverflow.com/questions/12041525/a-system-independent-way-using-python-to-get-the-root-directory-drive-on-which-p [01:15] i guess that's the heart of what you want [01:15] tvansteenburgh: look at the second answer [01:15] :P [01:15] * lazyPower edited that like, 5 minutes ago [01:16] hey, nice [01:16] and its such a hack. you're finding the path to the interpreter, which may or may not be correct on windows. [01:16] what if vagrant mounts on C:\\ but the python interpreter is on d:\\ [01:16] your answer isn't a hack [01:16] its not solid though. i just want the root of the current filesystem. [01:17] thats the only safe assumption i'm willing to give with windows [01:17] i guess this works :| [01:17] * lazyPower resigns to using his own hack [01:17] a hack, using hacks, to produce hacky scripts [01:17] * lazyPower hackety hack hacks [01:18] tvansteenburgh: thanks though, appreciate the extra braincells @ the problem. [01:19] * tvansteenburgh was not much help [01:19] * tvansteenburgh wanders off to eat pie, waving as he goes [01:19] I thought on windwos you just shoved everything into C:\windows\system32\ and called it a day? :) [01:20] sarnold: duh [01:20] ;) [01:20] :) [01:20] only real lusers put stuff elsewhere [01:20] making it easy to remoev [01:20] or backup [01:20] hahaha [01:20] i mean, software is so great on that platform why wants to remove it?! [01:20] s/why/who/ [01:48] hey sarnold [01:48] evening lazyPower :) [01:48] http://askubuntu.com/questions/465544/what-is-the-reason-that-i-see-cron-session-opening-and-closing-every-hour-in-va <- this is a good question. Why DOES this happen? [01:49] lazyPower: heh that is a decent question :) [01:49] oh man, did i stump you? [01:50] heh, no, I'm just saying that for a beginner it'll be utterly impenetrable with no clue where to go for finding the answer :) [01:50] his or her guess is utterly adorable :) [01:50] dang [01:50] i keep hoping i'll find an area of grey knowledge and stump you, its become quite the fun game to play. [01:51] better know the day it happens i'm pooping the cork on the champagne. [01:51] s/pooping/popping [01:51] what a typo wow [01:51] context... it is everything. [01:51] haha, look closer to home -- I know nearly nothing about Go. I spent two hours just trying to figure out how to do cscope-like things in it that didn't involve "Step 1: install a Java Servlet Container" [01:51] lol [01:53] but, go isn't home here [01:54] i work with pretty much everything *but* go [01:54] well, I guess if you're just using the API of juju, it wouldn't be your regular stomping grounds either.. [01:54] until there's a go charm in the store. [01:54] hehe [01:54] then i'll be like "yo dawg" [01:54] "whats up with this go code?" [01:55] and I'll guess my way through it :) [01:56] the answer there isn't too bad, but if a better one isn't posted when I'm done with dinner, I'll write a -good- one :) hehe [01:56] looking forward to it === axw is now known as axw-lunch [04:02] mkdir: cannot create directory �/var/run/rabbitmq�: Permission denied [04:02] /usr/lib/rabbitmq/bin/rabbitmq-server: 80: /usr/lib/rabbitmq/bin/rabbitmq-server: cannot create /var/run/rabbitmq/pid: Directory nonexistent [04:03] bah, echannel [04:03] sorry [04:20] hey guys im testing out juju and maas. So far things are pretty awesome. I also have an aws cluster and i have set that up with a different name in my environments file. Do i need to run an instance of juju for each envionrment with juju bootstrap or is there a way that I can have one gui/juju server that will manage both providers? If you need one juju node per provider can it be colocated with maas? I found this http://askubuntu. [04:20] com/questions/181880/does-each-juju-environment-specified-require-its-own-master-node but im wondering if anything has changed at this point in juju's development. I think that it would be really nice to be able to join all my clouds with one orchestration tool. If its not there now is on the roadmap or am i missing something fundamental? === CyberJacob|Away is now known as CyberJacob === CyberJacob is now known as CyberJacob|Away === CyberJacob|Away is now known as CyberJacob === vladk|offline is now known as vladk === zer0 is now known as Guest93246 === vladk is now known as vladk|offline === vladk|offline is now known as vladk [11:33] Hi! I'm looking into Juju for service orchestration and the planned deployment of an OpenStack cloud (possibly in combination with Saltstack). Could anyone tell me how resource hungry Juju is? As in: How many servers can I realistically expect to steer from one master? And is there some infrastructure size you would consider a hard limit of Juju's capabilities? [11:36] Sorry for asking here, but I didn't find any information on these topics anywhere on the net (and I've been looking into service orchestration and configuration management for a few weeks now ;) ) === magicrob1tmonkey is now known as magicrobotmonkey [14:16] Is it possible to write amulet tests that interrogate the relation sentry for charms which are not yet in the charm store ? The reason I ask is that I'm getting a "request failed with: 404" and it seems to be trying to query https://manage.jujucharms.com/api/3/charm/... [14:29] gnuoy: you can specify a launchpad branch to deploy from. [14:29] are you using amulet 1.5? [14:29] I am [14:29] bueno, that *should* work. [14:29] branch: lp:~blah [14:30] if it doesn't let me know and i'll ping the parties working on amulet. [14:30] that behaviour should have been triaged in 1.4.x of amulet [14:30] lazyPower, thanks, I'll give it a whirl [14:43] Hey all i have asked this question last night be im guessing everyone was asleep. I have a physical infrastructure that im running with maas and a cloud in aws. I would like to manage both of these providers with one juju server. Im looked over all the questions concerning juju and maas on ask ubuntu and i found this http://askubuntu.com/questions/181880/does-each-juju-environment-specified-require-its-own-master-node which seems [14:43] to sugest that you need one juju machine per enviornment. Im wondering if that is still true or if what i want to do is possible using manual provisioning [14:46] i think my main concern is that juju isn't ha and i would like to keep my single point failure on aws [14:47] it has a higher uptime guarantee and more tools [14:47] that and the point of the physical hardware im deploying is to be cheap and expendable [14:49] cruisibesares: we don't have cross environment relationships yet. You can do it with the manual provider, but as the provider name implies, there's manual effort involved in it. [14:50] thanks [14:50] Its on the roadmap, but i don't have an ETA for X-environment implementation. So at best, you'll want to do 2 bootstrap nodes, one for your maas cluster one for aws, or go manual and do enlistment manually. [14:51] cruisibesares: sorry i don't have a better answer for you than 'its coming' :( [14:51] ok great thats really helpful i will consider both of those options thanks so much [14:51] no thats totally fine i get that there is a lot on the roadmap [14:52] Yep, features galore are coming in this iteration. I think we have it up for the iteration after this - but that's uncertain. It's still mid to high priority though. [14:52] are you on the mailing list? You'll get notices of what lands in teh changelog on the mailing list. [14:52] so now i will just have to gamble on which setup will have cleanest update path [14:53] no im not on the mailing list yet [14:53] thats on the main page for juju? [14:53] https://lists.ubuntu.com/mailman/listinfo/juju [14:54] you may want to ping the list with your question for other community members that have taken one route vs another - and get feedback. Kind of a straw poll to speak - and see if their experiences align with your goals. [14:54] I'm running a manual provider setup between Do and Softlayer that has been pretty solid. [14:54] but I'm a minority in that aspect. [14:55] and working with a true bootstrap node in the environment that does enlistment for me - is sorely missed. Its not *that* big of a deal to manually enlist but if i were scaling > 10 machines, i'd want this all to be automated for me. [14:55] great idea [14:55] Given that you're running with maas and aws - both of which have full providers, it would probably be best to go that route and put some glue around it. [14:56] depending on your scaling future :) [14:56] alright well its good to know people are doing it manually [14:56] alright cool i'll try and send something to the mailing list soon [14:56] thanks for your ideas and help [14:56] will give me something fun to play with while i wait :) [15:02] anytime [15:03] lazyPower, fwiw I've raised Bug#1319437 for the amulet issue [15:03] <_mup_> Bug #1319437: Amulet breaks when inspecting the relation-sentry regarding charms not in charmstore [15:04] thanks gnuoy! i'll poke the fellas and let them know [15:04] np, thanks for the help [15:07] gnuoy: from the creators mouth - it's doing the right thing, it assuems OH YOU'RE NOT A LOCALCHARM, LETS USE THE API HERP DERP [15:07] so you found a valid corner case, it'll get addressed soon. [15:07] lazyPower, it breaks in the same way if the charm is in a local directory rather than lp [15:08] gnuoy: should land in 1.5.1 [15:08] kk [15:14] yay, being quoted verbatium from another channel [15:34] hi, anyone around to help me with running juju locally? I'm running on trusty, but after an upgrade path from saucy [15:34] I can't get juju to create the machines with the local provider properly [15:34] keep getting: WARNING juju.worker.instanceupdater updater.go:231 cannot get instance info for instance "": no instances found [15:34] I had lxc already set up previously, so I assume this must be an issue with lxc (mis)configuration [15:34] wallyworld_: I'm a little confused.. is bug #1306537 fixed in 1.18.3 in the PPA? [15:35] <_mup_> Bug #1306537: LXC local provider fails to provision precise instances from a trusty host === ted is now known as tedg [15:51] sinzui: looks like apparmor is going to be a troublemaker this time around - https://bugs.launchpad.net/ubuntu/+source/apparmor/+bug/1296384 [15:51] <_mup_> Bug #1296384: LXC apparmor profile broken w/recent trusty update [15:54] lazyPower, looks like Ubuntu is still ignoring bug 1305280 [15:54] <_mup_> Bug #1305280: apparmor get_cgroup fails when creating lxc with juju local provider [15:55] pindonga: can you tell me what is your version of lxc + juju-core? [15:56] avoine, lxc==1.0.3-0ubuntu3 , juju-core==1.18.1-0ubuntu1 [15:57] pindonga: I wonder if your having bug #1306537 too [15:57] <_mup_> Bug #1306537: LXC local provider fails to provision precise instances from a trusty host [15:58] pindonga: what lxc-ls gives you? [15:59] exit 0 (no output) [16:02] cjohnston, it's possible, I'm trying to deploy a charm for testing with default-series: trusty, and it looks like something is happening (taking it's time though) [16:02] and it just failed with: (error: error executing "lxc-start": command get_cgroup failed [16:02] to receive response) [16:04] there's also bug #1317197 but I'm not sure that'd be it if your getting a cgroup issue [16:04] <_mup_> Bug #1317197: juju deployed services to lxc containers stuck in pending === jam2 is now known as jam1 [16:15] thx cjohnston the title looks promising, will take a deeper look after lunch [16:15] :-) [16:35] <_mup_> Bug #1319474 was filed: Juju uses hard-coded regions [16:36] lazyPower: I have an ansible question for you if you have a moment [16:38] <_mup_> Bug #1319475 was filed: Juju should support new signing format [16:49] jcastro: https://github.com/juju/docs/pull/97 mind having a look? [16:57] on it [16:57] don't know how I missed that, thanks! [17:02] cjohnston: shoot - sorry about the delay was away from my desk. [17:02] yw man ;) [17:02] lazyPower: np.. [17:03] sinzui: tyhicks in #ubuntu-server has confirmed the apparmor bug is duplicated by one that was supposed to be fixed in reprelease. [17:03] *prerelease [17:03] cjohnston: but fire when ready :) [17:03] lazyPower: I have http://paste.ubuntu.com/7463732/ ... however, it's failing that 'user' isn't found.. I added the when because it was failing for the same reason when I didn't have the when.. [17:04] I'm wondering if there is something else I should be doing, or maybe if I should add some sort of repeat type something? [17:04] It seems like I'm just not getting back the relation data quick enough for ansible [17:04] cjohnston: "'user' doesnt' seem like it would expand. Ansible playbooks expand jinja2 variable syntax as of 1.6 [17:04] so wouldn't it be {{user}} [17:05] they depreciated the older style of variable notation using $'s, and i think what you're seeing is related. but i'm not positive. [17:05] I tried that.. but I got an error.. let me try it again and see if I can figure the error [17:06] capture the error for me and i'll take a look. [17:06] ack [17:27] lazyPower: http://paste.ubuntu.com/7463825/ [17:29] cjohnston: looking, 1 sec [17:29] cjohnston: where's your line defining user? [17:29] there sh9ould be a register play in your playbook that defines the username. [17:29] or is it a config option on the charm? [17:31] lazyPower: AIUI charmhelpers automatically makes everything in the /etc/ansible/host_vars/localhost available.. is that not the case? [17:36] cjohnston: have you tried without all the quotes single and double? [17:38] avoine: based on http://docs.ansible.com/playbooks_conditionals.html#applying-when-to-roles-and-includes when: "'reticulating splines' in output" <-- is how I was operating [17:41] Is that not correct? [17:41] I think when you use a variable name instead of plain text you don't need the single quotes [17:42] "{{ user }} in current_relation" <-- is what I just tried that gave the traceback I pasted [17:43] cjohnston: thats correct [17:44] I would try: user in current_relation [17:45] lazyPower: which part are you saying is correct [17:45] Thjat the ansible helpers make all config values global keys in the playbook. [17:46] i didn't know if that was coming from a config value or from your play === vladk is now known as vladk|offline [18:21] cjohnston: thats strange that its undefined though... [18:21] i'm nto sure what to recommend here. [18:22] syntax looks fine [18:39] wwitzel3, ah-hah, I've found you after all. heh. Glad I didn't bike, would have been a wet ride [18:39] lazyPower: well.. avoine's suggestion didn't cause an error === CyberJacob is now known as CyberJacob|Away [18:48] balloons: o/ (Tim from lunch) [18:49] o/ === CyberJacob|Away is now known as CyberJacob === vladk|offline is now known as vladk [19:20] Trying to deploy using the "manual" environment via which my bootstrap node will be in an already existing "juju-server" machine. How do I change the port. I see bootstrap-host: however there is no "bootstrap-port:" and appending the port at the end of the hostname doesn't work. Any ideas? [19:20] onezero: it's not a good idea to bootstrap the same server twice [19:21] Why? [19:21] I'm using a docker container. [19:21] onezero: because, juju isn't designed to host more than one bootstrap on a single machine [19:21] you can deploy services to the bootstrap node, but a single node can't have more than one bootstrap running on it [19:23] onezero: I think there might be a communciation issue between bootstrapping and deploying [19:23] In my case a vm is entirely dedicated as a juju server and that's the only function it serves. It seems like a waste to create a whole new vm for each additional environment... [19:24] onezero: well, you can deploy services to that VM, but that one VM also controls any and all other VMS you wish to spin up in that environment [19:24] it's the orchestration service for that environment [19:25] So basically, if I want to orchestrate multiple environments... I need multiple actual servers. [19:25] One juju server per environment [19:26] onezero: you need atleast one server per environment [19:27] an environment can have 1+ severs which can have n+ charms deployed on to it (either using the whole machine or using containerization kvm, lxc, etc) [19:27] on to it, being on to any of the servers in the environment [19:28] with manual provider you can enlist an additional machine by running juju add-machine @ [19:28] which will make it available in that environment [19:32] I just wanted to keep the orchestration (ie juju bootstrapped node) separated from the actual servers that are being orchestrated. Basically I have a maas cluster which is my first environment for which I bootstrapped a single vm to serve only that singular purpose of juju orchestration. Next I have some servers NOT part of maas that I would like to manually deploy charms to... but in order to do that I created a new manual environment in my yaml config. I [19:34] onezero: yeah, so you want something like cross environment relations, which is on the roadmap but probably won't happen in the next few months [19:34] onezero: you can create a KVM or LXC on the maas bootstrap node [19:34] and use that as your manual provider bootstrap node [19:35] the main problem is there's not isolation, so juju-db will stomp all over itself [19:35] but if you put the bootstrap node in a container inside an existing bootstrap node, there's no real collison [19:42] marco... THANKS a bunch. Glad to get confirmation of that. [19:56] mbruzek: around? [19:56] Yes [19:57] hey, see PM [20:12] Ok folks, could use some help.. [20:12] This is a error I get when trying to view a juju status -e maas [20:13] ERROR state/api: websocket.Dial wss://tngek.maas:17070/: dial tcp: lookup tngek.maas: no such host [20:16] l1l: afaik that's because bootstrap hasn't finished [20:16] jose; The machine is already booted, and I can ssh into it. [20:17] l1l: bootstrap does some additional things as it needs some tools to be the master :) [20:17] did your 'juju bootstrap' finish? [20:19] Yes, it finished with no errors and the node booted up. However, when I try to check the juju status I get that error repeating [20:21] hmm, that's weird [20:21] maybe someone else would be able to help [20:22] I have googled till blue in the face and have found similiar bugs, but they see a "connection refused" instead of the "no such host". It's apparently related to DNS. [20:22] Thanks though! [20:22] np :) [20:31] l1l: add "nameserver " to the top of your /etc/resolv.conf temporarily === andreas__ is now known as ahasenack [20:32] there might be a way to tell your local resolver to only use that DNS for the .maas domain [20:35] dnsmasq has the --server option which seems to suit well, but I haven't used it [20:37] ahasenack; Adding that to the resolv.conf fixes it. So time to point the finger at maas-dns ? [20:37] l1l: no [20:38] l1l: maas is controlling that zone, so you need to use it for dns when talking to machines in that zone [20:38] it's as simple as that [20:38] now, that change you just made should be temporary, because that means all your other name resolution queries will go to maas, even the ones that have nothing to do with maas [20:38] like google.com, gmail, etc [20:39] Yea, wonder how I can make maas just use that zone. [20:39] see man dnsmasq, look for the -S option [20:40] and I think you can add a similar option to /etc/dnsmasq.conf, but I haven't tried [20:40] would be a way to tell your local resolver, assuming you are on ubuntu and using dnsmasq (the default), to only use the maas dns for resolving names in the .maas domain [20:40] that would be on your machine, where you are issuing juju commands, btw [20:41] the maas nodes are already using the right dns [20:41] odd, I dont have that dnsmasq.conf [20:43] I think ubuntu works with snippets in dnsmasq.d [20:43] there might be ubuntu specific documentation about this [20:43] I also see a /etc/dnsmasq.d-available/ [20:44] hmm, I don't see anything todo with dnsmasq in the /etc dir [20:47] I'm on trusty, if that makes a difference [20:47] oh, and on a desktop [20:47] $ dpkg -S /etc/dnsmasq.d [20:47] network-manager: /etc/dnsmasq.d [20:47] you might not have network-manager [20:51] does a server install not get the network-manager? === jeremydei_ is now known as jeremydei === vladk is now known as vladk|offline === CyberJacob is now known as CyberJacob|Away