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

=== scuttlemonkey is now known as scuttle|afk
=== kadams54 is now known as kadams54-away
=== kadams54 is now known as kadams54-away
=== CyberJacob|Away is now known as CyberJacob
=== CyberJacob is now known as CyberJacob|Away
=== Spads_ is now known as Spads
gnuoyjamespage, dosaboy, if either of you have a moment I'd like to get https://code.launchpad.net/~gnuoy/charms/trusty/nova-cloud-controller/next-1392645/+merge/241775 landed pretty sharpish09:58
jamespagegnuoy, does that need a test case update?09:59
gnuoyjamespage, if it doesn;t then we're missing a unit test. let me fix it either way09:59
jamespagegnuoy, +110:00
gnuoyjamespage, branch updated, just waiting for UOSCI to do its thing10:17
gnuoyjamespage, could you take another look at  https://code.launchpad.net/~gnuoy/charms/trusty/nova-cloud-controller/next-1392645/+merge/241775 if/when you have a moment?13:10
jamespagegnuoy, +113:14
gnuoythanks13:14
gnuoyjamespage, would you mind extending your +1 to the stable equivalent https://code.launchpad.net/~gnuoy/charms/trusty/nova-cloud-controller/next-1392645/+merge/241799 ?13:18
jamespagegnuoy, +113:22
gnuoyta13:22
=== kadams54 is now known as kadams54-away
=== kadams54-away is now known as kadams54
=== kadams54 is now known as kadams54-away
=== kadams54-away is now known as kadams54
=== alai` is now known as alai
rogpeppedoes anyone know if config-changed is guaranteed to be called when a charm starts up?14:17
rogpeppefwereade: ^14:17
fwereaderogpeppe, essentially, yes14:18
rogpeppefwereade: ta14:18
fwereaderogpeppe, if wecome up in an error state we won't call it until the error's resolved14:18
rogpeppefwereade: right, that's what i would expect14:18
fwereaderogpeppe, but it's pretty much the first thing we do in ModeAbide: if c-c hasn't run yet for this instance of Uniter, run it14:18
rogpeppefwereade: but it'll be called after "start", right?14:19
fwereaderogpeppe, before start14:19
rogpeppefwereade: ah, interesting14:19
fwereaderogpeppe, which is a problem14:19
fwereaderogpeppe, because "has the start hook run yet" is state we don't actually expose to the charm14:19
rogpeppefwereade: yeah, i was planning on restarting the service when the config changes14:19
fwereaderogpeppe, so most charms, AFAIK, just assume they're always started, and always run their software in c-c14:19
rogpeppefwereade: that doesn't surprise me14:20
rogpeppefwereade: so the start hook is pretty much redundant14:20
fwereaderogpeppe, you'd be technically wrong, but in good company, and constrained by not having a good way to do it right14:20
rogpeppefwereade: well, it would be easy to remember whether the start hook has been called or not14:20
fwereaderogpeppe, well, IMO the true problem is that we don't expose have-you-started-yet as an env var14:20
rogpeppefwereade: but is that a bad thing to do?14:21
fwereaderogpeppe, yeah, but it's be duplicated in every damn charm under the sun14:21
fwereaderogpeppe, it's a good thing to do, but it's working around juju being bad14:21
rogpeppefwereade: perhaps the start hook really is somewhat redundant in fact, and could be deprecated14:22
fwereaderogpeppe, mm, I think that stop/start are actually worthwhile14:22
rogpeppefwereade: is there some juju doc online that sets out the hook ordering guarantees succinctly?14:22
rogpeppefwereade: are you thinking about possible charm migration there?14:23
fwereaderogpeppe, looking ahead to the possibility of migrating units and their storage from one machine to another, yeah14:23
fwereaderogpeppe, https://juju.ubuntu.com/docs/authors-charm-hooks.html14:23
rogpeppefwereade: ah, that doc's perfect, thanks14:25
rogpeppefwereade: i guess if we always guarantee to call config-changed before start, we'd still be ok not implementing the start hook14:26
fwereaderogpeppe, that is true14:27
fwereaderogpeppe, I really ought to just expose started state in the env though14:27
rogpeppefwereade: that's true. although does that mean you should observe its value in every hook, and stop if it's not true... ?14:27
fwereaderogpeppe, or maybe actually $JUJU_STOPPED, so a test for an empty STOPPED value comes closest to matching behaviour in old jujus14:28
fwereaderogpeppe, I don't *think* so14:28
fwereaderogpeppe, config-changed is the only hook that'll run when not started14:28
fwereaderogpeppe, at least for now14:28
rogpeppefwereade: install :)14:28
fwereaderogpeppe, sorry14:29
fwereaderogpeppe, config-changed in the only hook that doesn't run in acontext where it can know whether it's started14:29
rogpeppefwereade: another unrelated charm question: where's a good place to put charm-specific persistent state?14:30
fwereaderogpeppe, if it's only going to be read by the charm, I think the charm dir is actually fine probably14:31
fwereaderogpeppe, the thing that freaks me out is writing stuff to the charm dir that will e read from outside a hook context14:32
rogpeppefwereade: what it's for example, a downloaded binary that is going to be used as an upstart service?14:32
rogpeppefwereade: or a config file for same14:32
rogpeppefwereade: that's the context i'm considering it in14:32
fwereaderogpeppe, I would keep those outside the charm dir14:33
rogpeppefwereade: um, yes14:33
fwereaderogpeppe, in my mind the dividing line is whether it's necessary for the software itself, or necessary for the management layer14:33
fwereaderogpeppe, so templates used in hooks? fine in the charm dir14:33
fwereaderogpeppe, stuff actually read by other processes? keep it outside, so that it's most likely to keep working even if juju manages to completely trash its own state14:34
fwereaderogpeppe, fail as safe as possible14:34
rogpeppefwereade: i know one charm that's using /etc/init/$appname:$servicename14:34
fwereaderogpeppe, that sounds sane to me14:34
fwereademarcoceppi, does that sound like a reasonably-best practice to you?14:34
rogpeppefwereade: i'm not sure that's great though, as it's vulnerable to hulksmashing14:35
fwereaderogpeppe, I'm pretty sure wedon't allow hulk-smashed units of the same service on the same machine14:35
rogpeppefwereade: i'd prefer to have the unit name in there too, and perhaps the env uuid too14:35
fwereaderogpeppe, modulo subordinates14:35
rogpeppefwereade: interesting. i wonder why not - it seems potentially useful for testing.14:35
fwereaderogpeppe, I don't think I have a well-reasoned answer to that beyond "it seemed like it opened more scary doors than useful ones"14:36
fwereaderogpeppe, would indeed be useful for testing14:37
rogpeppefwereade: actually, that does work14:37
fwereaderogpeppe, I think jam had some way around it?14:37
rogpeppefwereade: well, i'm waiting for the unit to come up...14:37
fwereaderogpeppe, hmm, you can just do it? interesting14:37
rogpeppefwereade: yeah, seems to work14:37
fwereaderogpeppe, and I see no code that would prevent it from so doing14:38
lazyPowerjose: ping14:38
fwereaderogpeppe, maybe it just got deleted when it was determined to be bloody hindering awkward for testing ;p14:38
rogpeppefwereade: well, i see a status with two started units from the same service on the same machine, which seems fairly clear14:39
fwereaderogpeppe, yeah, and I remember it being akward code to write too14:39
rogpeppefwereade: yeah, i think it's reasonable - it falls out logically from the basic juju operations14:39
fwereaderogpeppe, so, not really sorry to see it gone14:39
fwereaderogpeppe, just puts a slightly heavier burden on the charm author14:39
fwereaderogpeppe, and strongly pushes towards generating based on unit name14:40
rogpeppefwereade: if there was an easy way to get a name guaranteed to be unique to the charm, that would help14:40
rogpeppefwereade: because presumably with manual placement, it's possible to have services from several envs on the same machine... or maybe that's a step too far :)14:40
fwereaderogpeppe, my suspicion is14:41
fwereaderogpeppe, that that will fail in surprising and unhelpful ways, because of multiple machine agents trying to run at the same time14:41
fwereaderogpeppe, and I have half an inkling that the manual provider code checks for pre-existing machine agents14:41
rogpeppefwereade: yeah, the upstart service names aren't named using the env UUID14:41
fwereaderogpeppe, to prevent exactly that14:41
fwereaderogpeppe, although14:42
rogpeppefwereade: otherwise it would probably be fine14:42
fwereaderogpeppe, for general cleanliness' sake, we should absolutely be writing our code such that it should work14:42
rogpeppefwereade: oh, and /var/log/juju etc14:42
rogpeppefwereade: i wonder about $CHARM_UUID14:42
fwereaderogpeppe, mm, I have a suspicion the machine agents would try to recall each others' deployed units14:42
fwereaderogpeppe, UNIT_UUID?14:42
rogpeppefwereade: yeah14:43
rogpeppefwereade: although we've already got CHARM_DIR14:43
lazyPowerjrwren: ping14:49
jrwrenpong15:00
jrwrenlazyPower: you have great timing. I had a question for you.15:01
lazyPowerjrwren: awesome - whats up?15:01
jrwrenlazyPower: you first. You pinged first :)15:01
jrwrenlazyPower: ok, I'll ask first.  https://juju.ubuntu.com/docs/authors-hook-errors.html says always return error code zero from hooks. OK. How do I return from a hook in a "bad configuration" state.  e.g. charm was deployed with --config mycharmconfig.yaml   and the state of that config mixes known bad options.15:06
lazyPowerjrwren: was just following up on the fix you had for mongodb - did that make it as a backport to the precise charm as well?15:06
jrwrenI want the end user to somehow know their charm is misconfigured.15:06
jrwrenlazyPower: I know nothing about the precise charm. :(15:07
lazyPowerjrwren: you can read the config in the install/config-changed hook and return 1 if there are bad options mixed.15:07
lazyPowerbut afaik you cannot do that on the CLI at present. it wont halt during pre-deployment15:07
jrwrenlazyPower: is there a way to return an error string so that status show "bad config" or something ?15:08
lazyPowerjrwren: there's no state outside of "charm is in error" - the best case we have today is making sure you log the error in the unit log.15:09
jrwrenlazyPower: Thanks. That is the information I needed to know.15:09
lazyPowerjrwren: can you take a look at getting your patches to the mongodb charm backported and MP'd against precise?15:16
lazyPowerwould be wunderbar! if you could.15:16
jrwrenlazyPower: I'll add it to my chalkboard, at the bottom.15:18
lazyPowerthanks jrwren15:18
jrwrenlazyPower: My ETD on that is 2.5 years from now.15:25
=== tvansteenburgh1 is now known as tvansteenburgh
lazyPowerrick_h_ natefinch: Great session! Lots of good info in there! If you missed it: http://summit.ubuntu.com/uos-1411/meeting/22387/whats-new-and-upcoming-in-the-work-of-juju-ui-engineering/15:53
jrwrenlazyPower: https://bugs.launchpad.net/juju-core/+bug/139278616:24
mupBug #1392786: charm has no way to report error state <juju-core:New> <https://launchpad.net/bugs/1392786>16:24
lazyPowerbazinga16:25
mhall119marcoceppi: gaughen jose: who is going to present the Cloud & DevOps summary in an hour?17:51
marcoceppiI'm still at conference17:52
mhall119I think jose is at class, gaughen are you okay to do it?17:52
gaughendon't think I have a choice17:52
gaughenmhall119, I will be quick as I have another mtg17:52
mhall119not unless you have an urgent need not to ;)17:52
mhall119gaughen: you can go first, or last, if that would help you17:53
gaughenmhall119, first would be perfect17:53
gaughennow I need to go get my last session started17:53
rogpeppecan anyone tell me if open-port is idempotent?18:23
rogpeppei.e. if i call it twice with the same port, will it succeed the second time?18:24
jrwrenrogpeppe: afaik, yes. I'm 90% sure. :)18:31
rogpeppejrwren: :)18:31
rogpeppejrwren: i'm just being lazy and not reading the source code tbh18:31
jrwrenrogpeppe: nothing wrong with that. charm authors shouldn't have to read the source code.18:32
* rogpeppe is in that unusual position this afternoon :)18:33
rogpeppes/unusual/unaccustomed/18:39
=== CyberJacob|Away is now known as CyberJacob
=== kadams54 is now known as kadams54-away
=== kadams54-away is now known as kadams54
marcoceppirogpeppe: yes, iirc all juju commands are idempotent20:57
mwenninglazyPower, ping22:50
josemwenning: hey, you need help with anything?22:51
mwenningjose, I'm getting an error when I try to bring up juju - I'm behind a proxy and it keeps timing out.22:55
mwenningcan you help there?22:55
josemwenning: is that when bootstrapping?22:55
mwenninghttps://pastebin.canonical.com/12052122:55
mwenningyes.22:56
josemwenning: not canonical, could you mind pasting it to paste.ubuntu.com?22:58
mwenningjose, pastebin.ubuntu.com/9014361/23:03
josethanks23:03
josemwenning: if you're using a proxy and the MAAS cluster is on your local network, then the proxy is probably the issue23:04
josecan you access the MAAS admin site from your web browser?23:04
mwenningjose, yes, that part's working fine.23:06
josehmm, I'm not sure then23:06
josethis is more a MAAS thing than a Juju thing23:06
mwenningI've been using maas to do Certs23:06
joseyou're getting a 502 (Service Unavailable)23:06
mwenningjose, that's the maas server right?23:07
josemwenning: yeah. nothing related with Juju, unfortunately23:07
josesorry to not be of much help23:07
mwenninglooks like it's trying to access boot-images?23:07
mwenningI can bring up a browser and touch that page just fine23:07
josemwenning: mind a quick PM?23:08
mwenningPM?23:08
joseprivate message23:08
mwenningsure23:09
=== CyberJacob is now known as CyberJacob|Away

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