/srv/irclogs.ubuntu.com/2015/12/10/#juju.txt

apuimedojamespage: I just stumbled upon a weird neutron-api behavior on kilo10:14
jamespageapuimedo, oh yes10:14
apuimedofor some reason, it was failing with an ml2 message10:14
apuimedowhen the plugin configured was midonet10:14
apuimedoI did `sudo service neutron-server restart` and it worked10:15
apuimedojamespage: http://paste.openstack.org/show/481451/10:17
apuimedoalso, the public network was not created10:17
apuimedohttp://paste.openstack.org/show/481452/10:18
jamespageapuimedo, that first error normally indicates that the db was not syncs when the daemon was started10:19
apuimedojamespage: is that a known issue when deploying with bundler?10:20
jamespageapuimedo, no10:20
apuimedoI'm not running from master, it's backport from a month or two back10:20
apuimedojamespage: do you envision any possibility of a race between mysql and neutron?10:22
jamespageapuimedo, we have had issues with grants in HA configurations in the past but those where resolved issues - they materialized as db syncs failing, not failing daemons10:23
apuimedojamespage: non-ha deployment10:24
jamespagedef not then10:24
apuimedoI'll try to reproduce it10:24
apuimedoon a clean env10:24
jamespagethedac, gnuoy: landed the haproxy configuration and defaults bump11:01
gnuoyjamespage, tip top, ta11:02
=== verterok is now known as verterok-away
jcastro_https://aws.amazon.com/blogs/aws/new-aws-price-list-api/12:58
jcastro_https://bugs.launchpad.net/juju-core/+bug/152482312:58
mupBug #1524823: Support AWS price API <juju-core:New> <https://launchpad.net/bugs/1524823>12:58
jcastro_FYI folks12:58
=== Makyo is now known as Guest8307
=== verterok-away is now known as verterok
mbruzekcory_fu: I have a question about reactive14:32
mbruzekcory_fu: Going back to the peer situation where there are more than one unit of the service.  If one peer sets a state X and have a method react to that state, and at the end remove state X.  Will the other peers have a chance to react to the state X ?14:35
cory_fumbruzek: States are entirely a local construct.14:38
mbruzekcory_fu: hrmm... So if a leader sets state X the followers will not see that right?14:40
cory_fumbruzek: That is to say, states set on unit A are only ever visible on unit A, but they can be set on unit A "in respect to" unit B if they are set from a relation class in response to information coming over the relation14:40
cory_fuCorrect14:41
mbruzekcory_fu: thank you for the explanation14:41
cory_fumbruzek: Data comes in to the leader over the relation, and the leader says to itself, "Ok, from my perspective, unit B is now in state 'foo' which means it has sent me a CSR and is expecting me to sign it."  The charm layer can then go, "Ok, for all followers that I consider to be in state 'foo', give me their CSR and I will sign it and send it back"14:43
mbruzekcory_fu: I was looking at a much more straight forward case.  When the leader changes the CA I was looking at setting a state for the followers to react to, but it is not needed because I can handle this logic in leader_settings_changed()14:44
cory_fumbruzek: This is confused somewhat in your case because the peer relation is *also* handling the follower case, so it also has to implement the follower saying to itself, "Ok, I now see a leader, so I'm in state 'connected' which means to me that I need to create a CSR to send to the (one) leader"14:44
cory_fumbruzek: You know, leader settings is kind of like its own relation, that you could model as a GLOBAL scope pseudo-interface14:47
jcastro_hey jose, how would you feel about redoing the owncloud charm in reactive? It should be way simpler than what it currently is15:02
josejcastro_: I don't know reactive (but I guess I can learn soon), it may take a bit. I can work on it after finals maybe?15:03
jcastro_yeah no rush or anything15:03
josecool15:03
* jose rushes to university15:03
jcastro_like, I just think the old charm fundamentally won't be interesting to owncloud15:04
jcastro_but with the new framework and attached CI, etc. it's way more compelling.15:04
apuimedojamespage: could you take a look at https://code.launchpad.net/~celebdor/charm-helpers/midonet/+merge/27454315:22
thedacjamespage: thanks for landing the haproxy timeout fixes15:31
jamespagethedac, no problemo15:58
jamespageapuimedo, took and initial glance - some unit tests for the new context and the kilo specific behaviour would be nice ;-)15:59
apuimedojamespage: understood. Can you please put it on a review comment?16:00
apuimedootherwise when I get to it I might forget :P16:00
jamespageapuimedo, done16:00
apuimedothanks a lot jamespage16:00
beisnero/  tvansteenburgh - ping re: pending tests for http://review.juju.solutions/review/2348 ... if it's just a wait-in-line thing, no prob.16:29
beisnertvansteenburgh, so if i intend to do that review, should i have the padlock locked?16:29
lazypowerbeisner: yeah if you're working a review16:32
lazypowersign into the RQ, and click the lock button next to the item so nobody else snipes it out form under you16:32
lazypoweri've done that to jose on more than 10 occcasions now16:33
beisnerha, thanks16:33
beisnerlazypower, well, i'm re-running tests in uosci, and have the same pending in charm ci, so it'll prob be tomorrow before i revisit.  should i still lock?16:33
lazypowerI would16:34
beisnerack, thx sir16:34
lazypowerif someone wants ot review it, they will ping ya asking if its ok16:34
lazypoweri tend to get these long drawn out reviews for new stack items, and the big data team always laps me on the RQ. so i get pings now and again asking if i'm actually reviewing something or if i'm playing the "lock the review and pretend" game16:34
lazypowerwhich i'm good at too16:35
tvansteenburghbeisner: re pending tests, it's b/c the revq went offline last night and the celery jobs haven't brought things up-to-date yet.16:39
beisnertvansteenburgh, np at all.  i'll revisit tomorrow.  thx for the update.16:42
tvansteenburghbeisner: here's the lxc jenkins log if you need it in the meantime http://juju-ci.vapour.ws:8080/job/charm-bundle-test-lxc/1757/console16:45
beisnerwoot DEBUG:runner:KeyError: 'rabbitmq-server/0'16:46
beisnertvansteenburgh, basicall all openstack charm tests will hit that, as we destry/bootstrap on every iter.16:46
beisnertvansteenburgh, i saw a bug with plans to parse that instead of returning key error.  is that going forward?16:47
tvansteenburghhttps://github.com/juju/amulet/issues/11116:47
beisneryeah that ;-)16:47
tvansteenburghyeah, just needs to get dove16:47
tvansteenburghdone16:47
tvansteenburghwanna do it? :D16:48
beisnerwant > bandwidth16:49
beisnerok so, no expectation for that charm test to pass in charm ci, but should be expected to pass in uosci since each test gets a fresh bootstrap.16:49
cfxlazypower: Been awhile since I've been summoned to IRC. :)17:07
lazypowercfx o/17:08
lazypowerhey there17:08
cfxhola17:08
lazypowerIts a classic, thats for sure :)17:08
cfxTruthy statement.17:08
cfxI feel as though I've been a big, big nuisance through all this.17:09
cfxBut you've been tremendously welcoming.17:09
lazypowerNot at all, you've been curious, and I just so happen to have some answers for you :)17:09
cfx:D17:10
lazypowerWe appreciate the review on teh docs as well. big thumbs up on diving into that17:10
mbruzekHello cfx17:10
cfxPlenty willing to keep going. I'm booked really solidly through Sunday but this is super high priority for me.17:10
cfxmbruzek: yo!17:11
TheJeffhey #juju17:11
mbruzekcfx It will take some time to action on the feedback you gave me, as I am working on something else right now, but we will get to it soon17:11
mbruzekHello th17:11
lazypowercfx: looking over that last correspondence, it looks like there's a lot of overlap between what we already have charmed up in the charm store, with some additional proxy charms for the CDN, and charming up wowza17:11
lazypowershould be pretty straight forward, I'm willing to bet we could get you moving in a month or less17:11
mbruzekhello TheJeff17:11
lazypowerTheJeff o/17:11
TheJefflil help?  I've run through the openstack juju deploy guide (this has taken me quite some time over the past few days)17:12
cfxmbruzek: oh sure, take your time. I'm just playing the part of the highly-confused newbie.17:12
lazypowerTheJeff: please state the nature of your IT emergency :)17:12
TheJeffopenstack-dashboard is up, seems my  units are running (juju status)17:12
TheJeffi'm presented with a login, I log in using creds from my config yaml17:12
TheJeffand it boots me over to an error page17:12
cfxlazypower: I'm sure I can get a little extra leeway if my boss knows I'm engaging experts. :)17:12
lazypowerso far so good17:12
TheJeff`Something went wrong!17:13
TheJeffAn unexpected error has occurred. Try refreshing the page. If that doesn't help, contact your local administrator.`17:13
TheJeffBUT THAT IS ME!17:13
cfxTheJeff: Hate it when that happens. :(17:13
TheJeffso, looked at the apache logs on the openstack-dashboard unit, looks fine - 302s and 200s flowing like fine wine17:13
lazypowerbeisner ddellav: when logging into horizon, whats the best route to go debug login errors that are not 401 unauthorized?17:13
TheJeffbut where do I find logs that can lead me with delicious bread crumbs to where my problem lies?17:14
lazypowerTheJeff: nice use of adjectives. I approve17:14
TheJeffsome app level issue I assume, can't hit this or that17:14
lazypowerI'm not sure why, but i'll see if we cant get an openstack expert to lend some eyeballs17:14
TheJeff:(17:15
TheJeffI have to demo an openstack install via juju at 3.17:15
TheJeffugh17:15
TheJeffToronto time17:15
cfxI'm gonna head to lunch here in a sec. lazypower, you pretty much know the score. I'd like to have something to SAY by Sunday. I'd like to be UP by the beginning of the year if at all possible. Completely open to what to do next.17:15
lazypowercfx: lets model your infra in juju :)17:16
cfxRight now I'm planning on continuing reading as I can, and continuing with the feedback. That seems like progress in itself.17:16
lazypowercfx: i'm going to head to lunch. first step is figure out what we have provided that you'll need up front, and build a bundle with those services17:16
lazypowerwe can do a planning session to fill in the gaps with services we dont yet have charmed17:16
cfxlazypower: lunch indeed. reconvene in a bit?17:16
cfxwhat's the first URL I'm going to stare crosseyed-at?17:16
lazypowerthen we'll do a charm school, write those layer(s), and talk deploy strat :)17:17
lazypowerhttp://jujucharms.com/demo17:17
cfxiloveyousomuchrightnow17:17
lazypoweror just jujucharms.com and click over in teh store17:17
lazypowerO_O17:17
lazypowerand on that note, time to feed my face17:17
cfxlol17:17
lazypowerTheJeff: sorry i'm not much mor ehelp than pinging. but if they can they'll lend a hand17:18
jcastro_TheJeff: please start posting on juju@lists.ubuntu.com, that'll help get other eyeballs to bear if you're time constrained17:20
beisnerlazypower, TheJeff -  i'd start by checking `juju stat --format tabular` for sane "Unit is ready" extended workload status17:21
beisnerthat will be an indicator that all required relations are made17:21
beisnerlazypower, TheJeff - horizon logs will be on the openstack-dashboard unit(s) in /var/log/apache2/  ... keep in mind that horizon heavily queries nova-cloud-controller, so logs on that unit in /var/log/nova may also be indicative.17:27
PrabakaranHi kwmonroe, I was referring azuls zulu8 java layer charm, apart from reactive directory which does actual installation of zulu8 i noticed that some additional directories and code files like hooks, wheelhouse,  .build.manifest,  .gitignore, Makefile, tox.ini, etc  .... i was wondering should i include all these layered specific files even for ibm java charm also.. could you please explain about these files and advise on the same?17:56
mgaragents18:22
mgaraI'm using my openstack installation and I want to bootstrap juju using that installation ... I made sure to put all required configs .. but when I run juju bootstrap it returns some error .. that it may looks familiar to you :18:23
mgaraERROR failed to bootstrap environment: index file has no data for cloud {RegionOne http://172.16.45.11:5000/v2.0} not found18:23
mgarado I need to modify something in my config ?18:23
mgzmgara: how did you tell it which image to use?18:23
mgarathat's the thing .. i dont get where to put the image i want ...18:24
mgzmgara: you need to generate an image stream, and set image-metadata-url to point to it18:24
mgaraok cool ill try to digg more  thanks mgz !18:24
mgzmarlinc: see `juju metadata help generate-image`18:25
mgarathank you !18:25
mgzthat creates a dir structure with some json, which you then need to host somewhere both your client and the openstack install can see18:26
mgzswift will do if you can expose over http or similar18:26
mgzmgara: see https://jujucharms.com/docs/1.25/howto-privatecloud for more18:26
mgzthe tools you can just get from streams.canonical.com if you have a route out to it.18:27
=== sarnold is now known as sarnold_
mattraehi i'm using juju 1.25.. i'm seeing that 'juju status <service>' is hanging forever18:44
mattraejuju status <service> used to work a few min ago..18:44
mattraenow only 'juju status' works18:44
mattraeany ideas what might be wrong?18:44
mattraei've also noticed that when 'juju status <service>' does work, it is about 10 times longer responding than just running 'juju status', depending on how many units are deployed18:45
lazypowerweird18:45
lazypowermattrae: is your model controller under high load? (eg: node 0)18:45
=== hbaum_ is now known as hbaum
mattraelazypower: we're using ensure-availability with 3 nodes. i checked at least 2 and didn't see a high load.. they're also 20 core machines18:52
lazypoweryeah that seems beefy enough to run a pretty sizeable infra18:52
lazypoweras i understand it, when you're querying an individual node, its just poking @ the mongo data store to return status data....18:53
lazypowermattrae: I would certainly file a bug about this, it may be a regression in our HA as of 1.2518:53
lazypowerwe may need to extend test coverage around that18:53
lazypoweri'm sure we have it but it could probably be perf tested as well18:53
mattraei tried restarting the juju machine agent and juju-db. now i'm redeploying and i'll see if i run into the same issue. i also collected the logs from /var/log in case that is helpful18:54
mattraelazypower: cool i'll collect some more information and file a bug18:54
lazypowermattrae: thanks for the debug effort, sorry you ran into that :-/18:55
mattraesure no problem :)18:55
mattraethanks for the help18:55
mattraelazypower: looks like the bug is reported in lp:1516989 and should be fixed in 1.25.219:06
lazypowermattrae: nice work19:07
mattraethx :)19:07
cfxdrac, boot, system setup, PXE, MAAS, drac, boot, system setup, PXE, MAAS...19:24
cfxmass maas commission! bwahaha19:26
cfxahem.19:26
cfxlazypower: so, since a search on demo.jujucharms.com for the software package we were discussing before doesn't appear to exist... the most I was able to do was add hardware to the sandbox and sit here, confused :)19:57
cory_fustub: You around?20:03
cory_fuOh, nm, of course not20:03
lazypowerarosales allow me to introduce you to cfx20:32
arosalescfx: greetings! I was just commenting to lazypower on the great comments @ https://github.com/mbruzek/docs/issues/4120:36
arosalescfx: thanks for taking some time to give feedback on making the docs better20:36
cfxarosales: Oh any time. Since the feedback has been so positive I plan on continuing.20:47
cfxHeaded home to tackle the next section, actually!20:48
arosalescfx: excellent, I just wanted to thank you for your contributions to the community and working to make developing charms easier for everyone20:49
* cfx salutes crisply!20:49
cfxMy pleasure.20:49
cfxbbiab20:50
Iceyin the ruby juju layer, any opposition to using https://github.com/postmodern/ruby-install instead of building from source?21:04
lazypowerIcey: i've used the brightbox ppa's, and rbenv - i'm not opposed to anything at this point wi th ruby to be completely honest21:06
lazypowerwhat may be a good idea is to kind of get a pulse with the ruby community by pinging their mailing list, and asking what they're using21:07
IceyI figure, with ruby-install, we can allow the user to choose a ruby version still and build as needed, but if there's a binary already out there, then we get to skip the 15 min compile time...21:07
lazypoweri'm + for that21:08
Iceyand it doesn't mean leaving a lot of stuff around on prod boxes as much21:08
lazypoweri like how its senses the env and uses whatever native package manager is21:12
Iceyyea :)21:13
lazypowerthen uses build as a fail-safe fallback21:13
lazypoweri'm +1 to this21:13
lazypowerall the way21:13
IceyI'll take a look at it soon, build time for this charm is quickly getting annoying enough to give that a priority :)21:13
* lazypower anoints Icey with the juju 21:13
* Icey ewwwww21:13
lazypowerso, what that translates to Icey  since you went there with it, is I took the juju logo and beat you about the head and shoulders with it21:14
* Icey collapses unconscious into the dust21:14
Iceylazypower lazier version, download the binary ourselves from https://rvm.io/binaries/ubuntu/14.04/x86_64/ ?21:26
lazypowerYou've immediately lost compat on centos21:26
Iceywell21:26
lazypowerwhich not a *Terrible* loss, but a loss all the same21:26
Iceyhttps://rvm.io/binaries/21:26
lazypoweri tend to favor cross platform solutions if they are avail21:26
Iceyfair enough21:26
Iceyit looks like ruby-install will still be building on the box21:35
IceyRVM will let us get premade binaries21:36
lazypowerblurg21:37
lazypowercory_fu: you were looking to see if there's an easy way to discern over a relation if a unit is talking to the leader?21:59
cory_fuAny way, but yes21:59
lazypowermore eyeballs here :) thats all, migrating the topic22:00
cory_fuI suppose the leader could set a flag on the relation saying that it's the leader, but is there a way built in to Juju?22:00
marcoceppicory_fu: I think the only way would be `relation-set captian="i am, now"`22:02
marcoceppiwhere the leader announced over peer, unit-get leader might be a good way around this22:02
marcoceppicory_fu: oh22:02
marcoceppicory_fu: leader-set unit="$JUJU_UNIT_NAME"22:02
marcoceppiuse leader settings to define it22:02
lazypowermarcoceppi: i'm guessing use that in tanem with $JUJU_REMOTE_UNIT22:03
lazypowerto determine if we are indeed talking to theleader22:03
marcoceppilazypower: yeah, so during leader-elected, have it set that, which should run before peer relations on first go22:03
lazypowerright22:03
marcoceppithen you can do if [ `leader-get unit` == $JUJU_REMOTE_UNIT ]22:03
marcoceppinot pretty, but it's better than peer setting the information22:04
lazypoweri agree 100%22:04
lazypowerpeer setting the information seems like it could be messier in terms of when the leadership changes22:04
cory_fumarcoceppi: So you're saying that leader-settings-changed would be guaranteed to run before peer-relation-joined?22:06
marcoceppicory_fu: no, but leader-elected will most certainly run /the first time/ before any relation does22:07
marcoceppisince it's part of the standard hook lineup22:07
lazypoweryeah, thats true22:07
lazypowerinstall -> leader-elected => confg-changed => relations if applicable => start22:07
marcoceppionce that hook sets the unit, any other hook on any unit that run will see the new value22:07
marcoceppiwell, config-changed -> start -> other22:08
lazypowerno idea why i changed hashrocket symbol after the first, but i digress22:08
lazypowernot always marco22:08
marcoceppilazypower: i balk, really?22:08
lazypowerif you add-relation before its stood up, it seems to run relations before start.22:08
marcoceppirofl, funtastic.22:08
lazypower^_^22:08
lazypowerseems legit22:08
lazypowerhook order is never garanteed *ice skates away*22:08
marcoceppiI was under the impression `juju deploy` queued install -> leadership -> cfg -> start22:08
marcoceppiyes, it's not, but I digress22:09
lazypowerto be 100% fair, i haven't tested that assertion since the 1.23 series22:09
cory_fuI feel like, in this case, it might actually make more sense to send it over the peer relation.  In terms of the conversation flow, the leader would start the conversation by saying, "I need a CSR from you" to any peer that joined, to which the follower could reply.  I think that's cleaner than every peer telling every other peer that it wants that peer to sign a cert22:09
lazypowerit may have been patched22:09
cory_fulazypower, mbruzek: ^22:09
lazypowercory_fu: that makes sense, its not like the units are having a gpg key signing party22:09
lazypowerwhich i never get invited to ;_;22:09
marcoceppilazypower: fosdem!22:10
lazypowermarcoceppi: we gonna GPG key signing?!22:10
marcoceppicory_fu: what's the problem with every peer getting a copy of the CSR?22:10
marcoceppilazypower: there's one every year22:10
lazypowerschwing!22:10
marcoceppilazypower: https://fosdem.org/2016/keysigning/22:10
mbruzekcory_fu: thanks, that will take a bit of refactoring but I think that could be done22:10
marcoceppimbruzek cory_fu I still don't see the problem with every unit sending it's CSR22:11
marcoceppiother than a bit more noise22:11
marcoceppipeer-relation-changed is basically "am I the leader? Nope, I don't care exit 0"22:11
cory_fumarcoceppi: Well, there's nothing really wrong with it, I suppose22:11
marcoceppiand peer-relation-joined is basically BLAM BLAM BLAM HERE'S MY CSR22:11
mbruzekmarcoceppi: but every peer will send a csr to ever other peer22:11
mbruzekmarcoceppi:  think of the children!22:11
marcoceppibut every peer will already make a connection with every other peer22:12
mbruzekmarcoceppi: Lets say there are 1000 peers22:12
lazypowerhide you kids, hide yo wife, we're generating tls certificates over hereeee22:12
marcoceppiit's not really saving much more or less22:12
marcoceppidata wills till be sent, hooks will still fire22:12
mbruzekif 1000 peers are sending certs to the 1000 other peers22:12
marcoceppibecause each charm has a relation-joined and changed22:12
mbruzekthat is like 1000x10022:12
mbruzek022:12
marcoceppimbruzek: but the thing is, that /already/ happens22:12
lazypowermarcoceppi: i think part of the concern here, is to reduce noise whend ebugging22:13
marcoceppialso, it's a factorial22:13
lazypowerthe csr => leader should be a one shot for each node, not a one shot and then dancing with the rest of the group22:13
lazypowerwhile its not critical that its happening, it does make sense to reduce that noise on the wire22:13
marcoceppisure, it would cut down a bit, but each peer would still ahve their relation-joined and relation-changed fired because juju implicitly sets the private-address22:13
marcoceppiso you're not really reducing much noise22:13
lazypowereh, i guess thats fair too22:14
lazypowerwhere's my marco meme images... this needs to be a meme22:14
marcoceppimy point is, this level of complexity isn't really much of a save22:14
cmarsi'm seeing some weird behavior with my reactive charm. everytime the update-status hook runs, it also runs all my relation handling functions22:15
cmarswhich is kind of bad, because those functions basically rewrite the config and restart the service22:16
cmarsany ideas what could be causing this?22:16
lazypowercmars: this was recently changed, the update-status hook wasn't implemented in the previos editions of built charms22:16
lazypowerit was just added this week i do believe, so now its triggering all your state changes you haven't guarded against22:17
marcoceppicmars: because each hook runs the reactive bus22:17
marcoceppiso those states match22:17
marcoceppicmars: you should create a state like "charm.done" where you can decorate @when_not('charm.done') to avoid it being processed multiple times22:17
cmarsah, got it22:17
marcoceppi<service>.ready is another, better name22:17
cmarsthanks22:17
marcoceppicmars: the update-status hook was debated on being added, and ultimately incldued because it helps illuminate this problem. Your relation stuff willa ctually run on each hook after the states are matched sicne states and hooks are evaluated on each hook execution22:18
* marcoceppi creates some docs on this point to help illuminate it more since it also caught me off guard22:19
marcoceppilazypower: about the keysigning, do you want to go? I didnt' go last time but kind of wanted to22:20
marcoceppiweb of trust, etc etc22:20
lazypowerYeah man, i'm game22:20
marcoceppicool22:20
* marcoceppi submits his key22:20
mbruzekmarcoceppi:  is there a list for the kesigning party?22:21
marcoceppimbruzek: https://fosdem.org/2016/keysigning/22:21
marcoceppijust follow the instructions22:21
cmarsmarcoceppi, i still don't see how I can tell the difference between an actual change in the relation data vs. update-status just calling my handler22:22
marcoceppialso, we should all sign each others keys the next time we sprint, help build that web of trust22:22
marcoceppioh, hum22:22
marcoceppicory_fu: ^22:23
lazypowercmars: the relationship wont execute if the data is the same ;)22:23
lazypowercmars: fire off a charm, relate it to something, then try to invoke a re-run using the same rel data, it wont happen22:24
cory_fucmars: You shouldn't care if you're in a relation hook or update-status.  If you need to know if the data changed, use the data_changed helper22:24
cmarscory_fu, how do I use data_changed?22:24
marcoceppicory_fu: the point cmars was making, is that on each hook he's getting the relation state evaluated as true22:25
cory_fucmars: But, really, the interface layer should be managing the conversation flow and you should just be able to respond to the states it sets22:25
cmarsi saw mention of that in the base layer README, but didn't see docs22:25
marcoceppiso I recommended a .ready state for the charm, but that won't trigger if there's relation data changed22:25
lazypowermarcoceppi you could remove the .ready state if the rel data has changed22:25
marcoceppilazypower: but the interface should do that22:25
marcoceppiI shouldn't have to22:25
lazypowernot necessarily22:25
lazypoweryour interface is talking about relation data comms, the charm.ready state has zilcho to do with that22:26
lazypowerthats you as teh charm authors responsibility to listen to those states coming from the interface layer, to determine if you need to alter state in your charm layer.22:26
marcoceppiright, but now my layer has to watch for changed_data on the relation, which the interface should be doing22:26
cory_fucmars: https://pythonhosted.org/charms.reactive/charms.reactive.helpers.html#charms.reactive.helpers.data_changed22:26
lazypoweror, @when('interface.didsomething')22:27
lazypowerdef destroy_state(): remove_state('things')22:27
cory_fucmars: Basically, give it a unique ID and the data22:27
cmarscory_fu, ... and it'll track subsequent calls with that ID as a key into some lookup table?22:28
cory_fucmars: Also, your charm layer can set states to tell itself that it's already done a task and then use @when_not22:28
lazypowermarcoceppi: with what i've proposed, your'e still using hte interface states to determine if your charm layer has to do something. its not listening to the data coming over the wire.22:28
cory_fucmars: Yes22:28
cmarscory_fu, ok, that'll work22:29
cory_fucmars: It computes a hash of the (serialized) data and stores that22:29
marcoceppicory_fu: ah, so you could just compute if the relation data has changed in your layer to take action, other wise just noop?22:29
cory_fuYe22:30
cory_fuYes22:30
* marcoceppi likes22:30
lazypowerseems wrong if your charm layer is doing communication state alteration. just sayin22:30
cory_fulazypower: What do you mean, communication state alteration?22:30
lazypowerdata changing is related to the interface, not the charm layer.22:30
lazypowerif you're probing for data changed in teh charm layer, you're doing it wrong22:30
marcoceppilazypower: I disagree22:31
cmarsthe problem is, i have handlers triggered on @when states change. those states are set by relations. yet suddenly update-status started calling them too22:31
cory_fulazypower: I'm not certain that I agree22:31
cmarsi think that's wrong22:31
lazypowercory_fu: this was prety specific to marco's question. and i may be misinterpreting what he was saying.22:31
cmarsbecause those states aren't changing22:31
cory_fumarcoceppi: Ha.  I told you people would get bitten by update-status calling their handlers.  ;)22:32
marcoceppilazypower cmars right, states are set and persist beetween runs, teh interface says "all the data required to satisfy this are now here"22:32
cmarsor are we supposed to be tolerant of bounces? i could see that.. "at least once" is a common thing you have to deal with22:32
cory_fucmars: The states aren't changing, but they are active.  As long as they remain active, the handlers will get called.  So your handler needs to tell the interface class that it handled that state if it's not intended to be persistent22:33
lazypowerso, you're telling me that if in your charm layer, you're checking against data thats coming from, lets say the interface is a data-bag, - and you're altering a state that the interface sets from yoru harm layer, that you're doing it right?22:33
cmarscory_fu, and they'll get called on each hook execution?22:33
lazypoweryou've broken encapsulation of what the interface is doing for your in the first place22:33
cory_fuYeah, what marcoceppi said22:33
marcoceppithey're states, not events. So you could/should probably just unset the state when you're done?22:34
cmarsah22:34
cmarsi see22:34
marcoceppicory_fu: would it make sense to do something like remove_state('database.available') ?22:34
cory_fuThe states from the interface are telling you that your relation conversation has progressed to a certain point.  It's up to you what to do with this information, and to only do it once if you care about that22:34
marcoceppicory_fu: in the layer22:34
cmarsi guess i was thinking "events", but its more like a handoff. you set a state, someone else has to clear it22:35
cmarsok22:35
cmars:)22:35
cory_fumarcoceppi: I don't think the charm layer should be removing interface layer states.  Instead, it should tell the interface class that it's handled the state via a method which would then remove that state22:35
marcoceppicory_fu: that's what I figured22:35
cory_fuBecause the state is actually associated with a conversation, of which there could be more than one22:35
marcoceppicory_fu: none of our itnerfaces do that currently22:35
cory_fuThe one lazypower and mbruzek are working on does22:35
cory_fuAnd at least one other one I wrote did.  Let me find it22:36
lazypowercory_fu: that i agree with, as its a conversation exchange vbetween the charm layer, and the interface layer. Having the charm signal to the interface to remove a state is what i would say to be the correct way to do it.22:36
marcoceppicmars: which interface is this for?22:36
cory_fuYep22:36
cmarsmongodb22:36
lazypowerbut just removing that state whollly during the charm layer execution, nah22:36
lazypowerthats wrong22:36
lazypoweryou jsut took control of something that should be encapsulated and encouraging that behavior may have unintended side effects22:36
lazypowersuch as data not being cleaned up, connections not closed cleanly, backups not made, etc.22:37
marcoceppiright, I was trying to make that piont earlier22:37
cory_fumarcoceppi: https://github.com/johnsca/juju-relation-mysql/blob/master/provides.py#L5022:37
lazypowermarcoceppi: yeah i thought i might be misinterpreting what you were saying, which is why i was making a case against it. <322:37
marcoceppibut, tracking the relation data in the layer and asserting it has changed is not a mutation of the interface or the state22:37
lazypowereh22:37
lazypowerehhhhh22:37
lazypoweryou in the charm layer, shouldn't give a fig about that tho should you?22:37
marcoceppicory_fu: but that's for provides, do you ahve the aternative? the requires side?22:38
lazypowerthe interface should be responding to data changes and emitting states to that effect.22:38
cory_fumarcoceppi: It's the same pattern, though?22:38
marcoceppicory_fu: otherwise {mysql}.available is always set22:38
marcoceppicory_fu: and will always be true on each hook execution22:38
cory_fumarcoceppi: And that makes sense, because mysql has not gone away22:38
marcoceppicory_fu: yes, but then you'd have to do one of two things22:38
marcoceppicory_fu: either you create a new state, 'charm.done' and assert @when_not22:39
marcoceppihwoever, if MySQL updates the conversation there's no way to re-execute since it's still available22:39
marcoceppior you do what you said about asserting if the conversation data has changed in the method decorated with the @when {mysql}.available which lazypower doesn't agree with22:39
* lazypower tries to look intimidating22:40
marcoceppiits eems there is almost a need for an "event" of "oh, hey yo data changed"22:40
marcoceppiso I could see the itnerface layer tracking data internally, using the method you shared earlier22:41
lazypowerwhat i think it should do, and feel free to tell me otehrwise - is as you jsut said set a state that the data has been changed, and your charm layer, should signal back ot the interface that the state has been handled and to remove it22:41
marcoceppiand on realtion-changed, and if after available was set, if the data has changed, set a {mysql}.data-changed that you could call a mysql.acknowledge() method on to remove later22:41
cory_fumarcoceppi: I tried at one point to have the interface layer do the data_changed checking but ran into some obstacle because of the fact that there's multiple conversations.  But it might be worth revisiting22:41
lazypoweroh snap, cory_fu  - thats a good point22:42
lazypowerthis does get hairy when you're doing multiple conversations on a unit scope22:42
cory_fuIt certainly does seem doable22:42
marcoceppicory_fu: potentially22:42
marcoceppicory_fu:what would that look like?22:42
lazypoweractually, i change my vote22:43
lazypoweri just advocated for 30 extra lines of code to accomplish what 2 could do22:43
lazypowerand i dont want to write 30 lines of code what 2 can do.22:43
marcoceppiyeah, I think it's up to the interface author to make the call of how to handle data change22:43
* lazypower switches off and goes back to his editor22:44
lazypowersorry for the noise, it sounded way better until i sktched what it looks like in pseudo code22:44
mbruzekmarcoceppi, lazypower, cory_fu:  I was heads down on the charm-helpers fix that we need for this charm to work.  If you could give a look at my merge proposal please:  https://code.launchpad.net/~mbruzek/charm-helpers/peers/+merge/28021122:47
* mbruzek reads the scroll back22:47
marcoceppimbruzek: lgtm22:48
mbruzekmarcoceppi:  tests pass22:48
cory_fumarcoceppi: I think it would look something like this: http://pastebin.ubuntu.com/13908409/22:48
cory_fumarcoceppi: But that's untested and I think it's wrong that MySQLClient is GLOBAL scope, because you might want to talk to two different databases for some reason22:49
cory_fuShould be SERVICE scope22:49
marcoceppicory_fu: so for the first run22:49
marcoceppiyou'd get a .connected, .available, and .changed ?22:50
cory_fuYes22:50
marcoceppicory_fu: I like it22:50
marcoceppiI agree with service scope as well22:50
cory_fuI also like it22:50
marcoceppiANOTHER_CUP_SMASH.gif22:50
cory_fu:)22:50
mbruzekThanks for merging the charm-helpers23:07
mbruzekHow long until it is on pipy?23:07
marcoceppimbruzek: I didn't publish it23:07
marcoceppiguess I should23:07
mbruzekis that process automated or do I need to grease some wheels?23:07
* mbruzek greases Marco's brakes23:08
marcoceppigreases brakes, not the best idea23:09
marcoceppimbruzek: it's uploaded23:09
mbruzekmarcoceppi: is there any lag time after you upload to pipy ?  I rebuilt and deployed the charm again, but got the old version of hookenv.py23:23
cory_fumbruzek: You might need to clear out your wheelhouse/ directory.  Remember that build is additive, so it will put the new version in with the old one and it will be up to chance which one gets installed (last one wins)23:26
mbruzekcory_fu: where is this wheelhouse directory?23:27
mbruzekcory_fu: in the charm!23:28
mbruzekcory_fu: that was my problem I have both charmhelpers-0.6.1.tar.gz and charmhelpers-0.6.0.tar.gz23:29
cory_fu:)23:30
cory_fuWe really need to improve the handling of removed files during build23:30
mbruzekOK that does it, EOD for me.23:31
mbruzekI will check/test it tomorrow23:31
mbruzekcory_fu: you still think the leader should set a state to ask for the csr?23:32
mbruzekcory_fu: I saw you guys broke into some other stuff in the scrollback23:32
cory_fumbruzek: I think marco was right that it doesn't actually save any hook calls, so it's probably not worth putting the effort in23:33
cory_fuI feel like it does make for a more conceptually clean conversation flow, though, so if you feel like doing it, then I certainly wouldn't object23:34
cory_fuAnyway, I'm off to EOD as well23:35
lazypowercheers dudes o/23:38
lazypowerthanks for the help today cory_fu23:38
cory_funp!23:39
mbruzekcory_fu: or marcoceppi if anyone would like to review the implementation early please go here https://github.com/mbruzek/layer-tls and https://github.com/mbruzek/interface-tls23:45
mbruzekI have not yet been able to test with the new charmhelpers, will do that tomorrow, but if you find some logic flaws, or have anyone has suggestions please add issues23:46

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