[10:40] Chipaca: 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:41] bthomas: 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] thank you [10:41] bthomas: that should work in k8s on 2.9 [10:42] got it [10:43] bthomas: or, you could always logger.debug(sorted((k, v) for (k, v) in os.environ.items() if 'juju' in k.lower())) [10:43] yes indeed. thank you [10:43] bthomas: or just logger.debug(sorted(os.environ.items()))))))))))) :-p [10:43] :-))))))))))) [10:47] * Chipaca goes back to reviewing stuff [10:59] ¡Muy buenos días a todos! [11:01] facubatista: 👋❗ [11:02] hola Chipaca :) [11:02] hola facubatista [11:02] hola bthomas :) [12:26] Buongiorno! [12:31] Morning JoseMasson [12:31] Google translate says "Buongiorno" is Italian for "Good Morning" [12:40] Chipaca: 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:41] However the "remove" hook does not seem to get executed when the model itself is destroyed. So needs a bit more digging. [12:49] bthomas: Yes, today I woke up with my Italian roots very active :P [13:19] * bthomas -> lunch [13:24] I 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:25] It is possible to send it as a parameter to "juju deploy ...." ? [13:35] * bthomas -> back [16:49] bthomas: https://github.com/juju/juju/blob/develop/tests/suites/relations/charms/departer/hooks/self-relation-departed FWIW [16:51] Chipaca: ack. I need to figure out why I am not see this in logs [16:54] I wonder if it could be I need TRACE level logging and not just debug [17:32] bthomas: why would that change what you have in the environ? [17:33] Chipaca: 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] bthomas: … transiently how? [17:34] Chipaca: I was thinking "unset" but I will admit that is being paranoid :-) [17:35] bthomas: env vars don't work that way tho, there is really no way to unset a variable from 'outside' a process [17:36] Chipaca: 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:37] bthomas: if process A sets an env var and spawns process B, and then unsets the env var, that unsetting does not affect process B [17:39] Chipaca: 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:40] bthomas: and relation-departed? [17:40] Chipaca: Ah good point. I will add a relation-departed and test again. [17:44] bthomas: maybe log from __init__, and not a specific handler? [17:44] Chipaca: I have logger.debug(str(sorted(os.environ.items()))) in all the above handlers and __init__ also [17:47] Chipaca: May I schedule a short 1:1 for tomorrow around 11am ? [17:47] bthomas: sure [17:52] bthomas: we can do it earlier also probably, i'll ping you on mattermost if i have a gap [17:53] i expect the car thing is going to be a bunch of sitting around waiting for people, but might be pleasently surprised [17:53] Chipaca: I tried to give you time in case your care woes over runs. But yeah ping me any time. [18:20] * Chipaca wanders off to make pascualina [18:22] Oooh that spinach stuffing looks reeeeally good, reminds me of spinach stromboli [18:23] * bthomas EODs but am around for a bit