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

SDN-1334: Pod to svc connectivity check in OVN #21

Merged
merged 1 commit into from Dec 4, 2020

Conversation

tssurya
Copy link
Contributor

@tssurya tssurya commented Dec 3, 2020

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:

---
apiVersion: v1
kind: Pod
metadata:
  name: pod1
  labels:
    app: MyApp
spec:
  containers:
  - name: pod1
    image: quay.io/itssurya/dev-images:15084af4-4491-44a2-94bf-c62bfdeb7131
    command:
      - /sbin/init

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

@tssurya
Copy link
Contributor Author

tssurya commented Dec 3, 2020

/hold

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 3, 2020
@tssurya
Copy link
Contributor Author

tssurya commented Dec 4, 2020

/hold cancel.

This is good to go.

@tssurya
Copy link
Contributor Author

tssurya commented Dec 4, 2020

/hold cancel

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 4, 2020
@juanluisvaladas
Copy link
Contributor

/lgtm

@openshift-ci-robot
Copy link
Contributor

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Dec 4, 2020
@@ -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/
Copy link
Contributor Author

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.

Copy link
Contributor

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

@openshift-merge-robot openshift-merge-robot merged commit 6916ab3 into openshift:master Dec 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants