Bug 1612031 - Encountered fatal error while building diagnostics
Summary: Encountered fatal error while building diagnostics
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: oc
Version: 3.11.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 3.11.0
Assignee: Maciej Szulik
QA Contact: Junqi Zhao
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-08-03 10:01 UTC by Junqi Zhao
Modified: 2018-10-11 07:23 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-11 07:23:29 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:2652 0 None None None 2018-10-11 07:23:49 UTC

Description Junqi Zhao 2018-08-03 10:01:24 UTC
Description of problem:
# oc adm diagnostics --master-config=/etc/origin/master/master-config.yaml
[Note] Determining if client configuration exists for client/cluster diagnostics
Info:  Successfully read a client config file at '/root/.kube/config'

ERROR: [CED3001 from controller openshift/origin/pkg/oc/cli/admin/diagnostics/util/util.go]
       Encountered fatal error while building diagnostics: While building the diagnostics, a panic was encountered.
       This is a bug in diagnostics. Error and stack trace follow: 
       runtime error: invalid memory address or nil pointer dereference
       goroutine 1 [running]:
       runtime/debug.Stack(0xc4215c95f0, 0x27a8ce0, 0x47321e0)
       	/opt/rh/go-toolset-7/root/usr/lib/go-toolset-7-golang/src/runtime/debug/stack.go:24 +0xa7
       github.com/openshift/origin/pkg/oc/cli/admin/diagnostics.DiagnosticsOptions.buildDiagnostics.func1(0xc4215c9a58)
       	/builddir/build/BUILD/atomic-openshift-git-0.766dbc4/_output/local/go/src/github.com/openshift/origin/pkg/oc/cli/admin/diagnostics/diagnostics.go:309 +0x6e
       panic(0x27a8ce0, 0x47321e0)
       	/opt/rh/go-toolset-7/root/usr/lib/go-toolset-7-golang/src/runtime/panic.go:502 +0x229
       github.com/openshift/origin/pkg/oc/cli/admin/diagnostics.DiagnosticsOptions.buildRawConfig(0xc42140c810, 0xc42140c840, 0x0, 0x7ffe066596d4, 0x25, 0x2c13ccb, 0x21, 0x0, 0xc421402d00, 0x0, ...)
       	/builddir/build/BUILD/atomic-openshift-git-0.766dbc4/_output/local/go/src/github.com/openshift/origin/pkg/oc/cli/admin/diagnostics/config.go:19 +0x5c
       github.com/openshift/origin/pkg/oc/cli/admin/diagnostics.DiagnosticsOptions.buildDiagnostics(0xc42140c810, 0xc42140c840, 0x0, 0x7ffe066596d4, 0x25, 0x2c13ccb, 0x21, 0x0, 0xc421402d00, 0x0, ...)
       	/builddir/build/BUILD/atomic-openshift-git-0.766dbc4/_output/local/go/src/github.com/openshift/origin/pkg/oc/cli/admin/diagnostics/diagnostics.go:320 +0x122
       github.com/openshift/origin/pkg/oc/cli/admin/diagnostics.DiagnosticsOptions.RunDiagnostics(0xc42140c810, 0xc42140c840, 0x0, 0x7ffe066596d4, 0x25, 0x2c13ccb, 0x21, 0x0, 0xc421402d00, 0x0, ...)
       	/builddir/build/BUILD/atomic-openshift-git-0.766dbc4/_output/local/go/src/github.com/openshift/origin/pkg/oc/cli/admin/diagnostics/diagnostics.go:296 +0x60
       github.com/openshift/origin/pkg/oc/cli/admin/diagnostics/util.CommandRunFunc.func1(0xc42140bb80, 0xc421564e80, 0x0, 0x1)
       	/builddir/build/BUILD/atomic-openshift-git-0.766dbc4/_output/local/go/src/github.com/openshift/origin/pkg/oc/cli/admin/diagnostics/util/util.go:84 +0xab
       github.com/openshift/origin/vendor/github.com/spf13/cobra.(*Command).execute(0xc42140bb80, 0xc421564e60, 0x1, 0x1, 0xc42140bb80, 0xc421564e60)
       	/builddir/build/BUILD/atomic-openshift-git-0.766dbc4/_output/local/go/src/github.com/openshift/origin/vendor/github.com/spf13/cobra/command.go:760 +0x2c1
       github.com/openshift/origin/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xc4212f5900, 0xc42000e010, 0xc42000e020, 0xc4212f5900)
       	/builddir/build/BUILD/atomic-openshift-git-0.766dbc4/_output/local/go/src/github.com/openshift/origin/vendor/github.com/spf13/cobra/command.go:846 +0x30a
       github.com/openshift/origin/vendor/github.com/spf13/cobra.(*Command).Execute(0xc4212f5900, 0x2, 0xc4212f5900)
       	/builddir/build/BUILD/atomic-openshift-git-0.766dbc4/_output/local/go/src/github.com/openshift/origin/vendor/github.com/spf13/cobra/command.go:794 +0x2b
       main.main()
       	/builddir/build/BUILD/atomic-openshift-git-0.766dbc4/_output/local/go/src/github.com/openshift/origin/cmd/oc/oc.go:49 +0x365
       
[Note] Summary of diagnostics execution (version v3.11.0-0.10.0):
[Note] Errors seen: 1


Version-Release number of selected component (if applicable):
openshift v3.11.0-0.10.0


How reproducible:
Always

Steps to Reproduce:
1. run `oc adm diagnostics --master-config=/etc/origin/master/master-config.yaml`
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Junqi Zhao 2018-08-03 10:07:34 UTC
same issue with "oc adm diagnostics"
# oc adm diagnostics

[Note] Determining if client configuration exists for client/cluster diagnostics
Info:  Successfully read a client config file at '/root/.kube/config'

ERROR: [CED3001 from controller openshift/origin/pkg/oc/cli/admin/diagnostics/util/util.go]
       Encountered fatal error while building diagnostics: While building the diagnostics, a panic was encountered.
       This is a bug in diagnostics. Error and stack trace follow: 
       runtime error: invalid memory address or nil pointer dereference
       goroutine 1 [running]:
       runtime/debug.Stack(0xc4215ef5f0, 0x27a8ce0, 0x47321e0)
       	/opt/rh/go-toolset-7/root/usr/lib/go-toolset-7-golang/src/runtime/debug/stack.go:24 +0xa7
       github.com/openshift/origin/pkg/oc/cli/admin/diagnostics.DiagnosticsOptions.buildDiagnostics.func1(0xc4215efa58)
       	/builddir/build/BUILD/atomic-openshift-git-0.766dbc4/_output/local/go/src/github.com/openshift/origin/pkg/oc/cli/admin/diagnostics/diagnostics.go:309 +0x6e
       panic(0x27a8ce0, 0x47321e0)
       	/opt/rh/go-toolset-7/root/usr/lib/go-toolset-7-golang/src/runtime/panic.go:502 +0x229
       github.com/openshift/origin/pkg/oc/cli/admin/diagnostics.DiagnosticsOptions.buildRawConfig(0xc4213d6480, 0xc4213d64b0, 0x0, 0x2c2077f, 0x25, 0x2c13ccb, 0x21, 0x0, 0xc4213c6f00, 0x0, ...)
       	/builddir/build/BUILD/atomic-openshift-git-0.766dbc4/_output/local/go/src/github.com/openshift/origin/pkg/oc/cli/admin/diagnostics/config.go:19 +0x5c
       github.com/openshift/origin/pkg/oc/cli/admin/diagnostics.DiagnosticsOptions.buildDiagnostics(0xc4213d6480, 0xc4213d64b0, 0x0, 0x2c2077f, 0x25, 0x2c13ccb, 0x21, 0x0, 0xc4213c6f00, 0x0, ...)
       	/builddir/build/BUILD/atomic-openshift-git-0.766dbc4/_output/local/go/src/github.com/openshift/origin/pkg/oc/cli/admin/diagnostics/diagnostics.go:320 +0x122
       github.com/openshift/origin/pkg/oc/cli/admin/diagnostics.DiagnosticsOptions.RunDiagnostics(0xc4213d6480, 0xc4213d64b0, 0x0, 0x2c2077f, 0x25, 0x2c13ccb, 0x21, 0x0, 0xc4213c6f00, 0x0, ...)
       	/builddir/build/BUILD/atomic-openshift-git-0.766dbc4/_output/local/go/src/github.com/openshift/origin/pkg/oc/cli/admin/diagnostics/diagnostics.go:296 +0x60
       github.com/openshift/origin/pkg/oc/cli/admin/diagnostics/util.CommandRunFunc.func1(0xc4213cdb80, 0x49d61a8, 0x0, 0x0)
       	/builddir/build/BUILD/atomic-openshift-git-0.766dbc4/_output/local/go/src/github.com/openshift/origin/pkg/oc/cli/admin/diagnostics/util/util.go:84 +0xab
       github.com/openshift/origin/vendor/github.com/spf13/cobra.(*Command).execute(0xc4213cdb80, 0x49d61a8, 0x0, 0x0, 0xc4213cdb80, 0x49d61a8)
       	/builddir/build/BUILD/atomic-openshift-git-0.766dbc4/_output/local/go/src/github.com/openshift/origin/vendor/github.com/spf13/cobra/command.go:760 +0x2c1
       github.com/openshift/origin/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xc4212b9900, 0xc42000e010, 0xc42000e020, 0xc4212b9900)
       	/builddir/build/BUILD/atomic-openshift-git-0.766dbc4/_output/local/go/src/github.com/openshift/origin/vendor/github.com/spf13/cobra/command.go:846 +0x30a
       github.com/openshift/origin/vendor/github.com/spf13/cobra.(*Command).Execute(0xc4212b9900, 0x2, 0xc4212b9900)
       	/builddir/build/BUILD/atomic-openshift-git-0.766dbc4/_output/local/go/src/github.com/openshift/origin/vendor/github.com/spf13/cobra/command.go:794 +0x2b
       main.main()
       	/builddir/build/BUILD/atomic-openshift-git-0.766dbc4/_output/local/go/src/github.com/openshift/origin/cmd/oc/oc.go:49 +0x365
       
[Note] Summary of diagnostics execution (version v3.11.0-0.10.0):
[Note] Errors seen: 1

Comment 2 Juan Vallejo 2018-08-03 13:44:33 UTC
Moving to Luke

Comment 3 Maciej Szulik 2018-08-13 13:31:32 UTC
PR fixing the problem: https://github.com/openshift/origin/pull/20619

Comment 4 openshift-github-bot 2018-08-14 02:26:25 UTC
Commit pushed to master at https://github.com/openshift/origin

https://github.com/openshift/origin/commit/14e38d6e3eb033017dd337ccde82c5f912f4b2ac
Merge pull request #20619 from soltysh/bug1612031

Wire factory to DiagnosticsOptions

Comment 5 Junqi Zhao 2018-08-16 11:16:21 UTC
Issue is fixed
# openshift version
openshift v3.11.0-0.16.0

Comment 7 errata-xmlrpc 2018-10-11 07:23:29 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-2018:2652


Note You need to log in before you can comment on or make changes to this bug.