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

=== zz_CyberJacob is now known as CyberJacob
=== CyberJacob is now known as Guest35316
=== frankban|afk is now known as frankban
=== redir is now known as redir_sprint
magicaltrout[boom dynamically scaling DC/OS masters09:05
magicaltroutnearly there09:05
=== Guest35316 is now known as CyberJacob
kjackalmagicaltrout: Nice!09:26
magicaltroutyeah only took 3 evenings to figure it out :P09:26
magicaltroutwhat a geek09:26
magicaltroutjust converting the main tarball to a charm resource now09:27
kjackalCool!09:27
magicaltroutalthough the docs suck...09:27
kjackalLet us know when/what to review!09:27
magicaltroutdo I do09:27
magicaltrouthookenv.resource_get ?09:28
kjackalOh you know what documentation is like...09:28
magicaltroutwhich should give me a path according to the docs?09:28
magicaltroutoh I found an example by mbruzek09:31
magicaltroutshould do the job09:31
marcoceppimagicaltrout: there's also an example here: https://github.com/marcoceppi/layer-charmsvg09:49
kjackalHello marcoceppi!10:00
marcoceppio/10:01
kjackalDo you have ay news for me marcoceppi?10:01
marcoceppino10:01
kjackal:) cool, let me know if there is anything I can do from my side10:03
kjackalThank you marcoceppi!10:42
stubcory_fu, bcsaller_ : Whats happening with https://github.com/juju-solutions/charms.reactive/pull/66 ? I have some actions to write for an internal charm and need to know if I should be waiting, forking or going in a different direction.10:49
kjackalGood morning kwmonroe. I am looking on the issue you reported on reading/writing topics. How do you reproduce it?11:24
rambit0hello11:25
rambit0111:25
rambit0I get the message missing relation messaging11:27
rambit0on neutron-gateway11:48
rambit0do you know where I should search11:48
rambit0:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D11:59
lazyPowerstub ooo an @action decorator12:16
lazyPowermagicaltrout - are you still having issues with resources (per mailing list post)?12:17
lazyPowermagicaltrout - i may be doing this incorrectly, but what's worked for me w/ etcd, is to push the charm code, then `charm attach` the resources, *then* publish like so:  charm publish ~lazypower/etcd --resource etcd-0 --resource etcdctl-0 (these are the resource identifiers returned from charm attach).12:17
lazyPoweralso pardon my omission of revision on the charm entity... it should read ~lazypower/etcd-2  for example.12:17
magicaltroutthanks lazyPower , the error on the list looks non fatal12:25
magicaltroutjust ugly12:25
lazyPowerright, i think the messaging could be better12:25
lazyPowerbut i didnt want you blocked since there is a known good workflow there12:25
magicaltroutwell I've just got out of a meeting to find a node saying dc/os installed12:26
magicaltroutso I assume its not lying12:26
magicaltroutjust gonna check12:26
magicaltroutlets spin up 2 more and have a party12:28
magicaltroutor a quorum at least12:30
lazyPowerwoo12:34
lazyPowerquorum party12:34
magicaltroutboo i lied12:37
magicaltroutI hadn't republished12:37
* magicaltrout tries lazyPower's method12:38
magicaltroutokay12:44
magicaltroutnot a clue if its broken or not12:44
magicaltroutthis is a bit shit12:44
magicaltroutcharm attach cs:~spicule/wily/dcos-master-1 software=/home/bugg/Projects/dcos-master/bootstrap.tar.gz12:44
magicaltroutlazyPower: does that look right?12:44
lazyPoweryep, if thats the name of the resource12:44
lazyPowerit should yield a resource id like  software-0  when its successfully completed12:45
magicaltroutI get the same squid error12:45
lazyPowerrick_h_ urulama any idea why we're getting squid errors on attaching resources? I've run into this before when i dont specify a charm revision... but this is clearly not the case per magicaltrout's paste above.12:45
lazyPowerthe squid responses both vex and frustrate me magicaltrout, i feel your pain here.12:46
magicaltroutaye bit of a pain when I'm just trying to clear DC/OS stuff off my desk and get it into the store for people to hack on ;)12:47
magicaltroutdoesn't help when I can't understand what its trying to tell me :)12:47
urulamalazyPower: jrwren was looking into that. the default settings disconnect long uploads12:50
lazyPowerah right there was a post to the list about this last week12:50
lazyPowermagicaltrout - whats the size of your payload?12:50
magicaltrout478M lazyPower12:56
magicaltroutfrom a data centre not over my pipes12:56
=== urulama is now known as urulama-sprint
stublazyPower, urulama, magicaltrout : it also looks very similar to the bug report on the mailing list about large resources failing.12:59
urulama-sprintstub: yes, that's the same thing12:59
magicaltroutmerlijn's?12:59
stubyes13:00
magicaltroutk13:00
magicaltroutI'll revert to wget from dropbox then :)13:00
=== lazyPower changed the topic of #juju to: Welcome to Juju! || Docs: http://jujucharms.com/docs || FAQ: http://goo.gl/MsNu4I || Review Queue: http://review.juju.solutions || Unanswered Questions: http://goo.gl/dNj8CP || Youtube: https://www.youtube.com/c/jujucharms || Juju 2.0 beta-10 release notes: https://jujucharms.com/docs/devel/temp-release-notes
cory_fustub: I commented on https://github.com/juju-solutions/charms.reactive/pull/66 with a recap of the recent discussion I had with bcsaller_ about that.  When he comes on, I'd like him to verify that I didn't forget anything.  Let me know if that wall of text is unclear.  :p13:44
cory_fuI'd also like anyone else's input, because how actions are handled will affect everyone.13:44
cory_fuI know marcoceppi has thought about this as well13:44
cory_fustub: Also, apologies for it taking so long to move on those PRs.  We've just been pulled in other directions.13:45
magicaltroutI like the idea of an action annotation13:46
cory_fumarcoceppi: I know the new RQ is very charm focused, but PRs like that one would really benefit from me being able to kick it up to community as a whole to make it clear that, "hey, I could use help with this"13:46
marcoceppicory_fu: it's super charm focused atm, but we could expand that13:52
marcoceppicory_fu: or, just mail the list13:52
kwmonroekjackal - re: kafka write topic failure.. i believe it's only repro-able when the broker doesn't know its own hostname.  in the older charm, we had to set advertised.host.name so kafka knew when to listen.14:22
marcoceppimm, 99% test coverage, it's been a while14:24
kjackalkwmonroe: ok, so I got the kafka charm deployed on EC2 and actions were working fine14:24
kjackalkwmonroe: also we were not opening the ports of kafka so that might have been an issue14:25
stubcory_fu: Ta, and rebutted ;)14:43
stubI wonder if the reactive phases to be run should be declared by the bootstrap script that kicks off reactive.main() ? main(['setup', 'hooks', 'main']). Could extend the framework in all sorts of ways then without messing with the core.14:50
marcoceppicory_fu: is config.changed.<option> invoked on first hook run?15:04
cory_fumarcoceppi: Yes15:04
marcoceppi\o/15:04
marcoceppicory_fu: does config.changed reactive states mess with config().previous ?15:17
cory_fumarcoceppi: The config.changed states are set based on hookenv.config().previous(), but they do not change the result of that15:31
marcoceppicory_fu: one last question15:33
marcoceppiI'm rewriting an @hook(config-changed) state, one of the config option is version of software15:34
marcoceppithe rest are literally for the application15:34
marcoceppiso I basically want to do when any configuration changes, so long as it's not just version, but could also be version15:34
marcoceppiI'm trying to avoid needless spaming of writing out configuration files15:36
cory_fuHrm.  If only the version changes, are you not going to need to re-write the config anyway as part of the update / reinstall?15:38
marcoceppicory_fu: a seperate logic handles that15:39
marcoceppicory_fu: and I want to avoid a race where config.changed is processed before everything else15:40
cory_fuWhat do you mean, before everything else?15:40
marcoceppicory_fu: well, I have two handlers now, config.changed.version and config.changed15:41
marcoceppiif config.changed gets processed before config.changed.version then it's wasteful15:41
stubProbably simpler to use an if statement and the data_changed() helper15:41
cory_fuAh, yeah.  I would say stub is right about the if statement, but I don't think you actually need data_changed15:42
marcoceppiI just want to know if more than version was changed, is there a way to list all changed keys?15:42
cory_fumarcoceppi: Not sure why you would want to do that?15:44
stub[state.split('.',3][-1]  for state in bus.get_states() if state.startswith('config.changed.')]15:44
cory_fumarcoceppi: Let me write up how I would structure this.  One second15:44
marcoceppistub: that is certainly one way15:45
marcoceppicory_fu: I'll put what I'm doing in a branch if you want to optimize the rest of my crap15:45
cory_fumarcoceppi: http://pastebin.ubuntu.com/17975757/15:46
marcoceppicory_fu: I want to avoid rewriting config is version is the /only/ state changed though15:46
marcoceppisince it'll be written after intsall15:46
stubmarcoceppi: Only way I could find - I needed similar for the apt layer.15:47
cory_fuActually, that pastebin isn't ideal.15:50
cory_fumarcoceppi: What about this?  http://pastebin.ubuntu.com/17975982/15:51
arosaleslazyPower: do you know where the code location for mariadb is at:15:51
arosaleshttps://jujucharms.com/mariadb/15:51
marcoceppicory_fu: I was about to do that15:51
marcoceppicory_fu: but I argued why I shouldn't15:51
cory_fuIf the version changes, even if other config values have changed, you don't need to worry about rewriting the config15:51
marcoceppibut it doesn't matter15:51
marcoceppicory_fu: yeah15:51
cory_fuI don't see the problem15:51
cory_fuOnly one of those two will ever run15:52
marcoceppicory_fu: yeah15:52
marcoceppicory_fu: http://paste.ubuntu.com/17976046/15:52
arosaleslazyPower: looks like you may have touched the charm last.  I would specifically like to know where the upstream code lives. I didn't find a branch at LP where the bug link is, and the project link just goes to mariadb.org15:52
cory_fuIt basically says what you asked for.  Run the first when the version changed.  Run the second when any config has changed except the version15:52
marcoceppicory_fu: earlier I hadn't refactored the mongodb.ready, but since I did I never really reconsidered this as a solution15:53
cory_fuAh15:53
marcoceppicory_fu thanks stub I will def be using that snippet for latter15:54
cory_fustub: Your point about charms needing to react to changes made by actions is a good one.  So my only outstanding item on that PR is the CLI support.  Perhaps I can add it as part of the merge, though15:55
cory_fuUnless you want to take a stab15:55
stubcory_fu: I don't know where to begin on that bit15:56
cory_fuOk, no worries15:56
cory_fustub: I do think, though, that the goal for reactive actions should be to have charm-build populate actions from the templates by default.  I think marcoceppi is on board with me on that, yes?15:57
stubcory_fu: If charm build discovers and creates hooks for defined actions, an you think of a way for the user to specify that an action is 'traditional' or 'reactive' ?15:57
cory_fustub: If they create the action file manually, charm-build will not replace it with the reactive template15:57
stub(although from what I can tell, charm build doesn't discover anything and only automatically creates hooks for interfaces)15:57
stubok. I guess that is a perfectly reasonable UI.15:58
cory_fuRight.  charm-build is missing that functionality, but I want to add it15:58
stubok. I had assumed we would be stuck declaring them in layer.yaml.15:58
marcoceppicory_fu: +1 stub my thought was, interogate the actions.yaml file, if there's not actions/<action> file, create from boilerplate15:58
stubmarcoceppi: oh, yeah. discovery of actions is easy that way.15:59
=== frankban is now known as frankban|afk
lazyPowerarosales - i do, its still focused on the ~charmers branch in launchpad. http://launchpad.net/~charmers/charms/trusty/mariadb/trunk16:21
lazyPowerarosales - looks like i need to bump the metadata on the charm, this was one of the high priority items that squeeked through a couple weeks back...16:22
arosaleslazyPower: ok htanks16:25
arosaleslazyPower: if you are touching that charm may be good to put http://launchpad.net/~charmers/charms/trusty/mariadb/trunk as the contribute repo unless dbart would like to move that else where16:25
arosalespetevg: ^ note mariadb upstream link repo16:25
lazyPowerright, i wound up creating the group mariadb-charmers for pushing the charm as there wasn't one provided by dbart16:26
marcoceppiarosales: if we're touching a charm, it's not going to live in ~charmers anymore16:26
petevgarosales: useful. thx.16:26
marcoceppilazyPower: +116:26
lazyPowerhttps://launchpad.net/~mariadb-charmers   for reference16:26
lazyPowerarosales petevg - is someone actively working on mariadb at hte moment for a review/etc?16:28
petevglazyPower: arosales asked me to add a check for z Linux to make it install the package from universe, rather than from the mariadb repo.16:29
petevgThat's all I'm doing to it at the moment, though -- adding a check for z Linux.16:29
lazyPowerpetevg - ok, so lets move that rpeository from ~charmers, and target a repository in ~mariadb-charmers then.16:29
lazyPoweri'll send an email to dbart, cc you as well16:30
lazyPowermake it nice and official16:30
petevgSounds good.16:32
marcoceppiwriting unit tests for reactive files is brutal16:40
lazyPowermarcoceppi - its reminiscent of the stacks of @patch decorators in old amulet tests16:41
lazyPoweri dont like it16:41
marcoceppiis there way I can like, globally mock status_set, set_state, etc?16:41
marcoceppilike in setUp?16:42
lazyPoweronly using with() statements, problem is, if you have a large method body calling those methods, you've re-implemented the stack of patches in a less obvious way16:42
petevgmarcoceppi: You can manually create a mock patch, and then call stop and start on it whenever you want, instead of using the decorator.16:42
arosaleslazyPower: could you cc me on the email to dbart I would like to discuss the s390x and ppc64el install paths16:43
lazyPowerarosales will do16:43
marcoceppipetevg: you got an example?16:43
arosaleslazyPower: thanks16:43
marcoceppiI just always want to mock these16:43
* arosales waves at marcoceppi16:43
petevgIt's been awhile since I've been foolish enough to try. Give me a moment to look it up :-)16:43
arosalesmarcoceppi: feel comfortable with  me giving your mongodb layers a run on s390?16:43
marcoceppiarosales: give me a min16:44
kwmonroecory_fu: are you worried that 00-deploy (for https://github.com/apache/bigtop/pull/120/files#diff-30135d8baafe145bd84fb0ec91657c93R1) is going to run twice in bundletester?  do we need a restrictive glob for tests in tests.yaml?16:44
marcoceppiarosales: I'm just finishing unit tests and I've made a lot of changes in the past few hours16:44
arosalesmarcoceppi: no rush I can also check in tomorrow16:44
marcoceppiarosales: yas16:44
arosalesmarcoceppi: thanks for working on it16:44
petevgmarcoceppi. From the docs here: http://www.voidspace.org.uk/python/mock/patch.html, you get:16:44
petevghttps://www.irccloud.com/pastebin/KTRbAA80/16:44
marcoceppipetevg: could you do it with a real pastebin?16:45
petevgYes.16:45
marcoceppiapparently IRC cloud won' tlet you view it unless you're in irccloud, what a worthless sack16:45
petevgThat's annoying.16:45
petevghere's a gist: https://gist.github.com/petevg/2b22752b29f1a5f809560f448f6e7f6316:45
cory_fukwmonroe: It may run twice (I guess Tim's out, but he'd be able to answer that more definitively) but the second one would be close to a noop.  It would add only around 30s, maybe a minute, to the total run time16:46
cory_fuA test pattern would not be bad, though, if you want to figure out what that should be16:46
kwmonroeyeah cory_fu, but i think that's only because we luckily have reset: false in our tests.yaml.  i pity the soul that uses us as a reference and double's their test time.16:46
kwmonroenot a biggie cory_fu.. i'll scan our bits and see if it could be as simple as *.py.16:47
cory_fuWell, the only reason we can use the bundle_deploy option at all is because we also use reset: false.  It wouldn't do anything useful w/o it16:47
petevgmarcoceppi: You can use that in conjunction with unittest's setUpClass and tearDownClass methods and have code that isn't too messy, or too prone to failure. You wind up with a lot of lines like "self.foo_patcher = ...", "self.bar_patcher=...", though.16:47
marcoceppithere has to be a better way16:48
Odd_Blokemarcoceppi: If you do it in a TestCase super-class and inherit from that, then you only have to write it once.16:48
petevgOdd_Bloke says smart things.16:49
marcoceppiOdd_Bloke: yeah, I'm trying to read up on testcase superclassing16:51
Odd_Blokemarcoceppi: Like this: https://gist.github.com/OddBloke/d9a3e87bd397878a77f21bb080e0527516:51
marcoceppiOdd_Bloke: you da real mvp16:51
Odd_Blokemarcoceppi: Note what you'll need to do for test cases that do already have a setUp: https://gist.github.com/OddBloke/d9a3e87bd397878a77f21bb080e0527516:52
Odd_Blokemarcoceppi: (And a tearDown, for that matter)16:52
marcoceppiOdd_Bloke: up!16:53
marcoceppithanks16:53
Odd_Blokemarcoceppi: (And if you're patching loads of things consider shoving them in a list and having your tearDown just do: `for patcher in self.list_of_patchers: patcher.stop()`)16:54
marcoceppiOdd_Bloke: is setup called for ever test method, or once per testcase class?16:55
Odd_Blokemarcoceppi: Per method; setUpClass is per class.16:55
Odd_Bloke(You probably want it per-method, else you'll end up with previous tests mocks which will already have some state)16:55
marcoceppiOdd_Bloke: I do, just wanted to make sure I didn't need to run reset_mock16:56
Odd_Bloke:)16:58
marcoceppiOdd_Bloke petevg thanks!17:00
Odd_Blokemarcoceppi: Any time. :)17:01
Odd_BlokePretty much my entire professional career has consisted of arriving at a place, throwing up my hands at the testing, and then writing tests until I give up. ;)17:02
lazyPowerOdd_Bloke <317:03
arosalesstub: nice work it looks like https://jujucharms.com/postgresql/ may "juju work" on s390x17:07
stubcool17:07
* arosales has a "Live master (9.5.3) " workload status on a s390x machine atm17:07
=== mwhudson_ is now known as mwhudson
bdxis there a way to set arbitrary enpoint bindings for charms when deployed in bundles?21:38

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