From d180536cfef2f48a7858fda93ebe89518f50bfd1 Mon Sep 17 00:00:00 2001 From: bobz965 Date: Fri, 12 Jul 2024 23:39:09 +0800 Subject: [PATCH] fix: if user not set OVN_VERSION_COMPATIBILITY, should set it to none Signed-off-by: bobz965 --- dist/images/start-db.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dist/images/start-db.sh b/dist/images/start-db.sh index c160f183252..4bf637a4dc5 100755 --- a/dist/images/start-db.sh +++ b/dist/images/start-db.sh @@ -139,6 +139,7 @@ function is_clustered { function set_nb_version_compatibility() { if [ -n "$OVN_VERSION_COMPATIBILITY" ]; then if ! ovn-nbctl --db=$(gen_conn_str 6641) $SSL_OPTIONS get NB_Global . options | grep -q version_compatibility=; then + echo "ovn nb global option version_compatibility is set to ${OVN_VERSION_COMPATIBILITY}" ovn-nbctl --db=$(gen_conn_str 6641) $SSL_OPTIONS set NB_Global . options:version_compatibility=${OVN_VERSION_COMPATIBILITY} return fi @@ -147,6 +148,9 @@ function set_nb_version_compatibility() { if [ "$value" != "_$OVN_VERSION_COMPATIBILITY" ]; then ovn-nbctl --db=$(gen_conn_str 6641) $SSL_OPTIONS set NB_Global . options:version_compatibility=${OVN_VERSION_COMPATIBILITY} fi + else + echo "ovn nb global option version_compatibility is set to none" + ovn-nbctl --db=$(gen_conn_str 6641) $SSL_OPTIONS set NB_Global . options:version_compatibility=none fi }