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

Disabling token_duration fails to put the host out of build mode when registering via external capsules

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • 6.14.4.1, 6.15.3
    • Registration
    • 3
    • False
    • Hide

      None

      Show
      None
    • False
    • 0
    • Important
    • To Do
    • None

      Description of problem:

      It is supported to disable token_duration ( or set it to 0 ) and expect that the provisioning from satellite\capsule would continue to work properly. Recently we observed that the same is not applicable in case of Global Registration. 

       

      With token_duration disabled, The curl command to register a system via external capsules works fine and shows no errors at all but at the satellite side, the host remains in build mode i.e. Pending Build. 

       

      How reproducible:

      Always

       

      Is this issue a regression from an earlier version:

      NA

       

      Steps to Reproduce:

      1. Have a Sat 6.14 or 6.15 installed and configured with some content and activation keys

      2. Have a Capsule connected to the Satellite and have some contents synced on it

      3. Disable token_duration setting in satellite i.e. 

       

      hammer settings set --name token_duration --value 0

       

       

      4. Generate a curl command selecting the external capsule as the registration source and then execute the same on a RHEL client system

       

      5. Monitor the curl command execution on client , proxy.log on capsule, and production.log on the satellite{}

       

      Actual behavior:

       

      • No errors with curl command execution and as per the same, the system is registered successfully 

       

      The system has been registered with ID: b47ce59f-1e1b-4131-be92-58270296547a
      The registered system name is: rhel-client.example.com
      # Running [rhel-client.example.com] host initial configuration
      /usr/sbin/restorecon
      Refreshing subscription data
      All local data refreshed
      Host [rhel-client.example.com] successfully configured.
      Successfully updated the system facts.

       

      • In proxy.log of the capsule: [ TZ UTC ]

       

      2024-09-05T13:21:44 a7de2ce6 [I] Started GET /unattended/built 
      2024-09-05T13:21:44 a7de2ce6 [E] Failed to proxy /built for {"kind"=>"built"}: Error retrieving unattended/built for {"url"=>"http://mycapsule.example.com:8000"} from mysatellite.example.com: Net::HTTPMethodNotAllowed: 405 
      2024-09-05T13:21:44 a7de2ce6 [W] Error details for Failed to proxy /built for {"kind"=>"built"}: Error retrieving unattended/built for {"url"=>"http://mycapsule.example.com:8000"} from mysatellite.example.com: Net::HTTPMethodNotAllowed: 405 : <Proxy::Error::HttpError>: Error retrieving unattended/built for {"url"=>"http://mycapsule.example.com:8000"} from mysatellite.example.com: Net::HTTPMethodNotAllowed: 405 
      /usr/share/foreman-proxy/modules/templates/proxy_request.rb:51:in `call_template'
      /usr/share/foreman-proxy/modules/templates/proxy_request.rb:12:in `get'
      /usr/share/foreman-proxy/modules/templates/template_proxy_request.rb:6:in `get'
      /usr/share/foreman-proxy/modules/templates/templates_unattended_api.rb:23:in `block (2 levels) in <class:TemplatesUnattendedApi>'
      /usr/share/foreman-proxy/lib/proxy/helpers.rb:19:in `log_halt'
      /usr/share/foreman-proxy/modules/templates/templates_unattended_api.rb:22:in `block in <class:TemplatesUnattendedApi>'

       

      • production.log of satellite: [ TZ : IST ]

       

      24-09-05T18:51:44 [I|app|99a94507] Started GET "/unattended/built?url=http%3A%2F%2Fmycapsule.example.com%3A8000" for 192.168.XXX.XX at 2024-09-05 18:51:44 +0530
      2024-09-05T18:51:44 [I|app|99a94507] Processing by UnattendedController#built as TEXT
      2024-09-05T18:51:44 [I|app|99a94507]   Parameters: {"url"=>"http://mycapsule.example.com:8000", "unattended"=>{}}
      2024-09-05T18:51:44 [I|app|99a94507] Completed 405 Method Not Allowed in 15ms (ActiveRecord: 4.2ms | Allocations: 2675)

       

      result is the the host remains in build mode in the satellite 

       

      Expected behavior:

      • The registration should fail in a situation like this but the curl command shows no errors
      • The token situation needs to be fixed 
      • If it is expected behavior, then it needs to be documented as a prerequisite of global registration via external capsules. 

       

      Business Impact / Additional info:

       

      We cannot reproduce the issue if registering directly with a satellite. It only happens when it's done via external capsule or an LB.

            Unassigned Unassigned
            rhn-support-saydas Sayan Das
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: