Uploaded image for project: 'Red Hat Advanced Cluster Management'
  1. Red Hat Advanced Cluster Management
  2. ACM-7264

Policies with no status causes insights client crash

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Normal Normal
    • None
    • ACM 2.9.0
    • GRC
    • None
    • 1
    • False
    • Hide

      None

      Show
      None
    • False
    • GRC Sprint 2023-15, GRC Sprint 2023-16
    • Moderate
    • No

      Description of problem:

      I'm having problems with gatekeeper policies – no status is being returned.  In this state – which I realize is another problem – the insights client is crashing.  I feel there are some error checks likely missing causing the crash.

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

      I am using build 2.9.0-SNAPSHOT-2023-08-21-13-37-13

      How reproducible:

      I have not tried to recreate this.  I am not sure why/how I got my gatekeeper policies into a state where they do not provide any status in the policies. 

      Steps to Reproduce: 

      1. Note: this is a guess: Deploy gatekeeper policy set: https://github.com/gparvin/grc-demo/tree/main/2.7/generator/gatekeeper-container
      2. After it's working remove the policyset by fully deleting the policyset rollout
      3. Edit the project so it will use the 2.8 gatekeeper feature to generate the constraints in the policy instead of in gatekeeper config policies.  Redeploy
      4.  

      Actual results:

      My gatekeeper policies are not returning status. The constraints do not exist.  The insights client pod is crashing now

      Expected results:

      Expected no crashes of insights client pod

      Additional info:

      Log details:

       
      I0831 12:37:30.387773       1 reportretriever.go:186] Retrieve CCX Report for cluster parvin2
      I0831 12:37:30.387777       1 reportretriever.go:227] Creating Request for cluster parvin2 (77e7a677-7d8e-48d1-8d7d-93a3c022ab03) using Insights URL https://console.redhat.com/api/insights-results-aggregator/v1/clusters/reports
      W0831 12:37:30.503829       1 reportretriever.go:264] Response Code error for cluster parvin2 (77e7a677-7d8e-48d1-8d7d-93a3c022ab03), response code 400
      I0831 12:37:30.503849       1 reportretriever.go:271] Check OCM Console - cluster should be registered in CCX server 77e7a677-7d8e-48d1-8d7d-93a3c022ab03
      W0831 12:37:30.503854       1 reportretriever.go:213] Error getting good Response for cluster parvin2 (77e7a677-7d8e-48d1-8d7d-93a3c022ab03), No Success HTTP Response code 
      panic: interface conversion: interface {} is nil, not string
      goroutine 77 [running]:
      github.com/stolostron/insights-client/pkg/processor.getGovernanceResults({0x16af460, 0xc00034b438}, {{0xc000046b40?, 0xc000046b40?}, {0xc000412060?, 0xc000412060?}})
          github.com/stolostron/insights-client/pkg/processor/reportprocessor.go:218 +0x1474
      github.com/stolostron/insights-client/pkg/processor.(*Processor).createUpdatePolicyReports(0x0?, 0x0?, {0x16af460, 0xc00034b438})
          github.com/stolostron/insights-client/pkg/processor/reportprocessor.go:137 +0x375
      github.com/stolostron/insights-client/pkg/processor.(*Processor).ProcessPolicyReports(0x0?, 0x0?, {0x16af460, 0xc00034b438})
          github.com/stolostron/insights-client/pkg/processor/reportprocessor.go:477 +0x2d
      created by main.main
          github.com/stolostron/insights-client/main.go:74 +0x63e
      

       

              rh-ee-dhaiduce Dale Haiducek
              gparvin-redhat Gus Parvin
              Derek Ho Derek Ho
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: