both containers can run in host pid mode. With that they will deal with the correct PID.
This will solve this particular problem but in general I am not a big friend of leveraging PIDs as a health check mechanism.
The right way would be to query bind9 on application layer.
Regards,
Michael
Am 13.03.2018 um 07:33 schrieb Hari Prasad Killi <email address hidden>:
Hi Michael, Andrey, Alex,
Contrail-named writes its pid to /etc/contrail/dns/contrail-named.pid, which is used by contrail-dns to identify that named is up / down or if it got restarted (when pid changes). With these two being in two different containers, the pid of each one is 1. As contrail-dns doesn’t see pid 1 being contrail-named (it reads /proc to find out the command for the pid and match it against contrail-named), it doesn’t consider named to be up and never pushes the DNS records to named. Is there a way to handle this ? Or should these two run in a single container ? Please note that named is third party, with minimal changes done to suit our needs.
Also, contrail-dns need not run as root (user contrail).
Regards,
Hari
Hi Hari,
both containers can run in host pid mode. With that they will deal with the correct PID.
This will solve this particular problem but in general I am not a big friend of leveraging PIDs as a health check mechanism.
The right way would be to query bind9 on application layer.
Regards,
Michael
Am 13.03.2018 um 07:33 schrieb Hari Prasad Killi <email address hidden>: dns/contrail- named.pid, which is used by contrail-dns to identify that named is up / down or if it got restarted (when pid changes). With these two being in two different containers, the pid of each one is 1. As contrail-dns doesn’t see pid 1 being contrail-named (it reads /proc to find out the command for the pid and match it against contrail-named), it doesn’t consider named to be up and never pushes the DNS records to named. Is there a way to handle this ? Or should these two run in a single container ? Please note that named is third party, with minimal changes done to suit our needs.
Hi Michael, Andrey, Alex,
Contrail-named writes its pid to /etc/contrail/
Also, contrail-dns need not run as root (user contrail).
Regards,
Hari