Container health check from another container
Hi, is it possible to run health check on a container from another container in same pod? -- Michael Ivanov
Thanks for reaching out, Michael. On Tue, Nov 21, 2023 at 9:45 AM Михаил Иванов <ivans@isle.spb.ru> wrote:
Hi, is it possible to run health check on a container from another container in same pod?
The answer is probably no, but I want to make sure to understand your use case. Can you elaborate on it in more detail?
--
Michael Ivanov
_______________________________________________ Podman mailing list -- podman@lists.podman.io To unsubscribe send an email to podman-leave@lists.podman.io
Hallo Valentin, the actual case is to wait until oracle container is in healthy state and only then allow to access it from the other container. Currently I loop on oracle container health check before running the second container. This approach is possible when I run containers from shell script, but probably will not work in eg. kubernetes. Rgrds, On 21.11.2023 11:49, Valentin Rothberg wrote:
Thanks for reaching out, Michael.
On Tue, Nov 21, 2023 at 9:45 AM Михаил Иванов <ivans@isle.spb.ru> wrote:
Hi, is it possible to run health check on a container from another container in same pod?
The answer is probably no, but I want to make sure to understand your use case. Can you elaborate on it in more detail?
--
Michael Ivanov
_______________________________________________ Podman mailing list -- podman@lists.podman.io To unsubscribe send an email to podman-leave@lists.podman.io
_______________________________________________ Podman mailing list --podman@lists.podman.io To unsubscribe send an email topodman-leave@lists.podman.io
On 11/21/23 09:33, Михаил Иванов wrote:
Hallo Valentin, the actual case is to wait until oracle container is in healthy state and only then allow to access it from the other container. Currently I loop on oracle container health check before running the second container. This approach is possible when I run containers from shell script, but probably will not work in eg. kubernetes. Rgrds, This sounds exactly like a systemd use case, have you investigated using quadlet for this? On 21.11.2023 11:49, Valentin Rothberg wrote:
Thanks for reaching out, Michael.
On Tue, Nov 21, 2023 at 9:45 AM Михаил Иванов <ivans@isle.spb.ru> wrote:
Hi, is it possible to run health check on a container from another container in same pod?
The answer is probably no, but I want to make sure to understand your use case. Can you elaborate on it in more detail?
--
Michael Ivanov
_______________________________________________ Podman mailing list -- podman@lists.podman.io To unsubscribe send an email to podman-leave@lists.podman.io
_______________________________________________ Podman mailing list --podman@lists.podman.io To unsubscribe send an email topodman-leave@lists.podman.io
_______________________________________________ Podman mailing list --podman@lists.podman.io To unsubscribe send an email topodman-leave@lists.podman.io
Hallo Daniels, thanks for the advice. I tried to run the pod using quadlet, but I hit the same problem. It seems that when started under quadlet all containers, belonging to the pod are started up without checking whether the other containers are already in healthy state or not. Is there a way to specify container dependencies inside podman/kubernetes pod? I don't like to run oracle in a separate container and define dependencies using systemd After/Require options. I prefer to keep oracle container in single pod with application, so that it is not necessary to map oracle port to different value for each application. Best regards, -- Michael Ivanov On 21.11.2023 17:39, Daniel Walsh wrote:
On 11/21/23 09:33, Михаил Иванов wrote:
Hallo Valentin, the actual case is to wait until oracle container is in healthy state and only then allow to access it from the other container. Currently I loop on oracle container health check before running the second container. This approach is possible when I run containers from shell script, but probably will not work in eg. kubernetes. Rgrds, This sounds exactly like a systemd use case, have you investigated using quadlet for this? On 21.11.2023 11:49, Valentin Rothberg wrote:
Thanks for reaching out, Michael.
On Tue, Nov 21, 2023 at 9:45 AM Михаил Иванов <ivans@isle.spb.ru> wrote:
Hi, is it possible to run health check on a container from another container in same pod?
The answer is probably no, but I want to make sure to understand your use case. Can you elaborate on it in more detail?
--
Michael Ivanov
_______________________________________________ Podman mailing list -- podman@lists.podman.io To unsubscribe send an email to podman-leave@lists.podman.io
_______________________________________________ Podman mailing list --podman@lists.podman.io To unsubscribe send an email topodman-leave@lists.podman.io
_______________________________________________ Podman mailing list --podman@lists.podman.io To unsubscribe send an email topodman-leave@lists.podman.io
_______________________________________________ Podman mailing list --podman@lists.podman.io To unsubscribe send an email topodman-leave@lists.podman.io
For example, you can define a custom /health API for this. In this API you can call and process health results from another hosts you are integrating with. С уважением, А. И. вт, 21 нояб. 2023 г., 11:45 Михаил Иванов <ivans@isle.spb.ru>:
Hi, is it possible to run health check on a container from another container in same pod?
--
Michael Ivanov
_______________________________________________ Podman mailing list -- podman@lists.podman.io To unsubscribe send an email to podman-leave@lists.podman.io
On Tue, Nov 21, 2023 at 10:12 AM Александр Илюшкин <ailjushkin@gmail.com> wrote:
For example, you can define a custom /health API for this.
In this API you can call and process health results from another hosts you are integrating with.
Can you describe the use case? I don't yet fully understand what you want to do. I am a bit confused as you first mentioned "another container in the same pod" and now mention "another host". Kind regards, Valentin
С уважением, А. И.
вт, 21 нояб. 2023 г., 11:45 Михаил Иванов <ivans@isle.spb.ru>:
Hi, is it possible to run health check on a container from another container in same pod?
--
Michael Ivanov
_______________________________________________ Podman mailing list -- podman@lists.podman.io To unsubscribe send an email to podman-leave@lists.podman.io
_______________________________________________ Podman mailing list -- podman@lists.podman.io To unsubscribe send an email to podman-leave@lists.podman.io
I apologize if I misunderstood the question. I thought about something like this. вт, 21 нояб. 2023 г. в 12:49, Valentin Rothberg <vrothberg@redhat.com>:
On Tue, Nov 21, 2023 at 10:12 AM Александр Илюшкин <ailjushkin@gmail.com> wrote:
For example, you can define a custom /health API for this.
In this API you can call and process health results from another hosts you are integrating with.
Can you describe the use case? I don't yet fully understand what you want to do. I am a bit confused as you first mentioned "another container in the same pod" and now mention "another host".
Kind regards, Valentin
С уважением, А. И.
вт, 21 нояб. 2023 г., 11:45 Михаил Иванов <ivans@isle.spb.ru>:
Hi, is it possible to run health check on a container from another container in same pod?
--
Michael Ivanov
_______________________________________________ Podman mailing list -- podman@lists.podman.io To unsubscribe send an email to podman-leave@lists.podman.io
_______________________________________________ Podman mailing list -- podman@lists.podman.io To unsubscribe send an email to podman-leave@lists.podman.io
-- С уважением, А.И.
On Tue, Nov 21, 2023 at 11:23 AM Александр Илюшкин <ailjushkin@gmail.com> wrote:
I apologize if I misunderstood the question. I thought about something like this.
Thanks! I'd prefer a text explanation as I still need to interpret the sketch. As far as I read it, something should be blocking on the health state of another container. So it's not possible for one container to know the health state of another container. That knowledge must either be implemented in the application logic *inside* the container (e.g., ping a server) or be used outside the containers, for instance, by moving the containers into systemd units which will only mark the unit as ready when the health check fired.
вт, 21 нояб. 2023 г. в 12:49, Valentin Rothberg <vrothberg@redhat.com>:
On Tue, Nov 21, 2023 at 10:12 AM Александр Илюшкин <ailjushkin@gmail.com>
wrote:
For example, you can define a custom /health API for this.
In this API you can call and process health results from another hosts
you are integrating with.
Can you describe the use case? I don't yet fully understand what you want to do. I am a bit confused as you first mentioned "another container in the same pod" and now mention "another host".
Kind regards, Valentin
С уважением, А. И.
вт, 21 нояб. 2023 г., 11:45 Михаил Иванов <ivans@isle.spb.ru>:
Hi, is it possible to run health check on a container from another
container in same pod?
--
Michael Ivanov
_______________________________________________ Podman mailing list -- podman@lists.podman.io To unsubscribe send an email to podman-leave@lists.podman.io
_______________________________________________ Podman mailing list -- podman@lists.podman.io To unsubscribe send an email to podman-leave@lists.podman.io
-- С уважением, А.И.
At least I tried, Valentin 😅 Yes, your interpretation is correct. That was interesting to learn about the systemd approach. С уважением, А. И. вт, 21 нояб. 2023 г., 15:05 Valentin Rothberg <vrothberg@redhat.com>:
On Tue, Nov 21, 2023 at 11:23 AM Александр Илюшкин <ailjushkin@gmail.com> wrote:
I apologize if I misunderstood the question. I thought about something like this.
Thanks! I'd prefer a text explanation as I still need to interpret the sketch. As far as I read it, something should be blocking on the health state of another container.
So it's not possible for one container to know the health state of another container. That knowledge must either be implemented in the application logic *inside* the container (e.g., ping a server) or be used outside the containers, for instance, by moving the containers into systemd units which will only mark the unit as ready when the health check fired.
вт, 21 нояб. 2023 г. в 12:49, Valentin Rothberg <vrothberg@redhat.com>:
On Tue, Nov 21, 2023 at 10:12 AM Александр Илюшкин <
ailjushkin@gmail.com> wrote:
For example, you can define a custom /health API for this.
In this API you can call and process health results from another hosts
you are integrating with.
Can you describe the use case? I don't yet fully understand what you want to do. I am a bit confused as you first mentioned "another container in the same pod" and now mention "another host".
Kind regards, Valentin
С уважением, А. И.
вт, 21 нояб. 2023 г., 11:45 Михаил Иванов <ivans@isle.spb.ru>:
Hi, is it possible to run health check on a container from another
container in same pod?
--
Michael Ivanov
_______________________________________________ Podman mailing list -- podman@lists.podman.io To unsubscribe send an email to podman-leave@lists.podman.io
_______________________________________________ Podman mailing list -- podman@lists.podman.io To unsubscribe send an email to podman-leave@lists.podman.io
-- С уважением, А.И.
participants (4)
-
Daniel Walsh -
Valentin Rothberg -
Александр Илюшкин -
Михаил Иванов