Bug 1835725

Summary: DNS operator reports "No DNS resource exists" when the DNS exists but its DaemonSet is not available
Product: OpenShift Container Platform Reporter: Miciah Dashiel Butler Masters <mmasters>
Component: NetworkingAssignee: Andrew McDermott <amcdermo>
Networking sub component: DNS QA Contact: Hongan Li <hongli>
Status: CLOSED ERRATA Docs Contact:
Severity: high    
Priority: unspecified CC: aos-bugs, wking
Version: 4.2.0   
Target Milestone: ---   
Target Release: 4.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
When the dnses.operator.openshift.io/default object exists but its corresponding DaemonSet is not available, clusteroperators/dns reports the "Available" condition with status "False" (which is correct), reason "NoDNS" (which is wrong), and message "No DNS resource exists" (which was also wrong). Under these conditions the status will now report "Not all desired DNS DaemonSets available".
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-07-13 17:38:49 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-05-14 11:53:32 UTC
Description of problem:

When the dnses.operator.openshift.io/default object exists but its corresponding DaemonSet is not available, clusteroperators/dns reports the "Available" condition with status "False" (which is correct), reason "NoDNS" (which is wrong), and message "No DNS resource exists" (which is also wrong).


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

The erroneous logic was added in OpenShift 4.2: https://github.com/openshift/cluster-dns-operator/pull/109/commits/540ab8bca50b50880a4eb44feaddee8352f565bf


How reproducible:

Readily.


Steps to Reproduce:


1. Launch a cluster.

2. Delete the default DNS's DaemonSet:

    oc -n openshift-dns delete daemonsets/dns-default

3. Check the clusteroperator:

    oc get clusteroperators/dns -o yaml


Actual results:

The clusteroperator reports the following: "No DNS resource exists":

      - lastTransitionTime: "2020-05-14T11:52:05Z"
        message: No DNS resource exists
        reason: NoDNS
        status: "True"
        type: Degraded


Expected results:

The clusteroperator should report the following: "Not all desired DNS DaemonSets available".


Additional info:

Observed in CI: https://prow.svc.ci.openshift.org/view/gcs/origin-ci-test/pr-logs/pull/openshift_router/113/pull-ci-openshift-router-master-e2e-aws/373

Comment 4 Hongan Li 2020-05-28 08:32:24 UTC
verified with 4.5.0-0.nightly-2020-05-27-202943 and the issue has been fixed.

status:
  conditions:
  - lastTransitionTime: "2020-05-28T08:26:34Z"
    message: Not all desired DNS DaemonSets available
    reason: NotAllDNSesAvailable
    status: "True"
    type: Degraded

Comment 5 errata-xmlrpc 2020-07-13 17:38:49 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, 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/RHBA-2020:2409