File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -169,6 +169,17 @@ Q_LOG_DRIVER_LOG_BASE=${Q_LOG_DRIVER_LOG_BASE:-acl_log_meter}
169169# Utility Functions
170170# -----------------
171171
172+ function wait_for_db_file {
173+ local count=0
174+ while [ ! -f $1 ]; do
175+ sleep 1
176+ count=$(( count+ 1 ))
177+ if [ " $count " -gt 5 ]; then
178+ die $LINENO " DB File $1 not found"
179+ fi
180+ done
181+ }
182+
172183function wait_for_sock_file {
173184 local count=0
174185 while [ ! -S $1 ]; do
@@ -695,8 +706,11 @@ function start_ovn {
695706 fi
696707
697708 # Wait for the service to be ready
709+ # Check for socket and db files for both OVN NB and SB
698710 wait_for_sock_file $OVS_RUNDIR /ovnnb_db.sock
699711 wait_for_sock_file $OVS_RUNDIR /ovnsb_db.sock
712+ wait_for_db_file $OVN_DATADIR /ovnnb_db.db
713+ wait_for_db_file $OVN_DATADIR /ovnsb_db.db
700714
701715 if is_service_enabled tls-proxy; then
702716 sudo ovn-nbctl --db=unix:$OVS_RUNDIR /ovnnb_db.sock set-ssl $INT_CA_DIR /private/$DEVSTACK_CERT_NAME .key $INT_CA_DIR /$DEVSTACK_CERT_NAME .crt $INT_CA_DIR /ca-chain.pem
You can’t perform that action at this time.
0 commit comments