Skip to content

Commit 6355063

Browse files
committed
contrib(kolla): add ExecStartPre socket-wait to drop-in
Kolla container units go active as soon as `docker start -a` runs, before the daemons inside open their sockets. Wait up to 120s for the NB and SB sockets so the exporter does not race them and trip StartLimitBurst at boot.
1 parent b10ab25 commit 6355063

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

contrib/kolla-ansible/ovn-exporter-kolla.conf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,9 @@
1313
After=docker.service kolla-ovn_nb_db-container.service kolla-ovn_sb_db-container.service kolla-ovn_northd-container.service
1414
Requires=kolla-ovn_nb_db-container.service kolla-ovn_sb_db-container.service
1515
Wants=kolla-ovn_northd-container.service
16+
17+
[Service]
18+
# Kolla container units go active as soon as `docker start -a` runs, before the
19+
# daemons inside open their sockets. Wait up to 120s for the NB and SB sockets
20+
# so the exporter does not race them and trip StartLimitBurst at boot.
21+
ExecStartPre=/bin/sh -c 'for i in $(seq 1 120); do [ -S /run/ovn/ovnnb_db.sock ] && [ -S /run/ovn/ovnsb_db.sock ] && exit 0; sleep 1; done; exit 1'

0 commit comments

Comments
 (0)