Skip to content

Commit

Permalink
add delete ovs pods after restore nb db (#1474)
Browse files Browse the repository at this point in the history
  • Loading branch information
hongzhen-ma committed Apr 25, 2022
1 parent 73f9d15 commit 5ba5c52
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dist/images/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3226,6 +3226,9 @@ dbtool(){
kubectl exec -it -n $KUBE_OVN_NS ${podNameArray[0]} -- mv /etc/ovn/ovnnb_db_standalone.db /etc/ovn/ovnnb_db.db
kubectl scale deployment -n $KUBE_OVN_NS ovn-central --replicas=$replicas
echo "finish restore nb db file and ovn-central replicas"
echo "recreate ovs-ovn pods"
kubectl delete pod -n $KUBE_OVN_NS -l app=ovs
;;
*)
echo "unknown action $action"
Expand Down
3 changes: 3 additions & 0 deletions dist/images/kubectl-ko
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,9 @@ dbtool(){
kubectl exec -it -n $KUBE_OVN_NS ${podNameArray[0]} -- mv /etc/ovn/ovnnb_db_standalone.db /etc/ovn/ovnnb_db.db
kubectl scale deployment -n $KUBE_OVN_NS ovn-central --replicas=$replicas
echo "finish restore nb db file and ovn-central replicas"

echo "recreate ovs-ovn pods"
kubectl delete pod -n $KUBE_OVN_NS -l app=ovs
;;
*)
echo "unknown action $action"
Expand Down
3 changes: 3 additions & 0 deletions dist/images/restore-ovn-nb-db.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,6 @@ echo "restore nb db file"
mv /etc/ovn/ovnnb_db_standalone.db /etc/ovn/ovnnb_db.db
kubectl scale deployment -n $KUBE_OVN_NS ovn-central --replicas=$replicas
echo "finish restore nb db file and ovn-central replicas"

echo "recreate ovs-ovn pods"
kubectl delete pod -n $KUBE_OVN_NS -l app=ovs

0 comments on commit 5ba5c52

Please sign in to comment.