Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1889863

Summary: Router prints incorrect log message for namespace label selector
Product: OpenShift Container Platform Reporter: Miciah Dashiel Butler Masters <mmasters>
Component: NetworkingAssignee: Miciah Dashiel Butler Masters <mmasters>
Networking sub component: router QA Contact: Hongan Li <hongli>
Status: CLOSED ERRATA Docs Contact:
Severity: low    
Priority: low CC: aos-bugs
Version: 4.6   
Target Milestone: ---   
Target Release: 4.7.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-02-24 15:27:07 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Miciah Dashiel Butler Masters 2020-10-20 18:06:10 UTC
Description of problem:

When an IngressController specifies a namespace selector, the router pod prints a log message indicating that it will filter namespaces using that selector.  However, the log output does not print the label selector correctly.


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

4.6.0-0.ci-2020-08-06-061328

Most likely introduced in 4.3 by https://github.com/openshift/router/pull/47/commits/dc68ebfcbd9fdc600391ebe050228534dd2b07c3.


How reproducible:

Consistently.


Steps to Reproduce:

1. Launch a 4.6 cluster.

2. On the cluster created in Step 1, create a new IngressController that specifies spec.namespaceSelector:

     oc apply -f - <<'EOF'
     apiVersion: operator.openshift.io/v1
     kind: IngressController
     metadata:
       name: namespace-selector
       namespace: openshift-ingress-operator
     spec:
       replicas: 1
       domain: xyz.com
       endpointPublishingStrategy:
         type: Private
       namespaceSelector:
          matchLabels:
            foo: bar
     EOF

3. Check the logs for a router pod for the IngressController created in Step 2:

    oc -n openshift-ingress logs -c router deployments/router-namespace-selector


Actual results:

The log output prints the label selector incorrectly:

    "msg"="router is only using routes in namespaces matching labels"  "labels"=[{}]


Expected results:

The log output prints the label selector correctly:

    "msg"="router is only using routes in namespaces matching labels"  "labels"="foo=bar"

Comment 2 Hongan Li 2020-11-12 06:55:44 UTC
Verified with 4.7.0-0.nightly-2020-11-11-220947 and issue has been fixed.

# oc -n openshift-ingress logs router-default-87f6699c-5zsrx
<---snip--->
I1112 06:49:31.322770       1 router.go:254] router "msg"="router is only using routes in namespaces matching labels"  "labels"="foo=bar"

Comment 5 errata-xmlrpc 2021-02-24 15:27:07 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Moderate: OpenShift Container Platform 4.7.0 security, bug fix, and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2020:5633