/srv/irclogs.ubuntu.com/2016/06/28/#juju.txt

=== verterok` is now known as verterok
=== frankban|afk is now known as frankban
=== dpm_ is now known as dpm
tzob1xhello!!10:50
tzob1xI get this error Services not running that should be: neutron-plugin-openvswitch-agent10:53
tzob1xI cannot start it from terminal10:54
tzob1xmaybe you know what should I do?10:54
tzob1x:)10:54
=== Guest98782 is now known as spammy
=== tinwood_ is now known as tinwood
cory_fujcastro: Hey, I still need you to update the wiki-simple bundle since I don't have push perms for it in the store14:50
kjackalcory_fu: after nodejs we hit: https://jujucharms.com/apache-processing-spark/15:30
kjackalsorry15:30
kjackalwe hit ImportError: cannot import name 'node_dist_dir'15:30
cory_fuOk15:31
cory_fustokachu: Can you confirm that you intended https://github.com/battlemidget/charm-layer-ghost to be using https://pypi.python.org/pypi/nodejs?15:31
stokachucory_fu: never heard of that python module15:32
cory_fuOooh, I see!15:32
mskalka%n15:32
cory_fustokachu: Ok, thanks.  I see the issue now15:32
mskalkaignore that :X15:32
stokachucory_fu: :D i think i haven't updated the import path there15:32
stokachuin lib/charms/nodejs15:33
cory_fuYep15:33
stokachucory_fu: are you submitting a PR or I can do it  right quick15:33
cory_fustokachu: I'll submit a PR15:33
stokachucory_fu: awesome thanks man15:34
cory_fuHave some other changes I'd like to suggest15:34
stokachuperfect sounds good15:34
=== mskalka is now known as mskalka_afk
=== mskalka_afk is now known as mskalka
mgzcory_fu: poke about juju plugins specific change16:15
mgzcory_fu: I have proposed <https://github.com/juju/juju/pull/5731> - can you eyeball it and yell if you see any issue?16:16
bdxhey whats up guys? Is ppa:juju/daily no longer being maintained?16:21
bdxguess I should throw that in #juju-dev16:21
mgzbdx: it is... we just have the issue it was designed to be updated whenever we have a version that passes in CI16:22
mgzI will let you finish that line of logic in your head16:22
bdxha16:23
bdxmgz: ok, thanks16:23
stubcory_fu: I wonder.... if @hook(cb) simply set cb._reactive_phase = 'hook', then the main loop just needs to perform the same loop over the handlers several times (once for each phase) ignoring handlers not in that phase. And @when and friends would need to propogate the attribute of course.16:36
cory_fustub: That's basically what it does now.  The problem is that we want @when + @hook to trigger the when bit, but we don't want @when by itself to trigger, which is hard to do with just a "phase" var16:38
cory_fuOr perhaps I'm not following your suggestion16:38
cory_fuHrm, yeah, I was distracted when reading it and I think I might have misunderstood16:39
* mgz tears and cory_fu16:39
stubI tend to think an empty when should always trigger (in the 'other' phase) (but would think that a separate issue)16:40
mgzcan you take a look at my mp or wave another eco guy at it? ^^16:40
cory_fustub: Yeah, I didn't mean an empty @when (as in, @when() with no states).  I meant a @when w/o a @hook or @action.  I think I have an idea of how to resolve the issue, from your suggestion.16:42
cory_fustub: Just to be sure I understand, you're suggesting that all cb have a default phase of 'other' and @hook changes it to 'hook' which lets that handler be considered in that phase, while handlers with the default 'other' are not, and the phase checks that are currently done in @when should be dropped16:45
cory_fuHrm.  I just remembered why I didn't do it that way to start with.  External handlers can't attach metadata like that.  But I think I can make it work since there have been some changes in how external handlers are checked since the phase checking was first added16:46
stubcory_fu: yes.16:46
stubcory_fu: And renaming the 'other' phase to 'main' might be a good idea ;)16:47
cory_fuCertainly16:47
cory_fustub: Thanks for the help ont his16:47
cory_fu*on this16:47
=== zul_ is now known as zul
cory_fumgz: The plugin change seems perfectly reasonable to me16:50
mgzcory_fu: thank you!16:50
=== frankban is now known as frankban|afk
petevgI've got a question for anyone knowledgeable: do we have any best practices for unit testing layered charms?17:04
petevgIt looks like the Makefile for our layered charms has a "unit_test" entry by default, which attempts to run tox.17:04
rick_h_petevg: I think the openstack folks would have loads to say on that along with cory_fu and kwmonroe who have the experience on the hadoop charms17:05
petevgI picked cory_fu and kwmonroe's brains this morning. They said that I should start a convo on #juju :-)17:05
petevgThe hadoop charms have loads of integration tests and smoke tests, but no real unit tests yet.17:06
cory_fupetevg: I know jamespage has talked about unit tests in the openstack charms, if he's still around, though I understand much of that was focused on pulling the bits that made since to unit test out into separately packaged libraries rather than testing them directly in the charm.17:07
petevgPulling libs out of the charm doesn't sound like the worst strategy ...17:08
cory_fuHe also mentioned that they use a repo structure that is slightly different from what we use on the big data charms in that they have the layer itself nested one directory deep in the repo so that they have an outer layer to keep all the bits that are necessary for the layer (like unit tests) but that don't make sense in the final built charm17:08
petevgInteresting.17:09
petevgHiding the unit tests somewhere makes sense.17:09
petevgThe main thing that I'm trying to figure out how to do is to build up a virtualenv suitable for running unit tests in without duplicating the logic the populates wheelhouse in a layered charm.17:09
cory_fuThat also touches on the need we have to be able to nest base layers in subfolders of repos for upstream purposes while still having them be usable during charm build17:09
stubTo start with, I think we need a fixture that lets us specify relevant current state, call a handler (with suitable mocks), and inspect the resulting state. So testing handlers is just like testing any other function.17:10
cory_fupetevg: The wheelhouse.txt file is in the same format as a requirements.txt and can be referenced from within a tox.ini17:10
petevgcory_fu: cool. That makes that easy :-)17:10
cory_fustub: Since reactive decorators don't actually wrap the functions, they can be called (and thus tested) directly already.17:11
stubThat was easy then :)17:12
cory_fuJust pass in Mock() objects in place of relation instances.  If the handler manually checks states, of course you have to handle that.  Also, it doesn't let you verify that your state patterns do what you want17:12
cory_fuI do wish we could come up with a way to render the state graph as a means of verifying it, but it's too flexible as currently impelemented (which is not necessarily a bad thing)17:13
petevgWhat I'd like to avoid doing is having tests that are so mocked out that they aren't really doing anything that a linter doesn't already do.17:13
cory_fupetevg: +117:14
cory_fuThat's my concern with testing reactive charms currently.  Especially with reactive charms around things like Bigtop, where all of the heavy lifting is done in something like Puppet17:14
lazyPowercory_fu - charms.reactive -p get_states is my new favorite thing ever17:15
stubI still can't see a way around integration tests. Just need to minimize them since they are slow.17:16
mbruzekWhy did it take so long to learn about this option?17:16
cory_fulazyPower, mbruzek: I usually prefer -y (though I completely forgot there was a shortcut and always used the --format=yaml long-hand)17:17
cory_fu-p is pretty nice, too17:18
stubpetevg: Can you just reuse the cde to build a wheelhouse from charmtools.build ?17:18
lazyPowerhttp://paste.ubuntu.com/18038388/  for those following along at home and have no idea what -p does to that command :)17:18
cory_fustub: Definitely still have to have integration tests.  But like you said, we'd all prefer to minimize them.17:19
petevgstub: probably. Though it looks like I don't need to do too much more than just point tox at wheelhouse.txt as its requirements.txt.17:20
petevg... though I guess wheelhouse.txt goes away once you build the charm. And before you build the charm, you are missing any layers that it depends on, so your unit tests will fail on import.17:24
petevgIn any case, I think that I have a place to start. Thank you, everyone.17:25
stubpetevg: If you need API provided by a dependency layer, you are probably going to need to charm-build your layer and run the tests there17:32
petevgstub: yep. Which is not super unit testy (at least, not Python unit testy). But I'm not sure that there's a great way to work around it :-/17:33
stubI think it is either that, or mock your dependencies entirely17:33
joseballoons: happy birthday!17:33
petevgstub: yep. The point where one starts mocking out imports is the point where one has perhaps mocked a bit too far, though :-)17:33
stubAre you mocking my idea?17:34
petevgOnly a little :-)17:34
stubpetevg: ... you could assume your dependencies are in $LAYER_PATH and futz your import path and compile the wheelhouse.txts...17:35
petevgTrue ...17:36
stubc/compile/combine/17:36
petevgThere's no guarantee that someone will actually have their layer dependencies checked out, though.17:36
stubI need to investigate my idea of embedding dependency layers in git subtrees17:36
petevgthat sounds interesting.17:37
LiftedKiltquestion on the ceph-osd charm - it states that the default option for osd-journal is "no journal device will be used." Does that mean journaling is done per disk on the osd? or is journaling literally disabled17:45
cory_fustokachu: I'm hitting an issue with ghost now with encoding: http://pastebin.ubuntu.com/18040360/17:46
cory_fuIt looks like my default encoding is ANSI_X3.4-1968 for whatever reason (this is local provider in 1.25)17:46
cory_fuI'm not sure what the right way to handle that is17:46
stokachuhmm17:47
cory_fu(For comparison, on my laptop, the preferred encoding is UTF-8)17:47
stokachucory_fu: try replacing with check_call('npm install --production', shell=True)17:49
stokachufrom subprocess import check_call17:49
stokachumaybe it's that shell library im using17:49
cory_fuYeah, shell is setting universal_newlines=True which is causing the implicit decode, but I'm not actually sure why the preferred encoding isn't UTF-8 anyway17:50
stokachuyea that is odd17:50
=== valeech_ is now known as valeech
cory_fuBut I guess this is just more evidence that implicit conversions are a bad idea17:52
cory_fuWTG subprocess and by extension, shell17:52
stokachu:D17:53
stokachuwe should probably switch out that shell module for subprocess17:53
stokachuand just handle the output ourselves17:53
stokachucory_fu: does charmhelpers have a generic shell run command?17:54
cory_fuYeah.  I always think that it would be nice to have helpers around subprocess, but then every use case ends up needing something different that makes the helpers not work17:54
cory_fuNo17:54
cory_fuBecause of that ^17:54
cory_fu:p17:54
stokachuah makes sense17:55
cory_fuThis is  a failing of subprocess, though.  The implicit decoding done by universal_newlines should accept an explicit encoding type (and shell should also accept and pass that through)17:56
stokachucory_fu: im ok with just replacing shell with subprocess and working around it that way18:03
cory_fustokachu: Yep, I'm on it.  :)18:03
stokachucool thanks :D18:03
=== valeech_ is now known as valeech
cory_fustokachu: Why does ghost hate me?  :)  http://pastebin.ubuntu.com/18044477/18:40
stokachuwow18:41
stokachuare you in /srv/app by chance?18:41
cory_fuNope.  Was just watching a fresh deploy on aws18:42
stokachuhmm18:42
stokachui wonder what's using /srv/app other than our attempt to remove the directory18:42
cory_fustokachu: Why is ghost set up to deploy onto a storage mount?18:43
stokachuwould juju resources be doing anything?18:43
stokachuso nodejs pulls /srv/app from the storage functions18:43
cory_fuIt's a storage mount, but you would think it'd be done once the storage-attached hook fires18:43
stokachumarcoceppi: ^18:43
stokachucory_fu: https://github.com/battlemidget/juju-layer-node/blob/master/lib/charms/layer/nodejs.py#L1818:44
stokachuthats where we pull the app path18:44
cory_fustokachu: I'm still not seeing the benefit of having the node app live on a storage mount.18:45
stokachucory_fu: that was a marcoceppi change18:45
cory_fuI can see putting app data there, but why the app itself?18:45
cory_fuAh18:45
cory_fumarcoceppi: Please enlighten me18:45
stokachucory_fu: came from https://github.com/battlemidget/juju-layer-node/issues/318:46
cory_fustokachu: Ok, lazyPower helped me sort it out18:54
cory_fuIt's an issue in the ghost charm18:54
stokachuwhat was the issue?18:55
cory_fuWe shouldn't be calling rmtree on that path; that will try to delete the mount point itself.  We should be removing the app within it, if necessary (I'm not sure it's actually necessary)18:56
cory_fuI think that rmtree / makedirs code is a hold-over from before it was a Juju storage mount18:57
matthelmkeI'm doing a bootstrap of juju beta 10 and it returns this error: ERROR failed to bootstrap model: no matching tools available18:57
matthelmkeAny idea why?18:57
cory_fumatthelmke: What Ubuntu release is the machine from which you are bootstrapping?  Xenail?18:58
cory_fuer, Xenial?18:58
matthelmkexenial18:58
cory_fuHrm.  Odd.  It should work.  Perhaps try adding --upload-tools18:58
cory_fujuju boostrap --upload-tools <cloud> <controller>18:58
cory_fuThat shouldn't be necessary, but might work around the issue for you18:59
matthelmkeNope18:59
matthelmkejuju bootstrap --upload-tools --config default-series=”xenial” --constraints tags=juju maas-controller maas18:59
matthelmkeCreating Juju controller "maas-controller" on maas18:59
matthelmkeBootstrapping model "controller"18:59
matthelmkeStarting new instance for initial controller18:59
matthelmkeERROR failed to bootstrap model: no matching tools available18:59
cory_fumatthelmke: I'm afraid I don't know.  You could try asking in #juju-dev or pinging one of the core devs in this channel19:03
matthelmkethx19:03
cory_furick_h_: Maybe you could point someone out?19:04
cory_fuI get confused by time zones.  :p19:04
cory_fustokachu: I just realized the current ghost charm doesn't react to changes in the 'release' option.  Should it re-fetch and reinstall the ghost app when that changes?19:07
stokachucory_fu: yea it should and we also need to add an upgrade path19:07
stokachui think the latest ghost is like 0.8.019:08
stokachumatthelmke: juju bootstrap casey maas/172.16.0.1 --upload-tools --config image-stream=daily --config enable-os-refresh-update=false --config enable-os-upgrade=false --config bootstrap-timeout=8400 --bootstrap-series=xenial --credential casey19:09
stokachumatthelmke: thats the cmd i run with beta10 and it works fine19:10
matthelmkeWeird...this seems to be working. the only difference I see is the order of the flags19:10
matthelmkejuju bootstrap --config default-series="xenial" --constraints tags=juju --upload-tools maas-controller maas19:10
stokachucory_fu: how's the charm coming?19:45
cory_fustokachu: Working on it.  I'm going to have patches for the nodejs, nginx, and ghost layers19:45
stokachunice!19:46
kwmonroehey cory_fu, for hadoop-rest, was the plan to still build using layer:hadoop-client, or are we axing that from layer.yaml and putting hadoop-rest explicitly in the metadata.yaml?20:25
kwmonroei'm finally getting around to hive, but it's been so long i forgot how we're supposed to use rest.20:26
cory_fuAnything using hadoop-rest should not use hadoop-client20:27
cory_fuIt should just use the interface directly20:29
kwmonroejolly good20:29
magicaltrout....old chap20:29
kwmonroehey magicaltrout, do you reckon PDI will need hadoop jars/libs to integrate, or do you just point at the namenode url:port?20:44
kwmonroealso, i'm assuming it's just hdfs integration, right?  or does pdi do transforms with mapreduce?20:45
magicaltroutboth20:46
kwmonroeyou can't say "both" when i asked you like 4 questions.20:47
magicaltroutit installs itself inside HDFS,  but you use map reduce steps in your transformation that run on the cluster20:47
magicaltroutso for example, http://wiki.pentaho.com/display/BAD/Using+Pentaho+MapReduce+to+Generate+an+Aggregate+Dataset20:47
magicaltroutscroll down20:47
magicaltroutyou'll seem some screenshots20:47
magicaltroutyou have a Map/Reduce input & Map Reduce output20:48
magicaltroutand you can do whatever you want in between20:48
kwmonroeyeah, neat!20:48
magicaltroutso it will need lib access AFAIK20:48
magicaltroutso it can run on cluster20:49
magicaltroutbut i've not installed it myself before and I can't find the docs offhand20:49
magicaltroutso I could be wrong20:49
kwmonroedoubtful.  you're magicaltrout!20:49
magicaltroutlikely20:49
magicaltroutyou mean20:49
kwmonroeyeah, i get those confused all the time20:50
magicaltrouthehe20:50
kwmonroeanyway, good to know.  i'm banging around on cory_fu's hadoop-rest bits.. just curious if pdi would be another consumer.  i think not, but we'll see.20:50
stokachucory_fu: im stepping away for a bit, just shoot me a ping when you have those PR's up and ill get to them tonight20:56
cory_fustokachu: Ok, just about done (finally).20:56
stokachucory_fu: cool ill check back in about an hour20:57
cory_fustokachu: Ok, three PRs ready for you whenever you get back22:17
cory_fuhttps://github.com/battlemidget/charm-layer-ghost/pull/222:18
cory_fuhttps://github.com/battlemidget/juju-layer-node/pull/822:18
cory_fuhttps://github.com/battlemidget/juju-layer-nginx/pull/522:18
stokachucory_fu: nice will take a look22:19
stokachucory_fu: merged thanks! I'll push a new version of ghost up soon to charmstore22:28
cory_fuAwesome.  Thanks22:29
cory_fustokachu: When you do, can you comment on the issue that it's been pushed, and the new revision?22:31
stokachucory_fu: yea will do22:31
cory_fuThanks22:31

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