/srv/irclogs.ubuntu.com/2014/11/09/#juju.txt

=== balloons is now known as Guest6771
=== liam_ is now known as Guest12049
=== CyberJacob|Away is now known as CyberJacob
=== kadams54 is now known as kadams54-away
=== kadams54 is now known as kadams54-away
johnmceCan someone please help with a problem I'm having with Juju. I've asked about this problem here several times in the past 30 hours, but had no response.18:20
johnmceThere is clearly a bug in Juju that causes it to deploy old versions of charms when deploying Keystone to a MAAS LXC container18:21
johnmceI've used bzr to check the latest Keystone charm to a local repo. This charm clearly supports Juno, as can be seen in the source code.18:22
johnmceHowever, when it is deployed to a newly instantiated MAAS/LXC container, the charm deployed is an earlier revision that does not support Juno.18:24
johnmceCan anyone please help? I'm rapidly losing faith in Juju, as there is no documentation or community support that gives any clue as to the possible cause.18:25
jrwrenjose: how are you deploying it?18:27
jrwrenerr, johnmce18:28
jrwrensorry jose, misdir18:28
joseno prob :)18:28
jrwrenjohnmce: can you pastebin the commands you have run or maybe ask on askubuntu to completely describe the problem ?18:28
josejohnmce: probably not getting a response since it's the weekend and most people are hanging out doing some other stuff. but I'll be glad to give you a hand with this! as jrwren mentioned, if you could pastebin the command or the bundle you're using that'd give us a good first clue on what's going on18:29
johnmcejrwren: Thanks for the response. I'll pastebin some details info shortly.18:29
jrwrenjohnmce: if you have commands which you've run, I can try to reproduce.18:33
johnmcejrwren: This is a complete attempted install I just did: http://pastebin.com/9Tjae30218:40
johnmcejrwren: As you can see this revision of the charm is called "local:trusty/keystone-243". The same revision number that hits the LXC machine, but with inconsistent content.18:43
jrwrenjohnmce: whoa, how does that work :)18:43
jrwrenjohnmce: are any of /opt/charms or /opt/charms/trusty  symlinked directories? are they linked to where you expect?18:44
jrwrenjohnmce: can you paste that bundle?18:45
johnmcejrwren: None are symlinked. Unless of course "bzr branch" does some weird symlinking that I didn't expect18:46
jrwrenjohnmce: no, bzr branch won't do taht.18:46
jrwrenjohnmce: what is the value of openstack-origin in config?18:46
johnmcejrwren: Got to go for about 10 minutes. Where will I find the bundle in a suitable format for pasting?18:47
jrwrenjohnmce: maybe you didn't use a bundle. I see a bundle mentioned on line 112 of that pastebin18:48
josejohnmce: you're using a local charm, which means you're not deploying from the charm store (cc. jrwren )18:48
josejohnmce: that means, if you have branched and old revision which doesn't have the changes that are on the store yet, then you will not get them18:48
josejohnmce: try going into /opt/charms/trusty/keystone and doing bzr pull18:49
joseotoh, I'm seeing an error about an invalid cloud repo18:50
joseoh, oh, wait! charm helpers!18:50
josejohnmce: may I see what's the output of ls -lh /opt/charms/trusty/keystone, please?18:50
josealso, try deploying with just the following command:18:53
josejuju deploy --to lxc:1 --config=~/openstack.cfg keystone18:53
jrwrenseems like config isn't getting set. openstack-origin is defaulting18:57
=== kadams54 is now known as kadams54-away
johnmcejose: http://pastebin.com/8EpmNu9A19:00
johnmcejrwren: I included the relevant part of the config file in my original pastebin. This was the origin line for keystone: openstack-origin: 'cloud:trusty-juno'19:02
jrwrenjohnmce: right. I think you diagnosis is perfect. I've no idea why the juno definitions aren't in the charm on the deployed lxc.19:04
johnmcejrwren: I've got single quotes around cloud:trusty-juno. Is that the correct syntax?19:05
jrwrenjohnmce: its yaml. that should be fine with or without19:05
johnmcejrwren: Is there any more information I can provide to help diagnose this?19:10
josejohnmce: did you try deploying with that last command I gave you?19:12
johnmcejose: Sorry, not yet. I'll try it now.19:12
jrwrenjohnmce: you could run all of the commands with --debug --show-log and paste that. Maybe a log message will give us more clues.19:13
josejohnmce, jrwren: wouldn't recommend pastebinning the full log of debug.19:13
josethere's some sensitive credentials that show there19:14
johnmcejose: Interesting error when trying to deploy: Added charm "cs:trusty/keystone-8" to the environment.\n ERROR unknown option "vip_cidr"19:15
johnmcejose: strange that I didn't get an error with the local charm is that attrib is invalid19:16
josejohnmce: it is, in fact, not a valid config option19:17
joseI'm checking your first paste,s ec19:17
jrwrenjohnmce: i did get that error wiht local charm deploy using same bzr source that you did.19:17
joseI'm checking https://jujucharms.com/keystone/trusty/8 and I don't see vip_cidr as an option19:18
josejust vip19:18
jrwrenyes, its not in config.yaml.  unsure why johnmce did not get an error19:19
johnmcejose: Used to be an option: https://jujucharms.com/keystone/trusty/619:20
josehmm, probably deprecated for some reason19:20
josewait19:20
joseI know what that means19:20
jrwreni think i know too :)19:20
johnmcejose: Presumably vip is just IP/CIDR?19:20
jose(string) Virtual IP(s) to use to front API services in HA configuration. . If multiple networks are being used, a VIP should be provided for each network, separated by spaces.19:21
joseBUT19:21
josethat means you are using an old revision19:21
josetry removing that option from your yaml and deploying again19:21
josejohnmce: ^19:22
johnmcejose: trying now19:23
jrwreninstall hook is still running, but I can confirm that it is using the juno cloud archive. So I tend to agree with jose, your local bzr checkout is out of date.19:23
johnmcejose: nope, still failed19:23
josewhich error now?19:23
johnmcejrwren: I checked it out with bzr yesterday. They must have changed it in the last 30 hours or so then.19:24
johnmcejose: same error19:25
josejohnmce: have you deleted the value from the .yaml file?19:25
johnmcejose, jrwren: http://pastebin.com/TsDCNgwW19:27
johnmcejose: yes, both vip and vip_cidr are gone.19:27
josejohnmce: deploy using the command I gave you19:28
josejuju deploy --to lxc:1 --config=~/openstack.cfg keystone19:28
johnmcejose: still using my local copy, which I checked out yesterday. I don't think that vip_cidr got pulled in the past 30 hours though. Not mentioned in the config.yaml in my local copy.19:29
josejohnmce: if you use the command i just pasted, you will automatically pull the latest rev from the Charm Store, and the configuration options you will use will be the ones located in ~/openstack.cfg19:30
johnmcejose: Just doing it now19:30
josejohnmce: there's no need to use a local branch and that is, in fact, not recommended because it may cause this kind of issues19:30
josecool :)19:30
johnmcejose: no installation-blocking error this time, as expected19:30
josecool!19:30
johnmcejose: Not failing yet either - still pending19:31
joseawesome, let's hope it doesn't19:32
johnmcejose: Side note - bzr pull says I'm up to date I think19:32
josejohnmce: that's weird19:32
josejohnmce: bzr history, rev number?19:33
jose(latest)19:33
johnmcejose: john@maas-cam:/opt/charms/trusty/keystone$ bzr pull\n Using saved parent location: http://bazaar.launchpad.net/~openstack-charmers/charms/trusty/keystone/trunk/\n No revisions or tags to pull.                                                                                                               john@maas-cam:/opt/charms/trusty/keystone$19:33
jrwrenjohnmce: bzr log and bzr log -p can help you find out when that config option was removed.  I can't reproduce what you have experienced.  I get juno deployed.19:33
johnmcejrwren, jose: bzr log: http://pastebin.com/LfTTABtR19:35
jrwrenjohnmce: so unchanged since Oct 9th19:36
joseweird, it is the same revision that's on the store19:36
johnmcejrwren, jose: The charm from the main repo has now successfully installed. So, the problem is that what I'm getting with bzr is broken.19:36
jrwrenjohnmce: what is out put of juju get keystone?19:37
johnmceYesterday morning I renamed my old keystone folder and did a fresh bzr branch to get the latest keystone19:37
joseI am really wondering why was that failing, if it's the latest rev. the only thing that comes to mind is a file was changed manually by mistake19:39
josebut if you pulled+deployed then that shouldn't have been the case19:39
johnmcejose: I've made no modifications, and bzr diff confirms this19:40
joseyeah, I know19:40
joseanyways, looks like you were able to successfully deploy the charm, so that's good :)19:40
johnmcejrwren: There's sensitive information in "juju get keystone" output19:40
johnmcejrwren: anything in particular to look for?19:41
jrwrenjohnmce: just wondering if openstack-origin is set correctly from config19:41
josejohnmce: I'm wondering, is there the need to have the charm locally? if not, you could just go ahead and deploy from the charm store when you need19:42
johnmcejose: It's kind-of nice to be able to deploy this, but I'm trying to follow what I believe to be best-practices, and "bzr branch" each charm so that I know what I've got installed and can modify locally if needs be19:43
jrwrenjohnmce: i totally agree.19:43
josesame here, that's the benefit of the charm code being open source19:43
johnmcejose: I have previously made my own mods to a couple of charms (not keystone though)19:43
jrwreni wonder if there is a way to remove a charm from an environment.19:43
jrwrenits almost as if the state server is deploying the previous one even though you have asked for local.19:44
josejrwren: juju destroy-service [service-name]; juju destroy-machine #19:44
jrwrenjose: that does not remove teh copy of the charm from teh state server AFAIK19:44
josejrwren: you could upgrade-charm19:44
jrwrenoh, there ya go.19:44
jrwrenjohnmce: did you already have a keystone deployed? is it possible that deploy is really just doing add-unit?19:45
johnmcejrwren: I tried upgrading the charm originally when I still had keystone deployed. That was before I nuked keystone and tried to start again.19:45
josejrwren: destroy-service does remove the charm code from the state-server, when I debug my charms I don't have to re-bootstrap and I just destroy the service and redeploy19:45
josejohnmce: just a piece of advice, we have a package called charm-tools and it has a tool called `charm get`, so it branches from bzr19:46
jrwrenjose: good point.19:46
josejohnmce: it's just an alias to an script that does bzr branch for you but it *should* always get the rev on the charm store, and not any other related branches19:47
josemay be useful for you instead of having to type all the branch name, just 'charm get cs:trusty/keystone' and you're done19:47
johnmcejose: I'll try it now19:48
johnmcejose: I just diffed the keystone I got with "charm get" against the one I got yesterday (excluding the .bzr folder) and they are identical.19:50
josewat19:50
johnmcejose: Could ownership or permissions be an issue here?19:51
josejohnmce: I don't believe so19:51
josejohnmce: could you try deploying from the branch that you just pulled?19:51
johnmcejose: bzr not being able to set them? But then again, where is this old code coming from?19:51
joseI have no idea19:52
johnmcejose: doing this now: juju deploy --to lxc:1 cs:trusty/keystone --config=~/openstack.cfg19:54
josejohnmce: cs:trusty/keystone is the same as saying just keystone19:55
josealias19:55
johnmcejose: How did you want me to do a test deployment?19:55
josejohnmce: try removing that folder and branching again19:56
joseI wanna make sure this error doesn't pop up again19:56
johnmcejose: Every time I use the charm store, this succeeds, but local copy always fails19:56
johnmcejose: In theory, I have always been installing the same code from the same source. It's the just the intermediate step of using bzr that breaks it19:57
josethis is so weird19:58
johnmcejose, jrwren: I just tried again from the copy I got with "charm get ...". Same problem. Fails every time. Using charm store works every time - several times now.20:03
lazyPowerjohnmce: do you have any info about why the deployment failed?20:08
johnmcejose, jrwren: OK, I'm starting to doubt my sanity now. Look at this: http://pastebin.com/RwyfQ43k20:08
josehmm20:09
joselazyPower: ^20:09
lazyPowerjose: i see the deployment command returned, however that doesn't necessarily mean it is deploying propper, i'm late to the show admittedely20:09
lazyPower*admittedly20:09
johnmcejose: Is there a typo I'm not seeing?20:09
josejohnmce: has it gotten any error until now? has the install hook failed?20:09
johnmcejose: It's failed as usual.20:10
johnmcejose: it's clearly getting the charm from a folder other than the one I'e specified20:10
jrwrenanyone know how to connect to state server's mongod using mongo client?20:11
lazyPowerjose: ah - i see what you're running into20:11
joselazyPower: local fails, cs doesn't, even though they're exactly the same20:11
johnmcejose: how though? I'm being specific about the location20:11
lazyPowerjohnmce: correct me if i'm wrong, you've deployed keystone before, now you're attempting to deploy a newer revision of the charm and you've run into issues where a cached charm in your state server is continually deploying instead of what you expect to be deployed?20:12
jrwrenlazyPower: that is my guess too.20:13
johnmcelazyPower: yes that's right, I always end up with an old charm20:13
lazyPowerin some instances, i've run into charm caching on my state server, and have had to run juju upgrade-charm servicename  --repository=/path/to/charms while the machine is provisioning. This was happening to me back in the 1.18 days however, not on the newer builds of juju.20:13
johnmcelazyPower: the updated charm is simply not being read20:13
lazyPowerI'm spinning up a VM right now to verify if this is still the case - i'm giong to deploy mongodb from the store, switch to local, attempt destroy/re-deploy and see if it registers as local or cs20:13
johnmcelazyPower: to being with I was trying an upgrade, and then switched to destroy and deploy20:14
jrwrenlazyPower: he always uses local, so maybe a better test is to bzr branch an older rev, deploy that local, and bzr upgrade and deploy that.20:15
lazyPowerok, can you tail your machine-0.log (the stateserver's machine log) during the deploy phase so we can see what it thinks its doing?20:15
lazyPowerjrwren: ack, will do.20:15
johnmcelazyPower: I just tried doing an upgrade, which resulted in no error message, in spite of the keystone folder not existing20:18
lazyPowerjohnmce: when you juju status keystone - is the charm prefixed with local: and have a revision number that is 1 greater than the previous increment?20:18
lazyPoweraccording to this output i have here... keystone-244, should read local:trusty/keystone-24520:19
johnmcelazyPower, jose, jrwren: I may have just had a breakthough.20:19
lazyPower\o/ thats news we like to hear20:20
johnmcelazyPower, jose, jrwren: I had old copies of keystone lying around in renamed folders under the local repo20:20
lazyPowerdoh20:20
johnmcelazyPower, jose, jrwren: I thought that they would be ignored, but they are not20:20
lazyPowerjohnmce: i've done that as well, i'm gonig to file a bug against that actually20:21
johnmcelazyPower, jose, jrwren: One was called "keystone.old"20:21
jrwrenbut... what kind of renamed folders?20:21
lazyPowerjohnmce: I'm glad you discovered that - as i feel juju should warn you its picking something arbitrary20:21
jrwrenjuju read it from keystone.old ?20:21
lazyPowerjrwren: its scanning metadata, so it'll pick whicever it thinks is right20:21
jrwrenugh.20:21
lazyPowerjrwren: and thats a blood obnoxious papercut20:21
jrwrenthat is a stab wound.20:22
jrwrena papercut doesn't take 8 man hours on a sunday :)20:22
johnmcelazyPower, jose, jrwren: It really goes against any behaviour I'm used to seeing in other realms. I thought the folder name was key20:22
jrwrenjohnmce: yup, it should be, but the trick and key is that it treats the repository as a repository and reads metadata.yaml in each directory instead of just directory names.20:23
jrwrenits probably by design, but certainly docs should be better around local deploy in this area.20:23
johnmcelazyPower, jose, jrwren: Thanks for all your help. At least now I know for the future.20:24
lazyPowerjohnmce: really sorry you ran into that, give me another moment to get you a bug link20:24
lazyPoweri'm sure you'd like to tag it for additional traction20:24
josejohnmce: if there are any other questions or things we may help with, feel free to ask here or on juju@lists.ubuntu.com20:24
lazyPowerhttps://bugs.launchpad.net/juju-core/+bug/139097220:25
mupBug #1390972: Juju picks an arbitrary charm when multiple-versions of a charm are present in a local repository <papercut> <juju-core:New> <https://launchpad.net/bugs/1390972>20:25
johnmcelazyPower, jose, jrwren: You know I've probably been tripped up by this before at not known it. I often rename a folder rather than wipe it. I've previously nuked my whole installation to get a clean start.20:26
lazyPowerjohnmce: I keep multiple charm repositories for my environments and export JUJU_REPOSITORY20:26
lazyPoweryou can always juju upgrade-charm --switch when you are ready to move from store to devel, and this keeps me straight when im' jumping environments.20:27
jrwrenall great details which would be nice in docs.20:27
lazyPowerbut again, really sorry this tripped you up - its not a great user experience when its doing something on your behalf and not telling you that's what its doing.20:27
lazyPowerjrwren: file bug's on github.com/juju/docs - and i'll see about circling back to getting those in there.20:28
jrwrenlazyPower: i tend to file pull requests on juju/docs :)20:28
lazyPowerjrwren: even better :)20:28
johnmcelazyPower, jose, jrwren: I can't thank you guys enough for your patience. Hopefully others will benefit from this. It's beer o'clock here, so I'll sign off :-)20:29
lazyPowerjohnmce: best of luck to ya o/  cheers20:29
joseenjoy what's left of your weekend!20:29
=== scuttlemonkey is now known as scuttle|afk
=== kadams54 is now known as kadams54-away
=== kadams54-away is now known as kadams54
=== kadams54 is now known as kadams54-away

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