Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-298

Make ovnkube-trace work on hypershift deployments

    XMLWordPrintable

Details

    • SDN Sprint 224, SDN Sprint 227, SDN Sprint 228, SDN Sprint 229, SDN Sprint 230, SDN Sprint 231
    • 6
    • Rejected
    • False
    • Hide

      None

      Show
      None

    Description

      Description of problem:
      ovnkube-trace fails on hypershift deployments:
      https://bugzilla.redhat.com/show_bug.cgi?id=2066891#c8

      getDatabaseURIs looks for pods with container ovnkube-master, and those don't exist in hypershift.

      https://github.com/ovn-org/ovn-kubernetes/blob/6b8acf05cb6043ebdc42d9d36e700390baabea4a/go-controller/cmd/ovnkube-trace/ovnkube-trace.go#L540
      ~~~
      // Returns nbAddress, sbAddress, protocol == "ssl", nil
      func getDatabaseURIs(coreclient *corev1client.CoreV1Client, restconfig *rest.Config, ovnNamespace string) (string, string, bool, error) {
      containerName := "ovnkube-master"
      var err error

      found := false
      var podName string

      listOptions := metav1.ListOptions{}
      pods, err := coreclient.Pods(ovnNamespace).List(context.TODO(), listOptions)
      if err != nil

      { return "", "", false, err }

      for _, pod := range pods.Items {
      for _, container := range pod.Spec.Containers {
      if container.Name == containerName

      { found = true podName = pod.Name break }

      }
      }
      if !found

      { klog.V(5).Infof("Cannot find ovnkube pods with container %s", containerName) return "", "", false, fmt.Errorf("cannot find ovnkube pods with container: %s", containerName) }

      ~~~

      Version-Release number of selected component (if applicable):

      How reproducible:

      Steps to Reproduce:
      1.
      2.
      3.

      Actual results:

      Expected results:

      Additional info:

      Attachments

        Activity

          People

            pdiak@redhat.com Patryk Diak
            akaris@redhat.com Andreas Karis
            Ross Brattain Ross Brattain
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: