Uploaded image for project: 'Satellite'
  1. Satellite
  2. SAT-30614

When there is slow network connectivity sometimes rh_cloud logs a undefined code

    • None
    • None
    • None
    • Manual

      Description of Problem

      How reproducible

      Intermittent

      Steps to Reproduce

      1. Setup a proxy and have it slow connections down
      2. Run insights-client on the host and watch it come back with the error

      Actual Behavior

      We don't get a proper http response code back so we just log

      2024-02-02T13:24:40 [I|app|264e38c3] Parameters:{"module"=>"insights-core", "path"=>"platform/module-update-router/v1/channel"}2024-02-02T13:24:41 [W|app|264e38c3] Action failed
      2024-02-02T13:24:41 [I|app|264e38c3] Backtrace for 'Action failed' error (NoMethodError): undefined method `code' for nil:NilClass 

      Expected Behavior

      We can alter the error to return the full http response instead, so support has it for debugging. This will show if we got an actual timeout and what the error was compared to just a generic traceback error.

            [SAT-30614] When there is slow network connectivity sometimes rh_cloud logs a undefined code

            VERIFIED

            on Satellite 6.17.0 snap 6

            When there is an RHcloud client registered to a host, and we run insights-client on the host, when there is a slow connection, which is simulated by:

            iptables -I OUTPUT -d api.access.redhat.com -j DROP

            iptables -I OUTPUT -d cert-api.access.redhat.com -j DROP

             

            we don't observe 

             
            2025-03-31T08:16:07 [I|app|1db8f2cd] Backtrace for 'Action failed' error (NoMethodError):undefined method `code' for nil:NilClass
             
            but we observe just 504 error, which is the expected behaviour.
             2025-03-31T08:19:30 [I|app|28de65ef] Completed 504 Gateway Timeout in 60032ms (Views: 0.3ms| ActiveRecord: 4.6ms | Allocations: 14033)
             
             
            Versions this issue was tested on:

            satellite-6.17.0-2.el9sat.noarch
            foreman-3.14.0.1-1.el9sat.noarch
            katello-4.16.0-1.el9sat.noarch
            Red Hat Enterprise Linux release 9.5 (Plow)

            Ladislav Vasina added a comment - VERIFIED on Satellite 6.17.0 snap 6 When there is an RHcloud client registered to a host, and we run insights-client on the host, when there is a slow connection, which is simulated by: iptables -I OUTPUT -d api.access.redhat.com -j DROP iptables -I OUTPUT -d cert-api.access.redhat.com -j DROP   we don't observe    2025-03-31T08:16:07 [I|app|1db8f2cd] Backtrace for 'Action failed' error (NoMethodError): undefined method `code' for nil:NilClass   but we observe just 504 error, which is the expected behaviour.   2025-03-31T08:19:30 [I|app|28de65ef] Completed 504 Gateway Timeout in 60032ms (Views: 0.3ms | ActiveRecord: 4.6ms | Allocations: 14033)     Versions this issue was tested on: satellite-6.17.0-2.el9sat.noarch foreman-3.14.0.1-1.el9sat.noarch katello-4.16.0-1.el9sat.noarch Red Hat Enterprise Linux release 9.5 (Plow)

              rhn-support-chrobert Chris Roberts
              rhn-support-chrobert Chris Roberts
              Ladislav Vasina Ladislav Vasina
              Ian Ballou Ian Ballou
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: