/srv/irclogs.ubuntu.com/2018/05/02/#juju.txt

babbageclunkno, it'll be in the api package - this is the kind of thing I was thinking of: https://github.com/juju/juju/blob/develop/api/controller/controller_test.go#L37500:01
babbageclunkveebers: ^00:01
veebersbabbageclunk: excellent, that looks to be exactly what I want, thanks!00:07
babbageclunkcool00:08
[Kid]anyone had issues with juju deploying openstack on hosts that have shared storage?00:58
[Kid] hook failed: "mon-relation-changed" for ceph-mon:osd00:58
[Kid]https://paste.ubuntu.com/p/Y6Hh758CPQ/00:58
vinobabbageclunk: i have added unit test cases for verifying systemd failure and addressed review comments01:02
babbageclunkbabbageclunk: ok, taking a look now01:02
babbageclunkdoh, I mean vino^01:02
vinobabbageclunk: the push is still going on :)01:02
vinoits done..01:03
vinobabbageclunk: I am working on PR: https://github.com/juju/juju/pull/867001:45
veebersanastasiamac, babbageclunk: If you have a quick moment I would love a hand with this test, trying to do something similar to what babbageclunk linked above, but for api.Client (It currently doesn't have the option to pass in a apicaller at client creation, so I can't inject the best api version value)02:21
anastasiamacveebers: lemme find u an equivalent in api tests :) gimme a sec...02:21
veebersanastasiamac: cheers, I've looked but couldn't find one that would let me test FindTools returning the right error02:22
anastasiamacveebers: k, mayb m not understanding what u r after... i thought u wanted something similar to what's in https://github.com/juju/juju/blob/develop/api/caasunitprovisioner/client_test.go#L2702:23
veebersanastasiamac: something like that is what I was hoping for, wanting to test https://github.com/juju/juju/blob/develop/api/client.go#L284 but the current tests (example) https://github.com/juju/juju/blob/develop/api/client_test.go#L55 getting a Client I'm not sure if I can passing an APICaller so I can set best api version02:26
babbageclunkveebers: sorry, otp02:29
anastasiamacveebers: have u tried patching  a facade call (here best version) similar to https://github.com/juju/juju/blob/develop/api/client_test.go#L20802:29
anastasiamacveebers: the same test file, line 333 has another patch example...02:30
anastasiamacveebers: but geenral comment - we are not too thrilled to have JujuConnSuite based tests anywhere but in featuretests pkg... maybe the work u r doing, at least the tests, should reside in a new suite that complies with current standards? :D02:32
anastasiamacveebers: m happy to discuss \o/02:32
veebersanastasiamac: that patch example is pretty much my backup of what I wanted to do, but don't want to make people non-thrilled :-|02:38
veebersanastasiamac: perhaps I'll implement the test this way and we can chat about a better way once i've added it to my PR?02:39
babbageclunkveebers: oh wow, sorry - I didn't realise those tests were using JujuConnSuite.02:43
babbageclunkveebers: The simplest thing is probably what anastasiamac suggests - make a new suite that works like the controller test I linked to, and just has one test for the version check.02:46
anastasiamacveebers: babbageclunk +1 on a new suite :D02:47
veebersanastasiamac, babbageclunk ok I'll give that a whack. New suite in the api/client_test.go file/02:48
veebers?02:48
babbageclunkveebers: yup02:48
babbageclunkveebers: use that controller test one as an example - the gc.Suite call is important to register it. I don't think you'll need a setup or anything either.02:49
anastasiamacveebers: purest opinion - each suite deserves its own file :) but i can b swayed02:49
babbageclunkI think that's overkill :)02:49
veebersack, ack I'll give it a whack02:49
anastasiamaclike i said :D02:49
anastasiamac"purist" does not always mean "worth in practice" :D02:50
babbageclunkThen you're a realist like me, we just disagree about exactly where the line is!02:51
anastasiamacbabbageclunk: one of the best things that vino siad to me "when ppl disagree, they progress [when trying to find a solution together]" :D i LOVED it02:53
anastasiamacveebers: and fwiw, m *thrilled* u r  working in (and with) juju codebase \o/ really...02:54
vino:)02:55
veebersanastasiamac: ^_^02:55
babbageclunkanastasiamac: true - if we all agreed it would just mean that we suffered from groupthink02:55
anastasiamacbabbageclunk: but on a srs note, m looking at a _test* file  2,779 lines long.... surely this is insane in any book :D02:57
babbageclunkugh02:58
veebersanastasiamac: yeah that's crazy, someone should have removed 2 lines to make it 2,777 lines. That number looks *heaps* nicer02:59
veebers(or ultimately remove 555 lines to make it even nicer ;-))02:59
anastasiamacveebers: i was thinking to round it up to 3K :) surely 000s r prettiest :D02:59
anastasiamacveebers: yeah or to round down as u suggest :)03:00
veebersanastasiamac: true, but that would mean adding more lines. Perhaps a bunch of: /**********************************\n * This is a comment\m ***************************************/03:01
anastasiamacnice :0 yes, i love this pseudo-latin that gets added everywhere as an example text... worth having our copy in this file :D03:02
veeberssorry anastasiamac, babbageclunk I've hit a blank. The controller client can be created with controller.NewClient(apiCaller), but api.Client cannot (from what I see) there is only this; https://github.com/juju/juju/blob/develop/api/state.go#L26403:32
* anastasiamac looking03:34
anastasiamacveebers: do u have a sec to ho?03:36
veebersanastasiamac: I sure do, standup?03:37
anastasiamacveebers: yes! let's03:37
babbageclunkveebers: oh man, I'm sorry - this is way more difficult than I'd have expected. In the end I don't think it's essential to have a test for this.03:38
anastasiamacbabbageclunk: u r hurting my ears :(03:41
babbageclunkI'm just not sure it's worth it. And while I was looking for a good example I found lots and lots of API clients that were checking the facade version but didn't have tests for it.03:42
anastasiamacbabbageclunk: i think that we r also leaning out client so that we can burn it away altogether... so i agree, if veebers will enjoy the exercise of figuring out how to test client without JujuCOnnSuite (for example by mocking the state call that return Client()), then he'll b pioneering a new territory... if however, it gets too furstrating, let it go...03:46
babbageclunkyay!03:50
veebersbabbageclunk: this being a facade ver change, it needs to get in for the beta2 release so it can make it into 2.4 right?04:07
anastasiamacveebers: babbageclunk: we prefer not to bump facade versions in point releases, so it's bets of it's in before 2.4.004:15
anastasiamacand , of course, the more test driving it gets, the better...04:15
anastasiamacso the earliest u can but may b not strictly a  must for 2.4-b2?..04:16
veebersanastasiamac: if we go b2 -> rc -> rc I'll def need it in b2 :-)04:16
anastasiamacit'd b nicer, yes04:17
veebersanastasiamac, babbageclunk: I got a solution for that test (thanks anastasiamac) It's pretty barebones in that it only allows to test for the failure I was looking for. Could I get a re-review when you're free?05:21
babbageclunkveebers: looking now05:22
veebersthanks babbageclunk, I'm sure sometime in the future I'll leave you alone so you can actually get your stuff done ^_^05:22
babbageclunkveebers: yeah, that looks great! Did anastasiamac tip you off about export_test?05:24
veebersQuery, whats' needed for a charm to handle an upgrade? For instance setting up mediawiki related to a db works (status goes from blocked (needs db) -> started) do an update and status changes to blocked (needs db) but the application continues to work (i.e it's not blocked)05:24
anastasiamacbabbageclunk: noooo, veebers figured it all by himself... i was watching the magic05:24
babbageclunksmooth05:24
veebershah, I had help from anastasiamac, she pointed me in the right dir05:24
babbageclunkveebers: hmm, not sure why the status says it's blocked if it's connected to the db05:26
veebersbabbageclunk: yeah, I suspect (based on something wallyworld said) that the charms not handling the hooks properly when things get updated? (I'm not sure what exactly gets re-fired etc.)05:27
babbageclunkveebers: yeah, that sounds plausible - I think it's config-changed?05:36
veebersbabbageclunk: cool thanks. I may have a look as it'll make this CI test change easier05:50
TheAbsentOneIf I get the message "clear_flag" unknown does that mean I have a version issue? Also how do I properly check the version of reactive framework/juju?09:25
TheAbsentOnewow client crashed >.>09:57
TheAbsentOnekwmonroe you here by any chance?10:34
TheAbsentOnenvm fixed it!10:46
TheAbsentOneis charms reactive tool from pip broken?11:02
TheAbsentOneis adam gandelman on this Irc?11:36
rick_h_TheAbsentOne: shouldn't be broken from pip. What's the issue?11:38
TheAbsentOneI installed charms.reactive but when I try to run ``charms.reactive -p get_flags`` I get invalid syntax error and some traceback11:40
TheAbsentOnerick_h_11:40
TheAbsentOnesame with a --help11:40
rick_h_TheAbsentOne: this is run via juju run on a unit or something?11:40
rick_h_TheAbsentOne: it's a library, not a command line client. I'm not following what you're trying to do here.11:41
TheAbsentOneI tried to do this: https://jujucharms.com/docs/2.2/developer-debugging rick_h_11:42
TheAbsentOnebut allow me to ask how I can retrieve a list of all flags?11:43
rick_h_TheAbsentOne: so I'm confused. corey_fu is setting me straight11:43
rick_h_TheAbsentOne: looking at it, sec11:43
rick_h_TheAbsentOne: so you installed charms.reactive from pip in what fashion?11:44
TheAbsentOnefirst with pip install charms.reactive, then with pip3 - same issue11:44
TheAbsentOnehttps://pastebin.com/8X6c2iEX rick_h_11:44
rick_h_TheAbsentOne: ok, that's not python 2 compatible11:44
rick_h_TheAbsentOne: so let's try something11:45
rick_h_TheAbsentOne: run `sudo updatedb` and then once that completes `locate charms.reactive | grep bin` and see what comes out11:45
TheAbsentOneahn I uninstalled with pip and reinstalled with pip3 and it seems to fix it11:46
TheAbsentOneI do get an empty list though :( thanks for the help rick_h_11:48
rick_h_TheAbsentOne: huh, well I messed something up then because you're clearly running something with charms.reactive11:49
rick_h_TheAbsentOne: try this `which charms.reactive`11:49
TheAbsentOneohn but the locate command found stuff, under usr/local/bin11:49
TheAbsentOneand in my home folder too rick_h_11:50
rick_h_TheAbsentOne: ok, so now let's see what `ls -al /usr/local/bin/charms.reactive` shows11:50
rick_h_TheAbsentOne: yea, basically when you pip3 installed it there should be another version that is py3 and should work around somewhere11:51
rick_h_TheAbsentOne: so I'm trying to find the py3 so we can test it out11:51
TheAbsentOnethe command returns nothing interesting only the file itself11:51
TheAbsentOnebut there is a charms.reactive.sh right? Isn't that what you are looking for?11:52
TheAbsentOnerick_h_: https://www.dropbox.com/s/d5ejpkz49frlwvk/tempclicharms.png?dl=011:53
rick_h_TheAbsentOne: so let's try the one in your local directory and see if that works11:54
rick_h_TheAbsentOne: the other thing might be we can edit the .sh script and point the top of it to python3 vs python211:54
TheAbsentOnebut right now the command is running fine rick_h_ or is it something else you want to figure out?11:56
rick_h_TheAbsentOne: ok, if it's running fine now okie dokie11:56
TheAbsentOneunless I can help you with something about it? ^^11:57
TheAbsentOnesay rick_h_ do you want to give a quick look at something11:57
rick_h_TheAbsentOne: shoot11:58
TheAbsentOnerick_h_: So I'm creating a charm that uses the mysql-shared interface and the apache-layer to deploy apache and setup some pages in a wordpress like way. But it seems the mysql charm doesn't properly accept my request11:59
TheAbsentOnehttps://pastebin.com/4znUZhvv this is my charm's heart11:59
rick_h_TheAbsentOne: so does the apache unit have the default apache index page when you get it running at /index.html?12:01
TheAbsentOnerick_h_: I assumed that worked (as I did a similar thing before) but nope, weirdly enough it installs the pages correctly but the service doesn't get started for some reason12:04
rick_h_TheAbsentOne: did you expose apache?12:04
rick_h_TheAbsentOne: is this on a public cloud with all ports closed by default and you'd need to use expose to open the port for the charm?12:05
TheAbsentOneno public cloud (vmware cluster only accessible with a vpn) but I exposed it yeah12:07
TheAbsentOnelet me start the service manually12:08
rick_h_TheAbsentOne: I mean I'd start with testing can you get the normal apache charm to work out and serve out the basic page on there first. Then look at how the charm works vs the layer and see what you might need to pull/copy12:08
TheAbsentOnerick_h_: Yeah exactly I got that working before, I'll come back to you when I fix it. I'm just a bit confused right now. When I try systemctl restart apache2 I get asked for a password, is there a default password juju uses for things like this?12:11
rick_h_TheAbsentOne: did you sudo do it?12:12
TheAbsentOneUrgh >.> I'm really not paying attention thx rick_h_12:12
rick_h_TheAbsentOne: sorry, let me know if I can help. I'm tossing around different sessions at a sprint but I'll try to check in12:12
TheAbsentOneso basicly when I do that, the apache layer stuff is fine, this means I have to do it in a hook I guess12:13
TheAbsentOnenp rick_h_ thanks for helping out!12:13
rick_h_TheAbsentOne: yea, might have to restart I guess if you change something there and the charm is doing it but that's not baked into the layer12:13
TheAbsentOneexactly, I'll put the repository on github soon too, will make things easier to correct! After lunch ;) talk to you in a bit rick_h_12:14
=== zeus is now known as Guest44752
=== Guest44752 is now known as zeus
TheAbsentOnehttps://pastebin.com/gRcQJ3Dg do you need something more then this: ``database.configure('proto', 'admin', 'admin', prefix="proto")`` for the mysql-shared interface? Can't figure out why mysql charm is failing here14:35
stubDo we still care about precise support in charm-helpers ?16:16
=== grumble is now known as xn--3s9h
TheAbsentOnecould someone explain me why there is no interface:http in the vanilla tutorial/example layer-charm (https://jujucharms.com/docs/2.3/developer-layer-example)20:13
TheAbsentOneand a provides: with that interface20:14
veebersMorning team o/20:25
TheAbsentOnenvm my question, it's late here figured it out. Morning for you veebers goodnight for me ^^20:44
veebersGood night TheAbsentOne o/20:45
veebersif a charm does "juju-log" where can I see that log message? can I use juju debug-log or similar, do I need to jump onto a machine to see logs?23:05
=== beisner_ is now known as beisner
veebersno, better question I know you can show the log of hooks run, but I can never remember how to do so23:45
babbageclunkveebers: I'm not sure off the top of my head. I think they'll be in debug-log, but in the log for the model rather than the controller (which is where I'm normally looking).23:49
veebersbabbageclunk: ah, perhaps thats it. cheers23:49

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