/srv/irclogs.ubuntu.com/2020/12/01/#smooth-operator.txt

bthomasChipaca: Do you know if the environment variable for "is_doomed" is set in the operator pod or the application pod ? I did a kubectl exec to compare difference in operator pod environment variables before and during tear down of a model, but do not see any change.10:40
Chipacabthomas: I expect it only to be set in the hook run itself, so you'd need to use debug-hook (or debug-code)10:41
bthomasthank you10:41
Chipacabthomas: that should work in k8s on 2.910:41
bthomasgot it10:42
Chipacabthomas: or, you could always logger.debug(sorted((k, v) for (k, v) in os.environ.items() if 'juju' in k.lower()))10:43
bthomasyes indeed. thank you10:43
Chipacabthomas: or just logger.debug(sorted(os.environ.items()))))))))))) :-p10:43
bthomas:-)))))))))))10:43
* Chipaca goes back to reviewing stuff10:47
facubatista¡Muy buenos días a todos!10:59
Chipacafacubatista: 👋❗11:01
facubatistahola Chipaca :)11:02
bthomashola facubatista11:02
facubatistahola bthomas :)11:02
JoseMassonBuongiorno!12:26
bthomasMorning JoseMasson12:31
bthomasGoogle translate says "Buongiorno" is Italian for "Good Morning"12:31
bthomasChipaca: Uptil now what I can figure out is when "JUJU_HOOK_NAME" is "remove" the unit will die. I will dig a bit more.12:40
bthomasHowever the "remove" hook does not seem to get executed when the model itself is destroyed. So needs a bit more digging.12:41
JoseMassonbthomas: Yes, today I woke up with my Italian roots very active :P12:49
* bthomas -> lunch13:19
JoseMassonI am writing a MySQL charm, and need to setup the MYSQL_ROOT_PASSWORD. What would be a good practice for setting this password without harcoding it in the charm?13:24
JoseMassonIt is possible to send it as a parameter to "juju deploy ...." ?13:25
* bthomas -> back13:35
Chipacabthomas: https://github.com/juju/juju/blob/develop/tests/suites/relations/charms/departer/hooks/self-relation-departed FWIW16:49
bthomasChipaca: ack. I need to figure out why I am not see this in logs16:51
bthomasI wonder if it could be I need TRACE level logging and not just debug16:54
Chipacabthomas: why would that change what you have in the environ?17:32
bthomasChipaca: Is it possible the env variable is only transitently set . I need to dig further why I did not see it in my logs with a simple test charm (busybox).17:33
Chipacabthomas: … transiently how?17:33
bthomasChipaca: I was thinking "unset" but I will admit that is being paranoid :-)17:34
Chipacabthomas: env vars don't work that way tho, there is really no way to unset a variable from 'outside' a process17:35
bthomasChipaca: the same process that set the variable in the first place can unset it. Anyway I do not think this is the issue. I was just speculating.17:36
Chipacabthomas: if process A sets an env var and spawns process B, and then unsets the env var, that unsetting does not affect process B17:37
bthomasChipaca: true. But process B here is a single execution (event handler) of the charm. I have did not see the var in on_install on_start on_stop on_config_changed on_update_status . If process A is not setting the var for any of these particular handlers then I will not see. A may have set it for some other handler and then unset it.17:39
Chipacabthomas: and relation-departed?17:40
bthomasChipaca: Ah good point. I will add a relation-departed and test again.17:40
Chipacabthomas: maybe log from __init__, and not a specific handler?17:44
bthomasChipaca: I have logger.debug(str(sorted(os.environ.items()))) in all the above handlers and __init__ also17:44
bthomasChipaca: May I schedule a short 1:1 for tomorrow around 11am ?17:47
Chipacabthomas: sure17:47
Chipacabthomas: we can do it earlier also probably, i'll ping you on mattermost if i have a gap17:52
Chipacai expect the car thing is going to be a bunch of sitting around waiting for people, but might be pleasently surprised17:53
bthomasChipaca: I tried to give you time in case your care woes over runs. But yeah ping me any time.17:53
* Chipaca wanders off to make pascualina18:20
bthomasOooh that spinach stuffing looks reeeeally good, reminds me of spinach stromboli18:22
* bthomas EODs but am around for a bit18:23

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