Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-60281

panic with `oc describe templateinstance`

XMLWordPrintable

    • Quality / Stability / Reliability
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • x86_64
    • None
    • None
    • None
    • Done
    • Bug Fix
    • Hide
      * Before this update, panic occurred during `oc describe templateinstance` due to nil pointer dereference in `TemplateInstanceDescriber`. With this release, nil pointer dereference in the `oc describe templateinstance` command was fixed by checking for nil secret before describing parameters. [link:https://issues.redhat.com/browse/OCPBUGS-60281[*OCPBUGS-60281*])
      Show
      * Before this update, panic occurred during `oc describe templateinstance` due to nil pointer dereference in `TemplateInstanceDescriber`. With this release, nil pointer dereference in the `oc describe templateinstance` command was fixed by checking for nil secret before describing parameters. [link: https://issues.redhat.com/browse/OCPBUGS-60281 [* OCPBUGS-60281 *])
    • None
    • None
    • None
    • None

      Description of problem:

          oc panics

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

      Client Version: 4.19.7
      Kustomize Version: v5.5.0
      Server Version: 4.19.0-0.nightly-2025-08-07-091836
      Kubernetes Version: v1.32.7    

      How reproducible:

          always

      Steps to Reproduce:

          1.oc describe templateinstance my-centos-vm

      Actual results:

          panic: runtime error: invalid memory address or nil pointer dereference[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x3c3d5e2]
      goroutine 1 [running]:github.com/openshift/oc/pkg/helpers/describe.(*TemplateInstanceDescriber).DescribeTemplateInstance.func1(0xc000ba8000)	/go/src/github.com/openshift/oc/pkg/helpers/describe/describer.go:1351 +0x202github.com/openshift/oc/pkg/helpers/describe.tabbedString(0xc00123f810)	/go/src/github.com/openshift/oc/pkg/helpers/describe/helpers.go:37 +0x74github.com/openshift/oc/pkg/helpers/describe.(*TemplateInstanceDescriber).DescribeTemplateInstance(0x0?, 0x0?, {0xc0012bc10a?, 0x0?}, {0x0?, 0x0?})	/go/src/github.com/openshift/oc/pkg/helpers/describe/describer.go:1341 +0x3dgithub.com/openshift/oc/pkg/helpers/describe.(*TemplateInstanceDescriber).Describe(0xc00105c150, {0xc0012bc10a, 0x3}, {0x7ffef61890f8, 0xc}, {0xab?, 0x7f2e541b08d8?})	/go/src/github.com/openshift/oc/pkg/helpers/describe/describer.go:1336 +0xc6k8s.io/kubectl/pkg/cmd/describe.(*DescribeOptions).Run(0xc00119d540)	/go/src/github.com/openshift/oc/vendor/k8s.io/kubectl/pkg/cmd/describe/describe.go:209 +0x492k8s.io/kubectl/pkg/cmd/describe.NewCmdDescribe.func1(0xc000e8a008?, {0xc000a10360?, 0x2?, 0x2?})	/go/src/github.com/openshift/oc/vendor/k8s.io/kubectl/pkg/cmd/describe/describe.go:158 +0x69github.com/spf13/cobra.(*Command).execute(0xc000e8a008, {0xc000a10300, 0x2, 0x2})	/go/src/github.com/openshift/oc/vendor/github.com/spf13/cobra/command.go:989 +0xa91github.com/spf13/cobra.(*Command).ExecuteC(0xc000ce0308)	/go/src/github.com/openshift/oc/vendor/github.com/spf13/cobra/command.go:1117 +0x3ffgithub.com/spf13/cobra.(*Command).Execute(...)	/go/src/github.com/openshift/oc/vendor/github.com/spf13/cobra/command.go:1041k8s.io/component-base/cli.run(0xc000ce0308)	/go/src/github.com/openshift/oc/vendor/k8s.io/component-base/cli/run.go:143 +0x245k8s.io/component-base/cli.RunNoErrOutput(...)	/go/src/github.com/openshift/oc/vendor/k8s.io/component-base/cli/run.go:82main.main()	/go/src/github.com/openshift/oc/cmd/oc/oc.go:51 +0x1b7

      Expected results:

          no panic

      Additional info:

          I created a TemplateInstance that referenced one of the built-in templates that is shipped with openshift virt. Then I tried to use `oc describe` on it and saw this.

              aos-workloads-staff Workloads Team Bot Account
              mhrivnak@redhat.com Michael Hrivnak
              None
              None
              Ying Zhou Ying Zhou
              None
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: