/srv/irclogs.ubuntu.com/2015/10/28/#juju.txt

=== Spads_ is now known as Spads
thumperstub: hey there03:25
stubthumper: yo03:25
thumperstub: had an issue with the postgresql charm the other day03:25
thumperI have an old one in use cs:trusty/postgresql-1003:25
stubYou using the rewrite or the cs: one?03:25
stubk03:25
thumperand I tried to upgrade to -2803:25
thumperonly one unit03:25
thumperbut it said "can't as it would break replication relation"03:26
thumperseems to have a peer relation with itself03:26
thumperor something03:26
thumperhow do I upgrade it?03:26
stubI do not recall such an error message :-/03:26
thumper--force only mentions units in error state03:26
thumperthat error message probably came from juju itself03:27
thumperI think the charm upgrade expects endpoints to be the same ...03:27
thumperFSVO the same03:27
stuboh... that is a juju error message? Right. So probably because some relations got renamed and I didn't realize it would be a problem?03:27
thumperyeah...03:27
thumperthat makes sense03:27
thumperwhat does the replication relation do if there is only one unit?03:28
thumperanything?03:28
stubor the name of the interface changed03:28
stubnothing03:28
* thumper guesses interface changed name03:28
thumperhmm...03:29
thumperI wonder what the nice way is to say "just upgrade, ..."03:29
thumperI should try it locally first I guess :)03:29
stubSo lp:~stub/charms/trusty/postgresql/rewrite is what I recommend and actually has a test to upgrade from r127 (no idea of the cs: revno). But you are earlier than that.03:29
stubthumper: Is this modern juju, or haven't you updated that bit?03:30
thumperI deployed this last year around July03:30
thumperand that charm hasn't been upgraded since:)03:30
stubthumper: upgrade-charm --force will push the new charm everywhere without running hooks.03:30
thumperreally? --force won't run hooks?03:31
thumperthat seems fcuked03:31
stubI'd test upgrading to 1.24 then upgrading to the rewrite branch (again, recommended but not landed for review/beurocratic reasons)03:31
stubthumper: It is the only way to fix a charm that errored in its upgrade-charm hook.03:32
thumperI have my env running 1.24.503:32
thumperright, but it hasn't errored03:32
thumperit just said "won't upgrade"03:32
thumperstill on -1003:32
thumpermarcoceppi: I see you are around03:32
stubYeah, but that is why we love upgrade-charm --force.03:32
thumpermarcoceppi: quick charm upgrade question03:32
marcoceppithumper: yes, I am in your timezone03:32
thumperI have cs:trusty/postgresql-10 and I want to upgrade to cs:trusty/postgresql-2803:33
thumperbut an interface got renamed (or something)03:33
thumperand juju says "nah"03:33
thumperwhat will --force do?03:33
marcoceppithumper: so force will, at the next idle point in the agent, unpack the charm files without queuing an upgrade-charm hook03:34
marcoceppithumper: not sure if thta fixes your missing interface/relation problem or not, but it's how I develop03:34
thumperso I should manually run the hooks?03:35
thumperthis seems flakey to me...03:35
thumpermarcoceppi: also, stub has upgrade tests from r127 of the charm, any idea how we can work out what charm version that is?03:36
stubthumper: Not so much flaky, but a necessary back door to get you out of this snafu. The real problem is way back then I changed a name and nobody at that time realized it was a problem.03:37
marcoceppithumper: like right now, I've got a broken hook. So I patch the charm layer, charm build, then upgrade-charm --force, exit 1 in the debug hooks so I can keep that hook, then do a juju resolved --retry on the unit to recaputre that hook03:38
marcoceppithumper: no, you should avoid using --force03:38
marcoceppithumper: the way to fix this is to break the relation, upgrade-charm, attach the new relation03:38
marcoceppiwhoa, I'm really lagged03:38
stubthumper: just doing a 'juju set' on it after the upgrade-charm --force will kick off a hook, and one hook is all that is needed with the rewrite charm. Not sure about cs:28.03:39
thumpermarcoceppi: the relation is a peer relation03:39
marcoceppithumper: oh bother03:39
stubmarcoceppi: a single unit with a peer relation to boot ;)03:40
marcoceppithumper: well then you're fun03:40
* thumper taps...03:40
marcoceppithumper: well --force upgrade will get you the new payload03:40
marcoceppithumper: not sure if it'll queue the upgrade-charm hook or not tbh03:40
thumperstub: why is your new rewrite not promulgated (or however you spell that damn word)03:41
marcoceppii just know it'll drop the new charm payload03:41
* thumper goes to look at the code...03:41
marcoceppisyn03:42
stubthumper: its in the review queue. It got looked at about a month ago, when it was pointed out some tests were failing on the ci system. I got that down to one failing test, which is still better than the existing charm with its tests disabled.03:42
thumperso... disable the failing test like a real developer :-)03:43
thumperheh03:43
stubI've been poking at it to get it fixed, but the ci system gets rather constipated recently and there is still a good chance of failures due to cloud timeouts and such.03:45
stubOhh... someone gave it an enema. I got a fresh run coming up in an hour or three.03:47
stublxc green already, just need to wait for the real clouds03:48
stubthumper: where is my lxd provider?03:48
thumperstub: coming03:48
stubthumper: will an environment be able to span multiple lxd servers?03:49
thumpernot initially03:49
stubthumper: will that be a juju task, or an lxd task do you know?03:50
stubMy evil plan needs juju talking to multiple lxds, or a virtual lxd server that abstracts a collection of lxds.03:51
stub(maybe the latter is better, providing a ha end point to a cluster of lxds and automatic failover of containers etc.)03:52
thumperthe aim is to be able to have the lxd provider be able to point to a remote lxd endpoint03:53
thumperas well as the default of "localhost"03:53
stubI guess the manual provider is quite happy deploying a unit to an lxd container somewhere, so it wouldn't be a blocker to anyone. Just trickier to wire up.03:56
stubmarcoceppi: would stopping people making incompatible metadata.yaml changes be a job for charm proof or the charm store? It would need to be able to discover the previous revision of the charm.03:58
marcoceppistub: so, juju does this already with relations03:58
marcoceppiit just makes you remove relation03:58
marcoceppibut I don't think anyone considered the peer corner case03:59
stuboh, so this is just an edge case with the peer relation03:59
stubright03:59
marcoceppijuju should just allow you to upgrade regardless of the peer interface change03:59
marcoceppia bug would be in order03:59
stubMaybe for juju 2.0 peer relations are considered more special. Currently I think you can have multiple peer relations with all sorts of names and interfaces defined, which isn't really useful afaict.04:00
stubthumper: are you filing a bug?04:13
thumpersorry, wasn't following, on a call04:14
thumperI can file a bug04:14
thumperstub: bug 151078704:47
mupBug #1510787: juju upgrade-charm errors when it shouldn't <juju-core:Triaged> <https://launchpad.net/bugs/1510787>04:47
=== skay is now known as skay__
stubSo I now need to have two branches for my charm, one containing my work and layers.yaml and another one containing the built charm?09:55
stubMy first attempt was 'charm build -o .' to keep everything together in an easy to develop with place, but that just builds to ./trusty/charmname09:57
stubIf two branches, do we have a official location for the 'source' branch, which is the target branch for reviews, with the current trunk remaining for the generated output to be ingested into the charmstore?10:00
Iceystub what I've been working on is having them be 2 separate repos, one with the layers.yaml and such, one that is the deployable charm11:51
stubIcey: Yeah, that seems to be the way it needs to work. And I see I can specify a LAYER_PATH environment variable, so I can split out things into multiple layers when developing.11:54
stubThe review process is going to be more interesting11:54
Iceyyeah, almost like the layers repo isn't going to be reviewed, just the final output?11:55
stubOne of the reasons composer exists is to avoid all the boilerplate that ends up in reviews from things like charmhelpers. I think the layers will need to be reviewed, not the final output.11:59
Iceyhopefully :)11:59
Iceyideally we get to the point where each layer is independently reviewed, and we can just review the stuff that the charm author is writing11:59
stubtarmac or something should be able to to the build, commit and push automatically for the CI system to ingest.12:00
=== circ-user-C4wS5 is now known as gennadiy
gennadiyhi i still have question about expose services in bundle. i use expose: true in my bundle but after deploring services are not exported12:24
cory_fugennadiy: And the services in question have open ports listed in `juju status`?  The `expose: true` should work, if that's the case.  :/13:03
cory_fuAre you deploying the bundle with `juju quickstart` or `juju deployer`?13:04
gennadiyi deployed bundle from juju-gui13:05
cory_fuOh yes, that, too.  And the services have open ports listed?13:06
gennadiybut i think i have found problem i use bundles.yaml but in juju store i see bundle.yaml which doesn't contain expose13:06
gennadiymy bundle name is - tads2015-demo13:06
rick_h__urulama_: ^ does the expose stuff not get translated perhaps?13:07
urulama_rick_h__, gennadiy: it might be a bug, yes. we'll investigate.13:08
gennadiyconstraints field is absent too13:08
gennadiysorry. constraints presents in result bundle13:09
gennadiydo i have possibility to create bundle.yaml directly now?13:10
gennadiyas i understood my original bundles.yaml was converted to bundle.yaml. am i right?13:10
urulama_gennadiy: yes, you can. use the same format as you see the results.13:11
rick_h__gennadiy: yes, though be careful. The old system looks for a bundles.yaml so you need both to ingest properly13:11
gennadiycan i add expose field?13:11
gennadiy* can i use expose field in bundle.yaml?13:12
rick_h__gennadiy: yes definitely13:12
urulama_gennadiy: you should.13:12
gennadiyok. i will try13:12
rick_h__gennadiy: download the bundle and leave both files when you update it.13:12
=== JoshStrobl is now known as JoshStrobl|AFK
gennadiycan i setup name of bundle in bundle.yaml?13:44
gennadiybecause when i try to use bundle and config w/o name config is not applied13:44
gennadiyi use the following script13:45
gennadiyjuju-deployer -e $JUJU_CUR_ENV -c tads2015-demo/bundle.yaml -c config-demo.yaml tads2015-demo/bundle.yaml13:45
urulama_gennadiy: unfortunately, we currently don't handle expose.13:49
urulama_(in new bundle format)13:49
gennadiynow i use bundle instead of bundles and expose works13:49
gennadiybut now i have question about juju-deployer it has ability to merge yaml files.13:52
gennadiyso if i don't use bundle name for inside bundle file it doens't work correctly13:53
frankbangennadiy: in new bundle format there is no top level namespace with the bundle name13:53
gennadiyi see, but how to use juju-deployer now?13:53
gennadiyseem it doesn't work correctly w/o bundle name13:54
frankbangennadiy: how to use a config yaml file?13:54
gennadiyam i right?13:54
frankbangennadiy: don't know, checking sources, could be a juju-deployer bug13:54
frankbangennadiy: what's the problem with new bundle format? overriding values with multiple yaml files? if so, have you tried passing yaml overrides not including the top level bundle name?13:58
rick_h__gennadiy: what version of the deployer. You need a fairly recent one to support the newer format where the bundle name is not at the root of the file.14:13
Iceyis there a way to specify machine arguments when deploying?14:57
Iceyin essence, I want to use `juju deploy ceph` but specify a machine add constraint to restrict the service to us-east-1a14:58
Iceyor am I just going to have to use a bundle to get that kind of effect?14:58
vilamgz_: ping15:30
Iceyis 1.25 out yet :'(15:37
mgz_vila: hey15:45
vilamgz_: hey ! See PM ?15:46
lazypowerIcey its in -proposed15:51
lazypowerIcey add-apt-repository ppa:juju/proposed15:51
lazypowerinstall juju-core and profit from having 1.2515:52
lazypoweryou get payload management, update-status hooks, and a whole slew of other nice things15:52
lazypowerbut its /proposed, ymmv :)15:52
=== JoshStrobl|AFK is now known as JoshStrobl
mgz_vila: with 1.24.7 you may benefit from bug 1435283 fix16:18
mupBug #1435283: juju occasionally switches a units public-address if an additional interface is added post-deployment <addressability> <bug-squad> <network> <openstack-provider>16:18
mup<juju-core:Fix Released by mfoord> <juju-core 1.24:Fix Released by mfoord> <juju-core 1.25:Fix Released by mfoord> <https://launchpad.net/bugs/1435283>16:18
vilaack16:18
Iceylazypower I'm riding proposed now ;-)16:48
aisrael_lazypower: Layers question for you. I renamed my composer.yaml to layers.yaml by mistake, and charm build complained so I renamed it to layer.yaml. I'm getting this error trying to build now, though: http://pastebin.ubuntu.com/12991002/16:51
aisrael_lazypower: I suspect something's cached, but not sure where. deps/ looks like it just has the interface I pulled in.16:51
lazypowerouch16:51
lazypowerthat stack trace not really clear with what it duped on16:51
lazypowerbut i think i know whatshappening here16:51
aisrael_lazypower: I can dig deeper if needed.16:52
lazypowerif you ls $JUJU_REPOSITORY/trusty/mything16:52
lazypowerdoes mything have a compose.yaml?16:52
lazypowerif so, charm build is notifying you that files exist out of band, and you should only continue building if its OK to have this file present. (Eg: local modifications to the charm not the layer)16:52
aisrael_oh, it has a layers.yaml16:52
lazypower--force will allow you to override that and get past it, but its erring on the side of caution for you16:52
lazypoweri'm referring to the constructed charm16:53
lazypowerthe artifact16:53
aisrael_lazypower: removing that fixed it. Should I open a bug?16:53
* lazypower is doing a terrible job of explaining htis16:53
lazypowernah its intended behavior16:53
lazypowerif you run with -l DEBUG16:53
lazypowerit tells you what its matching on i think16:53
aisrael_lazypower: Right, the previous build left the layers.yaml in $JUJU_REPOSITORY/trusty/mycharm. Bad artifact.16:54
lazypower:)16:55
aisrael_lazypower: so a build copies over the charm, rather than replacing or rsyncing, right?16:55
lazypowerthe one thing build doesn't do, is take care of removal16:55
lazypowersay you remove an interface from layer.yaml, then re-run build - you need to implicitly rm -rf the built charm and then build, otherwise that interface will linger16:55
lazypoweraisrael_ correct, there are different strategies at play16:56
aisrael_lazypower: ack. I can see an argument for doing that cleanup automatically, even if it's an extra flag16:56
lazypowerlike config.yaml, metadata.yaml get merged16:56
lazypowerother files have a default policy of highest layer that has this file wins.16:56
aisrael_i.e, if I'm writing a charm in layers/, I'd expect that to be authoritative16:56
lazypowerso whatever your top layer is, will override files below it, save for a handfull of special files. and your local layer takes precedence over the interfaces.juju.solutions api yes but only if you have LAYER_PATH set16:57
lazypowersame with INTERFACE_PATH16:57
aisrael_like the charm equivalent to make clean16:57
lazypoweryeah16:57
aisrael_Caffeinated ramblings. Thanks for the help unblocking me!16:58
lazypowerseems like charm build --clean should just nuke the compiled dir if exists then build.16:58
lazypowerNP thanks for the questions :)16:58
Iceyhow hard would it be to change the AMIs used by Juju to be something that's EBS optimized?17:03
aisrael_lazypower: I am now a layer convert (not that I wasn't a fan before).17:22
lazypower:)17:22
aisrael_well, layer + reactive17:22
lazypowerLayer + reactive is a powerful tool17:22
lazypoweraisrael_ : https://github.com/mbruzek/layer-k8s/pull/517:23
aisrael_Niiiiice17:23
lazypowerworking on a feature branch with matt for the last 2 days, working independently there have been zero merge conflicts - putting complexity in its place :)17:23
lazypowerand the change sets are getting smaller17:23
aisrael_lazypower: lxc now builds for os x, so if we can run lxd in a container... we might be closer to having a working local provider.17:53
lazypowernice!17:55
aisrael_I'll poke around at it tonight when I'm back home.17:56
marcoceppilazypower: +1 to a --clean flag where it removes the previous build18:13
marcoceppihelpful when heavily devving18:13
lazypowerI'll feature rq it18:13
lazypowerhttps://github.com/juju/charm-tools/issues/3318:15
=== wolverin_ is now known as wolverineav
cholcombecan you combine all your juju actions code into one file and symlink it just like the hooks?20:41
marcoceppicholcombe: yes20:48
cholcombemarcoceppi, nice :)20:48
cholcombeso i do the usual @hooks.hook business20:48
marcoceppicholcombe: welllll20:49
marcoceppicholcombe: no one has tried that, they're not hooks, they're actions, so it's hard to say if that code will respect that20:49
marcoceppicholcombe: for now it's probably better to just make a python module and then stub the import/execute of that module/methods in each file20:50
cholcombemarcoceppi, if i remember right at the code i looked at it just calls the hook with the matching filename that it was called with20:50
marcoceppicholcombe: sure, but actions are not in the hooks directory20:50
cholcombeoh i know20:50
marcoceppiso if there's any attempt to parse out hook related file paths20:50
marcoceppiit'll fail20:50
cholcombehmm yeah20:51
* cholcombe goes back to splitting them up 20:51
=== Icey is now known as IceyEC
=== IceyEC is now known as Icey
=== menn0_ is now known as menn0

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