Skip to content

[BUG] Failing test in pcn-iptables service #233

@michelsciortino

Description

@michelsciortino

Describe the bug

The local_test_interfaces1.sh has been renamed as flaky_local_test_interfaces1.sh in order to be excluded from the pcn-iptables tests execution as it fails on the new Jenkins slaves.

The script tests the connectivity between two namespaces by using the ping command, expecting to have packet loss when the forwarding policy is not set to ACCEPT on both veth1 and veth2 interfaces exposed by the two namespaces.

When the forwarding policy is set to DROP on both the interfaces, the echo-requests sent from one namespace to the other are correctly dropped.

When the forwarding policy is set to ACCEPT on one of the two interfaces by running
pcn-iptables -A FORWARD -i veth1 -j ACCEPT
or
pcn-iptables -A FORWARD -i veth2 -j ACCEPT
the echo-requests receive responses instead of having packet loss in the forwarding.

To Reproduce

Install required tools:

sudo apt-get install git net-tools

Clone the Polycube repository:

git clone https://github.com/polycube-network/polycube
cd polycube
git submodule update --init --recursive

Launch the automatic install script:

./scripts/install.sh

Execute the failing test:

cd src/services/pcn-iptables/test
./flaky_local_test_interfaces1.sh 

Show test result:

echo $? # will display 1

Expected behavior

The test executes

pcn-iptables -P FORWARD DROP
pcn-iptables -A FORWARD -i veth1 -j ACCEPT
test_fail sudo ip netns exec ns1 ping 10.0.2.1 -c 2 -W 2

expecting the packets to be dropped as forwarding is enabled only on interface veth1 and the echo requests should not receive any reply.

Please tell us about your environment:

  1. OS details:
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.2 LTS"
NAME="Ubuntu"
VERSION="18.04.2 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.2 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic
  1. Kernel details:
4.18.0-15-generic #16~18.04.1-Ubuntu SMP Thu Feb 7 14:06:04 UTC 2019
x86_64 x86_64 x86_64 GNU/Linux
  1. Polycube Version:
polycubectl:
 version: v0.1.0-beta+ [git: (branch/commit): master/09aa4164]
polycubed:
 version: v0.1.0-beta+ [git: (branch/commit): master/09aa4164]
  1. Polycube Log:
    local_test_interfaces1.sh.log
    polycubed.log

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions