Giter Site home page Giter Site logo

docker-ovs's Introduction

#SocketPlane

Circle CI Coverage Status

Developers don't want to care about VLANs, VXLANs, Tunnels or TEPs. People responsible for managing the infra expect it to be performant and reliable. SocketPlane provides a networking abstraction at the socket-layer in order to solve the problems of the network in a manageable fashion.

SocketPlane Technology Preview

This early release is just a peek at some of the things we are working on and releasing to the community as open source. As we are working upstream with the Docker community to bring in native support for network driver/plugin/extensions, we received a number of request to try the proposed socketplane solution with existing Docker versions. Hence we came up with a temporary wrapper command : socketplane that is used as a front-end to the docker CLI commands. This enables us to send hooks to the SocketPlane Daemon.

In this release we support the following features:

  • Open vSwitch integration
  • ZeroConf multi-host networking for Docker
  • Elastic growth of a Docker/SocketPlane cluster
  • Support for multiple networks
  • Distributed IP Address Management (IPAM)

Overlay networking establishes tunnels between host endpoints, and in our case, those host endpoints are Open vSwitch. The advantage to this scenario is the user doesn't need to worry about subnets/vlans or any other layer 2 usage constraints. This is just one way to deploy container networking that we will be presenting. The importance of Open vSwitch is performance and the defacto APIs for advanced networking.

Our 'ZeroConf' technology is based on multicast DNS. This allows us to discover other SocketPlane cluster members on the same segment and to start peering with them. This allows us to elastically grow the cluster on demand by simply deploying another host - mDNS handles the rest. Since multicast availability is hit and miss in most networks, it is aimed at making it easy to deploy Docker and SocketPlane to start getting familiar with the exciting marriage of advanced, yet sane networking scenario with the exciting Docker use cases. We will be working with the community on other clustering technologies such as swarm that can be in used in conjunction to provide a more provisioning oriented clustering solutions.

Once we've discovered our neighbors, we're able to join an embedded [Consul] instance, giving us access to an eventually consistent key/value store for network state.

We support mutiple networks, to allow you to divide your containers in to subnets to ease the burden of enforcing firewall policy in the network.

Finally, we've implemented a distributed IP address management solution that enables non conflicting address assignment throughout a cluster.

Note: As we previously mentioned, it's not an ideal approach, but it allows people to start kicking the tyres as soon as possible. All of the functionality in socketplane.sh will move in to our Golang core over time.

