facubatista¡Muy buenos días a todos!10:12
Chipacafacubatista: 👋❗10:17
facubatistahola Chipaca10:17
bthomasनमस्ते facubatista : I have pushed update to charm.py docs as discussed in last to last standup.10:22
facubatistabthomas, wonderful, I trust Chipaca and Justing reviews, so when you get two approves there, land it, thanks!10:26
* Chipaca is reviewing it right now10:27
bthomasIt will be good if some one from Juju team, perhaps jam also reviews.10:27
Chipacabthomas: where's the deprecation notice for leader-settings-changed from?10:52
bthomasChipaca: The depreciation notice was already in there. Wasn't it ?10:54
bthomasI only put it in all CAPS.10:54
Chipacaah, true :)10:54
bthomasPlease do make any changes, as required.10:54
Chipacabthomas: just finished, great work11:09
bthomasThanks Chipaca11:09
Chipacabthomas: lots of suggestions of course11:09
bthomasWill fix11:09
Chipacajam: I've called you out in a couple of places in that PR, if you could give those specific bits a quick read (the whole thing is massive, but just those things shouldn't be too hard …)11:10
Chipacai should lunch12:09
* Chipaca goes12:09
* justinclark is struggling with actions :(14:53
justinclarkfacubatista / Chipaca, is there something special about writing actions for k8s charms that requires something besides defining the action in actions.yaml and observing the proper action event in the charm?14:55
justinclarkI've tested on several different charms and get errors like this: "env: can't execute 'python3': No such file or directory" with return code 127.14:57
justinclarkThe error messages are different for each app (Grafana, elasticsearch, Prometheus), which implies it might have something to do with the container in which the apps are running.14:59
facubatistajam, actions are fully supported by Juju under k8s?15:00
justinclarkI can talk more in standup, but the actions themselves are very simple - just test logging and a return message via event.set_results()15:00
jamfacubatista, actions in k8s are executed in the application pod, not the operator pod15:01
facubatistaso, they don't reach the OF/charm, right? it would be a way to execute stuff from the app directly?15:03
Chipacajustinclark: the application pod often doesn't have python3 installed15:04
Chipacajustinclark: ps if the application pod were ubuntu-based it (sh|w)ould have it15:05
justinclarkI see. Well the most surprising error message I had (last night) was something like: "./src/charm.py no such file or directory". So I'm not sure it can even execute the code defined in the charm itself.15:06
justinclarkI'll reproduce that one now.15:06
jamfacubatista, the content of the charm code is copied into the application pod during the init container15:07
jamjustinclark, I wonder if that is a $PATH issue, where we execute it but with the wrong $CWD15:08
facubatistajustinclark, you can jump into the app pod?15:09
justinclarkjam, that seems reasonable. I'll get the error output in a moment.15:12
justinclarkfacubatista, yes I can get into the pod.15:12
justinclarkjam, here is the real error message: "/var/lib/juju/agents/unit-prometheus-0/charm/dispatch: line 3: ./src/charm.py: not found"15:14
facubatistajustinclark, can you do a "tree" on /var/lib/juju/agents/unit-prometheus-0/charm ?15:18
justinclarkHowever, I can do this: "microk8s.kubectl exec -it -n lma prometheus-0 -- ls /var/lib/juju/agents/unit-prometheus-0/charm/src" and it shows charm.py15:18
Chipacathe thing is15:19
Chipacathat charm.py will say15:19
Chipaca#!/usr/bin/env python315:19
Chipacaand the container probably doesn't have /usr/bin/env15:19
justinclarkChipaca, that's correct. The only thing in /usr/bin is juju-run15:21
Chipacathus, no such file or directory15:21
facubatistaI would have expected another error, though15:21
facubatista12:20:50|facundo@blackfx:~$ cat x.py15:21
facubatista#!/usr/bin/notenv python315:21
facubatista12:20:54|facundo@blackfx:~$ ./x.py15:21
facubatistabash: ./x.py: /usr/bin/notenv: bad interpreter: No such file or directory15:21
Chipacafacubatista: now try with dash15:21
facubatista$ ./x.py15:22
facubatistadash: 1: ./x.py: not found15:22
facubatistacan we verify somehow that the docker image has Python3?15:23
facubatistaI mean, at building/somewhen time, otherwise the OF will never work15:23
Chipacafacubatista: "the only thing in /usr/bin is juju-run"15:24
Chipacawell, only actions won't15:24
Chipacaand only actions run in the application pod15:24
Chipacaand only if the charm uses dispatch, and the action isn't shell15:24
Chipacaby this i mean that there _are_ ways to get it to work, but they suck15:24
facubatistaChipaca, the charm uses dispatch, and the actions are not shell, because we're in the future15:25
jamChipaca, charmcraft's dispatch can't handle if python isn't available at all and you have an actions/foo right?15:25
Chipacajam: right, hence 'only if the charm uses dispatch'15:25
Chipacawe _could_ make it smarter, but not sure it's worth it15:26
Chipacakinda cornercasey15:26
jambut you could have a dispatch with "if JUJU_ACTION and -x ./actions/$JUJU_DISPATCH_PATH" etc in dispatch and gave it work.15:26
facubatistawhy are we considering "if charm uses dispatch"? all our charms use dispatch15:28
Chipacajam: that's what i mean by 'make it smarter'15:30
Chipacafacubatista: only the ones built with charmcraft and not then further tweaked15:30
facubatistaChipaca, which are the ones that be 100% of our base in some months from now, right?15:31
Chipacajam: further that one have to check wither that hook is a symlink to dispatch, or the charm itself, etc15:31
facubatistaChipaca, jam, standup15:31
jamok, but I don't see how that helps the discussion :) was there something on my chair?15:31
Chipacajam: ants in yer pants?15:50
* facubatista -> lunch16:15
bthomasThere are a lot of commits in the docstrings pull request. Is it ok to squash them into a single commit with good commit message.16:19
bthomasI address as many review changes as possible. Still some left.17:10
* bthomas -> out for dinner bb much later17:11
facubatistabthomas, it's ok to squash them, if you like17:18
justinclarkQuestion about ElasticSearch-K8s HA: in the pod spec, we need to configure the network host for each ES unit. In other words, there will be a different pod spec for each unit. However, self.model.pod.set_spec() only runs for the master unit. Is there any way to have a different pod spec for each unit?18:55
jam@justinclark, i'm not sure what you *need* to do vs what is done so far. But the juju model is that multiple units should not be measurably different from each other. If you need a difference-per-object then that may need to be different apps.19:13
justinclarkjam, basically what the ES docs say is if we want to have ES nodes on different servers (machines), we need to explicitly give ES a network host. Here is the short page in their docs: https://www.elastic.co/guide/en/elasticsearch/reference/6.8/network.host.html19:24
justinclarkThis is one of the first things we (Balbir and I) need to figure out since the ES charm should support HA by default.19:27

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