Tighten regex when looking for ovn db file
The payload containers sb, nb and northd have a shared db dir. The join wrapper skips the join command if it detects an existing ovn db. But the regex used by the join command is not specific enough. So the sb would skip the join if the nb db was present. This patch tightens the regex so that the join wrappers look for their own db. Change-Id: I20b139244664a5218c236ec28756fefd617cc668changes/56/883356/2
parent
c5793b0765
commit
1e37e2b998
|
@ -8,7 +8,7 @@ function log_msg()
|
|||
echo "$(date): $msg" >> $WRAPPER_LOG
|
||||
}
|
||||
|
||||
ls -l /var/lib/ovn/{.ovn,ovn}* &> /dev/null && { log_msg "Existing DB files found, skipping join"; exit 0; }
|
||||
ls -l /var/lib/ovn/{.ovn,ovn}nb* &> /dev/null && { log_msg "Existing DB files found, skipping join"; exit 0; }
|
||||
log_msg "No existing DB files present"
|
||||
ADDRESSES="{{ peers.db_nb_cluster_connection_strs|join(' ') }}"
|
||||
log_msg "Running join-cluster cmd: ovsdb-tool join-cluster /var/lib/ovn/ovnnb_db.db OVN_Northbound $ADDRESSES"
|
||||
|
|
|
@ -7,7 +7,7 @@ function log_msg()
|
|||
msg=$1
|
||||
echo "$(date): $msg" >> $WRAPPER_LOG
|
||||
}
|
||||
ls -l /var/lib/ovn/{.ovn,ovn}* &> /dev/null && { log_msg "Existing DB files found, skipping join"; exit 0; }
|
||||
ls -l /var/lib/ovn/{.ovn,ovn}sb* &> /dev/null && { log_msg "Existing DB files found, skipping join"; exit 0; }
|
||||
log_msg "No existing DB files present"
|
||||
ADDRESSES="{{ peers.db_sb_cluster_connection_strs|join(' ') }}"
|
||||
log_msg "Running join-cluster cmd: ovsdb-tool join-cluster /var/lib/ovn/ovnsb_db.db OVN_Southbound $ADDRESSES"
|
||||
|
|
Loading…
Reference in New Issue