Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
michelsciortino opened this issue Nov 8, 2019 · 0 comments · Fixed by #252
Closed

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

michelsciortino opened this issue Nov 8, 2019 · 0 comments · Fixed by #252
Assignees
Labels
bug Something isn't working
Milestone

Comments

@michelsciortino
Copy link
Contributor

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
@michelsciortino michelsciortino added the bug Something isn't working label Nov 8, 2019
@palexster palexster added this to the Alpha 0.1 milestone Nov 28, 2019
@goldenrye goldenrye self-assigned this Dec 8, 2019
goldenrye added a commit that referenced this issue Dec 8, 2019
a port was assigned with id 0. Don't assign port id 0 to any port should
be able to fix the issue. notes that this fix is part of fixing 233,
another part of fixing is in libiptc library: need to parse interface,
which is fixed in another commit.

please refer to issue:
#233
goldenrye added a commit that referenced this issue Dec 8, 2019
a port was assigned with id 0. Don't assign port id 0 to any port should
be able to fix the issue.

please refer to issue:
#233

Signed-off-by: Jianwen Pi<jianwpi@gmail.com>
@acloudiator acloudiator modified the milestones: 0.1, v0.9.0-rc Feb 18, 2020
@acloudiator acloudiator linked a pull request Feb 18, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants