├── earthquake ├── zookeeper-2212 │ ├── init.earthquake-zookeeper.sh │ ├── banner.txt │ ├── Dockerfile │ └── README.md └── zookeeper-1797 │ ├── README.md │ ├── Dockerfile │ └── demo.sh ├── quagga ├── 1.0 │ ├── supervisord.conf │ ├── zebra.conf │ └── Dockerfile ├── supervisord.conf └── Dockerfile ├── bird ├── Dockerfile └── v1.5 │ └── Dockerfile ├── exabgp ├── 4.0.5 │ └── Dockerfile ├── 3.4.11 │ ├── Dockerfile │ └── exabgp.env └── 3.4.13 │ ├── Dockerfile │ └── exabgp.env ├── gobgp └── Dockerfile ├── ryu ├── README.md └── Dockerfile ├── yabgp └── 0.4.0 │ └── Dockerfile ├── dind └── ovs-ryu │ ├── init.dind-ovs-ryu.sh │ ├── Dockerfile │ └── README.md └── LICENSE /earthquake/zookeeper-2212/init.earthquake-zookeeper.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | cat /banner.txt 3 | 4 | [[ $1 ]] && exec "$@" 5 | exec bash --login 6 | -------------------------------------------------------------------------------- /quagga/1.0/supervisord.conf: -------------------------------------------------------------------------------- 1 | [supervisord] 2 | nodaemon=true 3 | 4 | [program:zebra] 5 | command=/usr/sbin/zebra 6 | [program:bgpd] 7 | command=/usr/sbin/bgpd 8 | -------------------------------------------------------------------------------- /quagga/supervisord.conf: -------------------------------------------------------------------------------- 1 | [supervisord] 2 | nodaemon=true 3 | 4 | [program:zebra] 5 | command=/usr/lib/quagga/zebra 6 | [program:bgpd] 7 | command=/usr/lib/quagga/bgpd 8 | -------------------------------------------------------------------------------- /bird/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:14.04 2 | 3 | MAINTAINER Wataru Ishida 4 | 5 | RUN apt-get update 6 | RUN apt-get install -qy --no-install-recommends bird 7 | RUN mkdir /run/bird 8 | 9 | ENV HOME /root 10 | WORKDIR /root 11 | -------------------------------------------------------------------------------- /quagga/1.0/zebra.conf: -------------------------------------------------------------------------------- 1 | ! 2 | ! Zebra configuration saved from vty 3 | ! 2016/08/01 05:20:14 4 | ! 5 | hostname zebra 6 | password zebra 7 | log file zebra.log 8 | ! 9 | debug zebra events 10 | debug zebra packet 11 | debug zebra kernel 12 | debug zebra rib 13 | debug zebra fpm 14 | -------------------------------------------------------------------------------- /earthquake/zookeeper-2212/banner.txt: -------------------------------------------------------------------------------- 1 | === Earthquake Demo: ZOOKEEPER-2212(distributed race condition related to QV version) === 2 | * Please run 000-prepare.sh first, then run 100-run-experiment.sh several times. README.md might be useful. 3 | * For further information, please refer to https://github.com/osrg/earthquake . 4 | -------------------------------------------------------------------------------- /exabgp/4.0.5/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:16.04 2 | 3 | ENV EXABGP_VERSION 4.0.5 4 | 5 | ENV HOME /root 6 | WORKDIR /root 7 | 8 | RUN apt-get update && apt-get install -qy --no-install-recommends \ 9 | # Python 10 | python3-pip \ 11 | python3-setuptools \ 12 | # Utility 13 | iproute2 \ 14 | && rm -rf /var/lib/apt/lists/* \ 15 | && pip3 install exabgp==${EXABGP_VERSION} 16 | 17 | -------------------------------------------------------------------------------- /bird/v1.5/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:14.04 2 | 3 | MAINTAINER Wataru Ishida 4 | 5 | ENV HOME /root 6 | WORKDIR /root 7 | 8 | RUN apt-get update 9 | RUN apt-get install -qy --no-install-recommends wget tar gcc flex bison libncurses-dev libreadline6-dev make 10 | RUN wget ftp://bird.network.cz/pub/bird/bird-1.5.0.tar.gz && tar xvf bird-1.5.0.tar.gz && cd bird-1.5.0 && ./configure && make && make install 11 | -------------------------------------------------------------------------------- /gobgp/Dockerfile: -------------------------------------------------------------------------------- 1 | # gobgp (part of Ryu SDN Framework) 2 | # 3 | 4 | FROM osrg/quagga 5 | 6 | MAINTAINER FUJITA Tomonori 7 | 8 | RUN apt-get update 9 | RUN apt-get install -qy --no-install-recommends wget lv tcpdump emacs24-nox 10 | 11 | ENV HOME /root 12 | WORKDIR /root 13 | ENV GO111MODULE on 14 | 15 | RUN git clone git://github.com/osrg/gobgp 16 | RUN cd gobgp && go install ./cmd/gobgpd ./cmd/gobgp 17 | -------------------------------------------------------------------------------- /ryu/README.md: -------------------------------------------------------------------------------- 1 | ## Ryu Dockerfile 2 | 3 | 4 | This repository contains **Dockerfile** of [Ryu](http://osrg.github.io/ryu/) published to the public [Docker Registry](https://index.docker.io/). 5 | 6 | 7 | ### Installation 8 | 9 | 1. Install [Docker](https://www.docker.io/). 10 | 11 | 2. Download from public [Docker Registry](https://index.docker.io/): `docker pull osrg/ryu` 12 | 13 | ### Usage 14 | 15 | docker run -it --rm osrg/ryu /bin/bash 16 | -------------------------------------------------------------------------------- /yabgp/0.4.0/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:16.04 2 | 3 | ENV YABGP_VERSION 0.4.0 4 | 5 | ENV HOME /root 6 | WORKDIR /root 7 | 8 | RUN apt-get update && apt-get install -qy --no-install-recommends \ 9 | # For calling REST API of YABGP 10 | curl \ 11 | # Utility 12 | iproute2 \ 13 | # Python 14 | python-pip \ 15 | python-setuptools \ 16 | # For building Python C extension 17 | gcc \ 18 | python-dev \ 19 | # Removes APT caches 20 | && rm -rf /var/lib/apt/lists/* \ 21 | # Installs YABGP via pip 22 | && pip install yabgp==${YABGP_VERSION} 23 | -------------------------------------------------------------------------------- /exabgp/3.4.11/Dockerfile: -------------------------------------------------------------------------------- 1 | # EXA BGP 2 | # 3 | # Commit version to be use [ bb7d1b7b539a48ca331c05a474f1af6015424273 ] 4 | 5 | FROM ubuntu:14.04 6 | 7 | MAINTAINER Naoto Hanaue 8 | 9 | RUN apt-get update 10 | RUN apt-get install -qy --no-install-recommends wget python git 11 | 12 | ENV HOME /root 13 | WORKDIR /root 14 | 15 | RUN wget --no-check-certificate https://github.com/Exa-Networks/exabgp/archive/3.4.11.tar.gz 16 | RUN mkdir exabgp && tar xzvf 3.4.11.tar.gz -C exabgp --strip-components 1 17 | 18 | ADD exabgp.env /root/exabgp/etc/exabgp/exabgp.env 19 | -------------------------------------------------------------------------------- /exabgp/3.4.13/Dockerfile: -------------------------------------------------------------------------------- 1 | # EXA BGP 2 | # 3 | # Commit version to be use [ bb7d1b7b539a48ca331c05a474f1af6015424273 ] 4 | 5 | FROM ubuntu:14.04 6 | 7 | MAINTAINER Wataru Ishida 8 | 9 | RUN apt-get update 10 | RUN apt-get install -qy --no-install-recommends wget python git 11 | 12 | ENV HOME /root 13 | WORKDIR /root 14 | 15 | RUN wget --no-check-certificate https://github.com/Exa-Networks/exabgp/archive/3.4.13.tar.gz 16 | RUN mkdir exabgp && tar xzvf 3.4.13.tar.gz -C exabgp --strip-components 1 17 | 18 | ADD exabgp.env /root/exabgp/etc/exabgp/exabgp.env 19 | -------------------------------------------------------------------------------- /dind/ovs-ryu/init.dind-ovs-ryu.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | OVSBR0_IP=${OVSBR0_IP:-192.168.42.254} 3 | OVSBR0_NETMASK=${OVSBR0_NETMASK:-24} 4 | OVSBR0_PROTO=${OVSBR0_PROTO:-OpenFlow13} 5 | 6 | /etc/init.d/openvswitch-switch start 7 | 8 | (ovs-vsctl list-br | grep ovsbr0 ) || \ 9 | ( 10 | ovs-vsctl add-br ovsbr0 11 | ovs-vsctl set bridge ovsbr0 protocols=${OVSBR0_PROTO} 12 | ovs-vsctl set-controller ovsbr0 tcp:127.0.0.1 13 | ) 14 | 15 | ip link set ovsbr0 up 16 | ip addr add ${OVSBR0_IP}/${OVSBR0_NETMASK} dev ovsbr0 17 | echo "Assigned ${OVSBR0_IP} to ovsbr0" 18 | 19 | [[ $1 ]] && exec "$@" 20 | exec bash --login 21 | -------------------------------------------------------------------------------- /ryu/Dockerfile: -------------------------------------------------------------------------------- 1 | # Ryu SDN Framework 2 | # 3 | # VERSION 0.0.1 4 | 5 | FROM ubuntu:16.04 6 | 7 | MAINTAINER FUJITA Tomonori 8 | 9 | ENV HOME /root 10 | WORKDIR /root 11 | 12 | RUN apt-get update && apt-get install -y --no-install-recommends \ 13 | curl \ 14 | python-setuptools \ 15 | python-pip \ 16 | python-eventlet \ 17 | python-lxml \ 18 | python-msgpack \ 19 | iproute2 \ 20 | && rm -rf /var/lib/apt/lists/* \ 21 | && curl -kL https://github.com/osrg/ryu/archive/master.tar.gz | tar -xvz \ 22 | && mv ryu-master ryu \ 23 | && cd ryu \ 24 | && pip install -r tools/pip-requires \ 25 | && python setup.py install 26 | -------------------------------------------------------------------------------- /exabgp/3.4.11/exabgp.env: -------------------------------------------------------------------------------- 1 | [exabgp.api] 2 | encoder = text 3 | 4 | [exabgp.cache] 5 | attributes = false 6 | nexthops = false 7 | 8 | [exabgp.daemon] 9 | daemonize = false 10 | pid = '' 11 | user = 'root' 12 | 13 | [exabgp.log] 14 | #all = false 15 | all = false 16 | configuration = false 17 | daemon = true 18 | destination = '/mnt/exabgpd.log' 19 | #destination = 'syslog' 20 | enable = true 21 | level = INFO 22 | message = false 23 | network = true 24 | packets = false 25 | parser = false 26 | processes = true 27 | rib = false 28 | routes = false 29 | short = false 30 | supervisor = true 31 | timers = false 32 | 33 | [exabgp.pdb] 34 | enable = false 35 | 36 | [exabgp.profile] 37 | enable = false 38 | file = '' 39 | 40 | [exabgp.tcp] 41 | timeout = 1 -------------------------------------------------------------------------------- /exabgp/3.4.13/exabgp.env: -------------------------------------------------------------------------------- 1 | [exabgp.api] 2 | encoder = text 3 | 4 | [exabgp.cache] 5 | attributes = false 6 | nexthops = false 7 | 8 | [exabgp.daemon] 9 | daemonize = false 10 | pid = '' 11 | user = 'root' 12 | 13 | [exabgp.log] 14 | #all = false 15 | all = false 16 | configuration = false 17 | daemon = true 18 | destination = '/mnt/exabgpd.log' 19 | #destination = 'syslog' 20 | enable = true 21 | level = INFO 22 | message = false 23 | network = true 24 | packets = false 25 | parser = false 26 | processes = true 27 | rib = false 28 | routes = false 29 | short = false 30 | supervisor = true 31 | timers = false 32 | 33 | [exabgp.pdb] 34 | enable = false 35 | 36 | [exabgp.profile] 37 | enable = false 38 | file = '' 39 | 40 | [exabgp.tcp] 41 | timeout = 1 -------------------------------------------------------------------------------- /quagga/1.0/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM golang 2 | 3 | MAINTAINER ISHIDA Wataru 4 | 5 | RUN apt-get update && apt-get install -qy --no-install-recommends \ 6 | supervisor \ 7 | quagga \ 8 | telnet \ 9 | tcpdump \ 10 | && rm -rf /var/lib/apt/lists/* \ 11 | # Prepare state files directories 12 | && mkdir /var/run/quagga && chown quagga:quagga /var/run/quagga \ 13 | && mkdir /var/log/quagga && chown quagga:quagga /var/log/quagga \ 14 | # For the backward compatibility 15 | && ln -s /usr/sbin/zebra /usr/local/sbin/zebra \ 16 | && ln -s /usr/sbin/ospfd /usr/local/sbin/ospfd \ 17 | && ln -s /usr/sbin/bgpd /usr/local/sbin/bgpd 18 | 19 | ADD supervisord.conf /etc/supervisor/conf.d/quagga.conf 20 | 21 | ENTRYPOINT ["/usr/bin/supervisord"] 22 | -------------------------------------------------------------------------------- /quagga/Dockerfile: -------------------------------------------------------------------------------- 1 | # Quagga BGP 2 | 3 | FROM ubuntu:trusty 4 | 5 | MAINTAINER FUJITA Tomonori 6 | 7 | RUN apt-get update 8 | RUN apt-get install -qy --no-install-recommends supervisor quagga telnet tcpdump wget git ca-certificates build-essential 9 | 10 | RUN wget --no-check-certificate -O go.tgz https://dl.google.com/go/go1.12.1.linux-amd64.tar.gz &&\ 11 | tar -C /usr/local -xzf go.tgz &&\ 12 | rm go.tgz 13 | 14 | RUN sed -i 's/bgpd=no/bgpd=yes/g' /etc/quagga/daemons 15 | RUN sed -i 's/zebra=no/zebra=yes/g' /etc/quagga/daemons 16 | 17 | ADD supervisord.conf /etc/supervisor/conf.d/supervisord.conf 18 | 19 | ENV GOPATH /go 20 | ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH 21 | RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 777 "$GOPATH" 22 | WORKDIR $GOPATH 23 | 24 | ENTRYPOINT ["/usr/bin/supervisord"] 25 | -------------------------------------------------------------------------------- /dind/ovs-ryu/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM osrg/dind-ubuntu-vivid 2 | MAINTAINER Akihiro Suda 3 | 4 | # Install OVS 5 | RUN apt-get update && apt-get install -y openvswitch-switch 6 | 7 | # Install Python packages 8 | RUN bash -c 'apt-get install -y python-{colorama,dev,eventlet,lxml,msgpack,netaddr,networkx,oslo.config,paramiko,pip,routes,six,webob}' 9 | 10 | # Install Ryu 11 | RUN pip install ryu 12 | 13 | # Install pipework 14 | RUN apt-get install -y arping 15 | RUN wget --no-check-certificate --quiet https://raw.githubusercontent.com/jpetazzo/pipework/master/pipework -O /usr/local/bin/pipework 16 | RUN chmod +x /usr/local/bin/pipework 17 | 18 | # Install misc useful stuffs 19 | RUN apt-get install -y less lv netcat telnet bash-completion vim byobu 20 | 21 | # Install init 22 | ADD ./init.dind-ovs-ryu.sh /init.dind-ovs-ryu.sh 23 | RUN chmod +x /init.dind-ovs-ryu.sh 24 | CMD ["wrapdocker", "/init.dind-ovs-ryu.sh"] 25 | -------------------------------------------------------------------------------- /earthquake/zookeeper-1797/README.md: -------------------------------------------------------------------------------- 1 | # Earthquake Demo for ZOOKEEPER-1797 2 | 3 | This container reproduces the bug reported in [ZOOKEEPER-1797](https://issues.apache.org/jira/browse/ZOOKEEPER-1797) ("PurgeTxnLog may delete data logs during roll") using [earthquake](https://github.com/osrg/earthquake). 4 | 5 | ## Example 6 | 7 | $ docker run -i -t --rm osrg/earthquake-zookeeper-1797 8 | [INFO] Reproducing ZOOKEEPER-1797 (PurgeTxnLog may delete data logs during roll) 9 | [INFO] Cleaning.. 10 | [INFO] Starting earthquake (ca91befb0556bddbf8229ef9b6650ec94cf79471) 11 | [INFO] Starting ZooKeeper (4d08af6da87eac3b565d599b0d24683e2e734827) 12 | [INFO] Starting createZnode.sh (see /createZnode.log) 13 | [INFO] Restarting ZooKeeper 14 | [INFO] Checking Znodes (see /validateZnode.log) 15 | [INFO] Done 16 | Unexpected exception when visiting znode!: error_count=5 17 | [IMPORTANT] SUCCESS: earthquake reproduced the bug. 18 | [INFO] For more information, please refer to https://github.com/osrg/earthquake and https://github.com/osrg/zookeeper/blob/zookeeper-1797/earthquake/zookeeper-1797/README.txt 19 | [INFO] Exiting.. 20 | [INFO] If you want to drop to shell after the test, please run `docker run -i -t osrg/earthquake-zookeeper-1797 /bin/bash`, then run `/init.py` in the container. 21 | 22 | -------------------------------------------------------------------------------- /earthquake/zookeeper-2212/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM osrg/dind-ovs-ryu 2 | MAINTAINER Akihiro Suda 3 | 4 | # Earthquake v0.1 (Jun 10, 2015) 5 | ENV EARTHQUAKE_GIT_COMMIT v0.1 6 | 7 | # This env is for dind 8 | ENV LOG file 9 | 10 | # Install ryu (Earthquake v0.1 is tested with ryu v3.20.2) 11 | RUN pip uninstall -y ryu && pip install ryu==3.20.2 12 | 13 | # Install pipework (our patched version for avoidance of veth name conflicts) 14 | RUN wget --no-check-certificate --quiet https://raw.githubusercontent.com/osrg/pipework/fix-pid-conflict/pipework -O /usr/local/bin/pipework 15 | RUN chmod +x /usr/local/bin/pipework 16 | 17 | # Install deps 18 | RUN apt-get update && apt-get install -y python-flask python-scapy python-zmq sudo 19 | RUN pip install zktraffic==0.1.3 hexdump 20 | 21 | # Install Earthquake 22 | WORKDIR / 23 | RUN git clone https://github.com/osrg/earthquake.git && \ 24 | ( cd earthquake && \ 25 | git checkout ${EARTHQUAKE_GIT_COMMIT} && \ 26 | git submodule init && \ 27 | git submodule update ) 28 | WORKDIR /earthquake/example/zk-found-bug.ether 29 | 30 | # Install init 31 | ADD ./banner.txt /banner.txt 32 | ADD ./init.earthquake-zookeeper.sh /init.earthquake-zookeeper.sh 33 | RUN chmod +x /init.earthquake-zookeeper.sh 34 | CMD ["wrapdocker", "/init.dind-ovs-ryu.sh", "/init.earthquake-zookeeper.sh"] 35 | -------------------------------------------------------------------------------- /earthquake/zookeeper-1797/Dockerfile: -------------------------------------------------------------------------------- 1 | # earthquake demo for reproduction of ZOOKEEPER-1797 ("PurgeTxnLog may delete data logs during roll") 2 | 3 | FROM java:7 4 | MAINTAINER Akihiro Suda 5 | 6 | # Mar 30, 2015 7 | ENV EARTHQUAKE_GIT_COMMIT ca91befb0556bddbf8229ef9b6650ec94cf79471 8 | # Apr 14, 2015 (Forked from ZooKeeper 3.4.5 (Nov 19, 2012)) 9 | ENV ZOOKEEPER_GIT_COMMIT 4d08af6da87eac3b565d599b0d24683e2e734827 10 | 11 | WORKDIR / 12 | 13 | RUN apt-get update && \ 14 | apt-get install -y ant protobuf-compiler golang golang-goprotobuf-dev 15 | 16 | RUN git clone https://github.com/osrg/earthquake.git && \ 17 | ( cd earthquake && \ 18 | git checkout ${EARTHQUAKE_GIT_COMMIT} && \ 19 | ./build ) 20 | 21 | ENV JAVA_TOOL_OPTIONS -Dfile.encoding=UTF8 22 | RUN git clone -b zookeeper-1797 https://github.com/osrg/zookeeper.git && \ 23 | ( cd zookeeper && \ 24 | git checkout ${ZOOKEEPER_GIT_COMMIT} && \ 25 | cp -f earthquake/zookeeper-1797/lib/* src/java/lib && \ 26 | cp -f earthquake/zookeeper-1797/aj/* src/java/main/org/apache/zookeeper/server && \ 27 | cp -f conf/zoo_sample.cfg conf/zoo.cfg && \ 28 | echo snapCount=30 >> conf/zoo.cfg && \ 29 | ant clean jar-ajc ) 30 | 31 | # just for the sake of ease 32 | RUN apt-get install -y less lv vim 33 | 34 | ENV EQ_DIRECT_MODE 1 35 | ENV EQ_ENV_PROCESS_ID zookeeper-1797 36 | ADD demo.sh / 37 | CMD ["/demo.sh"] 38 | -------------------------------------------------------------------------------- /earthquake/zookeeper-2212/README.md: -------------------------------------------------------------------------------- 1 | # Earthquake Demo for ZOOKEEPER-2212 (distributed race condition related to QV version) 2 | 3 | [Earthquake](http://osrg.github.io/earthquake/) is a dynamic model checker (DMCK) for real implementations of distributed system (such as ZooKeeper). 4 | 5 | Earthquakes permutes C/Java function calls, Ethernet packets, and injected fault events in various orders so as to find implementation-level bugs of the distributed system. 6 | 7 | We have successfully found a distributed race condition bug ([ZOOKEEPER-2212](https://issues.apache.org/jira/browse/ZOOKEEPER-2212)) of ZooKeeper using Earthquake. 8 | This container can reproduce the bug we found. 9 | 10 | For further information, please refer to https://github.com/osrg/earthquake/tree/v0.1/example/zk-found-bug.ether 11 | 12 | 13 | ## Usage 14 | Available on Docker Hub: [osrg/earthquake-zookeeper-2212](https://registry.hub.docker.com/u/osrg/earthquake-zookeeper-2212/) 15 | 16 | host$ sudo modprobe openvswitch 17 | host$ docker run --privileged -t -i --rm osrg/earthquake-zookeeper-2212 18 | guest$ ./000-prepare.sh 19 | [INFO] Starting Earthquake Ethernet Switch 20 | [INFO] Starting Earthquake Orchestrator 21 | [INFO] Starting Earthquake Ethernet Inspector 22 | [IMPORTANT] Please kill the processes (switch=1234, orchestrator=1235, and inspector=1236) after you finished all of the experiments 23 | [IMPORTANT] Please continue to 100-run-experiment.sh.. 24 | guest$ ./100-run-experiment.sh 25 | [IMPORTANT] THE BUG WAS REPRODUCED! 26 | guest$ kill -9 1234 1235 1236 27 | 28 | 29 | ## Environment Variables 30 | * `DISABLE_EQ`: disable Earthquake 31 | -------------------------------------------------------------------------------- /dind/ovs-ryu/README.md: -------------------------------------------------------------------------------- 1 | # Docker-in-Docker + OVS + ryu + pipework Superpack 2 | 3 | This container helps you connect [Docker-in-Docker](https://github.com/jpetazzo/dind) to [Open vSwitch](http://openvswitch.org/) (-in-Docker) with [ryu](http://osrg.github.io/ryu/) via [pipework](https://github.com/jpetazzo/pipework). 4 | 5 | Available on Docker Hub: [osrg/dind-ovs-ryu](https://registry.hub.docker.com/u/osrg/dind-ovs-ryu/) 6 | 7 | ## Usage 8 | 9 | $ sudo modprobe openvswitch 10 | $ docker run --privileged -t -i -e LOG=file --rm osrg/dind-ovs-ryu 11 | * /etc/openvswitch/conf.db does not exist 12 | * Creating empty database /etc/openvswitch/conf.db 13 | * Starting ovsdb-server 14 | * Configuring Open vSwitch system IDs 15 | * Starting ovs-vswitchd 16 | * Enabling remote OVSDB managers 17 | Assigned 192.168.42.254 to ovsbr0 18 | root@docker:/# ryu-manager YOUR_RYU_APP 19 | root@docker:/# docker run -itd -h dind1 --name dind1 busybox 20 | root@docker:/# pipework ovsbr0 dind1 192.168.42.101/24 21 | root@docker:/# docker run -itd -h dind2 --name dind2 busybox 22 | root@docker:/# pipework ovsbr0 dind2 192.168.42.102/24 23 | root@docker:/# docker exec -it dind1 sh 24 | / # ping -c 3 192.168.42.102 25 | PING 192.168.42.102 (192.168.42.102): 56 data bytes 26 | 64 bytes from 192.168.42.102: seq=0 ttl=64 time=0.201 ms 27 | 64 bytes from 192.168.42.102: seq=1 ttl=64 time=0.056 ms 28 | 64 bytes from 192.168.42.102: seq=2 ttl=64 time=0.094 ms 29 | 30 | --- 192.168.42.102 ping statistics --- 31 | 3 packets transmitted, 3 packets received, 0% packet loss 32 | round-trip min/avg/max = 0.056/0.117/0.201 ms 33 | / # 34 | 35 | 36 | ## Variables 37 | You can add a few optional variables to `docker` like `docker -e VAR_NAME=VAR_VALUE`. 38 | 39 | * `OVSBR0_IP`: IPv4 address assigned to `ovsbr0` bridge. default="192.168.42.254". 40 | * `OVSBR0_NETMASK`: netmask of `ovsbr0`. default="24". 41 | * `OVSBR0_PROTO`: OpenFlow protocol of `ovsbr0`. default="OpenFlow13". 42 | 43 | -------------------------------------------------------------------------------- /earthquake/zookeeper-1797/demo.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # earthquake demo for reproduction of ZOOKEEPER-1797 ("PurgeTxnLog may delete data logs during roll") 3 | 4 | function INFO(){ 5 | echo -e "\e[104m\e[97m[INFO]\e[49m\e[39m $@" 6 | } 7 | 8 | function IMPORTANT(){ 9 | echo -e "\e[105m\e[97m[IMPORTANT]\e[49m\e[39m $@" 10 | } 11 | 12 | INFO "Reproducing ZOOKEEPER-1797 (PurgeTxnLog may delete data logs during roll)" 13 | 14 | INFO "Cleaning.." 15 | rm -rf /tmp/* /*.out /*.log 16 | 17 | INFO "Starting earthquake (${EARTHQUAKE_GIT_COMMIT})" 18 | earthquake/earthquake/earthquake --launch-orchestrator --daemonize --log-file-path=earthquake.log --execution-file-path=zookeeper/earthquake/zookeeper-1797/1797.json 19 | 20 | INFO "Starting ZooKeeper (${ZOOKEEPER_GIT_COMMIT})" 21 | zookeeper/bin/zkServer.sh start > /zkServer.log 2>&1 22 | 23 | INFO "Starting createZnode.sh (see /createZnode.log)" 24 | sh zookeeper/earthquake/zookeeper-1797/createZnode.sh > /createZnode.log 2>&1 25 | sleep 3 26 | 27 | INFO "Restarting ZooKeeper" 28 | zookeeper/bin/zkServer.sh stop >> /zkServer.log 2>&1 29 | sleep 3 30 | zookeeper/bin/zkServer.sh start >> /zkServer.log 2>&1 31 | sleep 3 32 | 33 | INFO "Checking Znodes (see /validateZnode.log)" 34 | sh zookeeper/earthquake/zookeeper-1797/validateZnode.sh > /validateZnode.log 2>&1 35 | 36 | INFO "Done" 37 | if grep "Unexpected exception when visiting znode" /validateZnode.log; then 38 | IMPORTANT "SUCCESS: earthquake reproduced the bug." 39 | else 40 | IMPORTANT "FAIL: earthquake could not reproduce the bug." 41 | IMPORTANT "earthquake cannot always reproduce the bug due to non-determinism." 42 | IMPORTANT "You can probably reproduce the bug by trying to run this container several times." 43 | fi 44 | INFO "For more information, please refer to https://github.com/osrg/earthquake and https://github.com/osrg/zookeeper/blob/zookeeper-1797/earthquake/zookeeper-1797/README.txt" 45 | 46 | INFO "Exiting.." 47 | INFO 'If you want to drop to shell after the test, please run `docker run -i -t osrg/earthquake-zookeeper-1797 /bin/bash`, then run `/init.py` in the container'. 48 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | 2 | Apache License 3 | Version 2.0, January 2004 4 | http://www.apache.org/licenses/ 5 | 6 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 7 | 8 | 1. Definitions. 9 | 10 | "License" shall mean the terms and conditions for use, reproduction, 11 | and distribution as defined by Sections 1 through 9 of this document. 12 | 13 | "Licensor" shall mean the copyright owner or entity authorized by 14 | the copyright owner that is granting the License. 15 | 16 | "Legal Entity" shall mean the union of the acting entity and all 17 | other entities that control, are controlled by, or are under common 18 | control with that entity. For the purposes of this definition, 19 | "control" means (i) the power, direct or indirect, to cause the 20 | direction or management of such entity, whether by contract or 21 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 22 | outstanding shares, or (iii) beneficial ownership of such entity. 23 | 24 | "You" (or "Your") shall mean an individual or Legal Entity 25 | exercising permissions granted by this License. 26 | 27 | "Source" form shall mean the preferred form for making modifications, 28 | including but not limited to software source code, documentation 29 | source, and configuration files. 30 | 31 | "Object" form shall mean any form resulting from mechanical 32 | transformation or translation of a Source form, including but 33 | not limited to compiled object code, generated documentation, 34 | and conversions to other media types. 35 | 36 | "Work" shall mean the work of authorship, whether in Source or 37 | Object form, made available under the License, as indicated by a 38 | copyright notice that is included in or attached to the work 39 | (an example is provided in the Appendix below). 40 | 41 | "Derivative Works" shall mean any work, whether in Source or Object 42 | form, that is based on (or derived from) the Work and for which the 43 | editorial revisions, annotations, elaborations, or other modifications 44 | represent, as a whole, an original work of authorship. For the purposes 45 | of this License, Derivative Works shall not include works that remain 46 | separable from, or merely link (or bind by name) to the interfaces of, 47 | the Work and Derivative Works thereof. 48 | 49 | "Contribution" shall mean any work of authorship, including 50 | the original version of the Work and any modifications or additions 51 | to that Work or Derivative Works thereof, that is intentionally 52 | submitted to Licensor for inclusion in the Work by the copyright owner 53 | or by an individual or Legal Entity authorized to submit on behalf of 54 | the copyright owner. For the purposes of this definition, "submitted" 55 | means any form of electronic, verbal, or written communication sent 56 | to the Licensor or its representatives, including but not limited to 57 | communication on electronic mailing lists, source code control systems, 58 | and issue tracking systems that are managed by, or on behalf of, the 59 | Licensor for the purpose of discussing and improving the Work, but 60 | excluding communication that is conspicuously marked or otherwise 61 | designated in writing by the copyright owner as "Not a Contribution." 62 | 63 | "Contributor" shall mean Licensor and any individual or Legal Entity 64 | on behalf of whom a Contribution has been received by Licensor and 65 | subsequently incorporated within the Work. 66 | 67 | 2. Grant of Copyright License. Subject to the terms and conditions of 68 | this License, each Contributor hereby grants to You a perpetual, 69 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 70 | copyright license to reproduce, prepare Derivative Works of, 71 | publicly display, publicly perform, sublicense, and distribute the 72 | Work and such Derivative Works in Source or Object form. 73 | 74 | 3. Grant of Patent License. Subject to the terms and conditions of 75 | this License, each Contributor hereby grants to You a perpetual, 76 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 77 | (except as stated in this section) patent license to make, have made, 78 | use, offer to sell, sell, import, and otherwise transfer the Work, 79 | where such license applies only to those patent claims licensable 80 | by such Contributor that are necessarily infringed by their 81 | Contribution(s) alone or by combination of their Contribution(s) 82 | with the Work to which such Contribution(s) was submitted. If You 83 | institute patent litigation against any entity (including a 84 | cross-claim or counterclaim in a lawsuit) alleging that the Work 85 | or a Contribution incorporated within the Work constitutes direct 86 | or contributory patent infringement, then any patent licenses 87 | granted to You under this License for that Work shall terminate 88 | as of the date such litigation is filed. 89 | 90 | 4. Redistribution. You may reproduce and distribute copies of the 91 | Work or Derivative Works thereof in any medium, with or without 92 | modifications, and in Source or Object form, provided that You 93 | meet the following conditions: 94 | 95 | (a) You must give any other recipients of the Work or 96 | Derivative Works a copy of this License; and 97 | 98 | (b) You must cause any modified files to carry prominent notices 99 | stating that You changed the files; and 100 | 101 | (c) You must retain, in the Source form of any Derivative Works 102 | that You distribute, all copyright, patent, trademark, and 103 | attribution notices from the Source form of the Work, 104 | excluding those notices that do not pertain to any part of 105 | the Derivative Works; and 106 | 107 | (d) If the Work includes a "NOTICE" text file as part of its 108 | distribution, then any Derivative Works that You distribute must 109 | include a readable copy of the attribution notices contained 110 | within such NOTICE file, excluding those notices that do not 111 | pertain to any part of the Derivative Works, in at least one 112 | of the following places: within a NOTICE text file distributed 113 | as part of the Derivative Works; within the Source form or 114 | documentation, if provided along with the Derivative Works; or, 115 | within a display generated by the Derivative Works, if and 116 | wherever such third-party notices normally appear. The contents 117 | of the NOTICE file are for informational purposes only and 118 | do not modify the License. You may add Your own attribution 119 | notices within Derivative Works that You distribute, alongside 120 | or as an addendum to the NOTICE text from the Work, provided 121 | that such additional attribution notices cannot be construed 122 | as modifying the License. 123 | 124 | You may add Your own copyright statement to Your modifications and 125 | may provide additional or different license terms and conditions 126 | for use, reproduction, or distribution of Your modifications, or 127 | for any such Derivative Works as a whole, provided Your use, 128 | reproduction, and distribution of the Work otherwise complies with 129 | the conditions stated in this License. 130 | 131 | 5. Submission of Contributions. Unless You explicitly state otherwise, 132 | any Contribution intentionally submitted for inclusion in the Work 133 | by You to the Licensor shall be under the terms and conditions of 134 | this License, without any additional terms or conditions. 135 | Notwithstanding the above, nothing herein shall supersede or modify 136 | the terms of any separate license agreement you may have executed 137 | with Licensor regarding such Contributions. 138 | 139 | 6. Trademarks. This License does not grant permission to use the trade 140 | names, trademarks, service marks, or product names of the Licensor, 141 | except as required for reasonable and customary use in describing the 142 | origin of the Work and reproducing the content of the NOTICE file. 143 | 144 | 7. Disclaimer of Warranty. Unless required by applicable law or 145 | agreed to in writing, Licensor provides the Work (and each 146 | Contributor provides its Contributions) on an "AS IS" BASIS, 147 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 148 | implied, including, without limitation, any warranties or conditions 149 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 150 | PARTICULAR PURPOSE. You are solely responsible for determining the 151 | appropriateness of using or redistributing the Work and assume any 152 | risks associated with Your exercise of permissions under this License. 153 | 154 | 8. Limitation of Liability. In no event and under no legal theory, 155 | whether in tort (including negligence), contract, or otherwise, 156 | unless required by applicable law (such as deliberate and grossly 157 | negligent acts) or agreed to in writing, shall any Contributor be 158 | liable to You for damages, including any direct, indirect, special, 159 | incidental, or consequential damages of any character arising as a 160 | result of this License or out of the use or inability to use the 161 | Work (including but not limited to damages for loss of goodwill, 162 | work stoppage, computer failure or malfunction, or any and all 163 | other commercial damages or losses), even if such Contributor 164 | has been advised of the possibility of such damages. 165 | 166 | 9. Accepting Warranty or Additional Liability. While redistributing 167 | the Work or Derivative Works thereof, You may choose to offer, 168 | and charge a fee for, acceptance of support, warranty, indemnity, 169 | or other liability obligations and/or rights consistent with this 170 | License. However, in accepting such obligations, You may act only 171 | on Your own behalf and on Your sole responsibility, not on behalf 172 | of any other Contributor, and only if You agree to indemnify, 173 | defend, and hold each Contributor harmless for any liability 174 | incurred by, or claims asserted against, such Contributor by reason 175 | of your accepting any such warranty or additional liability. 176 | 177 | END OF TERMS AND CONDITIONS 178 | 179 | APPENDIX: How to apply the Apache License to your work. 180 | 181 | To apply the Apache License to your work, attach the following 182 | boilerplate notice, with the fields enclosed by brackets "[]" 183 | replaced with your own identifying information. (Don't include 184 | the brackets!) The text should be enclosed in the appropriate 185 | comment syntax for the file format. We also recommend that a 186 | file or class name and description of purpose be included on the 187 | same "printed page" as the copyright notice for easier 188 | identification within third-party archives. 189 | 190 | Copyright [yyyy] [name of copyright owner] 191 | 192 | Licensed under the Apache License, Version 2.0 (the "License"); 193 | you may not use this file except in compliance with the License. 194 | You may obtain a copy of the License at 195 | 196 | http://www.apache.org/licenses/LICENSE-2.0 197 | 198 | Unless required by applicable law or agreed to in writing, software 199 | distributed under the License is distributed on an "AS IS" BASIS, 200 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 201 | See the License for the specific language governing permissions and 202 | limitations under the License. 203 | --------------------------------------------------------------------------------