/srv/irclogs.ubuntu.com/2015/03/02/#juju.txt

halcyonlazyPower: hye! are u available?02:37
halcyonlazyPower: I did follow this tutorial but I failed to restart my networking service02:37
halcyonlazyPower: then I reboot, and affect to show my juju status02:39
halcyonhye, does anyone can help me , what should I do if my juju status mentioned agent-state-info : container failed to start?03:45
halcyon hye, does anyone can help me , what should I do if my juju status mentioned agent-state-info : container failed to start? I'm install juju using lxc in local provider03:50
lazyPowerhalcyon: this is more than likely related to reconfiguring your LXC bridge according to that post. As i mentioned - its tricky04:15
lazyPowerand failure is difficult to debug when that happens04:15
lazyPowerhalcyon: how much linux networking do you know?04:15
lazyPoweror rather, how confident are you in the event of catastrophic failure that you could reconfigure it into a working condition :)04:16
halcyonlazyPower: just a beginner :)04:18
halcyonlazyPower:  could u advice me on what should I do?04:19
lazyPowerhalcyon: Revert back to the LXCBR0 bridge, and revert the networking + subnet back to the 10.0.3.0/24 cidr05:48
lazyPowerhalcyon: i'm coming in and out of sleep - so if you're around in EST morning hours i can help. but for now i gotta get some sleep. have a good evening o/05:49
Muntanergood morning o/08:33
MuntanerI'm having problem with my first charm08:35
Muntaner1 - when I do a juju-log in the bash code of the charm, where can I actually find those logs?08:37
Muntanerbecause I have a "hook failed: install" but can't figure why08:37
Muntanermaybe I'm not using well the "set -e" thing...08:41
dimiternMuntaner, in the unit log08:42
dimiternMuntaner, e.g. if you have unit wordpress/2 on machine 4, juju ssh 4, sudo less /var/log/juju/unit-wordpress-2.log08:43
Muntanerdimitern, figured it08:43
Muntanerseems like I had an error caused by a "mysql restart", and I didn't have mysql on that machine08:43
Muntaner(dumb errors :) )08:43
dimiternMuntaner, yeah - hooks need to be idempotent - calling them multiple times shouldn't be a problem08:44
Muntanerdimitern, nice! it works :)08:46
Muntanernow, I need to connect the mysql charm to my charm08:46
Muntanercan you tell me how to do that? no ideas, right now08:46
dimiternMuntaner, you'll need to specify in your charm metadata that you require a db relation like wordpress does for example08:48
dimiternMuntaner, then you can add-relation yourcharm mysql08:48
dimiternMuntaner, and ofc the relevant relation hooks need to be in place (db-relation-changed, etc.)08:49
Muntanerdimitern, maybe I'm getting it to work :D08:54
dimiternMuntaner, cool :)08:54
Muntanerdimitern, I need to tell to my charm the IP of the mysql charm... can I do that?08:54
dimiternMuntaner, check out https://jujucharms.com/docs/authors-charm-interfaces08:57
dimiternMuntaner, and this https://jujucharms.com/docs/interface-mysql08:58
Muntanerdimitern, ty!08:58
MmikeHello, guys. I have a working juju environment, inside OpenStack. I have my bootstrap node and various other nodes with services happily running. I just managed to destroy my ~/.juju directory, along with the .jenv file that's tied to my environment.09:12
MmikeIs there a way to extract those info, somehow, from the bootstrap node?09:13
Muntanerdimitern, seems like I'm having problems in running the "db-relation-x" hooks09:22
Muntanerlogs aren't helping me09:23
dimiterndimitern, sorry I'm in a meeting perhaps lazyPower or some of the charmers can help you?09:28
Muntanerdimitern, no problem!09:31
=== scuttlemonkey is now known as scuttle|afk
Muntanerdimitern, my charm 0.1 is ready10:07
dimiternMuntaner, awesome! does it work with mysql?10:08
Muntanerdimitern, yep!10:08
Muntanerprestashop 0.1 ready ;D10:08
MuntanerI should implement other hooks now10:09
dimiternMuntaner, sweet!10:09
Muntanerdimitern, how can I provide to the guy that deploys via juju-gui or CLI some informations about the default log-in, the default link to reach to see the web service, etc. ?10:11
dimiternMuntaner, I guess in the readme file for the charm10:12
Muntanerdimitern, can't access to readmes via the gui - seems like it loads forever, strange10:24
dimiternfrankban, hey, perhaps you can help ^^10:27
frankbanMuntaner: so you are not able to see the readme files from the GUI? for all the charms?10:30
Muntaneryep frankban, first time that this happens10:30
MuntanerI see "Loading..." and the spinning forever10:30
frankbanMuntaner: ok I am trying to dupe10:31
Muntanerfrankban, tell me if you need anything (logs, background)10:32
frankbanMuntaner: sure thank you10:32
Muntanerfrankban, I am logged in the same juju-gui endpoint with two laptops, if this may help10:33
Muntanersame thing happens with only 1 guy logged, just tried10:33
bloodearneston 1.20.14, on openstack provider, is there a way for me to get hold of the private ip address of a unit that has been assigned a floating ip?10:35
bloodearnestjuju status just shows the public ip, not private10:35
Muntanerfrankban, another little issue: I can see the icon of my charm in the canvas, but on the left side I see its default icon10:38
frankbanMuntaner: I just deployed the GUI on a ocal env using quickstart, and when I click charms on the left I can see their readme, configuration, etc without problems10:39
Muntanerfrankban, maybe I caused this error someway10:40
frankbanMuntaner: could you please file a bug describing the steps to dupe the error?10:40
Muntanerfrankban, I just created my personal charm, changed his icon,  deployed it via CLI10:43
frankbanMuntaner: deployed as a local charm?10:45
Muntanerfrankban, I have an OpenStack private installation, all-in-one. The charm is a prestashop deployer - deployed it via CLI in the same LAN of the OpenStack server10:45
frankbanMuntaner: what command did you use to deploy the charm?10:46
Muntanerfrankban, juju deploy --repository=/home/mike/charms local:trusty/prestashop --debug10:46
frankbanMuntaner: ok so this is a local charm deployment10:47
frankbanMuntaner: how do you use the GUI to try to read the readme?10:47
Muntanerfrankban, I click on the charm on the canvas, then I click on the link on the left tab (for example: cs:trusty/mysql-22), and then it opens a tab that loads forever10:49
Muntanerif you need screenshots, can up them10:49
frankbanMuntaner: no thanks, now trying to dupe what you described10:50
frankbanMuntaner: ok I deployed a local charm and now I see the readme error10:55
Muntanergreat frankban!10:56
frankbanMuntaner: oh... after refreshing the GUI, I can now see the readme of the local charm, could you try it?10:57
Muntanerfrankban, F5ed a couple of times - no changes10:59
frankbanMuntaner: any JS console errors?11:00
frankbanMuntaner: oh I think I know why, I guess your charm is not in the charm stor eyet, correct?11:01
Muntanerno frankban, it justs exists in my laptop folder11:01
frankbanMuntaner: ok11:02
=== Murali_ is now known as Murali
Muntanerfrankban, btw I can't read the readme of any charm (juju-gui, mysql)11:16
frankbanMuntaner: even after refreshing?11:16
Muntanerfrankban, yes11:16
frankbanMuntaner: could you please try to refresh removing the URL path? so just the home of the GUI11:17
frankbanMuntaner: anyway, I filed https://bugs.launchpad.net/juju-gui/+bug/1427162 , please feel free to add there any additional information you have. and thanks for reporting this issue!11:19
mupBug #1427162: Local charms icon and readme <juju-gui:Triaged> <https://launchpad.net/bugs/1427162>11:19
=== Murali_ is now known as Murali
jamespagegnuoy, can you do me a quick review of https://code.launchpad.net/~james-page/charm-helpers/bug-1413862/+merge/25142611:54
gnuoysure11:55
gnuoyjamespage, approved11:57
jamespagegnuoy, ta11:57
=== Murali_ is now known as Murali
=== scuttle|afk is now known as scuttlemonkey
jcastrohey guys14:25
jcastrohttp://askubuntu.com/questions/590715/how-can-i-find-power-pc-specific-charms14:25
jcastrowe don't have this do we?14:25
hazmatjcastro: nope.. tags might help for the short term15:25
rick_h_jcastro: yea, there was talk of adding a metadata.yaml entry for that but nothing was firmed up and planned that I'm aware of.15:28
jcastrorick_h_, I was thinking though, if we see which charms fail on ppc64le we could have a general idea?15:29
rick_h_jcastro: maybe, I need to catch up on where/how good charm testing is to be a good indicator of something like this15:31
jcastrorick_h_, want me to answer it to that effect?15:36
jcastrohey tvansteenburgh ^^^15:37
tvansteenburghjcastro: we're not testing on ppc64le yet15:39
tvansteenburghnot in CI anyway15:39
jcastroack15:39
jcastrohttp://askubuntu.com/questions/590715/how-can-i-find-power-pc-specific-charms/591878#59187815:49
jcastroHow's this guys?15:49
jcastrombruzek, looks like that guy's jruby fixes for ppc64le are in upstream now15:50
mbruzekjcastro that is great15:50
Muntanerhey guys15:52
Muntanerjust a quick question15:52
Muntanerhow can I get in a juju hook15:52
Muntanerfor example, install or db-relation joined15:52
jcastrowhat do you mean by in a juju hook15:52
mbruzek"get in"?15:52
Muntanerthe floating IP assigned to the VM that is running this charm?15:52
Muntanersorry, bad english ^^"15:52
jcastrohttps://jujucharms.com/docs/authors-hook-debug15:53
jcastrook so this shows you how to go into a unit and debug a hook15:53
jcastroI assume your install hook failed and you want to see why?15:53
mbruzekMuntaner: the public-address and private-address is always available to a hook, likewise those values are available on relation hooks for the other charms.15:53
Muntanerno jcastro, I am running a command line installation into the install hook. I need to specify the local ip of the VM as a parameter of the installation15:54
jcastrooh yes, then what mbruzek said, let me find the doc snippet for those15:55
mbruzekMuntaner: if you want the private address for the system you are installing use 'unit-get private-address'15:55
mbruzekMuntaner: https://jujucharms.com/docs/authors-hook-environment15:56
Muntanermbruzek, thanks, lemme try15:57
mbruzekMuntaner: if you need the address of a related charm, say in the db-relation-changed hook, use `relation-get private-address`15:57
jcastroevilnickveitch, hey since we're ditching the charm feature rating bits, can I go ahead and snip out that page and submit a PR?15:58
evilnickveitchjcastro, if we are doing that then sure15:58
jcastrook confirmed we are, working it now16:00
Muntanermbruzek, echos tell me that it's working, thanks :)16:13
mbruzekMuntaner: you are most welcome16:13
Muntanermbruzek,16:20
Muntanernow I'm having a very strange issue16:20
Muntanerseems like the commands relation-get database return nothing16:23
Muntanerand they always worked16:23
mbruzekMuntaner:  Yes I have run into that before.  Sometimes the hook is fired before all the data is available.  Many database relation hooks exit 0 (silently) until the database'16:24
mbruzekkey is in the relation-get16:24
mbruzekMuntaner: which is the reason all hooks must be idempotent they could be called several times.  An operation like building a database takes a little bit of time, so it is possible to have the relation fired before it is done.16:25
Muntanermbruzek, the strange thing is that if I put the unit-get etc I have the problem16:26
Muntanerif I comment it, the problem isn't present anymore16:26
mbruzekMuntaner: Check out the following code I wrote: https://api.jujucharms.com/v4/precise/openmrs-1/archive/hooks/database-relation-changed16:29
mbruzekI followed the database-relation-changed pattern.  Get all the database values and in `relation-get database` did not return anything `exit 0` because the relation could be called several times.16:29
Muntanermbruzek, sorry, I can't get it16:31
MuntanerI'm not understanding the "problem", if there is one :(16:31
Muntanermbruzek, sooo... how can I be sure that all the values aren't empty?16:38
mbruzekMuntaner: check them all?16:39
mbruzekThe code checks the "database" variable because that is the last one to be set.  If that one is available the others should be too.16:40
Muntanermbruzek, if I do an exit 0... do the hook "finish" ?16:44
mbruzekIf you exit 0 it stops there without an error16:45
mbruzekIf you exit 1 Juju reads that return code as an error.16:45
mbruzekMuntaner: The hook will be called again when database is set16:45
Muntanermbruzek, it seems like my hook did an exit 016:46
Muntanerand in fact, his execution stopped in half16:46
Muntanermbruzek, it does not seem to be called again... so my charm is in an "half deployed" status16:48
mbruzekMuntaner: What are you writing the charm in?  Use juju-log or echo or print() to debug this.  If the charm is half deployed I would think you need to exit earlier if you don't have the data  you need.  Only do the configuration when you have all the data16:50
Muntanermbruzek, it's simple linux shell bash16:51
mbruzekalways use set -ex for bash scripts so you can see the individual commands running.16:52
Muntanermbruzek, already using it16:53
mbruzekMuntaner: then you should be able to figure out why the charm is half configured.16:53
Muntaneryes mbruzek, I know where I call the exit 0 because one variable is empty16:54
Muntanerbut I can't figure how should I implement a workaround for this16:54
mbruzekMuntaner: exit 0 early if you don't have all the information, when you have all the data continue to set up the whole configuration.16:54
Muntanermbruzek, I get lost at the "when you have all the data" part16:55
mbruzekAll the database variables, and the private address, what ever your charm needs16:55
Muntaneryer mbruzek but I can't understand how can I check "when" I have them, since the hook exited16:56
mbruzekMuntaner: the hook will be called again when you get more information16:56
Muntanermbruzek, btw, I'm not launching mysql and mycharm simultaneously: mysql is started since a long time16:57
Muntanerit's the same situation?16:57
Muntaner(I mean the mysql charm from the store)16:57
mbruzekMuntaner: Yes this is a common patter to connect to a database charm.  You can launch them simultaneously, the db-relation-changed hook can be called multiple times until you get all the database variables17:01
Muntanermbruzek, maybe I got it. my relation-changed is empty, actually I'm only writing in the relation-joined17:04
mbruzekMuntaner: well there is your problem.17:04
Muntanermbruzek, now I echo some dumb stuff in the relation-changed and seems to work17:30
Muntanerbye guys, see you tomorrow :)17:38
Muntanermbruzek, thanks for the tips17:38
mbruzekMuntaner: you are welcome17:38
mbruzekMuntaner: glad you got it working.17:38
mbruzekHey marcoceppi. If I wanted to rsync files between charms how would I set up creds?19:22
marcoceppimbruzek: is this a peer relation or a service relation?19:22
marcoceppisuddenly wget doesn't seem so horrible ;)19:22
mbruzekmarcoceppi: yes, that is the hook that I would use.19:22
marcoceppipeer?19:23
mbruzekno this would be a service relation19:23
marcoceppiicky, you'd have to have some kind of key exchange on the interface19:23
marcoceppiwhich isn't worth it anymore imo19:23
marcoceppiI thought this was a peer relation19:23
mbruzekHow does peer relation make it better?19:23
marcoceppimbruzek: the interface is virtually irrelevant, you can add any keys you want because it's an implicit relation between the units in the service/charm and not to other charms19:24
mbruzekI see.19:25
mbruzekmarcoceppi: do you know of any charms that transfer *anything* via rsync ?19:26
marcoceppii know they exist, not off the top of my head, but they're almost always peer relations19:27
mbruzekThis would be more of a master/minion relation19:27
mbruzekOver the banana interface19:28
lazyPowermbruzek: i thought we refactored that to the starfruit interface19:28
marcoceppiso this is an interface you're creating?19:28
mbruzekmarcoceppi: yes19:28
mbruzekmarcoceppi: I have complete control19:28
marcoceppimbruzek: then make the public key of that machine published on the interface19:28
marcoceppipublic-key=`cat ~/.ssh/id_rsa.pub`19:29
marcoceppiand have all the units that get that add that public key to their authorized-keys file19:29
marcoceppithen you can rsync to all the units19:29
whithttp19:30
=== kadams54 is now known as kadams54-away
marcoceppior, http19:50
=== anthonyf is now known as Guest30629
=== kadams54-away is now known as kadams54
=== Guest30629 is now known as anthonyjf
=== urulama is now known as urulama|afk
=== roadmr is now known as roadmr_afk
=== kadams54 is now known as kadams54-away
=== urulama|afk is now known as urulama
jcastrowhit, link me up!20:32
whitfor jujubox?20:33
whitjcastro, one sec20:33
whitjcastro, https://registry.hub.docker.com/u/whitmo/jujubox/20:33
whitjcastro, if you use docker 1.5.0 you can build and run charmbox, the second docker file20:34
whitjcastro, jujubox is only good for deploying, you need charmbox if you are doing any serious reviewing20:35
jcastroack20:35
jcastrohey so, right off the bat20:35
jcastroin the "Once it's up" section in your docs20:36
jcastroput quickstart first, because you can't status without bootstrapping20:36
jcastrowhit, also ran into this: http://pastebin.ubuntu.com/10506159/20:37
jcastrowhit, ah I see, perhaps mention up front that the local provider won't work20:37
jcastrowhit, have you posted this to the list? I don't see it there20:41
whityeah that's mentioned in the "future" section but we should put it more prominently20:42
whitjcastro, it's only been mentioned as an aside wrt review queue20:42
whitjcastro, if you mount your $JUJU_HOME, status will work if you have an env bs'ed, but yeah will fix that for the barecase20:43
jcastronod20:43
jcastroI was thinking more for the from-scratch case.20:44
whitjcastro, exactly20:44
whitjcastro, hypothetically it should run anywhere docker does20:44
whitjcastro, which is a nice story for folks who are  not on ubuntu but want to try juju20:45
jcastrowhit, man this is fast20:48
jcastromuch faster than the vagrant box, heh20:48
whitjcastro, yup20:48
=== kadams54-away is now known as kadams54
=== roadmr_afk is now known as roadmr
=== roadmr is now known as roadmr_afk
=== roadmr_afk is now known as roadmr
=== kadams54 is now known as kadams54-away
=== kadams54-away is now known as kadams54
=== kadams54 is now known as kadams54-away
mbruzekJuju peeps. My LXC environment seems to be corrupted. agent-state-info: 'failed to retrieve the template to clone: error executing "lxc-create":21:48
mbruzekDoes anyone know how to fix something like that?  I tried cleaning out the LXC images, but no go21:49
mbruzek$ sudo lxc-destroy -n mbruzek-local-machine-221:50
mbruzeklxc_container: lxccontainer.c: container_destroy: 2041 Error destroying rootfs for mbruzek-local-machine-221:50
mbruzekhelp?21:50
rick_h_mbruzek: thumper is your local provider guy :)21:50
waiganimbruzek: what does `sudo  lxc-ls --fancy` show?21:51
mbruzekwaigani: pastebin.ubuntu.com/10506962/21:54
mbruzekwaigani: I tried to destroy the stopped containers but I can not.21:55
mbruzekwaigani 1.21.3-vivid-amd64 if that makes any difference21:56
waiganimbruzek: have you tried with -f21:56
mbruzekyes21:56
waiganihad to ask :)21:56
mbruzek$ sudo lxc-destroy -f -n mbruzek-local-machine-321:58
mbruzeklxc_container: lxccontainer.c: container_destroy: 2041 Error destroying rootfs for mbruzek-local-machine-321:58
mbruzekDestroying mbruzek-local-machine-3 failed21:58
waiganimbruzek: lxc-info -n mbruzek-local-machine-321:58
mbruzekName:           mbruzek-local-machine-321:59
mbruzekState:          STOPPED21:59
mbruzekwaigani http://pastebin.ubuntu.com/10507040/22:00
=== kadams54 is now known as kadams54-away
mbruzekhttps://bugs.launchpad.net/juju-core/+bug/130721522:08
mupBug #1307215: destroy-environment fails to clear lxc containers <destroy-environment> <local-provider> <lxc> <ubuntu-engineering> <juju-core:Invalid> <lxc (Ubuntu):Fix Released> <https://launchpad.net/bugs/1307215>22:08
mbruzekI used the work around deleting /var/lib/lxc/<image-dir>22:09
waiganimbruzek: sorry interrupted, I was just about to send you that link. Beat me to it.22:11
=== kadams54-away is now known as kadams54
mbruzekThanks for your help waigani22:17
waiganimbruzek: np22:18
=== roadmr is now known as roadmr_afk
=== roadmr_afk is now known as roadmr
whithey cory_fu finally got back to your review comments.22:33
whitcorey_fu not sure I understand the .git inclusion one22:33
cory_fuwhit: Yeah, I replied to your comment on that one.22:37
whitcory_fu, ah thanks22:37
cory_fuwhit: Regarding the gh: prefix, I assume that the .git suffix check means that Amulet (and thus deployer) support git repo http URLs, right?  So, I was thinking amulet could just convert gh: prefix URLs to https: URLs to GitHub.  I do also think deployer should add the gh: prefix as well, though22:38
=== kadams54 is now known as kadams54-away
whitcory_fu, yeah I think both amulet and deployer would need to support it, but it should be an easy add23:02
whitcory_fu, of course, removing the duplication would mean that would just be a fix in deployer23:02
whitcory_fu, add the support for sniffing the .git control dir23:02
cory_fuwhit: I still don't understand, though.  If Amulet pre-processes gh:user/foo into https://github.com/user/foo.git, why would deployer need to support it?23:03
whitcory_fu, because it's not really useful for to create bundle files solely for testing23:04
cory_fuAgreed23:04
whitcory_fu, ie... you could use gh aliases for just simple test stuff, but your bundle files would still have to use the other23:04
cory_fuTrue23:04
whitcory_fu, so there is value supporting it in amulet, but it's less socially wierd if they both support it23:05
cory_fuI thought you meant it wouldn't work w/o deployer support.  I agree that it's not useful w/o deployer support, though23:05
whitcory_fu, but really amulet shouldn't be worrying about concerns deployer or jujuclient should handle23:05
cory_fuIndeed23:06
whitbut these technologies are organically grown based on need, so some pruning is to be expected23:06
lazyPower> "Less socially weird"23:11
lazyPoweri like this analysis of our tooling23:11
* marcoceppi welcomes all contributions that make amulet more or less socially weird23:15

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