/srv/irclogs.ubuntu.com/2020/04/06/#smooth-operator.txt

=== max__ is now known as Guest94787
Dmitrii-Sho/04:05
jammorning Dmitrii-Sh04:50
Dmitrii-Shmorning jam04:51
jamDmitrii-Sh, feedback given on https://github.com/canonical/operator/pull/21207:10
Dmitrii-Shjam: ty, I'll spend some time on it. I added .begin() in different test cases to be able to get to charm metadata (so that I can  check whether a relation is a peer relation or not)07:14
jamDmitrii-Sh, I believe we have self._meta we don't need self.charm.meta IIRC07:15
Dmitrii-Shjam: ok, I think I missed this. If so, I can replace the check07:16
niemeyerGood morning folks07:52
jammorning07:58
Chipacagood morning charmcaft!08:29
niemeyerMoin!08:29
jammorning08:33
Chipacajam: having some hardware issues, be there in a minute10:01
vgrevtsevhi everyone - is this a right place for a new developers to ask their questions about the new framework? :)10:23
Chipacavgrevtsev: yep!10:33
vgrevtsevChipaca: good to know, thanks - just starting writing my first charm, so I'll definitely have some questions around. As far as I understood, there are no single doc/howto, only READMEs from the different ops charms with some hidden knowledge?10:34
Chipacavgrevtsev: yes :(10:35
Chipacavgrevtsev: working on fixing that, but for now, yes10:35
facubatistaMuy buenos días a todos!11:23
Chipacafacubatista: 👋11:24
facubatistahola Chipaca!11:25
Dmitrii-Shfacubatista: o/11:25
facubatistahola Dmitrii-Sh!11:25
facubatistajam, I feel like the previous version of the branch was more clear: if the envvar is set, the logging setup is indicated to go to debug mode, which means two decissions that belongs to the logging setup: a) logger in debug level, b) also a handler to stderr11:41
jamon a call, will chat with you in a sec11:42
facubatistajam, now it feels mixed, it looks like which stream is decided outside the logging setup, and that stream is indicated to the logging setup, which when present, not only builds a handler for it (it's fine there) but also changes the level of the logger11:42
* niemeyer => lunch11:42
* Chipaca ⇝ also lunch11:46
jamfacubatista, so I don't have a huge problem with the fact that setting a 'debug_stream' means enabling debug messages. That said, since the log handler already filters at INFO, we could just have the log level always DEBUG?12:08
jamthe fact that handlers have separate levels from loggers is always a bit wonky12:08
facubatistadifferent levels for handlers and loggers is a good feature12:09
facubatistathey filter different levels for different purposes12:09
facubatistaI mean, they have different semantics12:09
facubatistajam, we can put the JujuLogHandler always in DEBUG, as it just sends stuff to juju, which also presents the user a way to select the level12:11
facubatistabut the logger must be in INFO by default12:11
facubatistajam, actually, this impacts in that interaction: when the user jumps into a debug hook, juju will start getting DEBUG logs, as we're chaning the logger level, which I think it's fine12:16
facubatistathe default is still info12:16
facubatistajam, so?12:33
jamfacubatista, so... that isn't how it currently works, so I'm trying to parse out a bit of what your suggesting how we should make it work. And the various pieces at play.12:34
facubatistajam, this is related: https://github.com/canonical/operator/issues/19812:35
facubatistawe need to have in mind how this will end in its whole12:35
Dmitrii-Shhttps://github.com/canonical/operator/pull/216 - sent another interface for review. I'll need to modify the existing charms to adjust to this change.12:38
Dmitrii-ShOf note: as I introduce more complex types into interfaces, I feel the need to use some form of serialization. For example, even using timedate.delta for various health-checking timeouts requires me to do that.12:38
Chipacadatetime.timedelta?12:43
Dmitrii-Shyes12:43
Dmitrii-Shgot it backwards while writing :^\12:44
Chipaca:)12:44
jamDmitrii-Sh, if it is a timedelta, why wouldn't you just serialize a float point seconds?12:45
Chipacajam: I'm assuming that's "some form of serialization"12:48
Dmitrii-Shjam: in this particular case I could covert datetime.delta to float and also expose a property on a type that does the reverse12:49
jamChipaca, fair enough, though there is a fair difference to say "use a float" vs "I need to encode things using JSON because I want to round trip a serialized form"12:50
jamChipaca, IIRC, charms.reactive defaulted to translating all relation-set values into JSON blobs12:50
Chipacaew :)12:51
facubatistajam, may you help me with something, as IIUC you already tested this IRL... see this: http://linkode.org/#ipk9mNkD5aiE8vA78xkUD1 <-- there I exercised debug-hooks, set up the envvar myself and run the hook, got the pdb prompt..12:52
facubatistajam, of course those two lines will not exist; if I write a message, it will appear after the other one? (like in node 2 of that linkode), or alone (like in node 3)?12:52
Dmitrii-Sh@property12:52
Dmitrii-Shdef timeout(self):12:52
Dmitrii-Sh    return self._timeout.total_seconds()12:52
Dmitrii-Shsomething like that ^12:53
jamfacubatista, so you'll need juju 2.8 from the edge snap, and the command is "juju debug-code" if you want to test the new behavior.12:53
jamfacubatista, but the new behavior is in (3)12:53
jamI intentionally skip the Juju message, because it isn't helpful when you are ending up in PDB12:53
Dmitrii-Shjam: but, yes, to use the same type on both sides of the relation I need to use something to serialize/deserialize more complex objects. Whether its pickle, JSON or other boilerplate code to fit the data into relation data bags12:55
Dmitrii-Shthe question is how complex do we want it to be for somebody implementing an interface12:55
jamDmitrii-Sh, given the whole point of interfaces is to be the point of abstraction, I certainly wouldn't want Python types on the wire12:56
jameven Pickle between Python isn't safe because on might be a Python3.5 running on Xenial, and the other is Python 3.8 running in Focal12:57
jamfacubatista, if you want to test it, you should be able to do "snap install --channel=edge juju --classic" and then 'juju bootstrap lxd' should leave you with a '2.8beta1' controller.12:58
Dmitrii-Shjam: yes, plus the code on both sides of a relation may be of different revisions12:58
facubatistajam, so, it will be better to have a more complex text, like http://linkode.org/#Pu9DEIIWWybq5Q2eDSelJ12:58
jamfacubatista, yeah, I think something like that.12:59
facubatistaChipaca, it worries me lying in line 6 ^12:59
jamis there a way we can tell ^D/exit was done and make sure the hook exits nonzero?12:59
facubatistajam, can I upgrade juju and keep the same controller? how that works?12:59
jamfacubatista, if you have the new snap, you might be able to "juju upgrade-controller". However, if it is a 2.7 stable controller, getting it to a 2.8 beta can be a bit trickier, IIRC.13:00
facubatistajam, I can totally destroy and re-bootstra, I just don't want to do that very often; do you think I will be able to just leave 2.8beta1 in my system?13:02
jamChipaca, just make him write the documentation before he can land his code, then it won't be a lie.13:02
jamThough I believe the official discourse just switched to discourse.juju.is13:03
jamlike 3 days ago or something.13:03
jamfacubatista, until we hit official beta, Juju doesn't guarantee compatibility/upgrades. While it is coming real-soon-now and I don't see any particular problems I certainly wouldn't use it for anything you want to guarantee keep around.13:04
jamother than that, things in 'edge' have passed the unit test suite, but not necessarily the full CI regression suite.13:04
jam(I've always tended to run straight off develop/or a feature branch rather than edge, so I don't have a lot of experience with it)13:05
facubatistajam, ack, thanks13:12
Dmitrii-Shniemeyer: just sent an invite - I hope you can make it.14:12
niemeyerDmitrii-Sh: Thanks! If the meeting doesn't run over I will make it14:19
facubatistaniemeyer, I put the message here: https://docs.google.com/document/d/1H_3V19XGnEvUtE_tk2CFWmtiW8Zc4y1lvxTPz55VSJY/edit (the original one, and a newer already improved version below)14:19
niemeyerfacubatista: Thanks, let's sync later today as your timezone is friendly to that :)14:23
facubatistaniemeyer, +114:26
crodriguezDmitrii-Sh: niemeyer : I need to dig more into the mssql components and the solution I want to put in place before asking questions about how to transpose that to the framework itself. The more I read about it the less I'm sure of what I want to do haha. I will dig more about that and maybe we can reschedule the call in a few days?15:03
crodriguezIt's a bit complex since the mssql components are only in preview mode for docker, no official doc about transposing it to k8s itself, so I'm experimenting15:04
Dmitrii-Shcrodriguez: I think we can still have a call (even if it's going to be short) just to go over what's involved at a high level15:09
Dmitrii-Shand then dive into the details as we get more info15:09
crodriguezSure Dmitrii-Sh15:10
niemeyercrodriguez: Yeah, I'd appreciate even just listening to what you've been up to, so we can learn about your initial views on the problems you're working through15:10
crodriguezokay np :) I just didn't want to waste anyone's time since I'm still figuring things out15:11
niemeyercrodriguez: No worries.. that's exactly the sort of opinion I'd be happy to learn about.. once you learn a bit more about the problem space and the candidate solutions, these early feelings will be replaced by feasible alternatives given what you've learned15:18
niemeyercrodriguez: Some of the idiosyncrasies might be worth fixing, though, if we can learn about them15:20
=== narindergupta is now known as narinderguptamac
vgrevtsevhi Dmitrii-Sh - are you able to have a quick sync now?16:05
Dmitrii-Shcrodriguez: thanks for the feedback, feel free to reach out going forward16:05
Dmitrii-Shvgrevtsev: sure, just finished the last meeting16:05
vgrevtsevDmitrii-Sh: https://meet.google.com/sxc-wcti-vko?authuser=116:05
niemeyerChipaca: How's the Office Hours thing going?16:07
Chipacaniemeyer: still need to meet with tim v and look at when and how to do it (soon)16:07
niemeyerChipaca: Ack, thanks16:08
Chipacagood news is i know what i'm charming :-)16:49
vgrevtsevmany thanks Dmitrii-Sh - it became much more clearer for me now :)16:56
* vgrevtsev starts charming16:56
Dmitrii-Shcheers16:56
facubatistammm... juju bootstrap crashed for juju from edge, will ask in #juju17:11
* Chipaca EODs17:16
narinderguptaHi team17:20
crodriguezo/17:21
narinderguptaWhen I scale up my zookeeper or Kafka PODS does stop and start.17:22
narinderguptaAnd when I run juju status I get a new juju unit17:22
narinderguptaWhile pod name is same17:23
narinderguptaFor example kafka-k8s/0 becomes kafka-k8s/417:23
narinderguptaWhile pod name remain same Kafka-k8s-017:23
narinderguptaDue to that sometime storage volume gets stuck and new pod does not start successfully and get stuck because volume get stuck17:24
narinderguptaAny ideas?17:24
niemeyernarindergupta: So you mean pods get destroyed and recreated but remain with the same name17:37
niemeyer?17:37
narinderguptaI am scaling up and there is change in spec17:37
narinderguptaJuju status says pods stop and pods start17:37
narinderguptaAnd I am expecting pod name to remain same which does17:38
narinderguptaBut juju unit changes17:38
narinderguptaFrom Kafka/0 to Kafka/417:38
narinderguptaniemeyer, ^17:38
niemeyernarindergupta: That's a bit awkward.. I wasn't involved in the design of the k8s implementation so I don't yet know how that works internally, but I can't imagine how the unit would get destroyed and recreated but the pod would remain the same17:40
narinderguptaThat's what is happening with operator framework did not tried with reactive though17:40
niemeyernarindergupta: The operator framework doesn't have a saying if the entire unit is getting destroyed.. it's living inside the unit17:41
narinderguptaSo you are suggesting it is juju behavior?17:42
narinderguptaWe are calling set_spec whenever config change17:42
narinderguptaself.model.pod.set_spec17:43
niemeyernarindergupta: Yes, the operator framework is a library to help you implementing the charm.. a charm is not deployed until juju says it should be17:43
niemeyernarindergupta: set_spec should not destroy your unit and recreate it17:43
narinderguptaIt is doing it17:43
narinderguptaNot first time17:44
narinderguptaBut on config changes17:44
narinderguptaBut adding new unit17:44
narinderguptaAs adding unit in zookeeper required to change the number of units as part of zookeeper config17:46
narinderguptaSo I have to call set_spec during scale17:46
narinderguptaup17:46
narinderguptaWhich is causing Destry old unit and create new one while pod remains the same17:46
narinderguptaActually whenever pod stop during upgrade Kafka unit gets terminated17:53
niemeyernarindergupta: We need someone that knows more deeply how the juju integration works.. what's your timezone?17:54
narinderguptaI am US CST17:54
niemeyerOk, so about 1PM now17:54
niemeyernarindergupta: How about we try to get hold of someone first thing tomorrow in your morning?17:55
narinderguptaSounds good to me17:55
niemeyernarindergupta: I'm keen on being present to understand as well how this is being done.. the behavior you describe doesn't seem to make sense, or I have a broken model in mind. So I'm keen to learn too.17:55
narinderguptaSure that would be helpful17:56
niemeyernarindergupta: Alright, can you please ping tomorrow when you get online?17:56
narinderguptaOk sounds good17:56
niemeyernarindergupta: Deal, thanks17:56
niemeyerfacubatista: Are you around for that last call?17:57
facubatistaniemeyer, otp, what about in 10'? or you EODing already? I can hang...17:57
niemeyerfacubatista: 10' is fine17:57
facubatistaniemeyer, thanks17:58
niemeyernp17:58
facubatistaniemeyer, ready18:14
facubatistaniemeyer, https://meet.google.com/veq-yfqm-kdk?18:14
niemeyeromw18:14
* facubatista eods20:29

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