Created
September 23, 2020 12:25
-
-
Save numansiddique/f3798dd7b0f749e4d07844df6958693c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
OVNDIR=/home/nusiddiq/workspace_cpp/ovn-org/ovn | |
systemctl start openvswitch | |
ovs-vsctl set open . external_ids:ovn-bridge-controller-1=br-ctrl1 | |
ovs-vsctl set open . external_ids:ovn-bridge-controller-2=br-ctrl2 | |
ovs-vsctl set open . external_ids:ovn-remote-controller-1=tcp:172.17.0.1:664 | |
ovs-vsctl set open . external_ids:ovn-remote-controller-1=tcp:172.17.0.1:6642 | |
ovs-vsctl set open . external_ids:ovn-remote-controller-2=tcp:172.17.0.1:6642 | |
ovs-vsctl set open . external_ids:ovn-encap-ip-controller-1=172.17.0.2 | |
ovs-vsctl set open . external_ids:ovn-encap-ip-controller-2=172.17.0.3 | |
ovs-vsctl set open . external_ids:ovn-encap-type-controller-1=geneve | |
ovs-vsctl set open . external_ids:ovn-encap-type-controller-2=geneve | |
pushd $OVNDIR | |
make -j5 | |
sudo make install | |
/usr/local/share/ovn/scripts/ovn-ctl start_northd | |
ovn-sbctl set-connection ptcp:6642:172.17.0.1 | |
ovn-nbctl ls-add sw0 | |
ovn-nbctl lsp-add sw0 sw0-port1 | |
ovn-nbctl lsp-set-addresses sw0-port1 "50:54:00:00:00:03 10.0.0.3" | |
ovn-nbctl lsp-add sw0 sw0-port2 | |
ovn-nbctl lsp-set-addresses sw0-port2 "50:54:00:00:00:04 10.0.0.4" | |
# Start ovn-controller containers | |
docker run -v /var/run/openvswitch:/var/run/openvswitch -v /tmp/ovn-multinode:/data --privileged --name=ovn-controller-1 -ovn/ovn-multi-node:latest bash | |
docker run -v /var/run/openvswitch:/var/run/openvswitch -v /tmp/ovn-multinode:/data --privileged --name=ovn-controller-2 -ovn/ovn-multi-node:latest bash | |
docker exec -it ovn-controller-1 bash | |
ovn-controller -n controller-1 | |
docker exec -it ovn-controller-1 bash | |
ovn-controller -n controller-2 | |
# On ovn-controller-1 container below logs are seen when ovn-controller-2 comes up. | |
2020-09-23T12:04:55Z|00036|ovsdb_idl|WARN|transaction error: {"details":"Transaction causes multiple rows in \"Port\" table to have identical values (ovn-contro-0) for index on column \"name\". First row, with UUID e3b9cb6f-6082-46ab-aa09-d340fcc1f304, existed in the database before this transaction and was not modified by the transaction. Second row, with UUID ae6df8fc-92cd-4a3a-ad8c-0e0fb41b4066, was inserted by this transaction.","error":"constraint violation"} | |
2020-09-23T12:04:55Z|00037|ovsdb_idl|WARN|transaction error: {"details":"Transaction causes multiple rows in \"Port\" table to have identical values (ovn-contro-0) for index on column \"name\". First row, with UUID fe9eb8c1-7dab-4e29-9685-39fef9188562, was inserted by this transaction. Second row, with UUID e3b9cb6f-6082-46ab-aa09-d340fcc1f304, existed in the database before this transaction and was not modified by the transaction.","error":"constraint violation"} | |
2020-09-23T12:04:55Z|00038|ovsdb_idl|WARN|transaction error: {"details":"Transaction causes multiple rows in \"Interface\" table to have identical values (ovn-contro-0) for index on column \"name\". First row, with UUID 1a3da0a5-0d00-4ee5-bb02-b0518482e919, was inserted by this transaction. Second row, with UUID 371da268-dc61-471d-b4da-603422007975, existed in the database before this transaction and was not modified by the transaction.","error":"constraint violation"} | |
2020-09-23T12:04:55Z|00039|ovsdb_idl|WARN|transaction error: {"details":"Transaction causes multiple rows in \"Port\" table to have identical values (ovn-contro-0) for index on column \"name\". First row, with UUID e3b9cb6f-6082-46ab-aa09-d340fcc1f304, existed in the database before this transaction and was not modified by the transaction. Second row, with UUID 4df52c18-a87e-4066-9835-46d0d918902e, was inserted by this transaction.","error":"constraint violation"} | |
2020-09-23T12:04:55Z|00040|ovsdb_idl|WARN|transaction error: {"details":"Transaction causes multiple rows in \"Interface\" table to have identical values (ovn-contro-0) for index on column \"name\". First row, with UUID 7ffc315d-c9ca-4daf-8ca3-298a29ee941a, was inserted by this transaction. Second row, with UUID 371da268-dc61-471d-b4da-603422007975, existed in the database before this transaction and was not modified by the transaction.","error":"constraint violation"} | |
2020-09-23T12:05:01Z|00041|poll_loop|INFO|wakeup due to [POLLIN] on fd 14 (<->/var/run/openvswitch/db.sock) at lib/stream-fd.c:157 (56% CPU usage) | |
# ovs-vsctl add-port br-ctrl1 p1 -- set Interface p1 external_ids:iface-id=sw0-port1 -- set interface p1 type=internal | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment