Merge "Fix run_dragonflow mgmt_address parameter"

This commit is contained in:
Zuul 2018-09-03 08:33:19 +00:00 committed by Gerrit Code Review
commit 63f13f8d22
2 changed files with 10 additions and 10 deletions

View File

@ -58,9 +58,9 @@ to allow this via `selinux`.
.. code-block:: bash
export DRAGONFLOW_ADDRESS=172.18.0.3 # Any free IP in the subnet
export DRAGONFLOW_IP=172.18.0.3 # Any free IP in the subnet
export MANAGEMENT_IP=$(docker inspect --format "{{ .NetworkSettings.Networks.${DRAGONFLOW_NET_NAME}.Gateway }}" etcd) # Assuming you put OVS on the host
docker run --name dragonflow --net $DRAGONFLOW_NET_NAME --ip ${DRAGONFLOW_ADDRESS} dragonflow:latest --dragonflow_address ${DRAGONFLOW_ADDRESS} --db_address ${NODE1}:2379 --management_ip ${MANAGEMENT_IP}
docker run --name dragonflow --net $DRAGONFLOW_NET_NAME --ip ${DRAGONFLOW_IP} dragonflow:latest --dragonflow_ip ${DRAGONFLOW_IP} --db_ip ${NODE1}:2379 --management_ip ${MANAGEMENT_IP}
* Make sure the IP was properly assigned to the container:

View File

@ -3,15 +3,15 @@
# First get all the arguments
while test ${#} -gt 0; do
case $1 in
--dragonflow_address)
--dragonflow_ip)
shift
DRAGONFLOW_ADDRESS=$1
DRAGONFLOW_IP=$1
;;
--db_address)
--db_ip)
shift
DB_ADDRESS=$1
DB_IP=$1
;;
--mgmt_address)
--management_ip)
shift
MANAGEMENT_IP=$1
;;
@ -29,14 +29,14 @@ while test ${#} -gt 0; do
shift
done
# SET DRAGONFLOW_ADDRESS and DB_ADDRESS on the ini file
# SET DRAGONFLOW_IP and DB_IP on the ini file
if [ ! -d /etc/dragonflow ]; then
mkdir -p /etc/dragonflow
fi
if [ ! -e /etc/dragonflow/dragonflow.ini ]; then
sed -e "s/LOCAL_IP/$DRAGONFLOW_ADDRESS/g" etc/standalone/dragonflow.ini | \
sed -e "s/LOCAL_IP/$DRAGONFLOW_IP/g" etc/standalone/dragonflow.ini | \
sed -e "s/MANAGEMENT_IP/$MANAGEMENT_IP/g" | \
sed -e "s/DB_SERVER_IP/$DB_ADDRESS/g" > /etc/dragonflow/dragonflow.ini
sed -e "s/DB_SERVER_IP/$DB_IP/g" > /etc/dragonflow/dragonflow.ini
fi
if [ ! -e /etc/dragonflow/dragonflow_datapath_layout.yaml ]; then
cp etc/dragonflow_datapath_layout.yaml /etc/dragonflow