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

[On-demand/Periodic Gathering]Gathering panics when the corresponding DataGather doesn't exist.

XMLWordPrintable

    • Quality / Stability / Reliability
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Description of problem:

          When we trigger a periodic/on-demand gathering, and at the same time, if we remove the corresponding DataGather, the gathering will panic when the gathering pod tries to update IO conditions.

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

          

      How reproducible:

          1. Trigger the gathering many times and delete the DataGather at the same time.
      
      

      Steps to Reproduce:

          1. Write a script to trigger the gathering many times and delete the DataGather at the same time.     
          2. Monitor the gathering pod status and view its logs.
          

      Actual results:

       2. The gathering pod exits with the Error status, and its logs printed the following error

      I1027 07:09:23.860883       1 diskrecorder.go:51] Wrote 183 records to disk in 11ms
      I1027 07:09:23.860941       1 request.go:1178] Error in request: resource name may not be empty
      E1027 07:09:23.860963       1 gather_commands.go:249] resource name may not be empty
      I1027 07:09:23.872747       1 requests.go:46] Uploading application/vnd.redhat.openshift.periodic to https://console.redhat.com/api/ingress/v1/upload
      I1027 07:09:24.064832       1 requests.go:87] Successfully reported id=2025-10-27T07:09:23Z x-rh-insights-request-id=f8d4db9a390c4171af5b031e9beedb93, wrote=105340
      I1027 07:09:24.064944       1 insightsuploader.go:226] Uploaded report successfully in 203.971478ms
      I1027 07:09:24.064965       1 gather_commands.go:268] Insights archive successfully uploaded with InsightsRequestID: f8d4db9a390c4171af5b031e9beedb93
      I1027 07:09:24.064986       1 request.go:1178] Error in request: resource name may not be empty
      E1027 07:09:24.065010       1 gather_commands.go:273] resource name may not be empty
      I1027 07:09:24.069045       1 gather_commands.go:410] Initial delay when checking processing status: 1m0s
      I1027 07:10:24.075892       1 requests.go:294] Making HTTP GET request at: https://console.redhat.com/api/insights-results-aggregator/v2/cluster/b4df1e47-e46d-40da-986a-04bd6df867d1/request/f8d4db9a390c4171af5b031e9beedb93/status
      I1027 07:10:33.948521       1 request.go:1178] Error in request: resource name may not be empty
      E1027 07:10:33.948557       1 datagather_status.go:164] Failed to update DataGather resource  conditions: resource name may not be empty
      E1027 07:10:33.948564       1 gather_commands.go:364] Failed to update DataGather resource  state: resource name may not be empty
      panic: runtime error: invalid memory address or nil pointer dereference
      [signal SIGSEGV: segmentation violation code=0x1 addr=0x138 pc=0x28ec7d5]
      
      goroutine 1 [running]:
      github.com/openshift/insights-operator/pkg/controller/status.UpdateDataGatherConditions({0x39698c8, 0xc0003ec2a0}, {0x39348d8, 0xc0002dfcc0}, 0x0, {0xc000fcb330, 0x2, 0x5875360?})
      	/go/src/github.com/openshift/insights-operator/pkg/controller/status/datagather_status.go:203 +0x55
      github.com/openshift/insights-operator/pkg/controller.updateDataGatherStatus({0x39698c8, 0xc0003ec2a0}, {0x39348d8, 0xc0002dfcc0}, 0xc001345860, 0xc000fcb760, {0x341908c, 0x12})
      	/go/src/github.com/openshift/insights-operator/pkg/controller/gather_commands.go:367 +0x25c
      github.com/openshift/insights-operator/pkg/controller.(*GatherJob).GatherAndUpload(0xc0005b4dc0, 0xc000788488, 0xc0007886c8)
      	/go/src/github.com/openshift/insights-operator/pkg/controller/gather_commands.go:292 +0x1dfd
      github.com/openshift/insights-operator/pkg/cmd/start.NewGatherAndUpload.runGatherAndUpload.func1(0xc000179200?, {0x33fcecf?, 0x4?, 0x33fced3?})
      	/go/src/github.com/openshift/insights-operator/pkg/cmd/start/start.go:196 +0x6d
      github.com/spf13/cobra.(*Command).execute(0xc0006d6908, {0xc000703ca0, 0x2, 0x2})
      	/go/src/github.com/openshift/insights-operator/vendor/github.com/spf13/cobra/command.go:989 +0xabb
      github.com/spf13/cobra.(*Command).ExecuteC(0xc00095f508)
      	/go/src/github.com/openshift/insights-operator/vendor/github.com/spf13/cobra/command.go:1117 +0x44f
      github.com/spf13/cobra.(*Command).Execute(...)
      	/go/src/github.com/openshift/insights-operator/vendor/github.com/spf13/cobra/command.go:1041
      main.main()
      	/go/src/github.com/openshift/insights-operator/cmd/insights-operator/main.go:31 +0x10f  

      Expected results:

          2. The gathering pod doesn't exist with the Error status ,and there is no panic error inside the pod logs.

      Additional info:

      This bug is suggested to be tested via unit tests.

          

              opokorny@redhat.com Ondrej Pokorny
              rh-ee-bazhou Baiyang Zhou
              None
              None
              Baiyang Zhou Baiyang Zhou
              None
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: