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

Bug 1419472

Summary: oadm diagnostics didn't report errors about MasterConfigCheck and NodeConfigCheck when DiagnosticName is not specified
Product: OpenShift Container Platform Reporter: Xia Zhao <xiazhao>
Component: ocAssignee: Juan Vallejo <jvallejo>
Status: CLOSED ERRATA QA Contact: Xia Zhao <xiazhao>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.5.0CC: aos-bugs, jokerman, jvallejo, mmccomas, tdawson, xxia
Target Milestone: ---Keywords: Regression
Target Release: ---   
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: 2017-04-12 19:11:40 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 Xia Zhao 2017-02-06 09:40:35 UTC
Description of problem:
When DiagnosticName = MasterConfigCheck|NodeConfigCheck:

Diagnose openshift system without DiagnosticName specified, errors are not reported:
# oadm diagnostics --master-config=/etc/nonfile
...
[Note] Running diagnostic: MasterConfigCheck
       Description: Check the master config file
       
[Note] Running diagnostic: NodeConfigCheck
       Description: Check the node config file
...


Diagnose openshift system with DiagnosticName specified, errors are reported:
# oadm diagnostics MasterConfigCheck --master-config=/etc/nonfile

[Note] Running diagnostic: MasterConfigCheck
       Description: Check the master config file
       
ERROR: [DH0002 from diagnostic MasterConfigCheck@openshift/origin/pkg/diagnostics/host/util.go:27]
       Could not read master config file '/etc/nonfile':
       (*os.PathError) open /etc/nonfile: no such file or directory


Version-Release number of selected component (if applicable):
openshift v3.5.0.16+a26133a
kubernetes v1.5.2+43a9be4
etcd 3.1.0

How reproducible:
Always

Steps to Reproduce:
1.Refer to "Description of problem"
2.
3.

Actual results:
No error report when DiagnosticName is not specified for "MasterConfigCheck" and "NodeConfigCheck".

Expected results:
Should report error when DiagnosticName is specified for "MasterConfigCheck" and "NodeConfigCheck".

Additional info:
Issue did not repro for DiagnosticNames != MasterConfigCheck|NodeConfigCheck

Comment 1 Juan Vallejo 2017-02-06 19:32:25 UTC
Related PR: https://github.com/openshift/origin/pull/12832

Comment 2 openshift-github-bot 2017-02-09 10:13:25 UTC
Commit pushed to master at https://github.com/openshift/origin

https://github.com/openshift/origin/commit/72c6f268f782d28a43caa379fcfb15e0e3679c64
bug 1419472
print master config error if it exists

Comment 3 Xia Zhao 2017-02-10 02:35:27 UTC
Tested with the latest puddle openshift v3.5.0.18+9a5d1aa, code is not merged into OCP. Will verify after it's in.

Comment 4 Troy Dawson 2017-02-10 22:50:27 UTC
This has been merged into ocp and is in OCP v3.5.0.19 or newer.

Comment 6 Xia Zhao 2017-02-13 06:38:37 UTC
Verified on the latest puddle, it's fixed.

# openshift version
openshift v3.5.0.19+199197c
kubernetes v1.5.2+43a9be4
etcd 3.1.0

Comment 8 errata-xmlrpc 2017-04-12 19:11:40 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-2017:0884