Bug 1707062

Summary: no termination message provided by failing dns-operator pods
Product: OpenShift Container Platform Reporter: Luis Sanchez <sanchezl>
Component: NetworkingAssignee: Dan Mace <dmace>
Networking sub component: DNS QA Contact: Hongan Li <hongli>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: medium CC: aos-bugs, bbennett, mmasters
Version: 4.1.0   
Target Milestone: ---   
Target Release: 4.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1723936 (view as bug list) Environment:
Last Closed: 2019-10-16 06:28:30 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1723936    

Description Luis Sanchez 2019-05-06 17:39:24 UTC
The dns-operator and dns-default pods do not provide a termination message, hindering debugging efforts when the pods are crash looping.

At minimum, the pod's terminationMessagePolicy should be "FallbackToLogsOnError".

See https://kubernetes.io/docs/tasks/debug-application-cluster/determine-reason-pod-failure/#customizing-the-termination-message

Expected Results:
The termination message should appear in a pod container's  .status.lastState.terminated.message field.

Comment 1 Ben Bennett 2019-05-06 20:02:01 UTC
Moving to 4.2 since this should not block the release.  But if it lands soon, please change it back to 4.2.

Comment 2 Ravi Sankar 2019-05-10 04:24:20 UTC
Fixed by https://github.com/openshift/cluster-dns-operator/pull/108

Comment 5 Hongan Li 2019-06-26 02:59:02 UTC
verified with 4.2.0-0.nightly-2019-06-25-003324 and issue has been fixed.

$ oc get deployment dns-operator -o yaml -n openshift-dns-operator
spec:
  template:
    spec:
      containers:
      - command:
        - dns-operator
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: FallbackToLogsOnError


$ oc get ds dns-default -o yaml -n openshift-dns
spec:
  template:
    spec:
      containers:
        name: dns
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: FallbackToLogsOnError
<---snip--->
        name: dns-node-resolver
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: FallbackToLogsOnError

Comment 6 errata-xmlrpc 2019-10-16 06:28:30 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-2019:2922