[00:45] <themonk> marcoceppi, i wrote a charm localcharm/precise/mycharm i can deploy it in local now i want to deploy in AWS, I configure environments.yaml and make defaults : amazon now what will be my next command to deploy mycharm in AWS
[00:45] <hazmat> bootstrap
[00:46] <hazmat> themonk, there's also juju switch for  changing environments without modifying your environments.yaml
[00:46] <hazmat> without args it tells your current env.. -l to list all..
[00:46] <hazmat> themonk, and then juju deploy --repository=localcharm local:mycharm.. ie exactly the same as local provider
[00:47] <pk> hatch: thanks for getting back to me on askUbuntu. I'm having issues trying to debug the hooks
[00:48] <pk> the debug-hooks command doesn't seem to do what it's purported to do
[00:48] <themonk> hazmat, so i need to bootstrap again for amazon env then juju deploy --repository=localcharm local:mycharm
[00:48] <hazmat> themonk, yes
[00:48] <hazmat> pk, how so
[00:49] <hatch> pk sorry just running off for supper... hazmat  see http://askubuntu.com/questions/429541/why-are-my-juju-relation-hooks-not-running/429565
[00:50] <pk> hazmat: every command in the tumx session is followed by "The program 'relation-get' is currently not installed.  You can install it by typing: \n apt-get install juju"
[00:50] <pk> s/relation-get/<JUJU_COMMAND>/
[00:52] <hazmat> pk, you have to wait till a hook actually runs
[00:52] <hazmat> pk, it will open up in a new window in tmux
[00:52] <hazmat> pk, window 0 in tmux of a debug-hooks session is not actually a hook context/environment
[00:53] <hazmat> pk, for example.. after doing juju debug-hooks in one terminal.. in a separate terminal do juju set myservice someconfig=value
[00:53] <hazmat> and you'll see a config-changed window open in the tmux session of the first terminal
[00:53] <hazmat> there you can do config-get / relation-get etc
[00:54] <pk> oooooooh, thanks. I'll give that a shot
[01:10] <hazmat> pk, the hook needs to be an executable
[01:10] <hazmat> pk, chmod +x and your missing a shebang line at the top ..
[01:10] <hazmat> pk, like #!/bin/bash
[01:10] <hazmat> pk, re looking at https://github.com/peterklipfel/firesuit/blob/master/charms/flask_charm/hooks/amqp-relation-changed
[01:21] <pk> yeah, I had changed the hook to executable, but haven't pushed. I suspect the shebang might be it
[01:29] <hatch> back.... pk hazmat got you all going?
[01:32] <pk> hatch, I understand things a bit better, but I still have nothing working
[01:32] <pk> I just got done testing the adding of the shebangs
[01:32] <hatch> pk so when you make the relation you get the debug-hook instance up?
[01:34] <hatch> basically I wan to make sure that the hook is actually getting fired when you make the relation
[01:37] <pk> it seems like the hook is not firing. When I add the relation, I get no new windows in the tmux session, and the log output doesn't contain what I would expect
[01:40] <pk> and the side effects aren't happening (touch /var/i_was_here)
[01:41] <hatch> hmm this is very odd
[01:43] <hatch> pk when you run a juju status after the add relation does it show the relation?
[01:43] <hazmat> pk, also when your developing you have to deploy with -u or you get cached versions
[01:44] <pk> yes, here's the full output http://pastebin.com/T8YBGdQu
[01:44] <hazmat> you sanity check your charm from the tmux window 0 if your in debug-hooks already
[01:44] <hazmat> pk, also you can turn up the default logging level
[01:45] <hazmat> pk, juju set-env logging-config="<root>=DEBUG"
[01:48] <pk> hazmat, is there an INFO level?
[01:50] <hazmat> pk, yes
[01:51] <pk> aha! at the end of my flask log, I'm getting permission denied
[01:51] <pk> see if that takes me anywhere
[02:05] <pk> hazmat, the permission denied error is coming from the destroy-relation command. I have no hook for amqp-relation-departed or amqp-relation-broken, so I don't know if the permission denied is meaningful
[02:18] <hazmat> pk, huh.. you don't use the client cli from charms.. there's a separate hook cli
[02:20] <pk> hazmat, I don't think I understand. Are you talking about the 'relation-get' commands in the charms?
[02:30] <hazmat> pk, no.. i'm just not clear where you getting the juju destroy-relation getting permission denied errors.. and seeing that in flask log
[02:32] <pk> hazmat, when I run juju destroy-relation flask rabbitmq, the flask log (~/.juju/local/log/...) displays "2014-03-05 02:04:12 ERROR juju.worker.uniter.filter filter.go:117 permission denied"
[02:41] <Xiaoqian> shang: ping
[02:41] <hazmat> pk, aha
[02:41] <hazmat> pk, when its executing a hook?
[02:42] <hazmat> interesting no hook
[02:44] <pk> hazmat, right. I wasn't sure whether it was a meaningful error because there's nothing for it to be executing
[02:55] <pk> nazmat, as an extra data point, I got the same error on the rabbitmq side when I added and destroyed the relation while the services were still pending
[02:56] <davecheney> pk: can you post more of the log from the unit agent ?
[03:15] <pk> davecheney, all I get after the relation joining is the following output from the flask log
[03:15] <pk> 2014-03-05 03:12:23 DEBUG juju.worker.uniter.filter filter.go:314 got unit change
[03:15] <pk> 2014-03-05 03:14:58 DEBUG juju.worker.uniter.filter filter.go:322 got service change
[03:15] <pk> 2014-03-05 03:14:58 DEBUG juju.worker.uniter.filter filter.go:523 no new charm event
[03:15] <pk> 2014-03-05 03:14:58 DEBUG juju.worker.uniter.filter filter.go:338 got relations change
[03:17] <davecheney> pk: is that the wholelog
[03:18] <davecheney> it looks like parts are missing
[03:20] <pk> davecheney, that is all the output after the relation-add command. The full log is here http://pastebin.com/yugfcNYc
[03:21]  * davecheney looks
[03:23] <davecheney> pk i can't see the original error in that log
[03:25] <pk> davecheney, right, so the error is present when I do the relation-destroy. I get
[03:25] <pk> 2014-03-05 03:25:08 DEBUG juju.worker.uniter.filter filter.go:338 got relations change
[03:25] <pk> 2014-03-05 03:25:13 DEBUG juju.worker.uniter.filter filter.go:322 got service change
[03:25] <pk> 2014-03-05 03:25:13 DEBUG juju.worker.uniter.filter filter.go:523 no new charm event
[03:25] <pk> 2014-03-05 03:25:13 DEBUG juju.worker.uniter.filter filter.go:338 got relations change
[03:25] <pk> 2014-03-05 03:25:13 ERROR juju.worker.uniter.filter filter.go:117 permission denied
[03:25] <pk> and that's it
[03:28] <davecheney> pk: this sholnd't be required, but are all your hooks executable ?
[03:28] <davecheney> ie, chmod +x ?
[03:31] <pk> davecheney, this was happening when there was no hook
[03:31] <Lord_Set2> Where can I find a list of the trusty charms?
[03:32] <pk> so my question was primarily whether or not it was helpful to my ultimate question of why my hooks aren't running
[03:33]  * davecheney looks at the source
[03:57] <davecheney> pk: still looking for where the permission deines are coming from
[03:57] <davecheney> is your charm online somewhere ?
[04:02] <pk> the charms I'm using are at https://github.com/peterklipfel/firesuit/tree/master/charms
[04:06] <davecheney> pk: thanks
[04:07] <davecheney> you should remove those dummy relation-name-* hooks
[04:08] <davecheney> and all the other dummy hooks
[04:11] <pk> davecheney, ok. Do you think those are causing the other deploy hooks to not run?
[04:11] <pk> s/deploy/relation/
[04:14] <davecheney> pk: it shouldn't
[04:14] <davecheney> but we are talkinga bout bugs here
[04:14] <davecheney> so they will just cloud the issue
[04:14] <davecheney> remove any hooks you don't need
[04:14] <davecheney> any any that charm create added for you
[04:17] <pk> davecheney, totally. I'm waiting on the environment to be up and running, but I'm testing now
[04:26] <pk> davecheney, I got rid of all the dummy scripts, and redeployed and added the relation. As far as I can tell, the hooks didn't run
[04:28] <davecheney> pk: ok
[04:28] <davecheney> so is there still an issue
[04:28] <davecheney> i'm a bit confused
[04:29] <pk> davecheney, ok. The issue originally was that my hooks aren't running, and I don't know why. Juju status shows that the relation was joined, but none of my hooks seem to be running. I'm not seeing any output, and when I ssh into the lxc's, I'm not seeing the files that I put there (as a dummy side effect for testing)
[04:30] <davecheney> pk: can you get the unit log for that unit
[04:30] <davecheney> there will be lots of likes 'HOOK: ...'
[04:30] <davecheney> that is the output of the hook
[04:30] <davecheney> i see in your code you call a few other commands that will be outputting
[04:30] <pk> the log that I posted before is that unit log
[04:31] <pk> (http://pastebin.com/yugfcNYc)
[04:31] <pk> There is no debug output that I would expect from my hooks
[04:32] <pk> so I put the `touch /var/i_was_here` in the hook to see if maybe there was an issue with the logging. But when I ssh in, and check /var, the file isn't there
[04:39] <pk> davecheney, I'll be back shortly, I have to switch venues
[04:42] <davecheney> kk
[04:42] <davecheney> pk: protip
[04:42] <davecheney> set -xe in all hook scripts
[04:42] <davecheney> then you get output
[05:04] <pk> davecheney, are you still around?
[05:10] <davecheney> pk: just
[05:19] <pk> davecheney, ok, I'll go work on it and hopefully be back with better, more relevant questions later
[05:19] <pk> thanks for your patience
[07:57] <maxcan> http://www.rapp.org/archives/2014/03/passengers/
[07:57] <maxcan> oops, wrong window.  apologies
[11:12] <prathamesh875> hi
[11:13] <prathamesh875> i wrote a charm in which i need to put some fines in the hooks/ directory
[11:13] <prathamesh875> and use those files
[11:13] <prathamesh875> but when deploying the charm it says it cannot find the file
[11:14] <prathamesh875>  HOOK cat: queries.sql: No such file or directory
[11:14] <prathamesh875> in my install hook i have executed the command
[11:14] <prathamesh875> cat queries.sql | mysql -u root -pPa55w0rd
[11:14] <prathamesh875> but its not able to find this file
[11:15] <prathamesh875> i have also tried chmod +x queries.sql
[11:15] <prathamesh875> can someone help me please
[11:16] <bloodearnest> prathamesh875: heya - hooks run from the charm root directory - not from the hooks directory
[11:16] <prathamesh875> ooh
[11:16] <bloodearnest> prathamesh875: so cat hools/queries.sql | mysql ...
[11:16] <prathamesh875> so i need to put that file in my charms directory?
[11:17] <prathamesh875> i had also tried that
[11:17] <prathamesh875> still it says no such file
[11:17] <bloodearnest> prathamesh875: it needs to be in the root or a sub dir of the charm yes
[11:17] <bloodearnest> prathamesh875: the usual conventions is to have a files/ directory
[11:18] <bloodearnest> prathamesh875: and then from a hook you can do "cat $CHARM_DIR/files/myfile" or whatever
[11:20] <prathamesh875> ok thanks bloodearnest
[11:20] <prathamesh875> will try that
[11:22] <bloodearnest> prathamesh875: to debug, you can also juju ssh <name>/0 and examine the files in /var/lib/juju/agents/unit-<name>-0/charm to si if the file is actually present on the unit
[11:22] <bloodearnest> s/si/see
[11:25] <prathamesh875> ohh
[11:25] <prathamesh875> thanks
[11:25] <prathamesh875> http://paste.openstack.org/show/72552/
[11:26] <prathamesh875> i had this in the unit
[11:26] <prathamesh875> but queries.sql was not in executable
[11:26] <prathamesh875> somehow permissions not got pushed
[11:27] <prathamesh875> http://paste.openstack.org/show/72555/
[11:27] <prathamesh875> now  i have this
[11:28] <prathamesh875> cat $CHARM_DIR/files/queries.sql | mysql -u root -pPa55w0rd
[11:28] <prathamesh875> and i have this in my install hook
[11:28] <prathamesh875> will deploy this again
[12:12] <snazy2000> Wonder if anyone can help me, im trying to install juju on windows but keep getting "This app cannot run your pc" i am using windows 8 x64 am i doing something wrong? :)
[12:15] <marcoceppi> snazy2000: not sure, doesn't sound like you are
[12:16] <snazy2000> hmm ive tried to install it on two pc's and says same thing
[12:16] <marcoceppi> snazy2000: you may want to run the install in compatibility mode for Windows 7
[12:17] <snazy2000> tried that, wont even let it get to admin mode
[12:18] <marcoceppi> snazy2000: huh, I've not heard of people having issues before :\
[12:20] <marcoceppi> snazy2000: I don't have a Windows 8 machine, only Vista, so I can't really even help replicate
[12:25] <marcoceppi> snazy2000: if it's still giving you grief, we have a Vagrant box you can use to try Juju out
[12:26] <snazy2000> Last thing im going to do it make sure file has downloaded correctly
[12:35] <snazy2000> are you running 32bit or 64?
[12:46] <marcoceppi> snazy2000: I've got a 64bit machine iirc
[12:46] <marcoceppi> snazy2000: It's an older laptop that I keep around in case I need to test things on Windows
[12:47] <snazy2000> ok thanks.
[12:52] <marcoceppi> snazy2000: I can certainly try, but it's Vista
[14:52] <mbruzek> When I run juju bootstrap -e local  I see:  ERROR cannot use 37017 as state port, already in use.
[14:53] <marcoceppi> mbruzek: check for upstart jobs
[14:53] <marcoceppi> mbruzek: sudo initctl list | grep juju
[14:54] <mbruzek> I see 2 upstart jobs running.  I know how to stop them with the kill command, is there a "better" way to stop them?
[14:56] <marcoceppi> mbruzek: sudo stop <job>
[14:57] <marcoceppi> mbruzek: then you'll want to rm -f /etc/init/juju-*
[14:57] <marcoceppi> then try bootstrapping again
[14:57] <mbruzek> Thanks marcoceppi, I ran sudo initctl stop juju-db-mbruzek-local
[14:57] <mbruzek> That seemed to do the trick.  I will re-run my clean script (which deletes that stufF)
[15:39] <bloodearnest> jcastro: so juju talk went well last night, thanks for you help
[15:39] <jcastro> nice, did you try the hadoop demo?
[15:46] <bloodearnest> jcastro: I tried it locally but didn't get it working, so I decided not to in the end
[15:46] <bloodearnest> but people seemed impressed with jujucharms.com despite it's fakery
[15:48] <bloodearnest> jcastro: interesting contact - the new UK+RoI AWS evangelist was there (he's local), he was nodding sagely throughout the talk, and we had a good chat after about CloudFormation, and our plans for SaaS support via virtual/proxy charms
[15:49] <bloodearnest> he twitched a bit at the "Democratization of the Cloud" slide :D
[16:01] <mbruzek> jcastro, I know "set -e" is recommended for Bash scripts, but I can't find it on the authors-charm-best-practice.html page.
[16:01] <jcastro> I don't think we have that written down
[16:01] <jcastro> add it perhaps?
[16:01] <mbruzek> jcastro, Is that recommendation located elsewhere?  A google search only turns it up on our getting started.
[16:01] <jcastro> I think it's only in marco's brain
[16:01] <mbruzek> jcastro, Yeah I will add that to my list.
[16:02] <mbruzek> Thanks jcastro
[16:03] <marcoceppi> mbruzek: unless the author is checking $? of every command, it's pretty much a requirement for bash charms
[16:03] <mbruzek> marcoceppi, I know
[16:03] <marcoceppi> just not really documented anywhere
[16:03] <mbruzek> marcoceppi, I was just checking for documentation to point him to
[16:03] <mbruzek> I found the document that I will update after the review.
[16:03] <marcoceppi> cool
[16:14] <evilnickveitch> mbruzek, marcoceppi, jcastro, set -e is used and explained in authors-charm-writing.html page (the walkthrough one)
[16:15] <mbruzek> evilnickveitch, I saw that, but I think it should be a recommendation in best practices.
[16:16] <mbruzek> there is a Bash section and everything.
[16:16] <mbruzek> That mention is hidden, I had to do a google search to find it.
[16:16] <mbruzek> searching our docs for "set -e" did not turn the page up.
[16:17] <mbruzek> on the juju.ubuntu.com search, I mean.
[16:17] <evilnickveitch> mbruzek, cool, I think that page is more a style/process guide, but if you think it should be there, be my guest and add it
[16:18] <jcastro> hey marcoceppi, I need to do this community weekly videocast thing; what's the TLDR on amulet and testing in general?
[16:18] <evilnickveitch> there is an open bug about search not working
[16:18] <mbruzek> I want to learn the new documentation process.
[16:18] <mbruzek> And I do think it should be in our best practices document as a great idea
[16:18] <marcoceppi> jcastro: automated testing is in it's finaly stages, amulet had a big release which introduced post-deployment commands and bug fixes
[16:20] <jcastro> mbruzek, I wrote down the new doc process in this readme: https://github.com/juju/docs
[16:20] <mbruzek> jcastro, after this review is done I am all over that
[17:05] <mbruzek> jcastro, When following the juju-docs process I encountered a problem
[17:05] <jcastro> oh?
[17:06] <mbruzek> I searched github for juju-docs
[17:06] <jcastro> it's juju/docs
[17:06] <mbruzek> I found juju/docs and when I forked it the command to clone juju-docs did not work
[17:06] <mbruzek> I will fix this in the README then.
[17:07] <jcastro> Oh I see what you mean
[17:08] <jcastro> actually, when you fork it you can call it whatever you want
[17:08] <jcastro> but you're right, it makes sense to match it
[17:11]  * mbruzek is fixing that now
[17:15] <mbruzek> jcastro, the clone uri was not correct
[17:16] <jcastro> huh
[17:16] <jcastro> how did I mess that up?
[17:16] <mbruzek> git clone git@github.com:{yourusername}/juju-docs.git
[17:16] <mbruzek> It looks correct in other places, except that one
[17:16] <mbruzek> I will fix it in my commit
[17:16] <jcastro> hey also
[17:17] <jcastro> one thing I try to avoid is the inline editing in github
[17:17] <jcastro> that way it forces me to learn the workflow
[17:17] <mbruzek> inline editing?  Like from github.com's web site?
[17:17] <jcastro> I still have to reference the README everytime I want to fix something, but I am getting better at it
[17:18] <jcastro> yeah, you can just click on a file and do "edit" and fix it, then hit a button and it will PR it.
[17:18] <mbruzek> OK yeah I want to learn git too so I am following your READMe
[17:18] <jcastro> right, better in the longrun
[20:38] <jamespage> hazmat, around? I'm looking at a race in deployer which is killing our automated testing
[20:39] <jamespage> and I know time.sleep(20) is probably not the fix :-)
[21:00] <jcastro> marcoceppi, dylan's use case to try an older revision worked
[21:00] <jcastro> http://askubuntu.com/questions/430029/how-do-i-deploy-a-specific-revision-of-a-charm/
[21:00] <jcastro> so I wrote it down
[21:01] <jamespage> hey jcastro
[21:01] <marcoceppi> yay
[21:01] <jcastro> hey jamespage
[21:03] <rick_h_> jcastro: sweet answer
[21:05] <jcastro> personally I think it's silly to have 2 totally separate revisions of something, but whatever. :p
[21:07] <rick_h_> meh, every code thing has it. apache  2.4.7 isn't where you go get the changelog for that. It's in the vcs revisions before it
[21:25] <jcastro> jamespage, where you waiting to ask me something? or just saying hello?
[21:25] <jamespage> just saying hello
[22:01] <hazmat> jamespage, around now
[22:01] <jamespage> hazmat, right
[22:02] <jamespage> hazmat, we're using deployer in the OpenStack lab to bootstrap and deploy test environments
[22:02] <jamespage> hazmat, seeing two things
[22:02] <jamespage> 1) dns-name not appearing straight away in status
[22:03] <jamespage> 2) the websocket connection to the environment after bootstrap failing
[22:03] <jamespage> guessing its not quite ready
[22:05] <hazmat> jamespage, will you be around for 30m
[22:05] <jamespage> hazmat, most likely in bed by then
[22:05] <jamespage> but it can wait
[22:06] <jamespage> I'm working around it with hacking loops and sleeps right now
[22:07] <hazmat> jamespage, are you bootstrapping with deployer? or separately?
[22:07] <jamespage> hazmat, with deployer
[22:08] <hazmat> jamespage, ok meeting done..
[22:09]  * hazmat src dives
[22:11] <hazmat> jamespage, that's strange since the entire cli should be running through the api now... and we use the cli
[22:11] <hazmat> jamespage, do you have a traceback on the timeout?
[22:11] <jamespage> hazmat, yeah one sec
[22:12] <hazmat> er.. use the cli to determine the api endpoint
[22:12] <jamespage> hazmat, http://paste.ubuntu.com/7040964/
[22:12] <hazmat> jamespage, i can add some sort  of loop around connecting to the env..  is sleep 20 working reliably for you?
[22:12] <jamespage> the codebase uses deployer internals directly - we might be doing something wrong
[22:13] <jamespage> hazmat, yeah - 20 secs seems to work OK
[22:13] <hazmat> jamespage, except in the traceback you sent ;-)
[22:15] <hazmat> jamespage, re use directly.. yeah.. that might account for it. depends on how your constructing env
[22:16] <jamespage> hazmat, that was pre-hack
[22:16] <hazmat> jamespage, if the  api endpoint url isn't in the env.. deployer calls out to the cli, which blocks
[22:16] <hazmat> till the api endpoint is ready.. and then deployer uses the api endpoint it calculates from that.
[22:16] <hazmat> er.. from that cli output
[22:17] <hazmat> jamespage, there's a sleep(20) in the traceback
[22:17] <jamespage> hazmat, lp:openstack-ubuntu-testing
[22:22] <hazmat> jamespage, yeah.. that usage should be fine
[22:23] <hazmat> jamespage, easy fix though.. there's already a loop around connect that's catching timeout errors, i'll add in conn refused
[22:24] <jamespage> great
[22:52] <maxcan> is rackspace openstack still unsupported?
[23:16] <hazmat> maxcan, yes.. unless you use it with the manual/null provider (ie you do provisioning and point juju to the machine via ssh)