From 746fb34817d0a3f546af44147bd47ffe4feae388 Mon Sep 17 00:00:00 2001 From: Ondrej Fabry Date: Wed, 21 Mar 2018 10:21:37 +0100 Subject: [PATCH 1/8] Strip go binaries in production image --- Makefile | 22 +++++++++++++--------- docker/prod_vpp_agent/Dockerfile | 3 +++ 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index 06c112ac66..fdae6b1a39 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,11 @@ COMMIT := $(shell git rev-parse HEAD) DATE := $(shell date +'%Y-%m-%dT%H:%M%:z') CNINFRA_CORE := github.com/ligato/vpp-agent/vendor/github.com/ligato/cn-infra/core -LDFLAGS = -ldflags '-X $(CNINFRA_CORE).BuildVersion=$(VERSION) -X $(CNINFRA_CORE).CommitHash=$(COMMIT) -X $(CNINFRA_CORE).BuildDate=$(DATE)' +LDFLAGS = -X $(CNINFRA_CORE).BuildVersion=$(VERSION) -X $(CNINFRA_CORE).CommitHash=$(COMMIT) -X $(CNINFRA_CORE).BuildDate=$(DATE) + +ifeq ($(STRIP), y) +LDFLAGS += -w -s +endif COVER_DIR ?= /tmp/ @@ -16,18 +20,18 @@ clean: clean-cmd clean-examples # Install commands install: @echo "# installing commands" - go install -v ${LDFLAGS} -tags="${GO_BUILD_TAGS}" ./cmd/vpp-agent - go install -v ${LDFLAGS} -tags="${GO_BUILD_TAGS}" ./cmd/vpp-agent-grpc - go install -v ${LDFLAGS} -tags="${GO_BUILD_TAGS}" ./cmd/vpp-agent-ctl - go install -v ${LDFLAGS} -tags="${GO_BUILD_TAGS}" ./cmd/agentctl + go install -v -ldflags "${LDFLAGS}" -tags="${GO_BUILD_TAGS}" ./cmd/vpp-agent + go install -v -ldflags "${LDFLAGS}" -tags="${GO_BUILD_TAGS}" ./cmd/vpp-agent-grpc + go install -v -ldflags "${LDFLAGS}" -tags="${GO_BUILD_TAGS}" ./cmd/vpp-agent-ctl + go install -v -ldflags "${LDFLAGS}" -tags="${GO_BUILD_TAGS}" ./cmd/agentctl # Build commands cmd: @echo "# building commands" - cd cmd/vpp-agent && go build -v -i ${LDFLAGS} -tags="$(GO_BUILD_TAGS)" - cd cmd/vpp-agent-grpc && go build -v -i ${LDFLAGS} -tags="${GO_BUILD_TAGS}" - cd cmd/vpp-agent-ctl && go build -v -i ${LDFLAGS} -tags="${GO_BUILD_TAGS}" - cd cmd/agentctl && go build -v -i ${LDFLAGS} -tags="${GO_BUILD_TAGS}" + cd cmd/vpp-agent && go build -v -i -ldflags "${LDFLAGS}" -tags="${GO_BUILD_TAGS}" + cd cmd/vpp-agent-grpc && go build -v -i -ldflags "${LDFLAGS}" -tags="${GO_BUILD_TAGS}" + cd cmd/vpp-agent-ctl && go build -v -i -ldflags "${LDFLAGS}" -tags="${GO_BUILD_TAGS}" + cd cmd/agentctl && go build -v -i -ldflags "${LDFLAGS}" -tags="${GO_BUILD_TAGS}" # Clean commands clean-cmd: diff --git a/docker/prod_vpp_agent/Dockerfile b/docker/prod_vpp_agent/Dockerfile index 152295cced..39bd3f736d 100644 --- a/docker/prod_vpp_agent/Dockerfile +++ b/docker/prod_vpp_agent/Dockerfile @@ -1,5 +1,8 @@ FROM dev_vpp_agent as devimg +RUN cd $GOPATH/src/github.com/ligato/vpp-agent + && make STRIP=y install + FROM ubuntu:16.04 RUN apt-get update \ From 5e732e75497c7d42c4da08b6ddcc4a7fbd00b21d Mon Sep 17 00:00:00 2001 From: Ondrej Fabry Date: Wed, 21 Mar 2018 10:37:28 +0100 Subject: [PATCH 2/8] Fix missed backslash --- docker/prod_vpp_agent/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/prod_vpp_agent/Dockerfile b/docker/prod_vpp_agent/Dockerfile index 39bd3f736d..8c5c416637 100644 --- a/docker/prod_vpp_agent/Dockerfile +++ b/docker/prod_vpp_agent/Dockerfile @@ -1,6 +1,6 @@ FROM dev_vpp_agent as devimg -RUN cd $GOPATH/src/github.com/ligato/vpp-agent +RUN cd $GOPATH/src/github.com/ligato/vpp-agent \ && make STRIP=y install FROM ubuntu:16.04 From c35e7b3f98c93d889bfd771d6f2debb7a319c196 Mon Sep 17 00:00:00 2001 From: Ondrej Fabry Date: Wed, 21 Mar 2018 10:54:51 +0100 Subject: [PATCH 3/8] Replace GOPATH with absolute dir --- docker/prod_vpp_agent/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/prod_vpp_agent/Dockerfile b/docker/prod_vpp_agent/Dockerfile index 8c5c416637..cc10d3f998 100644 --- a/docker/prod_vpp_agent/Dockerfile +++ b/docker/prod_vpp_agent/Dockerfile @@ -1,6 +1,6 @@ FROM dev_vpp_agent as devimg -RUN cd $GOPATH/src/github.com/ligato/vpp-agent \ +RUN cd /root/go/src/github.com/ligato/vpp-agent \ && make STRIP=y install FROM ubuntu:16.04 From 3cd3f9ce62c3a3b1e8d363ebb06aadf61a892941 Mon Sep 17 00:00:00 2001 From: Ondrej Fabry Date: Wed, 21 Mar 2018 11:12:02 +0100 Subject: [PATCH 4/8] Run build with bash shell --- docker/dev_vpp_agent/build-agent.sh | 19 ++++--------------- docker/prod_vpp_agent/Dockerfile | 5 +++-- 2 files changed, 7 insertions(+), 17 deletions(-) diff --git a/docker/dev_vpp_agent/build-agent.sh b/docker/dev_vpp_agent/build-agent.sh index 8fd29737d8..0a4688b5f7 100755 --- a/docker/dev_vpp_agent/build-agent.sh +++ b/docker/dev_vpp_agent/build-agent.sh @@ -5,28 +5,17 @@ set -e # setup Go paths export GOROOT=/usr/local/go export GOPATH=$HOME/go -export PATH=$PATH:$GOROOT/bin:$GOPATH/bin +export PATH=$PATH:${GOROOT}/bin:${GOPATH}/bin echo "export GOROOT=$GOROOT" >> ~/.bashrc echo "export GOPATH=$GOPATH" >> ~/.bashrc echo "export PATH=$PATH" >> ~/.bashrc -mkdir -p $GOPATH - -# install gometalinter, golint, gvt & Glide -#go get -u github.com/alecthomas/gometalinter -#gometalinter --install -#go get -u github.com/golang/lint/golint -#go get -u github.com/FiloSottile/gvt -#curl https://glide.sh/get | sh # checkout agent code -mkdir -p $GOPATH/src/github.com/ligato -cd $GOPATH/src/github.com/ligato +mkdir -p ${GOPATH}/src/github.com/ligato +cd ${GOPATH}/src/github.com/ligato git clone https://github.com/ligato/vpp-agent # build the agent -cd $GOPATH/src/github.com/ligato/vpp-agent +cd ${GOPATH}/src/github.com/ligato/vpp-agent git checkout $1 -#make make install -#make test -#make generate diff --git a/docker/prod_vpp_agent/Dockerfile b/docker/prod_vpp_agent/Dockerfile index cc10d3f998..699711b29a 100644 --- a/docker/prod_vpp_agent/Dockerfile +++ b/docker/prod_vpp_agent/Dockerfile @@ -1,7 +1,8 @@ FROM dev_vpp_agent as devimg -RUN cd /root/go/src/github.com/ligato/vpp-agent \ - && make STRIP=y install +RUN /bin/bash -c "\ + cd /root/go/src/github.com/ligato/vpp-agent \ + && make STRIP=y install" FROM ubuntu:16.04 From c2bba0d54137ba3809ec3d20f2ee5ccaf497c4ef Mon Sep 17 00:00:00 2001 From: Ondrej Fabry Date: Wed, 21 Mar 2018 11:38:16 +0100 Subject: [PATCH 5/8] Add GOROOT to PATH --- docker/dev_vpp_agent/Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docker/dev_vpp_agent/Dockerfile b/docker/dev_vpp_agent/Dockerfile index 72e1fbd90f..226f80d6b0 100644 --- a/docker/dev_vpp_agent/Dockerfile +++ b/docker/dev_vpp_agent/Dockerfile @@ -50,6 +50,8 @@ RUN wget -O go.tgz "https://golang.org/dl/go${GOLANG_VERSION}.linux-amd64.tar.gz && tar -C /usr/local -xzf go.tgz \ && rm go.tgz +ENV PATH /usr/local/go/bin:$PATH + # build & install Protobuf & gogo protobuf compiler RUN git clone https://github.com/google/protobuf.git \ && cd protobuf \ From cb68d2018a81bfecdd253063563913f03abf9736 Mon Sep 17 00:00:00 2001 From: Marcel Sestak Date: Wed, 21 Mar 2018 11:47:03 +0100 Subject: [PATCH 6/8] fixes in tests Signed-off-by: Marcel Sestak --- tests/robot/libraries/docker.robot | 3 +- tests/robot/suites/crud/linux_arp_crud.robot | 12 +- tests/robot/suites/misc/etcd_clear.robot | 271 ++++++++++++++++++ .../controller_start.robot | 10 + 4 files changed, 289 insertions(+), 7 deletions(-) create mode 100644 tests/robot/suites/misc/etcd_clear.robot diff --git a/tests/robot/libraries/docker.robot b/tests/robot/libraries/docker.robot index 37a53f8893..5e275a900d 100644 --- a/tests/robot/libraries/docker.robot +++ b/tests/robot/libraries/docker.robot @@ -164,9 +164,10 @@ Execute In Container Log Many ${container} ${command} Switch Connection docker ${currdate}= Get Current Date - ${out} ${stderr}= Execute Command ${DOCKER_COMMAND} exec ${container} ${command} return_stderr=True + ${out} ${stderr} ${rc}= Execute Command ${DOCKER_COMMAND} exec ${container} ${command} return_stderr=True return_rc=True Log ${out} Log ${stderr} + Log ${rc} ${status}= Run Keyword And Return Status Should be Empty ${stderr} Run Keyword If ${status}==False Log One or more error occured during execution of a command ${command} in container ${container} level=WARN Append To File ${RESULTS_FOLDER}/output_${container}.log *** Time:${currdate} Command: ${command}${\n}${out}${\n}*** diff --git a/tests/robot/suites/crud/linux_arp_crud.robot b/tests/robot/suites/crud/linux_arp_crud.robot index 5f9b4876d0..ba59ed9192 100644 --- a/tests/robot/suites/crud/linux_arp_crud.robot +++ b/tests/robot/suites/crud/linux_arp_crud.robot @@ -60,7 +60,7 @@ Add ARPs vpp_ctl: Put Linux ARP agent_vpp_1 vpp1_veth1 veth1_arp 155.155.155.155 32:51:51:51:51:51 vpp_ctl: Put Linux ARP agent_vpp_1 vpp1_veth2 veth2_arp 155.155.155.156 32:51:51:51:51:52 vpp_ctl: Put Linux ARP agent_vpp_1 lo loopback_arp 155.155.155.156 32:51:51:51:51:52 - vpp_ctl: Put Linux ARP agent_vpp_1 eth0 eth_arp 155.155.155.156 32:51:51:51:51:52 + #vpp_ctl: Put Linux ARP agent_vpp_1 eth0 eth_arp 155.155.155.156 32:51:51:51:51:52 Sleep ${SYNC_SLEEP} Check ARPSs @@ -68,14 +68,14 @@ Check ARPSs Log ${out} Should Contain ${out} 155.155.155.156 dev vpp1_veth2 lladdr 32:51:51:51:51:52 PERMANENT Should Contain ${out} 155.155.155.155 dev vpp1_veth1 lladdr 32:51:51:51:51:51 PERMANENT - Should Contain ${out} 155.155.155.156 dev eth0 lladdr 32:51:51:51:51:52 PERMANENT + #Should Contain ${out} 155.155.155.156 dev eth0 lladdr 32:51:51:51:51:52 PERMANENT Should Contain ${out} 155.155.155.156 dev lo lladdr 32:51:51:51:51:52 PERMANENT Change ARPs vpp_ctl: Put Linux ARP agent_vpp_1 vpp1_veth1 veth1_arp 155.255.155.155 32:61:51:51:51:51 vpp_ctl: Put Linux ARP agent_vpp_1 vpp1_veth2 veth2_arp 155.255.155.156 32:61:51:51:51:52 vpp_ctl: Put Linux ARP agent_vpp_1 lo loopback_arp 155.255.155.156 32:61:51:51:51:52 - vpp_ctl: Put Linux ARP agent_vpp_1 eth0 eth_arp 155.255.155.156 32:61:51:51:51:52 + #vpp_ctl: Put Linux ARP agent_vpp_1 eth0 eth_arp 155.255.155.156 32:61:51:51:51:52 Sleep ${SYNC_SLEEP} Check ARPSs Again @@ -83,21 +83,21 @@ Check ARPSs Again Log ${out} Should Contain ${out} 155.255.155.156 dev vpp1_veth2 lladdr 32:61:51:51:51:52 PERMANENT Should Contain ${out} 155.255.155.155 dev vpp1_veth1 lladdr 32:61:51:51:51:51 PERMANENT - Should Contain ${out} 155.255.155.156 dev eth0 lladdr 32:61:51:51:51:52 PERMANENT + #Should Contain ${out} 155.255.155.156 dev eth0 lladdr 32:61:51:51:51:52 PERMANENT Should Contain ${out} 155.255.155.156 dev lo lladdr 32:61:51:51:51:52 PERMANENT Delete ARPs vpp_ctl: Delete Linux ARP agent_vpp_1 veth1_arp vpp_ctl: Delete Linux ARP agent_vpp_1 veth2_arp vpp_ctl: Delete Linux ARP agent_vpp_1 loopback_arp - vpp_ctl: Delete Linux ARP agent_vpp_1 eth_arp + #vpp_ctl: Delete Linux ARP agent_vpp_1 eth_arp Check ARPSs After Delete ${out}= Execute In Container agent_vpp_1 ip neigh Log ${out} Should Not Contain ${out} 155.255.155.156 dev vpp1_veth2 lladdr 32:61:51:51:51:52 PERMANENT Should Not Contain ${out} 155.255.155.155 dev vpp1_veth1 lladdr 32:61:51:51:51:51 PERMANENT - Should Not Contain ${out} 155.255.155.156 dev eth0 lladdr 32:61:51:51:51:52 PERMANENT + #Should Not Contain ${out} 155.255.155.156 dev eth0 lladdr 32:61:51:51:51:52 PERMANENT Should Not Contain ${out} 155.255.155.156 dev lo lladdr 32:61:51:51:51:52 PERMANENT diff --git a/tests/robot/suites/misc/etcd_clear.robot b/tests/robot/suites/misc/etcd_clear.robot new file mode 100644 index 0000000000..1d18d349d8 --- /dev/null +++ b/tests/robot/suites/misc/etcd_clear.robot @@ -0,0 +1,271 @@ +*** Settings *** +Library OperatingSystem +#Library RequestsLibrary +#Library SSHLibrary timeout=60s +#Library String + +Resource ../../../variables/${VARIABLES}_variables.robot + +Resource ../../../libraries/all_libs.robot + +Suite Setup Testsuite Setup +Suite Teardown Testsuite Teardown +Test Setup TestSetup +Test Teardown TestTeardown +*** Variables *** +${VARIABLES}= common +${ENV}= common +${CONFIG_SLEEP}= 1s +${RESYNC_SLEEP}= 1s +${SYNC_SLEEP}= 10s +# wait for resync vpps after restart +${RESYNC_WAIT}= 20s + +*** Test Cases *** +Configure Environment + [Tags] setup + Add Agent VPP Node agent_vpp_1 + + +Show Interfaces Before Setup + vpp_term: Show Interfaces agent_vpp_1 + vpp_term: Show Interfaces agent_vpp_2 + Write To Machine vpp_agent_ctl vpp-agent-ctl ${AGENT_VPP_ETCD_CONF_PATH} -ps + +Setup Interfaces + vpp_ctl: Put Veth Interface Via Linux Plugin node=agent_vpp_1 namespace=ns1 name=ns1_veth1 host_if_name=ns1_veth1_linux mac=d2:74:8c:12:67:d2 peer=ns2_veth2 ip=192.168.22.1 prefix=30 + vpp_ctl: Put Veth Interface Via Linux Plugin node=agent_vpp_1 namespace=ns2 name=ns2_veth2 host_if_name=ns2_veth2_linux mac=92:c7:42:67:ab:cd peer=ns1_veth1 ip=192.168.22.2 prefix=30 + + vpp_ctl: Put Afpacket Interface node=agent_vpp_1 name=vpp1_afpacket1 mac=a2:a1:a1:a1:a1:a1 host_int=vpp1_veth2 + @{ints}= Create List vpp1_vxlan1 vpp1_afpacket1 + vpp_ctl: Put Bridge Domain node=agent_vpp_1 name=vpp1_bd1 ints=${ints} + + Sleep ${SYNC_SLEEP} + +Check Linux Interfaces On VPP1 + ${out}= Execute In Container agent_vpp_1 ip a + Log ${out} + Should Contain ${out} vpp1_veth2@vpp1_veth1 + Should Contain ${out} vpp1_veth1@vpp1_veth2 + Should Contain ${out} linux_vpp1_tap1 + +Check Interfaces On VPP1 + ${out}= vpp_term: Show Interfaces agent_vpp_1 + Log ${out} + ${int}= vpp_ctl: Get Interface Internal Name agent_vpp_1 vpp1_memif1 + Log ${int} + Should Contain ${out} ${int} + ${int}= vpp_ctl: Get Interface Internal Name agent_vpp_1 vpp1_afpacket1 + Log ${int} + Should Contain ${out} ${int} + ${int}= vpp_ctl: Get Interface Internal Name agent_vpp_1 vpp1_vxlan1 + Log ${int} + Should Contain ${out} ${int} + ${int}= vpp_ctl: Get Interface Internal Name agent_vpp_1 vpp1_loop1 + Log ${int} + Should Contain ${out} ${int} + ${int}= vpp_ctl: Get Interface Internal Name agent_vpp_1 vpp1_tap1 + Log ${int} + Should Contain ${out} ${int} + +Check Linux Interfaces On VPP2 + ${out}= Execute In Container agent_vpp_2 ip a + Log ${out} + Should Contain ${out} vpp2_veth2@vpp2_veth1 + Should Contain ${out} vpp2_veth1@vpp2_veth2 + Should Contain ${out} linux_vpp2_tap1 + +Check Interfaces On VPP2 + ${out}= vpp_term: Show Interfaces agent_vpp_2 + Log ${out} + ${int}= vpp_ctl: Get Interface Internal Name agent_vpp_2 vpp2_memif1 + Log ${int} + Should Contain ${out} ${int} + ${int}= vpp_ctl: Get Interface Internal Name agent_vpp_2 vpp2_afpacket1 + Log ${int} + Should Contain ${out} ${int} + ${int}= vpp_ctl: Get Interface Internal Name agent_vpp_2 vpp2_vxlan1 + Log ${int} + Should Contain ${out} ${int} + ${int}= vpp_ctl: Get Interface Internal Name agent_vpp_2 vpp2_loop1 + Log ${int} + Should Contain ${out} ${int} + ${int}= vpp_ctl: Get Interface Internal Name agent_vpp_2 vpp2_tap1 + Log ${int} + Should Contain ${out} ${int} + +Check Bridge Domain On VPP1 Is Created + vat_term: BD Is Created agent_vpp_1 vpp1_vxlan1 vpp1_afpacket1 + +Check Bridge Domain On VPP2 Is Created + vat_term: BD Is Created agent_vpp_2 vpp2_vxlan1 vpp2_afpacket1 + +Show Interfaces And Other Objects After Config + vpp_term: Show Interfaces agent_vpp_1 + vpp_term: Show Interfaces agent_vpp_2 + Write To Machine agent_vpp_1_term show int addr + Write To Machine agent_vpp_2_term show int addr + Write To Machine agent_vpp_1_term show h + Write To Machine agent_vpp_2_term show h + Write To Machine agent_vpp_1_term show br + Write To Machine agent_vpp_2_term show br + Write To Machine agent_vpp_1_term show br 1 detail + Write To Machine agent_vpp_2_term show br 1 detail + Write To Machine agent_vpp_1_term show vxlan tunnel + Write To Machine agent_vpp_2_term show vxlan tunnel + Write To Machine agent_vpp_1_term show err + Write To Machine agent_vpp_2_term show err + vat_term: Interfaces Dump agent_vpp_1 + vat_term: Interfaces Dump agent_vpp_2 + Write To Machine vpp_agent_ctl vpp-agent-ctl ${AGENT_VPP_ETCD_CONF_PATH} -ps + Execute In Container agent_vpp_1 ip a + Execute In Container agent_vpp_2 ip a + +Check Ping From VPP1 to VPP2 + linux: Check Ping agent_vpp_1 10.10.1.2 + +Check Ping From VPP2 to VPP1 + linux: Check Ping agent_vpp_2 10.10.1.1 + +Config Done + No Operation + + +Remove VPP Nodes + Remove All Nodes + Sleep ${SYNC_SLEEP} + +Start VPP1 And VPP2 Again + Add Agent VPP Node agent_vpp_1 + Add Agent VPP Node agent_vpp_2 + Sleep ${RESYNC_WAIT} + +Check Linux Interfaces On VPP1 After Resync + ${out}= Execute In Container agent_vpp_1 ip a + Log ${out} + Should Contain ${out} vpp1_veth2@vpp1_veth1 + Should Contain ${out} vpp1_veth1@vpp1_veth2 + Should Contain ${out} linux_vpp1_tap1 + +Check Interfaces On VPP1 After Resync + ${out}= vpp_term: Show Interfaces agent_vpp_1 + Log ${out} + ${int}= vpp_ctl: Get Interface Internal Name agent_vpp_1 vpp1_memif1 + Log ${int} + Should Contain ${out} ${int} + ${int}= vpp_ctl: Get Interface Internal Name agent_vpp_1 vpp1_afpacket1 + Log ${int} + Should Contain ${out} ${int} + ${int}= vpp_ctl: Get Interface Internal Name agent_vpp_1 vpp1_vxlan1 + Log ${int} + Should Contain ${out} ${int} + ${int}= vpp_ctl: Get Interface Internal Name agent_vpp_1 vpp1_loop1 + Log ${int} + Should Contain ${out} ${int} + ${int}= vpp_ctl: Get Interface Internal Name agent_vpp_1 vpp1_tap1 + Log ${int} + Should Contain ${out} ${int} + +Check Linux Interfaces On VPP2 After Resync + ${out}= Execute In Container agent_vpp_2 ip a + Log ${out} + Should Contain ${out} vpp2_veth2@vpp2_veth1 + Should Contain ${out} vpp2_veth1@vpp2_veth2 + Should Contain ${out} linux_vpp2_tap1 + +Check Interfaces On VPP2 After Resync + ${out}= vpp_term: Show Interfaces agent_vpp_2 + Log ${out} + ${int}= vpp_ctl: Get Interface Internal Name agent_vpp_2 vpp2_memif1 + Log ${int} + Should Contain ${out} ${int} + ${int}= vpp_ctl: Get Interface Internal Name agent_vpp_2 vpp2_afpacket1 + Log ${int} + Should Contain ${out} ${int} + ${int}= vpp_ctl: Get Interface Internal Name agent_vpp_2 vpp2_vxlan1 + Log ${int} + Should Contain ${out} ${int} + ${int}= vpp_ctl: Get Interface Internal Name agent_vpp_2 vpp2_loop1 + Should Contain ${out} ${int} + ${int}= vpp_ctl: Get Interface Internal Name agent_vpp_2 vpp2_tap1 + Log ${int} + Should Contain ${out} ${int} + +Check Bridge Domain On VPP1 Is Created After Resync + vat_term: BD Is Created agent_vpp_1 vpp1_vxlan1 vpp1_afpacket1 + +Check Bridge Domain On VPP2 Is Created After Resync + vat_term: BD Is Created agent_vpp_2 vpp2_vxlan1 vpp2_afpacket1 + +Show Interfaces And Other Objects After Resync + vpp_term: Show Interfaces agent_vpp_1 + vpp_term: Show Interfaces agent_vpp_2 + Write To Machine agent_vpp_1_term show int addr + Write To Machine agent_vpp_2_term show int addr + Write To Machine agent_vpp_1_term show h + Write To Machine agent_vpp_2_term show h + Write To Machine agent_vpp_1_term show br + Write To Machine agent_vpp_2_term show br + Write To Machine agent_vpp_1_term show br 1 detail + Write To Machine agent_vpp_2_term show br 1 detail + Write To Machine agent_vpp_1_term show vxlan tunnel + Write To Machine agent_vpp_2_term show vxlan tunnel + Write To Machine agent_vpp_1_term show err + Write To Machine agent_vpp_2_term show err + vat_term: Interfaces Dump agent_vpp_1 + vat_term: Interfaces Dump agent_vpp_2 + Write To Machine vpp_agent_ctl vpp-agent-ctl ${AGENT_VPP_ETCD_CONF_PATH} -ps + Execute In Container agent_vpp_1 ip a + Execute In Container agent_vpp_2 ip a + Sleep ${SYNC_SLEEP} +Check Ping From VPP1 to VPP2 After Resync + linux: Check Ping agent_vpp_1 10.10.1.2 + +Check Ping From VPP2 to VPP1 After Resync + linux: Check Ping agent_vpp_2 10.10.1.1 + +Remove VPP Nodes 2 + Remove All Nodes + Sleep ${SYNC_SLEEP} + +Start VPP1 And VPP2 Again 2 + Add Agent VPP Node agent_vpp_1 + Add Agent VPP Node agent_vpp_2 + Sleep ${RESYNC_WAIT} + +Check Ping From VPP1 to VPP2 After Resync 2 + linux: Check Ping agent_vpp_1 10.10.1.2 + +Check Ping From VPP2 to VPP1 After Resync 2 + linux: Check Ping agent_vpp_2 10.10.1.1 + +Remove VPP Nodes 3 + Remove All Nodes + Sleep ${SYNC_SLEEP} + +Start VPP1 And VPP2 Again 3 + Add Agent VPP Node agent_vpp_1 + Add Agent VPP Node agent_vpp_2 + Sleep ${RESYNC_WAIT} + +Check Ping From VPP1 to VPP2 After Resync 3 + linux: Check Ping agent_vpp_1 10.10.1.2 + +Check Ping From VPP2 to VPP1 After Resync 3 + linux: Check Ping agent_vpp_2 10.10.1.1 + + +Resync Done + No Operation + +Final Sleep After Resync For Manual Checking + Sleep ${RESYNC_SLEEP} + + +*** Keywords *** +*** Keywords *** +TestSetup + Make Datastore Snapshots ${TEST_NAME}_test_setup + +TestTeardown + Make Datastore Snapshots ${TEST_NAME}_test_teardown \ No newline at end of file diff --git a/tests/robot/suites/sfc/test_controller_start/controller_start.robot b/tests/robot/suites/sfc/test_controller_start/controller_start.robot index 147ba31451..d6f4616803 100644 --- a/tests/robot/suites/sfc/test_controller_start/controller_start.robot +++ b/tests/robot/suites/sfc/test_controller_start/controller_start.robot @@ -10,6 +10,8 @@ Resource ../../../libraries/all_libs.robot Suite Setup Testsuite Setup Suite Teardown Suite Cleanup +Test Setup TestSetup +Test Teardown TestTeardown *** Variables *** ${VARIABLES}= common @@ -63,3 +65,11 @@ Final Sleep For Manual Checking Suite Cleanup Stop SFC Controller Container Testsuite Teardown + +*** Keywords *** +TestSetup + Make Datastore Snapshots ${TEST_NAME}_test_setup + +TestTeardown + Make Datastore Snapshots ${TEST_NAME}_test_teardown + From e4ff5de1d23598dfe71d9429eeca4e3a7ff8ae8c Mon Sep 17 00:00:00 2001 From: Ondrej Fabry Date: Thu, 22 Mar 2018 10:18:30 +0100 Subject: [PATCH 7/8] Update CHANGELOG --- CHANGELOG.md | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0187c69ced..451dc2ec1f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,53 +1,55 @@ -# Release v1.3-rc1 (2018-XX-XX) +# Release v1.3 (2018-03-22) ## Compatibility VPP v18.01-rc0~605-g954d437 cn-infra v1.1 -The vpp-agent is now using custom VPP branch stable-1801-contiv. -Link to [github].(https://github.com/vpp-dev/vpp/tree/stable-1801-contiv) +The vpp-agent is now using custom VPP branch [stable-1801-contiv](https://github.com/vpp-dev/vpp/tree/stable-1801-contiv). ## New Features -- [ipsecplugin](plugins/defaultplugins/ifplugin) - * New plugin for IPSec added. *add more info about IPSec (what is possible to do, - what is not, link to readme...)* +- [ipsecplugin](plugins/defaultplugins/ipsecplugin) + * New plugin for IPSec added. The IPSec is supported for VPP only + with linux set manually for now. IKEv2 is not yet supported. + More information in the [readme](plugins/defaultplugins/ipsecplugin/README.md). - [nsplugin](plugins/linuxplugin/nsplugin) - * New namespace plugin added. The configurator handles common namespace and microservice - processing and communication with other Linux plugins. + * New namespace plugin added. The configurator handles common namespace + and microservice processing and communication with other Linux plugins. - [ifplugin](plugins/defaultplugins/ifplugin) * Added support for Network address translation. NAT plugin supports - configuration of NAT44 interfaces, address pools and DNAT. Look for - more information in the [readme](plugins/defaultplugins/ifplugin/README.md). + configuration of NAT44 interfaces, address pools and DNAT. + More information in the [readme](plugins/defaultplugins/ifplugin/README.md). * DHCP can now be configured for the interface - [l2plugin](plugins/defaultplugins/l2plugin) * Split-horizon group can be configured for bridge domain interface. - [l3plugin](plugins/defaultplugins/l3plugin) * Added support for proxy ARP. For more information and configuration - example, please see [readme](plugins/defaultplugins/l3plugin/README.md). + example, please see [readme](plugins/defaultplugins/l3plugin/README.md). - [linux ifplugin](plugins/linuxplugin/ifplugin) - * Support for automatic interface configuration (currently only TAP). + * Support for automatic interface configuration (currently only TAP). ## Improvements - [aclplugin](plugins/defaultplugins/aclplugin) * Removed configuration order of interfaces. Access list can be now configured even if interfaces do not exist yet, and add them later. - [vpp-agent-ctl](cmd/vpp-agent-ctl) - * The vpp-agent-ctl was refactored and command info was updated. + * The vpp-agent-ctl was refactored and command info was updated. -## Image - * VPP can be build in release and debug mode +## Docker Images + * VPP can be build and run in release or debug mode. + Read more information in the [readme](https://github.com/ligato/vpp-agent/blob/pantheon-dev/docker/dev_vpp_agent/README.md). + * Production image is now smaller by roughly 40% (229MB). ## Bugfix * Resync of ifplugin in both, VPP and Linux, was improved. Interfaces with the same configuration data are not recreated during resync. * STN do not fail if IP address with mask is provided. - * Fixed ingress/egress interface resolution in ACL. + * Fixed ingress/egress interface resolution in ACL. * Linux routes now check network reachability for gateway address b before configuration. It should prevent "network unreachable" errors during config. * Corrected bridge domain crash in case non-bvi interface was added to - another non-bvi interface. - * Fixed several bugs related to VETH and AF-PACKET configuration and resync. + another non-bvi interface. + * Fixed several bugs related to VETH and AF-PACKET configuration and resync. # Release v1.2 (2018-02-07) From 976f9ff34e4f33b15927ed6813a1bf524e4d6142 Mon Sep 17 00:00:00 2001 From: Ondrej Fabry Date: Thu, 22 Mar 2018 10:54:32 +0100 Subject: [PATCH 8/8] Update cn-infra to v1.2 --- CHANGELOG.md | 2 +- Gopkg.lock | 5 +++-- Gopkg.toml | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 451dc2ec1f..04dd003e69 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ ## Compatibility VPP v18.01-rc0~605-g954d437 -cn-infra v1.1 +cn-infra v1.2 The vpp-agent is now using custom VPP branch [stable-1801-contiv](https://github.com/vpp-dev/vpp/tree/stable-1801-contiv). diff --git a/Gopkg.lock b/Gopkg.lock index dde701b6c5..0d6b1308a3 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -306,7 +306,8 @@ "utils/safeclose", "utils/structs" ] - revision = "b1d7b65181d158935badfb66898f06160c4b1c26" + revision = "e3b8c2a73fdfb66fe7654d1c3377ed5c1762a3b2" + version = "v1.2" [[projects]] branch = "master" @@ -598,6 +599,6 @@ [solve-meta] analyzer-name = "dep" analyzer-version = 1 - inputs-digest = "3c5d7fb379ea29a3fbcd2d52b9ff2959a2c2603331eebda510b99e0bc47b2d79" + inputs-digest = "016c08dd68a32b7f5817dae0617b9753604f5cf7009afe9dd6c0194c473c3e32" solver-name = "gps-cdcl" solver-version = 1 diff --git a/Gopkg.toml b/Gopkg.toml index 8c28f4356d..7f3816a894 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -59,7 +59,7 @@ required = [ [[constraint]] name = "github.com/ligato/cn-infra" - revision = "b1d7b65181d158935badfb66898f06160c4b1c26" + version = "1.2" [[constraint]] branch = "master"