Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1612031 - Encountered fatal error while building diagnostics
Encountered fatal error while building diagnostics
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Command Line Interface (Show other bugs)
3.11.0
Unspecified Unspecified
medium Severity medium
: ---
: 3.11.0
Assigned To: Maciej Szulik
Junqi Zhao
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2018-08-03 06:01 EDT by Junqi Zhao
Modified: 2018-10-11 03:23 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-10-11 03:23:29 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:2652 None None None 2018-10-11 03:23 EDT

  None (edit)
Description Junqi Zhao 2018-08-03 06:01:24 EDT
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 06:07:34 EDT
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 09:44:33 EDT
Moving to Luke
Comment 3 Maciej Szulik 2018-08-13 09:31:32 EDT
PR fixing the problem: https://github.com/openshift/origin/pull/20619
Comment 4 openshift-github-bot 2018-08-13 22:26:25 EDT
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 07:16:21 EDT
Issue is fixed
# openshift version
openshift v3.11.0-0.16.0
Comment 7 errata-xmlrpc 2018-10-11 03:23:29 EDT
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.