[ See Getting Started Demo Here ] ( https://www.youtube.com/watch?v=ukITRl58ntg )

[ See Socketplane with a LAMP Stack Demo Here ] ( https://www.youtube.com/watch?v=5uzUSk3NjD0 )

[ See Socketplane with Powerstrip Demo Here ] ( https://www.youtube.com/watch?v=Icl0L8tQybs )

Installation

Vagrant

A Default Vagrant file has been provided to setup a a demo system. By default three Ubuntu 14.04 VM hosts will be installed each with an installed version of Socketplane.

You can change the number of systems created as follows:

export SOCKETPLANE_NODES=1
#or
export SOCKETPLANE_NODES=10

To start the demo systems:

git clone https://github.com/socketplane/socketplane
cd socketplane
vagrant up

The VM's are named socketplane-{n}, where n is a number from 1 to SOCKETPLANE_NODES || 3

Once the VM's are started you can ssh in as follows:

vagrant ssh socketplane-1
vagrant ssh socketplane-2
vagrant ssh socketplane-3

You can start Docker containers in each of the VM's and they will all be in a default network.

sudo socketplane run -itd ubuntu

You can also see the status of containers on a specific host VM by typing:

sudo socketplane info

If you want to create multiple networks you can do the following:

sudo socketplane network create web 10.2.0.0/16

sudo socketplane run -n web -itd ubuntu

You can list all the created networks with the following command:

sudo socketplane network list

For more options use the HELP command

sudo socketplane help

Non-Vagrant install / deploy

If you are not a vagrant user, please follow these instructions to install and deploy socketplane. While Golang, Docker and OVS can run on many operating systems, we are currently running tests and QA against Ubuntu and Fedora.

Note: If you are using Virtualbox, please take care of the following before proceeding with the installation :

  • Clustering over NAT adapter will not work. Hence, the Virtualbox VMs must have either Host-Only Adapter (or) Internal Network (or) Bridged adapter installed for clustering to work.

  • The VMs/Hosts must have unique hostname. Make sure that /etc/hosts in the VMs have the unique hostname updated.

    First Node: curl -sSL http://get.socketplane.io/ | sudo BOOTSTRAP=true sh

    Subsequent Nodes: curl -sSL http://get.socketplane.io/ | sudo sh

or

First Node:
wget -qO- http://get.socketplane.io/ | sudo BOOTSTRAP=true sh

Subsequent Nodes:
wget -qO- http://get.socketplane.io/ | sudo sh

Warning: The BOOTSTRAP=true should be used on the first node only. Without it, it won't work. If used on subsequent nodes, bad things will happen.

This should ideally start the Socketplane agent container as well. You can use sudo docker ps | grep socketplane command to check the status. If, the agent isnt already running, you can install it using the following command :

sudo socketplane install

Next start an image, for example a bash shell:

sudo socketplane run -i -t ubuntu /bin/bash

You can also see the status of containers on a specific host VM by typing:

sudo socketplane info

If you want to create multiple networks you can do the following:

sudo socketplane network create web 10.2.0.0/16

sudo socketplane run -n web -itd ubuntu

You can list all the created networks with the following command:

sudo socketplane network list

For more options use the HELP command

sudo socketplane help

Useful Agent Commands

The Socketplane agent runs in its own container and you might find the following commands useful :

  1. Socketplane agent troubleshooting/debug logs :

     sudo socketplane agent logs
    
  2. Socketplane agent stop :

     sudo socketplane agent stop
    
  3. Socketplane agent start :

     sudo socketplane agent start
    

Hacking

See HACKING.md

Contact us

For bugs please file an issue. For any assistance, questions or just to say hi, please visit us on IRC, #socketplane at irc.freenode.net

Stay tuned for some exciting features coming soon from the SocketPlane team.

License

Copyright 2014 SocketPlane, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.Code is released under the Apache 2.0 license.

docker-ovs's People

Contributors

cdituri avatar dave-tucker avatar flavio-fernandes avatar mavenugo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-ovs's Issues

Docker OVS socketplane/openvswitch:2.3.1

Hey Guys, please help!!!!

Im new in OVS with dockers.

I run my image:
docker run -itd socketplane/openvswitch:2.3.1

And activate Openvswith with the next commmands

modprobe openvswitch
sudo docker exec f9b19ed7d027 modprobe openvswitch
sudo docker exec f9b19ed7d027 supervisorctl restart ovs-vswitchd
sudo docker exec f9b19ed7d027 supervisorctl restart ovsdb-server

sudo docker exec f9b19ed7d027 ovs-vsctl show
sudo docker exec f9b19ed7d027 ovs-vsctl add-br fo1
sudo docker exec f9b19ed7d027 ovs-ofctl -OOpenFlow13 dump-flows fo1
sudo docker exec f9b19ed7d027 ovs-dpctl show

Should I create other bridge? Im doing the same for 2 docker images.

Before start the container, I checked and I have IP
vliz@r-7910:~$ sudo docker inspect --format '{{.NetworkSettings.IPAddress}}' sw1
172.17.0.3

Then, I run the container
docker start -ai f9b19ed7d027

and I get a lot of errors. I check and now I dont have any IP
liz@r-7910:~$ sudo docker inspect --format '{{.NetworkSettings.IPAddress}}' sw1

2019-07-05T05:28:54Z|00184|dpif(revalidator37)|DBG|system@ovs-system: dumped all flows
2019-07-05T05:28:54Z|00181|dpif(revalidator38)|DBG|system@ovs-system: dumped all flows
2019-07-05T05:28:54Z|00180|dpif(revalidator40)|DBG|system@ovs-system: dumped all flows
2019-07-05T05:28:54Z|00181|poll_loop(revalidator40)|DBG|wakeup due to [POLLIN] on fd 53 (FIFO pipe:[339419942]) at lib/seq.c:157 (0% CPU usage)
2019-07-05T05:28:54Z|00197|poll_loop(revalidator39)|DBG|wakeup due to [POLLIN] on fd 48 (FIFO pipe:[339401559]) at lib/seq.c:157 (0% CPU usage)
2019-07-05T05:28:54Z|00184|poll_loop(revalidator41)|DBG|wakeup due to [POLLIN] on fd 52 (FIFO pipe:[339484725]) at lib/seq.c:157 (0% CPU usage)
2019-07-05T05:28:54Z|00182|poll_loop(revalidator38)|DBG|wakeup due to [POLLIN] on fd 45 (FIFO pipe:[339439838]) at lib/seq.c:157 (0% CPU usage)
2019-07-05T05:28:54Z|00520|poll_loop(revalidator36)|DBG|wakeup due to [POLLIN] on fd 47 (FIFO pipe:[339367895]) at lib/seq.c:157 (0% CPU usage)
2019-07-05T05:28:54Z|00521|dpif(revalidator36)|DBG|system@ovs-system: flow_dump_done success
2019-07-05T05:28:54Z|00198|poll_loop(revalidator39)|DBG|wakeup due to [POLLIN] on fd 48 (FIFO pipe:[339401559]) at lib/seq.c:157 (0% CPU usage)
2019-07-05T05:28:54Z|00185|poll_loop(revalidator37)|DBG|wakeup due to [POLLIN] on fd 43 (FIFO pipe:[339436735]) at lib/seq.c:157
2019-07-05T05:28:54Z|00183|poll_loop(revalidator38)|DBG|wakeup due to [POLLIN] on fd 45 (FIFO pipe:[339439838]) at lib/seq.c:157 (0% CPU usage)
2019-07-05T05:28:54Z|00209|poll_loop|DBG|wakeup due to [POLLIN] on fd 74 (FIFO pipe:[339485798]) at lib/seq.c:157 (0% CPU usage)
2019-07-05T05:28:54Z|00182|poll_loop(revalidator40)|DBG|wakeup due to [POLLIN] on fd 53 (FIFO pipe:[339419942]) at lib/seq.c:157 (0% CPU usage)
2019-07-05T05:28:54Z|00185|poll_loop(revalidator41)|DBG|wakeup due to [POLLIN] on fd 52 (FIFO pipe:[339484725]) at lib/seq.c:157 (0% CPU usage)
ovs-vswitchd stderr | 2019-07-05T05:28:55Z|00522|poll_loop(revalidator36)|DBG|wakeup due to 499-ms timeout at ofproto/ofproto-dpif-upcall.c:626 (0% CPU usage)
2019-07-05T05:28:55Z|00523|netlink_socket(revalidator36)|DBG|nl_sock_transact_multiple__ (Success): nl(len:24, type=28(ovs_datapath), flags=9[REQUEST][ECHO], seq=7d, pid=10,genl(cmd=3,version=2)
2019-07-05T05:28:55Z|00524|netlink_socket(revalidator36)|DBG|nl_sock_recv__ (Success): nl(len:120, type=28(ovs_datapath), flags=0, seq=7d, pid=10,genl(cmd=1,version=2)
2019-07-05T05:28:55Z|00525|dpif(revalidator36)|DBG|system@ovs-system: get_stats success
2019-07-05T05:28:55Z|00526|netlink_socket(revalidator36)|DBG|nl_sock_send__ (Success): nl(len:24, type=30(ovs_flow), flags=305[REQUEST][ACK][DUMP], seq=7e, pid=10,genl(cmd=3,version=1)
ovs-vswitchd stderr | 2019-07-05T05:28:55Z|00527|dpif(revalidator36)|DBG|system@ovs-system: flow_dump_start success
2019-07-05T05:28:55Z|00528|netlink_socket(revalidator36)|DBG|nl_sock_recv__ (Success): nl(len:20, type=3(done), flags=2[MULTI], seq=7e, pid=10 done(0)
2019-07-05T05:28:55Z|00529|dpif(revalidator36)|DBG|system@ovs-system: dumped all flows
2019-07-05T05:28:55Z|00184|poll_loop(revalidator38)|DBG|wakeup due to [POLLIN] on fd 45 (FIFO pipe:[339439838]) at lib/seq.c:157 (0% CPU usage)
2019-07-05T05:28:55Z|00186|poll_loop(revalidator41)|DBG|wakeup due to [POLLIN] on fd 52 (FIFO pipe:[339484725]) at lib/seq.c:157 (0% CPU usage)
2019-07-05T05:28:55Z|00186|poll_loop(revalidator37)|DBG|wakeup due to [POLLIN] on fd 43 (FIFO pipe:[339436735]) at lib/seq.c:157
2019-07-05T05:28:55Z|00199|poll_loop(revalidator39)|DBG|wakeup due to [POLLIN] on fd 48 (FIFO pipe:[339401559]) at lib/seq.c:157 (0% CPU usage)
2019-07-05T05:28:55Z|00183|poll_loop(revalidator40)|DBG|wakeup due to [POLLIN] on fd 53 (FIFO pipe:[339419942]) at lib/seq.c:157 (0% CPU usage)
2019-07-05T05:28:55Z|00185|dpif(revalidator38)|DBG|system@ovs-system: dumped all flows
2019-07-05T05:28:55Z|00184|dpif(revalidator40)|DBG|system@ovs-system: dumped all flows
2019-07-05T05:28:55Z|00187|dpif(revalidator37)|DBG|system@ovs-system: dumped all flows
2019-07-05T05:28:55Z|00200|dpif(revalidator39)|DBG|system@ovs-system: dumped all flows
2019-07-05T05:28:55Z|00187|dpif(revalidator41)|DBG|system@ovs-system: dumped all flows
2019-07-05T05:28:55Z|00201|poll_loop(revalidator39)|DBG|wakeup due to [POLLIN] on fd 48 (FIFO pipe:[339401559]) at lib/seq.c:157 (0% CPU usage)
2019-07-05T05:28:55Z|00188|poll_loop(revalidator37)|DBG|wakeup due to [POLLIN] on fd 43 (FIFO pipe:[339436735]) at lib/seq.c:157
2019-07-05T05:28:55Z|00186|poll_loop(revalidator38)|DBG|wakeup due to [POLLIN] on fd 45 (FIFO pipe:[339439838]) at lib/seq.c:157 (0% CPU usage)
2019-07-05T05:28:55Z|00530|poll_loop(revalidator36)|DBG|wakeup due to [POLLIN] on fd 47 (FIFO pipe:[339367895]) at lib/seq.c:157 (0% CPU usage)
2019-07-05T05:28:55Z|00185|poll_loop(revalidator40)|DBG|wakeup due to [POLLIN] on fd 53 (FIFO pipe:[339419942]) at lib/seq.c:157 (0% CPU usage)
2019-07-05T05:28:55Z|00531|poll_loop(revalidator36)|DBG|wakeup due to [POLLIN] on fd 47 (FIFO pipe:[339367895]) at lib/seq.c:157 (0% CPU usage)
2019-07-05T05:28:55Z|00202|poll_loop(revalidator39)|DBG|wakeup due to [POLLIN] on fd 48 (FIFO pipe:[339401559]) at lib/seq.c:157 (0% CPU usage)
2019-07-05T05:28:55Z|00187|poll_loop(revalidator38)|DBG|wakeup due to [POLLIN] on fd 45 (FIFO pipe:[339439838]) at lib/seq.c:157 (0% CPU usage)
2019-07-05T05:28:55Z|00189|poll_loop(revalidator37)|DBG|wakeup due to [POLLIN] on fd 43 (FIFO pipe:[339436735]) at lib/seq.c:157
2019-07-05T05:28:55Z|00188|poll_loop(revalidator41)|DBG|wakeup due to [POLLIN] on fd 52 (FIFO pipe:[339484725]) at lib/seq.c:157 (0% CPU usage)
2019-07-05T05:28:55Z|00532|dpif(revalidator36)|DBG|system@ovs-system: flow_dump_done success
2019-07-05T05:28:55Z|00210|poll_loop|DBG|wakeup due to [POLLIN] on fd 74 (FIFO pipe:[339485798]) at lib/seq.c:157 (0% CPU usage)
^Zovs-vswitchd stderr | 2019-07-05T05:28:55Z|00211|poll_loop|DBG|wakeup due to 472-ms timeout at vswitchd/bridge.c:2525 (0% CPU usage)
2019-07-05T05:28:55Z|00212|netlink_socket|DBG|nl_sock_transact_multiple__ (Success): nl(len:32, type=29(ovs_vport), flags=9[REQUEST][ECHO], seq=7f, pid=10,genl(cmd=3,version=1)
2019-07-05T05:28:55Z|00213|netlink_socket|DBG|nl_sock_recv__ (Success): nl(len:184, type=29(ovs_vport), flags=0, seq=7f, pid=10,genl(cmd=1,version=1)
ovs-vswitchd stderr | 2019-07-05T05:28:55Z|00533|poll_loop(revalidator36)|DBG|wakeup due to 500-ms timeout at ofproto/ofproto-dpif-upcall.c:626 (0% CPU usage)
ovs-vswitchd stderr | 2019-07-05T05:28:55Z|00534|netlink_socket(revalidator36)|DBG|nl_sock_transact_multiple__ (Success): nl(len:24, type=28(ovs_datapath), flags=9[REQUEST][ECHO], seq=80, pid=10,genl(cmd=3,version=2)
2019-07-05T05:28:55Z|00535|netlink_socket(revalidator36)|DBG|nl_sock_recv__ (Success): nl(len:120, type=28(ovs_datapath), flags=0, seq=80, pid=10,genl(cmd=1,version=2)
2019-07-05T05:28:55Z|00536|dpif(revalidator36)|DBG|system@ovs-system: get_stats success
2019-07-05T05:28:55Z|00537|netlink_socket(revalidator36)|DBG|nl_sock_send__ (Success): nl(len:24, type=30(ovs_flow), flags=305[REQUEST][ACK][DUMP], seq=81, pid=10,genl(cmd=3,version=1)
2019-07-05T05:28:55Z|00538|dpif(revalidator36)|DBG|system@ovs-system: flow_dump_start success
2019-07-05T05:28:55Z|00539|netlink_socket(revalidator36)|DBG|nl_sock_recv__ (Success): nl(len:20, type=3(done), flags=2[MULTI], seq=81, pid=10 done(0)
2019-07-05T05:28:55Z|00540|dpif(revalidator36)|DBG|system@ovs-system: dumped all flows
2019-07-05T05:28:55Z|00186|poll_loop(revalidator40)|DBG|wakeup due to [POLLIN] on fd 53 (FIFO pipe:[339419942]) at lib/seq.c:157 (0% CPU usage)
2019-07-05T05:28:55Z|00203|poll_loop(revalidator39)|DBG|wakeup due to [POLLIN] on fd 48 (FIFO pipe:[339401559]) at lib/seq.c:157 (0% CPU usage)
2019-07-05T05:28:55Z|00204|dpif(revalidator39)|DBG|system@ovs-system: dumped all flows
2019-07-05T05:28:55Z|00188|poll_loop(revalidator38)|DBG|wakeup due to [POLLIN] on fd 45 (FIFO pipe:[339439838]) at lib/seq.c:157 (0% CPU usage)
2019-07-05T05:28:55Z|00190|poll_loop(revalidator37)|DBG|wakeup due to [POLLIN] on fd 43 (FIFO pipe:[339436735]) at lib/seq.c:157
2019-07-05T05:28:55Z|00189|dpif(revalidator38)|DBG|system@ovs-system: dumped all flows
2019-07-05T05:28:55Z|00191|dpif(revalidator37)|DBG|system@ovs-system: dumped all flows
2019-07-05T05:28:55Z|00189|poll_loop(revalidator41)|DBG|wakeup due to [POLLIN] on fd 52 (FIFO pipe:[339484725]) at lib/seq.c:157 (0% CPU usage)
2019-07-05T05:28:55Z|00190|dpif(revalidator41)|DBG|system@ovs-system: dumped all flows
2019-07-05T05:28:55Z|00187|dpif(revalidator40)|DBG|system@ovs-system: dumped all flows
2019-07-05T05:28:55Z|00541|poll_loop(revalidator36)|DBG|wakeup due to [POLLIN] on fd 47 (FIFO pipe:[339367895]) at lib/seq.c:157 (0% CPU usage)
2019-07-05T05:28:55Z|00205|poll_loop(revalidator39)|DBG|wakeup due to [POLLIN] on fd 48 (FIFO pipe:[339401559]) at lib/seq.c:157 (0% CPU usage)
2019-07-05T05:28:55Z|00192|poll_loop(revalidator37)|DBG|wakeup due to [POLLIN] on fd 43 (FIFO pipe:[339436735]) at lib/seq.c:157
2019-07-05T05:28:55Z|00190|poll_loop(revalidator38)|DBG|wakeup due to [POLLIN] on fd 45 (FIFO pipe:[339439838]) at lib/seq.c:157 (0% CPU usage)
ovs-vswitchd stderr | 2019-07-05T05:28:55Z|00191|poll_loop(revalidator41)|DBG|wakeup due to [POLLIN] on fd 52 (FIFO pipe:[339484725]) at lib/seq.c:157 (0% CPU usage)
2019-07-05T05:28:55Z|00206|poll_loop(revalidator39)|DBG|wakeup due to [POLLIN] on fd 48 (FIFO pipe:[339401559]) at lib/seq.c:157 (0% CPU usage)
2019-07-05T05:28:55Z|00542|poll_loop(revalidator36)|DBG|wakeup due to [POLLIN] on fd 47 (FIFO pipe:[339367895]) at lib/seq.c:157 (0% CPU usage)
2019-07-05T05:28:55Z|00543|dpif(revalidator36)|DBG|system@ovs-system: flow_dump_done success
2019-07-05T05:28:55Z|00193|poll_loop(revalidator37)|DBG|wakeup due to [POLLIN] on fd 43 (FIFO pipe:[339436735]) at lib/seq.c:157
2019-07-05T05:28:55Z|00188|poll_loop(revalidator40)|DBG|wakeup due to [POLLIN] on fd 53 (FIFO pipe:[339419942]) at lib/seq.c:157 (0% CPU usage)
2019-07-05T05:28:55Z|00191|poll_loop(revalidator38)|DBG|wakeup due to [POLLIN] on fd 45 (FIFO pipe:[339439838]) at lib/seq.c:157 (0% CPU usage)
2019-07-05T05:28:55Z|00214|poll_loop|DBG|wakeup due to [POLLIN] on fd 74 (FIFO pipe:[339485798]) at lib/seq.c:157 (0% CPU usage)
ovs-vswitchd stderr | 2019-07-05T05:28:56Z|00544|poll_loop(revalidator36)|DBG|wakeup due to 500-ms timeout at ofproto/ofproto-dpif-upcall.c:626 (0% CPU usage)
ovs-vswitchd stderr | 2019-07-05T05:28:56Z|00545|netlink_socket(revalidator36)|DBG|nl_sock_transact_multiple__ (Success): nl(len:24, type=28(ovs_datapath), flags=9[REQUEST][ECHO], seq=82, pid=10,genl(cmd=3,version=2)
2019-07-05T05:28:56Z|00546|netlink_socket(revalidator36)|DBG|nl_sock_recv__ (Success): nl(len:120, type=28(ovs_datapath), flags=0, seq=82, pid=10,genl(cmd=1,version=2)
2019-07-05T05:28:56Z|00547|dpif(revalidator36)|DBG|system@ovs-system: get_stats success
2019-07-05T05:28:56Z|00548|netlink_socket(revalidator36)|DBG|nl_sock_send__ (Success): nl(len:24, type=30(ovs_flow), flags=305[REQUEST][ACK][DUMP], seq=83, pid=10,genl(cmd=3,version=1)
2019-07-05T05:28:56Z|00549|dpif(revalidator36)|DBG|system@ovs-system: flow_dump_start success
2019-07-05T05:28:56Z|00550|netlink_socket(revalidator36)|DBG|nl_sock_recv__ (Success): nl(len:20, type=3(done), flags=2[MULTI], seq=83, pid=10 done(0)
2019-07-05T05:28:56Z|00551|dpif(revalidator36)|DBG|system@ovs-system: dumped all flows
2019-07-05T05:28:56Z|00189|poll_loop(revalidator40)|DBG|wakeup due to [POLLIN] on fd 53 (FIFO pipe:[339419942]) at lib/seq.c:157 (0% CPU usage)
2019-07-05T05:28:56Z|00192|poll_loop(revalidator41)|DBG|wakeup due to [POLLIN] on fd 52 (FIFO pipe:[339484725]) at lib/seq.c:157 (0% CPU usage)
2019-07-05T05:28:56Z|00207|poll_loop(revalidator39)|DBG|wakeup due to [POLLIN] on fd 48 (FIFO pipe:[339401559]) at lib/seq.c:157 (0% CPU usage)
2019-07-05T05:28:56Z|00194|poll_loop(revalidator37)|DBG|wakeup due to [POLLIN] on fd 43 (FIFO pipe:[339436735]) at lib/seq.c:157
2019-07-05T05:28:56Z|00190|dpif(revalidator40)|DBG|system@ovs-system: dumped all flows
2019-07-05T05:28:56Z|00192|poll_loop(revalidator38)|DBG|wakeup due to [POLLIN] on fd 45 (FIFO pipe:[339439838]) at lib/seq.c:157 (0% CPU usage)
2019-07-05T05:28:56Z|00208|dpif(revalidator39)|DBG|system@ovs-system: dumped all flows
2019-07-05T05:28:56Z|00193|dpif(revalidator38)|DBG|system@ovs-system: dumped all flows
2019-07-05T05:28:56Z|00195|dpif(revalidator37)|DBG|system@ovs-system: dumped all flows
2019-07-05T05:28:56Z|00193|dpif(revalidator41)|DBG|system@ovs-system: dumped all flows
2019-07-05T05:28:56Z|00552|poll_loop(revalidator36)|DBG|wakeup due to [POLLIN] on fd 47 (FIFO pipe:[339367895]) at lib/seq.c:157 (0% CPU usage)
2019-07-05T05:28:56Z|00194|poll_loop(revalidator38)|DBG|wakeup due to [POLLIN] on fd 45 (FIFO pipe:[339439838]) at lib/seq.c:157 (0% CPU usage)
2019-07-05T05:28:56Z|00209|poll_loop(revalidator39)|DBG|wakeup due to [POLLIN] on fd 48 (FIFO pipe:[339401559]) at lib/seq.c:157 (0% CPU usage)
2019-07-05T05:28:56Z|00191|poll_loop(revalidator40)|DBG|wakeup due to [POLLIN] on fd 53 (FIFO pipe:[339419942]) at lib/seq.c:157 (0% CPU usage)
ovs-vswitchd stderr | 2019-07-05T05:28:56Z|00196|poll_loop(revalidator37)|DBG|wakeup due to [POLLIN] on fd 43 (FIFO pipe:[339436735]) at lib/seq.c:157
2019-07-05T05:28:56Z|00553|poll_loop(revalidator36)|DBG|wakeup due to [POLLIN] on fd 47 (FIFO pipe:[339367895]) at lib/seq.c:157 (0% CPU usage)
2019-07-05T05:28:56Z|00192|poll_loop(revalidator40)|DBG|wakeup due to [POLLIN] on fd 53 (FIFO pipe:[339419942]) at lib/seq.c:157 (0% CPU usage)
2019-07-05T05:28:56Z|00210|poll_loop(revalidator39)|DBG|wakeup due to [POLLIN] on fd 48 (FIFO pipe:[339401559]) at lib/seq.c:157 (0% CPU usage)
2019-07-05T05:28:56Z|00195|poll_loop(revalidator38)|DBG|wakeup due to [POLLIN] on fd 45 (FIFO pipe:[339439838]) at lib/seq.c:157 (0% CPU usage)
2019-07-05T05:28:56Z|00554|dpif(revalidator36)|DBG|system@ovs-system: flow_dump_done success
2019-07-05T05:28:56Z|00194|poll_loop(revalidator41)|DBG|wakeup due to [POLLIN] on fd 52 (FIFO pipe:[339484725]) at lib/seq.c:157 (0% CPU usage)
ovs-vswitchd stderr | 2019-07-05T05:28:56Z|00215|poll_loop|DBG|wakeup due to [POLLIN] on fd 74 (FIFO pipe:[339485798]) at lib/seq.c:157 (0% CPU usage)
^C2019-07-05 05:28:56,444 WARN received SIGINT indicating exit request
2019-07-05 05:28:56,444 INFO waiting for stdout, ovs-vswitchd, ovsdb-server to die
ovs-vswitchd stderr | 2019-07-05T05:28:56Z|00555|poll_loop(revalidator36)|DBG|wakeup due to 501-ms timeout at ofproto/ofproto-dpif-upcall.c:626 (0% CPU usage)
ovs-vswitchd stderr | 2019-07-05T05:28:56Z|00556|netlink_socket(revalidator36)|DBG|nl_sock_transact_multiple__ (Success): nl(len:24, type=28(ovs_datapath), flags=9[REQUEST][ECHO], seq=84, pid=10,genl(cmd=3,version=2)
2019-07-05T05:28:56Z|00557|netlink_socket(revalidator36)|DBG|nl_sock_recv__ (Success): nl(len:120, type=28(ovs_datapath), flags=0, seq=84, pid=10,genl(cmd=1,version=2)
2019-07-05T05:28:56Z|00558|dpif(revalidator36)|DBG|system@ovs-system: get_stats success
2019-07-05T05:28:56Z|00559|netlink_socket(revalidator36)|DBG|nl_sock_send__ (Success): nl(len:24, type=30(ovs_flow), flags=305[REQUEST][ACK][DUMP], seq=85, pid=10,genl(cmd=3,version=1)
2019-07-05T05:28:56Z|00560|dpif(revalidator36)|DBG|system@ovs-system: flow_dump_start success
2019-07-05T05:28:56Z|00561|netlink_socket(revalidator36)|DBG|nl_sock_recv__ (Success): nl(len:20, type=3(done), flags=2[MULTI], seq=85, pid=10 done(0)
2019-07-05T05:28:56Z|00562|dpif(revalidator36)|DBG|system@ovs-system: dumped all flows
2019-07-05T05:28:56Z|00193|poll_loop(revalidator40)|DBG|wakeup due to [POLLIN] on fd 53 (FIFO pipe:[339419942]) at lib/seq.c:157 (0% CPU usage)
2019-07-05T05:28:56Z|00195|poll_loop(revalidator41)|DBG|wakeup due to [POLLIN] on fd 52 (FIFO pipe:[339484725]) at lib/seq.c:157 (0% CPU usage)
2019-07-05T05:28:56Z|00196|poll_loop(revalidator38)|DBG|wakeup due to [POLLIN] on fd 45 (FIFO pipe:[339439838]) at lib/seq.c:157 (0% CPU usage)
2019-07-05T05:28:56Z|00211|poll_loop(revalidator39)|DBG|wakeup due to [POLLIN] on fd 48 (FIFO pipe:[339401559]) at lib/seq.c:157 (0% CPU usage)
2019-07-05T05:28:56Z|00197|poll_loop(revalidator37)|DBG|wakeup due to [POLLIN] on fd 43 (FIFO pipe:[339436735]) at lib/seq.c:157
2019-07-05T05:28:56Z|00194|dpif(revalidator40)|DBG|system@ovs-system: dumped all flows
2019-07-05T05:28:56Z|00197|dpif(revalidator38)|DBG|system@ovs-system: dumped all flows
2019-07-05T05:28:56Z|00212|dpif(revalidator39)|DBG|system@ovs-system: dumped all flows
2019-07-05T05:28:56Z|00198|dpif(revalidator37)|DBG|system@ovs-system: dumped all flows
2019-07-05T05:28:56Z|00196|dpif(revalidator41)|DBG|system@ovs-system: dumped all flows
ovs-vswitchd stderr | 2019-07-05T05:28:56Z|00195|poll_loop(revalidator40)|DBG|wakeup due to [POLLIN] on fd 53 (FIFO pipe:[339419942]) at lib/seq.c:157 (0% CPU usage)
2019-07-05T05:28:56Z|00213|poll_loop(revalidator39)|DBG|wakeup due to [POLLIN] on fd 48 (FIFO pipe:[339401559]) at lib/seq.c:157 (0% CPU usage)
2019-07-05T05:28:56Z|00198|poll_loop(revalidator38)|DBG|wakeup due to [POLLIN] on fd 45 (FIFO pipe:[339439838]) at lib/seq.c:157 (0% CPU usage)
2019-07-05T05:28:56Z|00199|poll_loop(revalidator37)|DBG|wakeup due to [POLLIN] on fd 43 (FIFO pipe:[339436735]) at lib/seq.c:157
2019-07-05T05:28:56Z|00563|poll_loop(revalidator36)|DBG|wakeup due to [POLLIN] on fd 47 (FIFO pipe:[339367895]) at lib/seq.c:157 (0% CPU usage)
2019-07-05T05:28:56Z|00196|poll_loop(revalidator40)|DBG|wakeup due to [POLLIN] on fd 53 (FIFO pipe:[339419942]) at lib/seq.c:157 (0% CPU usage)
2019-07-05T05:28:56Z|00564|poll_loop(revalidator36)|DBG|wakeup due to [POLLIN] on fd 47 (FIFO pipe:[339367895]) at lib/seq.c:157 (0% CPU usage)
2019-07-05T05:28:56Z|00200|poll_loop(revalidator37)|DBG|wakeup due to [POLLIN] on fd 43 (FIFO pipe:[339436735]) at lib/seq.c:157
2019-07-05T05:28:56Z|00197|poll_loop(revalidator41)|DBG|wakeup due to [POLLIN] on fd 52 (FIFO pipe:[339484725]) at lib/seq.c:157 (0% CPU usage)
2019-07-05T05:28:56Z|00214|poll_loop(revalidator39)|DBG|wakeup due to [POLLIN] on fd 48 (FIFO pipe:[339401559]) at lib/seq.c:157 (0% CPU usage)
2019-07-05T05:28:56Z|00565|dpif(revalidator36)|DBG|system@ovs-system: flow_dump_done success
2019-07-05T05:28:56Z|00216|poll_loop|DBG|wakeup due to [POLLIN] on fd 74 (FIFO pipe:[339485798]) at lib/seq.c:157 (0% CPU usage)
2019-07-05T05:28:56Z|00215|poll_loop(revalidator39)|DBG|wakeup due to [POLLIN] on fd 4 (FIFO pipe:[339460011]) at lib/fatal-signal.c:218 (0% CPU usage)
2019-07-05T05:28:56Z|00002|poll_loop(handler34)|DBG|wakeup due to [POLLIN] on fd 4 (FIFO pipe:[339460011]) at lib/fatal-signal.c:218
2019-07-05T05:28:56Z|00197|poll_loop(revalidator40)|DBG|wakeup due to [POLLIN] on fd 4 (FIFO pipe:[339460011]) at lib/fatal-signal.c:218 (0% CPU usage)
2019-07-05T05:28:56Z|00201|poll_loop(revalidator37)|DBG|wakeup due to [POLLIN] on fd 4 (FIFO pipe:[339460011]) at lib/fatal-signal.c:218
2019-07-05T05:28:56Z|00002|poll_loop(handler30)|DBG|wakeup due to [POLLIN] on fd 4 (FIFO pipe:[339460011]) at lib/fatal-signal.c:218
2019-07-05T05:28:56Z|00216|fatal_signal(revalidator39)|WARN|terminating with signal 15 (Terminated)
2019-07-05T05:28:56Z|00199|poll_loop(revalidator38)|DBG|wakeup due to [POLLIN] on fd 4 (FIFO pipe:[339460011]) at lib/fatal-signal.c:218 (0% CPU usage)
2019-07-05T05:28:56Z|00002|poll_loop(handler28)|DBG|wakeup due to [POLLIN] on fd 4 (FIFO pipe:[339460011]) at lib/fatal-signal.c:218
2019-07-05T05:28:56Z|00002|poll_loop(handler22)|DBG|wakeup due to [POLLIN] on fd 4 (FIFO pipe:[339460011]) at lib/fatal-signal.c:218
2019-07-05T05:28:56Z|00002|poll_loop(handler32)|DBG|wakeup due to [POLLIN] on fd 4 (FIFO pipe:[339460011]) at lib/fatal-signal.c:218
2019-07-05T05:28:56Z|00002|poll_loop(handler26)|DBG|wakeup due to [POLLIN] on fd 4 (FIFO pipe:[339460011]) at lib/fatal-signal.c:218
2019-07-05T05:28:56Z|00002|poll_loop(urcu5)|DBG|wakeup due to [POLLIN] on fd 4 (FIFO pipe:[339460011]) at lib/fatal-signal.c:218
2019-07-05T05:28:56Z|00198|poll_loop(revalidator41)|DBG|wakeup due to [POLLIN] on fd 4 (FIFO pipe:[339460011]) at lib/fatal-signal.c:218 (0% CPU usage)
ovs-vswitchd stderr | 2019-07-05T05:28:56Z|00002|poll_loop(handler35)|DBG|wakeup due to [POLLIN] on fd 4 (FIFO pipe:[339460011]) at lib/fatal-signal.c:218
2019-07-05T05:28:56Z|00002|poll_loop(handler25)|DBG|wakeup due to [POLLIN] on fd 4 (FIFO pipe:[339460011]) at lib/fatal-signal.c:218
2019-07-05T05:28:56Z|00002|poll_loop(handler23)|DBG|wakeup due to [POLLIN] on fd 4 (FIFO pipe:[339460011]) at lib/fatal-signal.c:218
2019-07-05T05:28:56Z|00002|poll_loop(handler29)|DBG|wakeup due to [POLLIN] on fd 4 (FIFO pipe:[339460011]) at lib/fatal-signal.c:218
2019-07-05T05:28:56Z|00002|poll_loop(handler33)|DBG|wakeup due to [POLLIN] on fd 4 (FIFO pipe:[339460011]) at lib/fatal-signal.c:218
2019-07-05T05:28:56Z|00002|poll_loop(handler24)|DBG|wakeup due to [POLLIN] on fd 4 (FIFO pipe:[339460011]) at lib/fatal-signal.c:218
2019-07-05T05:28:56Z|00566|poll_loop(revalidator36)|DBG|wakeup due to [POLLIN] on fd 4 (FIFO pipe:[339460011]) at lib/fatal-signal.c:218 (0% CPU usage)
2019-07-05T05:28:56Z|00002|poll_loop(handler31)|DBG|wakeup due to [POLLIN] on fd 4 (FIFO pipe:[339460011]) at lib/fatal-signal.c:218
2019-07-05T05:28:56Z|00217|poll_loop|DBG|wakeup due to [POLLIN] on fd 4 (FIFO pipe:[339460011]) at lib/fatal-signal.c:218 (0% CPU usage)
2019-07-05T05:28:56Z|00002|poll_loop(handler27)|DBG|wakeup due to [POLLIN] on fd 4 (FIFO pipe:[339460011]) at lib/fatal-signal.c:218

and the same until I stop it.

This is my ifconfig
liz@r-7910:~$ ifconfig
docker0 Link encap:Ethernet HWaddr 02:42:a3:fb:27:3f
inet addr:172.17.0.1 Bcast:172.17.255.255 Mask:255.255.0.0
inet6 addr: fe80::42:a3ff:fefb:273f/64 Scope:Link
UP BROADCAST RUNNING PROMISC MULTICAST MTU:1500 Metric:1
RX packets:156885 errors:0 dropped:0 overruns:0 frame:0
TX packets:189703 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:9847950 (9.8 MB) TX bytes:467864442 (467.8 MB)

enp0s25 Link encap:Ethernet HWaddr 48:4d:7e:d9:cd:eb
inet addr:192.168.1.102 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::5f40:c835:1eef:302f/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:19770855 errors:0 dropped:0 overruns:0 frame:0
TX packets:25011541 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:15359687774 (15.3 GB) TX bytes:28082040284 (28.0 GB)
Interrupt:20 Memory:f1100000-f1120000

enp6s0 Link encap:Ethernet HWaddr 48:4d:7e:d9:cd:ed
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Memory:f3400000-f347ffff

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:47305 errors:0 dropped:0 overruns:0 frame:0
TX packets:47305 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:66133120 (66.1 MB) TX bytes:66133120 (66.1 MB)

veth13fee6d Link encap:Ethernet HWaddr 26:7c:bf:8d:d1:3c
inet6 addr: fe80::247c:bfff:fe8d:d13c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:36 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:4073 (4.0 KB)

veth832b9ff Link encap:Ethernet HWaddr 5a:ad:2d:97:0a:db
inet6 addr: fe80::58ad:2dff:fe97:adb/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:40 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:4470 (4.4 KB)

virbr0 Link encap:Ethernet HWaddr 00:00:00:00:00:00
inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

Following this https://github.com/socketplane/docker-ovs, how should I create the bridge? eth0, eth1 and eth2 should be real interfaces, right? Which one should be in my case?

ovs-vsctl add-br br0
ovs-vsctl set bridge br0 datapath_type=netdev
ovs-vsctl add-port br0 eth0
ovs-vsctl add-port br0 eth1
ovs-vsctl add-port br0 eth2

thank you for your help.

ovs-vsctl add port failed

I'm using docker to create a network topology by containers.
and I created a few container by "docker-ovs"
also, followed the official tutorial "Building a point-to-point connection"
https://docs.docker.com/articles/networking/#building-a-point-to-point-connection
connected my containers,
however, after I type ovs-vsctl add-port br0 A
there will be a error, says

root@jace# docker exec node1 ovs-vsctl add-port br0 A
ovs-vsctl: Error detected while setting up 'A'. See ovs-vswitchd log for details.

do you have any clue or any information about this problem?

trouble bringing up Vagrant box from scratch

I tried bringing up the vagrant box from scratch [1] and hit an issue with docker:

[root@centos ~]# docker -d 2014/12/04 17:11:43 docker daemon: 1.3.1 c78088f/1.3.1; execdriver: native; graphdriver: [10307ed2] +job     
serveapi(unix:///var/run/docker.sock) docker: relocation error: docker: symbol dm_task_get_info_with_deferred_remove, version Base not defined in file 
libdevmapper.so.1.02 with link time reference

I looked around an wonder if the issue is related to 32 bit not being supported [2] [3]? Any chance you know how to fix this? Do you also see this in your setup?

[1] https://gist.github.com/e3626f90bf8fa82f7eda
[2] https://groups.google.com/forum/#!topic/docker-user/QA48ecqZKww
[3] http://mwhiteley.com/linux-containers/2013/08/31/docker-on-i386.html

Running docker-ovs the container in interactive console.

For testing purposes, I need to run openvswitch utilities from the interactive console

docker run -it socketplane/openvswitch

The console open but doesn't return the prompt, looks like other processe (ovsdb-server) is running in the foreground.
I have tried to add "&" at the end of :

[program:ovsdb-server-vtep]
command=/usr/local/sbin/ovsdb-server /etc/openvswitch/conf.db /etc/openvswitch/vtep.db --remote=punix:/var/run/openvswitch/db.sock --pidfile=ovsdb-server.pid 

Still cannot get the console prompt.
Any help in that direction?

Cannot find db.sock

It complains that it cannot find db.sock. Actually it is looking for db.sock in /usr/var/run/openvswitch/ but it exists at /tmp/openvswitch.

Creating soft link ln -s /tmp/openvswitch/ /usr/var/run/openvswitch should resolve this.

sudo docker pull davetucker/docker-ovs --> Tag latest not found in repository davetucker/docker-ovs

[vagrant@centos ~]$ sudo docker pull davetucker/docker-ovs
Pulling repository davetucker/docker-ovs
2014/12/04 17:37:25 Tag latest not found in repository davetucker/docker-ovs
[vagrant@centos ~]$ sudo docker pull davetucker/docker-ovs:2.1.2
Pulling repository davetucker/docker-ovs
9ae424c5d3b7: Download complete
Status: Downloaded newer image for davetucker/docker-ovs:2.1.2
[vagrant@centos ~]$ sudo docker pull davetucker/docker-ovs:2.3.0
Pulling repository davetucker/docker-ovs
00a298722d96: Download complete
Status: Downloaded newer image for davetucker/docker-ovs:2.3.0
[vagrant@centos ~]$ sudo docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
davetucker/docker-ovs 2.3.0 00a298722d96 11 weeks ago 31.14 MB
davetucker/docker-ovs 2.1.2 9ae424c5d3b7 11 weeks ago 27.53 MB
[vagrant@centos ~]$

Simplify the build process

Use something similar to https://github.com/jpetazzo/docker-busybox

The idea would be:

  • Create a rootfs.tar
  • Install Open vSwitch binaries on top

This would require binaries being built and published for OVS (I'm working on this separately), but would greatly simplify the build process and also allow us to use Docker's Trusted Builds

Traffic not flowing through the container!

I am running the ovs container in interactive mode

cid=$(docker run -itd socketplane/openvswitch)
docker exec -it $cid /bin/sh

Connected new container interfaces (ethi) to host bridges (br10i)

sudo pipework br101 -i eth1 $RCID 0/0
sudo pipework br102 -i eth2 $RCID 0/0
sudo pipework br103 -i eth3 $RCID 0/0
sudo pipework br104 -i eth4 $RCID 0/0

and I bridged four VMs to br101...br104

Container (interfaces created successfully)
/ # ip a | grep eth
69: eth0: <BROADCAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default 
    link/ether 02:42:ac:11:00:03 brd ff:ff:ff:ff:ff:ff
    inet 172.17.0.3/16 scope global eth0
71: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 96:a6:ea:2d:2f:8c brd ff:ff:ff:ff:ff:ff
73: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether c2:80:72:05:cd:f8 brd ff:ff:ff:ff:ff:ff
75: eth3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 92:f4:ad:e6:24:73 brd ff:ff:ff:ff:ff:ff
77: eth4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 0a:f2:45:3f:f2:43 brd ff:ff:ff:ff:ff:ff
Container (include all interfaces into the same VLAN)

/ # ovs-vsctl add-br br0

ovs-vsctl: Error detected while setting up 'br0'.  See ovs-vswitchd log for details.
/ # ovs-vsctl add-port br0 eth1 tag=10
ovs-vsctl: Error detected while setting up 'eth1'.  See ovs-vswitchd log for details.
/ # ovs-vsctl add-port br0 eth2 tag=10
ovs-vsctl: Error detected while setting up 'eth2'.  See ovs-vswitchd log for details.
/ # ovs-vsctl add-port br0 eth3 tag=10
ovs-vsctl: Error detected while setting up 'eth3'.  See ovs-vswitchd log for details.
/ # ovs-vsctl add-port br0 eth4 tag=10
ovs-vsctl: Error detected while setting up 'eth4'.  See ovs-vswitchd log for details.

Result of ovs-vswitchd.log

https://docs.google.com/document/d/1RYlbF5yFDNXYuX--R5yfjv_hHGCBxpJgpVN-xkZXBIw/edit?usp=sharing

Noticeable error:

2015-07-26T18:22:00Z|00142|netlink_socket|DBG|nl_sock_recv__ (Success): nl(len:76, type=2(error), flags=0, seq=a, pid=15 error(-1(Operation not permitted), in-reply-to(nl(len:56, type=26(ovs_datapath), flags=9[REQUEST][ECHO], seq=a, pid=15))
2015-07-26T18:22:00Z|00143|netlink_socket|DBG|received NAK error=0 (Operation not permitted)
2015-07-26T18:22:00Z|00144|dpif|WARN|failed to create datapath ovs-system: Operation not permitted
2015-07-26T18:22:00Z|00145|ofproto_dpif|ERR|failed to open datapath of type system: Operation not permitted
2015-07-26T18:22:00Z|00146|ofproto|ERR|failed to open datapath br0: Operation not permitted
2015-07-26T18:22:00Z|00147|bridge|ERR|failed to create bridge br0: Operation not permitted

Despite the error mesages, it looks like the coommands run successfully:

lsmod | grep openvswitch

openvswitch            66908  0 
gre                    13796  1 openvswitch
vxlan                  37619  1 openvswitch
libcrc32c              12644  1 openvswitch
Container (correct port to bridge mapping)
/ # ovs-vsctl show
d0b49a49-a925-4fff-8c94-5fed590de4a2
    Manager "ptcp:6640"
    Bridge "br0"
        Port "eth1"
            tag: 10
            Interface "eth1"
        Port "eth2"
            tag: 10
            Interface "eth2"
        Port "br0"
            Interface "br0"
                type: internal
        Port "eth3"
            tag: 10
            Interface "eth3"
        Port "eth4"
            tag: 10
            Interface "eth4"
    ovs_version: "2.3.2"

But no traffic goes through the switch!

Can I use docker-ovs image with docker-compose as switch without using pipework?

Hi,
is it possible to use docker-compose / docker feature to use the following image as a switch of containers belonging to the same network?

For example, I have the following docker-compose:

version: '2'
services:
  dspdnsenum.lab:
    image: 'cosmicq/docker-bind:latest'
    stdin_open: true
    tty: true
    networks:
      public_dnsenum:
        ipv4_address: 193.21.1.2
    environment:
      - PASS=newpass
    volumes:
      - './var-lib-bind:/var/lib/bind'
      - './bind:/etc/bind'
      - './webmin:/etc/webmin'
  server:
    image: 'cosmicq/docker-bind:latest'
    stdin_open: true
    tty: true
    networks:
      public_dnsenum:
        ipv4_address: 193.21.1.3
    environment:
      - PASS=newpass
    volumes:
      - './webmin-slave:/etc/webmin'
      - './bind-slave:/etc/bind'
      - './var-lib-bind-slave:/var/lib/bind'
networks:
  public_dnsenum:
    ipam:
      config:
        - subnet: 193.21.1.1/24


I have a network with 2 services, it would very useful for my scenario to let all network pass through a docker-ovs image, so I would be able to make traffic analysis of all traffic.
I am thinking about best ways integrate switch / router support in my project, DSP.
It would be very useful to integrate natively your image in my environment.
Thanks very much in advance,
GP

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.