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
SDN-1334: Pod to svc connectivity check in OVN #21
Conversation
/hold |
/hold cancel. This is good to go. |
/hold cancel |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: juanluisvaladas, tssurya The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@@ -4,8 +4,8 @@ COPY . . | |||
ENV GO_PACKAGE github.com/openshift/debug-network | |||
|
|||
FROM centos:8 | |||
COPY --from=builder /go/src/github.com/openshift/debug-network/debug-scripts/* /usr/bin/ | |||
RUN yum -y --setopt=tsflags=nodocs install git go jq tcpdump traceroute net-tools nmap-ncat pciutils strace numactl make && \ | |||
COPY --from=builder /go/src/github.com/openshift/debug-network/debug-scripts/ /usr/bin/debug-network-scripts/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is done to keep the directory structure and avoid overwriting sdn and ovn files with the same name. We can clean it up in the future for when we integrate with oc adm and invoke the scripts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good enough, this will be reworked next week anyway
What is the aim of the script?
Test connectivity between pod and svc in OVN. It runs ovnkube-trace between the pod and svc in case of connectivity failure to check what went wrong.
How to test the script?
The script assumes that $KUBECONFIG file is loaded/mounted at /tmp/kubeconfig inside the pod. This is just temporary and will go away once we add a serviceaccount for the debug-namespace.
Method 1: Launch a debug pod on an OCP OVN cluster:
Sample yaml:
Replace the image with
registry.svc.ci.openshift.org/ocp/4.7:ocp-debug-network
once the image lands in the registry.oc rsh -n <DEBUG-NETWORK-NAMESPACE> <debug-network-podname> ./usr/bin/debug-network-scripts/ovn/pod_to_svc.sh <src-node-name> <dst-node-name>
Method 2: Launch it via podman or docker:
podman run -v /tmp/kubeconfig:/tmp/kubeconfig <IMAGE_ID> ./usr/bin/debug-network-scripts/ovn/pod_to_svc.sh