/srv/irclogs.ubuntu.com/2016/01/14/#juju.txt

=== natefinch-afk is now known as natefinch
=== thumper is now known as thumper-afk
tiagogomesHi, if I loose the juju state server, and I haven't ran the ensure-availability command, is all lost?11:54
=== mup_ is now known as mup
josetiagogomes: was your server turned off or completely shut down?13:21
joseby 'completely shut down' I mean destroyed forever13:22
tiagogomesjose I was talking about a hypothetical scenario. I'd like to know if was possible to recover from "completely shut down"13:23
josenot 100% sure on this13:24
tiagogomesok. what if I ran ensure-availability. And laster I acquired new hardware. Would it be possible to rerun ensure-availability so that a new state server starts on the new hardware?13:25
stubI think the review queue needs a kick. 30 mins and my MP isn't up.13:59
josestub: let me check if the merges I did cleared from the queue14:03
lazyPowerstub it may be behind a bit, when tvansteenburgh surfaces i'll poke at him to poke @ the logs and see if it needs cycled14:06
lazyPoweralso o/ stub14:06
stubta both of you14:07
stubo/14:07
lazyPowermornin jose14:07
lazyPowertiagogomes thats tricky14:07
stubI'm never sure if it has hung or if my ISP is being evil.14:07
lazyPowerstub :(  always a gamble14:07
tiagogomeslazyPower oh, can't just I add a state server?14:08
lazyPowertiagogomes nope. if you ran a single state server (no ha) and then destroy it, the chances of re-creating your model controller node are pretty minimal14:08
lazyPowerthere are some backup/restore tecnniques but i dont recall off hand what they were14:08
lazyPowernatefinch: didn't' you do a writeup to the list on how to recover from a tanked state server? or was it just how ot recover from missing .jenv files?14:09
tiagogomeslazyPower oh I think that you were replying to my first question. I asked after "<tiagogomes> ok. what if I ran ensure-availability. And laster I acquired new hardware. Would it be possible to rerun ensure-availability so that a new state server starts on the new hardware?"14:11
lazyPowertiagogomes - i think if you had one node still participating, you could reasonably re-create a HA state server, but restoring from a single node you're in for some heartache14:11
lazyPowerbut to 100% be certain of that i would need to confirm from core that its been tested14:11
lazyPowerthis is all theory at the moment14:11
lazyPowerbeisner still need that mysql mitaka sync landed?14:12
tiagogomesMy use case is that I purchase some blade server to use for JuJu. Later on I purchase another server and I would like to run the state server in the new server for high-availability, as they are in two different availability zones14:15
beisnerhi lazyPower - indeed if you've got cycles, please do.  TA!14:16
lazyPowerbeisner just pushed. LGTM14:16
lazyPoweri like what you did in tests/tests.yaml14:16
joseohai lazyPower14:43
lazyPowero/14:44
lazyPowerupdates14:45
natefinchlazyPower: howdy... not me, I don't think.  Maybe perrito666?  He's the restore master.14:45
* perrito666 feels summoned14:46
* natefinch waves at perrito666.14:46
* natefinch points at lazyPower.14:46
* lazyPower points at scrollback14:47
* natefinch sorta misses MUDs and all the emotes they had sometimes.14:47
beisnerthx lazyPower14:47
lazyPowerhaha14:47
lazyPowernatefinch did you MMUD bro?14:47
natefinchlazyPower: hugely in college... even ended up running a MUD for a while.14:47
lazyPowersame here, i pulled it out in 2014 and played a couple months worth of "let the bot autoroam in foreveralone mode"14:48
perrito666I see, it is theoretically possible14:48
perrito666although I never tried to do exactly that14:48
lazyPowertiagogomes ^14:48
lazyPowerseems like its theory, but not practice yet14:48
lazyPowerbeisner np np14:50
lazyPowerIf anyone is looking for some background noise, I just cut the final edit of the systemzoo podcast - episode 3 featuring former juju developers Wayne Witzel, and Whit Morriss - http://systemzoo.org/314:58
tiagogomeslazyPower ?14:58
lazyPowertiagogomes - confirmation that rebuilding from a fractured HA setup hasn't been verified14:59
lazyPowerperrito666 says its "theoretically possible" but it doesn't appear that we have data to back it up14:59
tiagogomeslazyPower, ha, what you mean by fractured.  I was hoping to rerun ensure-availability with a working system to make it even more HA15:00
perrito666backing up, changing a server and restoring should work but we never tested said feature as a migration, only as a rescue15:00
tvansteenburghstub: lazyPower: revq looks ok on the backend, should get to your mp eventually15:33
pmatuliscan juju use a network image store remote with the lxd local provider?15:37
matt_dupreI've pushed a bundle to Launchpad, but it hasn't appeared in the charm store (been a few hours).  I used lp:~project-calico/charms/bundles/<bundle-name>/bundle; but is there anything else I need to do?16:07
lazyPowermatt_dupre nope, that looks about right16:08
lazyPowerwe were having issues with ingestion in the last couple of weeks though16:08
lazyPowermatt_dupre - take a look here and if its a problem item add the url to the bug please - https://github.com/CanonicalLtd/jujucharms.com/issues/18916:09
matt_dupreWhat kind of time should I expect for a bundle?16:12
lazyPowermatt_dupre the longest you should have to waiti for a bundle ingestion is ~ an hour. publications using the launchpad ingestion system cycle every half hour16:13
matt_dupreOK, thanks lazyPower: I'll add a note to the issue16:13
lazyPowerthis problem will "go away" with juju 2.0 - as store upload is a direct process.16:13
lazyPowerwhile that doesn't help today, we're getting there quickly!16:13
=== Guest77121 is now known as med_
PrabakaranHello Kevin, Hope you are doing great !!. This is regarding IBM Java layer charm. Since it is a subordinate charm i am using ubuntu charm to test ibm-java subordinate charm.16:58
PrabakaranIn this case i am connecting ibm-java charm and Ubuntu charm via java interface. So before running charm build command layer.yaml file looks like this http://pastebin.ubuntu.com/14497095/ .16:58
PrabakaranIf I am connecting via java interface to test my charm, i have downloaded ubuntu charm and edited metadata.yaml file and mentioned provides as "java".16:58
PrabakaranNow if I want to connect ibm-java layer charm with Ubuntu charm with juju-info interface. I think I may have to change layer.yaml file before running charm build command.16:58
PrabakaranIf so, is there anything that i need to edit in the layer.yaml file, please advise how to connect Ubuntu charm and ibm-java layer charm with juju-info interface.16:58
=== scuttlemonkey is now known as scuttle|afk
=== scuttle|afk is now known as scuttlemonkey
tiagogomesHi, I am trying to boostrap JuJu on OpenStack but I am getting an not very helpful authentication failed. Is there a way to see more information about what's going on? I am using verbose mode. Also, does JuJu supports keystone v3?17:17
kwmonroehi Prabakaran - the java relation is needed to test your charm.  without it, the java states won't be set, which means you will not enter the code that does install or config-changed.  so i don't think you should change your ibm java charm to use juju-info.17:21
kwmonroePrabakaran: i'm working on the following, which is a generic ubuntu charm that already has the java interface for you.  if you deploy this, you shouldn't have to modify a local ubuntu charm.  instead, relate your ibm-java charm to ubuntu-devenv:  https://jujucharms.com/u/kwmonroe/ubuntu-devenv17:22
kwmonroePrabakaran: the nice thing about a generic ubuntu-devenv is that we can use the same thing for stuff like ibm-xlc and ibm-fortran, in addition to jdk providers like ibm and zulu.17:23
PrabakaranThanks kevin, i will test my charm with ubuntu-devenv charm17:25
kwmonroecool - good luck Prabakaran!  once i get tests added to that charm, i'll put it up for review.  until then, you can deploy it in a test like this (note the cs:~kwmonroe namespace for ubuntu-devenv): http://paste.ubuntu.com/14497345/17:27
tiagogomesdoes JuJu boostrapped on OpenStack requires Swift?17:40
bdxmbruzek, lazyPower: Nice work on layer-k8s and layer-tls!  After giving it some thought, and reviewing what I'll be trying to do alot of using the tls-layer, I feel like I need to use the  ca(), client_cert(), and server_cert() functions in k8s.py, everywhere I will be using layer-tls. Should/could those functions just be part of layer-tls?17:45
lazyPowerbdx we're considering shipping a lib w/ the tls layer17:46
lazyPowerthat would be a good abstraction point17:46
bdxlazyPower: each of the three functions, and the other two functions they depend on could just be defined in lib/tlslib.py and accept an input parameter of dest_dir?17:50
lazyPowersomething like that17:59
lazyPowerwe like the idea of key retrieval from unit data17:59
lazyPowerits all nicely encapsulated there in the charm state store, so why not?18:00
lazyPoweryou can put it wherever you want18:00
lazyPowerkeep it in memory if thats something you're into18:00
lazyPowerskys the limits18:00
lazyPowerbdx: file a bug and lets sketch what it looks like there18:00
lazyPoweri'lll ping the list about it, see how many "does this work with lets encrypt" responses and then land a lib18:01
bdxlazyPower: sweet!18:17
bdxwill do18:17
iceywhat's the policy with regards to layers on python versions, I'm trying to use a layer that does not work on python3 but works fine on python218:24
lazyPoweri think we're targeting python318:25
lazyPoweri know stub has strong feelings on this. I feel like as a whole we are moving away from python2 as its long since deprecated.18:26
iceythat's what I was hoping to hear :)18:26
iceyI notice that the hooks generated with charm build use /usr/bin/env python318:27
bdxlazyPower, mbruzek: like this https://github.com/jamesbeedy/layer-tls/blob/port_k8s_to_tls_lib/lib/tlslib.py ?18:34
lazyPowerbdx add some unit tests and you're talkin buddy!18:35
lazyPowerbdx btw we like py.test <318:35
bdxlazyPower: Is there a way to run my tests w/o deploying the layer/charm?18:49
lazyPowerjust unit tests, if you want to functionally test it, you'll either need to provide the env its expecting or mock it out like crazy.18:49
lazyPowerbdx i have a few concerns of mixing state in a library, as that seems like a layer should be doing that18:51
bdxentirely, I was wondering about that too18:52
lazyPoweri suppose if its properly namespaced, theres no harm in it, but in the event that webapp.certificate.available ever is set in another layer... its going to cause unintended side effects18:52
lazyPoweri think if it just performs the system level operation, and is used like a helper18:52
bdxtotally18:52
lazyPowerand all state is set outside of that utility library, its good as is, just needs some uniform docstrings and unit tests18:53
bdxlazyPower: https://github.com/jamesbeedy/layer-tls/blob/port_k8s_to_tls_lib/lib/tlslib.py19:12
lazyPowerbdx i like where this is headed19:13
lazyPower+1 to your docstrings19:13
bdxthx19:13
bdxlazyPower: so looking into unit_tests, I want to start with the unit_test template for a charm modified for this layer19:14
bdxlazyPower: https://github.com/jamesbeedy/layer-tls/blob/port_k8s_to_tls_lib/unit_tests/test_actions.py19:14
bdxis this ok/recommended in a layer?19:14
lazyPowerbdx thats fine, i've also adopted a py.test pattern here - https://github.com/juju-solutions/charms.docker/blob/master/tests/test_docker.py19:15
lazyPowerbut i also made this a proper python package that is nested in charms.d19:16
lazyPowercharm.*19:16
lazyPowers/m./ms./  # epic typing fail of the week achieved19:16
bdxwow, really cool19:17
lazyPowerbdx just basic python unit tests19:17
lazyPoweri try to keep my code as concise as possible so i'm only done one, and at most two mocks at a time while testing the code19:17
lazyPowerstacks of mocks get messy, and i dont always trust that i'm testing what i think i'm testing19:17
bdxlazyPower: I feel like I need the keys to exist to be able to test the functions in lib .... should I create optional input params to those functions for source_directory?19:23
lazyPoweryou can make it a test fixture19:23
lazyPowerbe aware that unitdata.kv() will create a db in the directory that is running the tests19:23
lazyPowerand need to clean itself up19:23
bdxlazyPower: so I could essentially create a fixture for layer-tls, or just for each of the functions?19:25
lazyPowerjust for that test file19:27
lazyPowertest fixtures aid in ssetting up things like controlled files on disk so you can create/remove a database in between tests, or only at start/end of test run19:27
lazyPowerbdx https://pytest.org/latest/fixture.html19:27
bdxwow, really cool19:39
lazyPowerbdx: sorry split brain. i re-read the scroll back and yeah - i would make some optional input parameters, and also template a couple of throw away certs to load in as fixture data19:50
lazyPowerthat way you're not married to having the amenities provided by the layer, you're only dealing with the end certificates w/ examples to test with in that lib. that will keep the sep. of concerns to a minimal.19:51
bdxlazyPower: ok, what about things like JUJU_UNIT_NAME ?19:58
bdxhttp://paste.ubuntu.com/14498348/19:58
bdxlazyPower: should I just set the env vars that it needs in the tests?19:59
lazyPowerthose are environment variables when they are read in, so now we're heading into mocking out os.environ19:59
lazyPoweror setting those in the fixture19:59
bdxgotcha19:59
aisraellazyPower: "Authors can use this hook to take action if their protocols for20:09
aisraelleadership, consensus, raft, or quorum require one unit to assert leadership." <-- should raft be draft?20:09
lazyPowernegative. Raft is a consensus algorithm20:10
lazyPoweraisrael ^20:10
aisraellazyPower: ack, thanks!20:10
aisraellazyPower: This a good link? https://en.wikipedia.org/wiki/Raft_(computer_science)20:10
lazyPoweraisrael indeed20:11
aisraelWow20:13
aisraelWrong window ^_^20:13
lazyPoweraisrael mind = blown? :)20:15
aisraelpwoooosh20:15
iceyhttps://gist.github.com/ChrisMacNaughton/f8a6e9b32b8d9bccfbe5 is replacing newlines in the output file with nothing and I can't figure out why; if I print privkey to stdout, it has newlines correctly but the written file has none, I've tried splitting on \n and iterating on lines, I've tried leaving the base64decode result as bytes and opening the file as binary20:39
hatchhas there been any discussion around adding 'required' fields to a charm configuration?20:40
aisraeljrwren: Hey, is this ready for re-review? https://code.launchpad.net/~evarlast/charms/trusty/apache2/trunk/+merge/27822020:49
jrwrenaisrael: yes, iirc20:50
jrwrenaisrael: or no.20:50
jrwrenaisrael: if the tests pass, then yes. otherwise, no.  Sorry, I lost track of that one.20:51
bdxlazyPower: https://github.com/jamesbeedy/layer-tls/blob/port_k8s_to_tls_lib/unit_tests/test_actions.py20:52
bdxlazyPower: any pointers from here?20:52
bdxlazyPower: https://github.com/jamesbeedy/layer-tls/blob/port_k8s_to_tls_lib/lib/tlslib.py20:53
aisraeljrwren: ack. I'll re-test and bump the bug if it needs attention20:54
jrwrenaisrael: thanks.20:54
lazyPowerbdx close, i dont see any assertions20:54
bdxahh entirely..... what should I assert though? just '0' ?20:55
bdxoooh20:55
bdxI should assert that the certs are in the correct places after the functions are ran/tested20:55
lazyPowerthat or just verify the write operation was called20:56
lazyPowerwe dont have to test python, we should test that we're using python correctly though20:56
iceylazyPower: ever use base64 to pass blobs of data into charm configs that you end up writing out to a file?20:59
lazyPoweri have20:59
iceya layer I'm trying to use does that but it doesn't work correctly, (stripping newlines?!)20:59
lazyPoweruhh20:59
lazyPowerwhat?20:59
iceywant to see the code?21:00
lazyPowerwhat layer?21:00
lazyPoweryeah21:00
iceyhttps://plus.google.com/hangouts/_/canonical.com/juju-client21:00
iceyand the layer is the juju-client one21:00
icey:-P21:00
lazyPowericey i'm in standup room atm21:00
iceydoing standup or hanging out?21:00
lazyPowerit might still happen ;)21:00
lazyPowernot sure yet, we have 5 minutes for it to go either way21:01
iceyhahaha21:01
iceythis shouldn't take 5 :)21:01
iceybut I can wait too :-P21:01
iceylet me know21:01
bdxlazyPower: now? https://github.com/jamesbeedy/layer-tls/blob/port_k8s_to_tls_lib/unit_tests/test_actions.py21:14
iceylazyPower: maybe we can look at it in the AM if I can't figure it out by then :)21:47
lazyPowericey Sounds like a plan21:47
lazyPoweri need ot EOD soon21:47
lazyPowerbdx Hit me with a PR in the morning and i'll review21:48
iceyme too :) started tearing down my aws env and realized we had an outstanding maybe today :)21:48
lazyPowerhaha, right on icey  thanks for circling back21:48
iceycourse lazyPower, will ping you tomorrow if I haven't cracked it by then :)21:48
beisnercoreycb, first of many mitaka amulet test enablement MPs, ready for review/landing if ya will:  https://code.launchpad.net/~1chb1n/charms/trusty/cinder/next-amulet-mitaka-1601/+merge/28251922:04
coreycbbeisner, ok22:04
lazyPowerbeisner: how did that ppc64 patch go?22:16
lazyPowerfrom sfeole22:17
beisnerlazyPower, thx for directing us to that.  gave feedback on the MP re: targeting at a different charm branch.  /me --> EODs22:31
ennoblecould someone explain to me how the runcmd file that is handed to cloud-init is created by juju?22:34
=== bradm_ is now known as bradm
bdxIs there a way to direct `charm generate` to grab layers from charms/layers if they exist instead of from there repos?23:24
bdxwhoops ... my bad, looks like it already does :-)23:25
bdxI can spell23:30

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