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

Error while creating the egressfirewall dnsName with uppercase on OCP 4.16

XMLWordPrintable

    • Important
    • Yes
    • False
    • Hide

      None

      Show
      None

      This is a clone of issue OCPBUGS-46564. The following is the description of the original issue:

      Description of problem:
      We are getting the below error on OCP 4.16 while creating the egressfirewall with uppercase:
      ~~~

      1. * spec.egress[4].to.dnsName: Invalid value: "TESTURL.infra.example.com": spec.egress[4].to.dnsName in body should match '^(*\.)?([a-z0-9]([-a-z0-9] {0,61}[a-z0-9])?\.)+[a-z0-9]([-a-z0-9]{0,61}

        [a-z0-9])?\.?$'
        #
        ~~~
        When I check the code
        https://github.com/openshift/ovn-kubernetes/blob/release-4.15/go-controller/pkg/crd/egressfirewall/v1/types.go#L80-L82
        types.go
        ~~~
        // dnsName is the domain name to allow/deny traffic to. If this is set, cidrSelector and nodeSelector must be unset.
        // kubebuilder:validation:Pattern=^([A-Za-z0-9-]\.)*[A-Za-z0-9-]+\.?$
        DNSName string `json:"dnsName,omitempty"`
        ~~~
        https://github.com/openshift/ovn-kubernetes/blob/release-4.16/go-controller/pkg/crd/egressfirewall/v1/types.go#L80-L85
        types.go
        ~~~
        // dnsName is the domain name to allow/deny traffic to. If this is set, cidrSelector and nodeSelector must be unset.
        // For a wildcard DNS name, the '' will match only one label. Additionally, only a single '' can be
        // used at the beginning of the wildcard DNS name. For example, '*.example.com' will match 'sub1.example.com' // but won't match 'sub2.sub1.example.com'.
        // kubebuilder:validation:Pattern=`^(*\.)?([A-Za-z0-9-]\.)*[A-Za-z0-9-]+\.?$`
        DNSName string `json:"dnsName,omitempty"`
        ~~~

      Code looks its supported for the upper case.
      Version-Release number of selected component (if applicable):

      How reproducible:

      Steps to Reproduce:

      1. Deploy the cluster with OCP 4.16.x

      2. Create EgressFirewall with the upper case for dnsName
      ~~~
      apiVersion: k8s.ovn.org/v1
      kind: EgressFirewall
      metadata:
      name: default
      spec:
      egress:

      • type: Allow
        to:
        dnsName: TEST.redhat.com
        ports:
      • port: 80
        protocol: TCP
      • port: 443
        protocol: TCP
        ~~~

      3.

      Actual results:

      Expected results:

      Additional info:

      Please fill in the following template while reporting a bug and provide as much relevant information as possible. Doing so will give us the best chance to find a prompt resolution.

      Affected Platforms:

      Is it an

      1. internal CI failure
      2. customer issue / SD
      3. internal RedHat testing failure

      If it is an internal RedHat testing failure:

      • Please share a kubeconfig or creds to a live cluster for the assignee to debug/troubleshoot along with reproducer steps (specially if it's a telco use case like ICNI, secondary bridges or BM+kubevirt).

      If it is a CI failure:

      • Did it happen in different CI lanes? If so please provide links to multiple failures with the same error instance
      • Did it happen in both sdn and ovn jobs? If so please provide links to multiple failures with the same error instance
      • Did it happen in other platforms (e.g. aws, azure, gcp, baremetal etc) ? If so please provide links to multiple failures with the same error instance
      • When did the failure start happening? Please provide the UTC timestamp of the networking outage window from a sample failure run
      • If it's a connectivity issue,
      • What is the srcNode, srcIP and srcNamespace and srcPodName?
      • What is the dstNode, dstIP and dstNamespace and dstPodName?
      • What is the traffic path? (examples: pod2pod? pod2external?, pod2svc? pod2Node? etc)

      If it is a customer / SD issue:

      • Provide enough information in the bug description that Engineering doesn't need to read the entire case history.
      • Don't presume that Engineering has access to Salesforce.
      • Do presume that Engineering will access attachments through supportshell.
      • Describe what each relevant attachment is intended to demonstrate (failed pods, log errors, OVS issues, etc).
      • Referring to the attached must-gather, sosreport or other attachment, please provide the following details:
        • If the issue is in a customer namespace then provide a namespace inspect.
        • If it is a connectivity issue:
          • What is the srcNode, srcNamespace, srcPodName and srcPodIP?
          • What is the dstNode, dstNamespace, dstPodName and dstPodIP?
          • What is the traffic path? (examples: pod2pod? pod2external?, pod2svc? pod2Node? etc)
          • Please provide the UTC timestamp networking outage window from must-gather
          • Please provide tcpdump pcaps taken during the outage filtered based on the above provided src/dst IPs
        • If it is not a connectivity issue:
          • Describe the steps taken so far to analyze the logs from networking components (cluster-network-operator, OVNK, SDN, openvswitch, ovs-configure etc) and the actual component where the issue was seen based on the attached must-gather. Please attach snippets of relevant logs around the window when problem has happened if any.
      • When showing the results from commands, include the entire command in the output.  
      • For OCPBUGS in which the issue has been identified, label with "sbr-triaged"
      • For OCPBUGS in which the issue has not been identified and needs Engineering help for root cause, label with "sbr-untriaged"
      • Do not set the priority, that is owned by Engineering and will be set when the bug is evaluated
      • Note: bugs that do not meet these minimum standards will be closed with label "SDN-Jira-template"
      • For guidance on using this template please see
        OCPBUGS Template Training for Networking  components

              rh-ee-arsen Arkadeep Sen
              openshift-crt-jira-prow OpenShift Prow Bot
              Anurag Saxena Anurag Saxena
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: