Fixing jenkins pipeline & tests#223
Conversation
d8e8927 to
a6b2655
Compare
| ADD src/components/k8s/pcn_k8s/init.sh /init.sh | ||
|
|
||
| CMD ["polycubed"] | ||
| CMD ["nsenter","--mount=/host/proc/1/ns/mnt","polycubed"] |
There was a problem hiding this comment.
Can you please add a comment saying what is this about?
| function test_tcp { | ||
| sudo ip netns exec ns2 netcat -l -w 5 $tcp_port& | ||
| sleep 2 | ||
| sleep 5 |
There was a problem hiding this comment.
Would it be possible to define a constant that is valid for all the tests, so that we don't have to change it manually throughout the entire file?
There was a problem hiding this comment.
I think this should be done in another PR as this change should affect every service's tests.
There was a problem hiding this comment.
Good point. Leave this as is.
|
@michelsciortino Thanks for this long awaited patch! |
I'v added this as a comment in the jenkinksfile
This command is not present in the scripts as it must be run on the host; |
203be2b to
60c59b5
Compare
palexster
left a comment
There was a problem hiding this comment.
/lgtm
Thanks @michelsciortino for this!
Adding croned stage 'Build Base Image' Adding volumes to docker run command Added nsenter in dockerfile CMD Killing polycubed docker in Clean Instance stage Adding /proc to Clean Instance & Same Instance Test stages + fix &policubed command in Ip Tables Tests stage Adding docker stop polycubed at the begin of each test stage Adding docker system prune --all --force at begin of each test stage Wrapping polycube kill command in tests/helpers_tests.bash Cron now triggers the pipeline only when the current branch is 'master' + removing unused labels Removing pcn-iptables tag in iptables test stage Increasing sleep time in src/services/pcn-nat/test/test_tcp_snat.sh Fixing Slack notification for SUCCESS status Adding conditional images building (images are built only if not already pushed to docker hub) Removing dash in polycube-network
60c59b5 to
c8e50ec
Compare
Docker base image is now built only triggered by a
cronat 2:00 am (everyday) to reduce the building time of the pipeline.Mounting volumes of the polycubed image have been changed:
/procis now mounted under/host/procto have a complete visibility of the namespaces created outside of the container.Solving iptables tests:
Docker manipulates the iptables policy of the node during his installation and this makes the kernel drop the packets forwarded between different network namespaces; to solve this,
sudo iptables -P FORWARD ACCEPTmust be run on the host before running tests in order avoid the kernel drops packets.