NSX|V3: fix issue with OVS manager configuration
In devstack today we support multiple managers. This would lead to the manager not being set correctly. This enables us to choose the first manager to get the version and set the manager status correctly. Change-Id: Ia79df4ec905eed5ac26fbb3ad9490031f112dad8
This commit is contained in:
parent
beb61a55ca
commit
19a28c7831
|
@ -44,7 +44,9 @@ source $TOP_DIR/lib/neutron_plugins/ovs_base
|
|||
function _version { echo "$@" | awk -F. '{ printf("%d%03d%03d%03d\n", $1,$2,$3,$4); }'; }
|
||||
|
||||
function _ovsdb_connection {
|
||||
NSX_VER=$(curl -s -k -u "$NSX_USER:$NSX_PASSWORD" -H 'Accept: application/json' https://$NSX_MANAGER/api/v1/node | python -c 'import sys, json; print json.load(sys.stdin)["node_version"][:5]')
|
||||
managers=(${NSX_MANAGER//,/ })
|
||||
NSX_MGR_IP=${managers[0]}
|
||||
NSX_VER=$(curl -s -k -u "$NSX_USER:$NSX_PASSWORD" -H 'Accept: application/json' https://$NSX_MGR_IP/api/v1/node | python -c 'import sys, json; print json.load(sys.stdin)["node_version"][:5]')
|
||||
if [ $(_version $NSX_VER) -ge $(_version 1.1.0) ]; then
|
||||
echo "unix:/var/run/vmware/nsx-agent/nsxagent_ovsdb.sock"
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue