Skip to content

Commit

Permalink
fix: if user not set OVN_VERSION_COMPATIBILITY, should set it to none
Browse files Browse the repository at this point in the history
Signed-off-by: bobz965 <[email protected]>
  • Loading branch information
bobz965 committed Jul 12, 2024
1 parent b179758 commit d180536
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions dist/images/start-db.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
}

Expand Down

0 comments on commit d180536

Please sign in to comment.