/srv/irclogs.ubuntu.com/2013/10/08/#juju.txt

=== freeflying_away is now known as freeflying
=== freeflying is now known as freeflying_away
omgponieswhat's the format for deploying a charm that's not in the official charm store but is in a bzr repo ?03:39
davecheneyomgponies: local ?03:40
omgponieswithout having to grab it local03:41
omgponieslooks like this works - juju deploy cs:~paulcz/precise/elasticsearch03:41
davecheneyyup, that is the format for a private charm store branch03:42
davecheneything03:42
omgponiesis there a flag for setting a version ... which I assume is the equivalent of the 'revision' file ?03:43
davecheneyomgponies: version is the value of the revision file in the root of your charm03:47
davecheneyor 1, by default03:47
omgponiesright,  I mean during deployment03:48
omgponiesfor instance 'revision' for the charm above is currently 5003:48
omgponiescan I specify that so if some jerk does a breaking change I don't find out by surprise03:49
davecheneyomgponies: make a file called revision in the root of your charm03:49
davecheneyput the numer 50 in ther03:49
davecheneyoh, hang on03:49
davecheneyi see what you are asking03:49
davecheney cs:~paulcz/precise/elasticsearch:$REVISION03:50
davecheneyis the full name03:50
davecheneybest to commit a revision file03:50
davecheneyhm03:50
davecheneyactualy03:50
davecheneyno03:50
davecheneythat may03:50
davecheneyprobably not work03:50
davecheneyi don't think private charmstore branches have a concept of revision as strong as real charms do03:50
davecheneythere is only one revision of the charm03:50
davecheneyand that is head03:50
omgponiesright03:51
omgponiesis there a doc somewhere that describes everything that is available from the 'unit-get' command ?04:16
davecheneyomgponies: not really04:18
davecheneyfrom memory04:18
davecheneypublic-address and private-address are the only useful ones04:18
davecheneyyup, sauce says those are the only two commands04:20
omgponiesthinking about from a monitoring perspective ... be able to get a list of units/services deployed to a box and a) set a useful hostname, b) determine what metrics to care about04:20
davecheneyomgponies: unit-get probably isn't going to be what you want04:23
omgponiesyeah I don't think there's any good way to get what I want04:24
omgponiesprobably need something to stick in the middle that can correlate 'ip-10-29-206-28' to data from `juju status`04:25
=== CyberJacob|Away is now known as CyberJacob
=== _mup__ is now known as _mup_
=== axw_ is now known as axw
=== rbasak_ is now known as rbasak
=== dosaboy_ is now known as dosaboy
gnuoyI don't have a public bucket for juju tools and use bootstrap --upload-tools to get them into a new environment. I've upgraded my client to 1.14 and now I want to upgrade the juju tools in existing environments. How do I do that ? I don't see an --upload-tools option to sync-tools08:47
gnuoyI do see --source for sync-tools and the comment suggests I can specify a local dir but I'm unable to spot the tools on the filesystem09:38
gnuoyok, facepalm. I didn't know about: juju upgrade-juju --upload-tools09:47
allenapWhen talking about containers in https://juju.ubuntu.com/docs/authors-subordinate-services.html, is that a general term? Or is it referring to LXC, for example?09:53
=== freeflying_away is now known as freeflying
evilnickveitchallenap, I believe it is used in a general sense. That's another page that needs a good rewrite...10:51
allenapevilnickveitch: Cool, thanks.10:53
=== freeflying is now known as freeflying_away
=== freeflying_away is now known as freeflying
_mup_Bug #1236824 was filed: boostrap tries to build jujud <juju:New> <https://launchpad.net/bugs/1236824>12:16
=== freeflying is now known as freeflying_away
=== TheRealMue is now known as TheMue
_mup_Bug #1236900 was filed: tar: unrecognized option ''--numeric-uid'' <juju:New> <https://launchpad.net/bugs/1236900>14:49
drj11hello15:15
drj11we have changed our config.yaml for a service to add a new configuration option. How do we add that configuration option to an already running service?15:16
marcoceppi_drj11: you'll need to upgrade the charm15:22
drj11marcoceppi_: thanks. I thought so. and I thought we'd tried that. me and morty are working on it. we'll try again15:22
drj11marcoceppi_: thanks again15:23
marcoceppi_drj11: was the charm initially deployed from the charm store or from local?15:25
marcoceppi_adeuring: I've got a few comments on your merge for charm-tools15:26
adeuringmarcoceppi_: thanks, I'll look15:26
marcoceppi_adeuring: You're trying to find "maintainer" of the branch, but to be honest the owner of the branch is always going to be ~charmers for  promulgated branches (or ~team)15:26
marcoceppi_adeuring: we don't do stacking anymore for promulgated branches15:26
drj11marcoceppi_: from local15:27
drj11marcoceppi_: we never use the charm store15:27
marcoceppi_drj11: gotchya, that shoudl work. You should be able to verify that the charm revision is bumped in the juju status15:28
marcoceppi_adeuring: so if a maintainer isn't in ~charmers (which is an expected case) then your function will fail15:28
adeuringmarcoceppi_: ok, so we might need a special rule for branches owned by charmers. But what if somebody deliberately want to fork a promulgated charm? In that case, this person should change the maintiner field. Otherwise, the official maintainers might receive undeserved "hate mail".15:29
marcoceppi_adeuring: It's an interesting case15:32
marcoceppi_I think an exception will need to be made for ~chamers for sure15:33
marcoceppi_adeuring: also, things like the the juju gui charm are maintained by "Juju GUI Team" not sure how this would handle that15:34
adeuringmarcoceppi_: let me look how this works with today data.15:35
adeuringmarcoceppi_: the GUI is acutally a good example: Sending a mail to the address given in the maintainer field (juju-gui@lists.launchpad.net) results in an error: "host polevik.canonical.com [91.189.95.64]: 550 unknown user". OTOH, the "real" mailing list (juju-gui@ubuntu.com) can't be checked either... Anyway, I#m open to sugegstion how else to check the sanity of the maintainer field.15:56
adeuringah, "juju-gui@lists.launchpad.net" would have worked, if the juju-gui team had set up this list on LP15:58
marcoceppi_adeuring: I think just making sure it follows "Full Name <properly-formated@email.tld>" would suffice. We don't take much responsibility for  personal branches and these should be checked during finaly charm review15:59
adeuringmarcoceppi_: ok, I believe the check you suggest already exists, so let's abandon the MP15:59
marcoceppi_adeuring: I like the moving of the version to the package16:00
adeuringmarcoceppi_: yeah, that makes things easier for some changes, but taht's easy to include in as a drive-by fix in any real branch.16:02
marcoceppi_adeuring: I'll see how easy it is to just cherry pick that commit16:02
adeuringmarcoceppi_: ok, let me just revert the other changes, that's the most easy way, I beleive.16:03
adeuringmarcoceppi_: done16:07
matsubarahi there, I bootstrapped a juju environment on openstack, then juju destroyed it. When I try to bootstrap again, juju says there's already a environment bootstrapped. Any ideas on how to fix this? Logs here: http://pastebin.ubuntu.com/6210041/16:38
=== teknico1 is now known as teknico
kurt_Hi Guys - I cannot get maas-tags to work with 14.1.  According to the constraints documentation, it should.  Any comments?17:05
kurt_http://pastebin.ubuntu.com/6210186/17:07
marcoceppi_1.14.1 doesn't have maas-tag support17:09
marcoceppi_It was just added in 1.15.1, https://lists.ubuntu.com/archives/juju/2013-October/003019.html17:10
marcoceppi_kurt_: ^17:10
kurt_marcoceppi_: is 1.15.1 support on precise?17:10
marcoceppi_kurt_: all juju releases are available for all current supported ubuntu releases17:11
kurt_Ok, guess its time to upgrade :)17:12
CheeseBurgno weekly update today?17:12
marcoceppi_kurt_: however, odd series, like 1.13, 1.15, etc are considered "devel" releases17:12
marcoceppi_so you need to get them from ppa:juju/devel17:12
kurt_marcoceppi_: Ok, thanks.  I may have it already.17:13
=== jorge_ is now known as jcastro_
kurt_marcoceppi_: in reading the readme for 1.15.1, I'm confused by this statement: "As an unstable release we do not make guarantees about clean upgrade17:33
kurt_paths of running environments from one 1.13.x version to another."17:33
marcoceppi_kurt_: 1.<ODD>.X releases are development releases, they are not considered stable17:44
marcoceppi_For 1.<EVEN>.X repleases you should be able to safely run `juju upgrade-juju` to upgrade from one stable juju release to another17:45
kurt_marcoceppi_: right, but I am in fact going from 1.13.1 to 1.15.1.  The statement appears to guarantee it will break. :)17:47
marcoceppi_kurt_: it shouldn't, it's just saying it might17:58
marcoceppi_once 1.16 comes out I recommend you sit on that release and move between 1.<even> releases17:58
kurt_marcoceppi_: ok, we'll see soon enough, I have it installed ;).  And yep - how far is 1.16 out?17:58
marcoceppi_kurt_: it should be released sometime this month17:59
marcoceppi_iirc17:59
kurt_cool, thanks17:59
matsubaraDoes juju keep any local state of a bootstrapped environment? I keep getting an error:  ERROR juju supercommand.go:282 environment is already bootstrapped even though I destroyed the whole environment.http://pastebin.ubuntu.com/6210041/18:39
marcoceppi_matsubara: is this a local environment?19:02
matsubaramarcoceppi_, canonistack19:07
matsubaramarcoceppi_, btw, I updated juju-core to 1.15.1 and now when I destroy-environment, the command returns but doesn't seem to destroy anything (i.e. If I run the command again, I get the question if I want to destroy the env)19:08
=== thomi_ is now known as thomi
mhall119jcastro: marcoceppi_: halp!19:32
marcoceppi_mhall119: what's up?19:32
mhall119I'm trying to make my config-changed charm call my db-relation-changed charm to re-acquire my DB credentials19:32
mhall119http://bazaar.launchpad.net/~api-website-devs/ubuntu-api-website/api-website-canonical-is-charm/view/head:/hooks/config-changed#L4919:32
mhall119but according to the charm log, that's failing: https://pastebin.canonical.com/98709/19:33
marcoceppi_mhall119: yeah, because relation hooks get extra environment variables19:33
mhall119marcoceppi_: so how can I make this work?19:33
marcoceppi_you can't really call relation-get out-of-band without supplying a relation-id19:33
marcoceppi_mhall119: what I've done in charms is record the data in a dot file in the $CHARM_DIR and read that in other hooks19:34
mhall119marcoceppi_: line 48 of the config-changed hook gets a relation-id19:34
marcoceppi_mhall119: you need to record the $JUJU_RELATION_ID from the db-relation-changed hook19:34
mhall119marcoceppi_: FWIW, this is derived from the internal certificaiton website charm19:34
mhall119marcoceppi_: $(relation-ids db) won't work?19:35
mhall119or is it that I need to set that to a named env var in the db-relation-changed hook before calling relation-get?19:36
marcoceppi_mhall119: db-relation-changed, when fired during a relation event, will already have the proper JUJU_RELATION_ID set19:37
marcoceppi_one second19:37
mhall119ok, so if I fire it from config-changed I need to set JUJU_RELATION_ID=$DID when I call db-relation-changed?19:37
marcoceppi_mhall119: yes19:38
mhall119instead of as $119:38
marcoceppi_$1 ?19:38
* marcoceppi_ checks code19:39
mhall119it was passing the relation id from $(relation-ids db) as the first argument to db-relation-changed when it called it19:39
mhall119https://pastebin.canonical.com/98709/19:39
mhall119I mean19:39
mhall119    DID=$(relation-ids db)19:39
mhall119    [ -n "$DID" ] && hooks/db-relation-changed $DID19:39
marcoceppi_right, set it as an environment variable before executing the hook19:39
mhall119ok19:40
mhall119and is that the only one that needs to be set?19:40
marcoceppi_db-relation-changed, unless programmed to, won't know what to do with $219:40
marcoceppi_$119:40
marcoceppi_mhall119: you typically need JUJU_REMOTE_UNIT19:40
marcoceppi_but I think you can get away without it19:40
marcoceppi_I'm waiting for my desktop to come back online to double check19:41
mhall119ok19:41
mhall119marcoceppi_: could it have ever worked passing it as the first parameter?  Like I said, this was taken from one of the IS charms19:44
marcoceppi_mhall119: depends on how the db-relation-changed hook is set up19:44
marcoceppi_mhall119: doesn't look like it19:45
mhall119ah, ok, I see how it was being used before19:47
mhall119marcoceppi_: on, new question19:48
mhall119suppose I have a config parameter called bzr_revno, and in config.yaml for my charm I have it default to 119:48
mhall119then, I update my app's code and I update the charm's config to make bzr_revno default to 219:48
mhall119now I just found out that this doesn't actually call config-changed hook19:49
mhall119is there *any* hook that would react to a change in the default config value?19:49
marcoceppi_mhall119: hooks/upgrade-charm - but that's only reacting to an upgrade-charm event. What I recommend you do is call hooks/config-changed from the upgrade-charm hook19:50
mhall119and then when IS deploys a new version, upgrade-charm will be called?19:50
marcoceppi_mhall119: I don't know how IS does it, but if they use upgrade-charm, then yes, hooks/upgrade-charm will run19:51
mhall119ok, I'll check19:51
mhall119oh, hey, hooks/upgrade-charm is a symlink to hooks/config-changed19:52
mhall119so it should be called anyway19:52
marcoceppi_:)19:52
mhall119but it wasn't...19:52
mhall119and I'm not sure why19:52
marcoceppi_check the logs?19:52
mhall119https://pastebin.canonical.com/98709/19:52
marcoceppi_also, run juju get api-website19:53
marcoceppi_see what juju thinks the value/defaults are19:53
marcoceppi_mhall119: there might be a thing where juju doesnt' update default values for configs when charms are upgraded19:54
marcoceppi_I could see that being the case19:54
mhall119so you'd have to still call uju set api-website-app bzr_revno=3719:55
marcoceppi_mhall119: if what I described above is true, then yes19:55
mhall119ok19:55
mhall119between that and needing to set JUJU_RELATION_ID, I think that explains the failure I was having19:55
mhall119thanks marcoceppi_19:56
marcoceppi_mhall119: np, let me know if you bump in to any other oddities19:56
mhall119don't worry, I will :)19:59
kurt_marcoceppi_: odd things going on with using maas-tags and deploying services http://pastebin.ubuntu.com/6210935/20:20
kurt_my tag matches an existing the host, the one the bootstrap node is on, but juju still wants to spin up a second node20:21
jamespagekurt_, specifying a tag does not force two services to deploy onto the same machine20:45
jamespagekurt_, you have to use --to <machineid> todo that20:45
kurt_jamespage: but if those hosts are not yet known to juju, how do you accomplish deploying services to those nodes?20:47
jamespagekurt_, deploy one service first, and then deploy using --to for subseqent services20:47
kurt_jamespage: how is handling moving on to the next node done then?20:48
jamespageby co-locating services you are specifically telling juju that you are taking charge of where stuff lands20:48
jamespageto add a new node just don't specify --to20:48
kurt_right.  but if I want specific services to land on specific nodes, and they are unknown to juju, this sounds like a problem20:49
kurt_I get that I use --to.  But when I need the next set of services on the the next node...20:49
kurt_how do I force juju to use a particular node? I thought that's what the purpose of tagging was20:50
kurt_tagging + constaints20:50
jamespagekurt_, tagging is just a way of grouping servers20:52
jamespagekurt_, juju will ask maas for a new unit which matches the provided tag20:52
kurt_ok, but it doesn't appear that was happening20:52
jamespagekurt_, thats not what it sounded like above "juju still wants to spin up a second node"20:53
jamespagethats the correct result20:53
kurt_jamespage: so if the node is already running that matches the tag, juju will look to deploy elsewhere without the "--to" function?20:55
jamespagekurt_, yes20:55
kurt_that doesn't seem intuitive20:55
jamespagethe node is already allocated to a service20:55
jamespageso juju won't by default place another service on it20:55
jamespagethink about a deployment with 1000 nodes20:56
jamespagewhere 400 are for storage and 600 are for compute20:56
jamespageI can assign tags for 'compute' and 'storage' to the different server types20:56
jamespageand then use juju to target nova-compute to 'maas-tag=compute' and ceph to 'maas-tag=storage'20:56
jamespageor servers could be tagged per physical availability zone, or switch or whatever20:57
kurt_Ok, when we talk about more servers in the tag group than a single server it makes sense20:57
kurt_but in the context of a single node, it didn't20:58
jamespagetags don't really make sense in that context20:58
kurt_ok. makes sense.  I am really looking for the one-size fits all hammer for juju.  It just doesn't exist.21:00
kurt_my "--force-to" option :D21:00
=== natefinch is now known as natefinch-afk
omgponiesis there a way to get the unit name from inside a hook23:15
omgponiesi.e. from juju status where I see  'services:\n  elasticsearch\n ... units: elasticsearch/023:16

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