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

Enable debug mode for Global Registration command execution

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • 6.17.z, 6.18.z
    • Registration
    • False
    • Proton Refinement Backlog
    • sat-proton
    • None
    • None
    • None
    • None

      Global Registration has gained a good popularity among our end-users. But when they run into certain problems during the execution of the curl command, or the registration fails at the end without telling why, It takes quite a good time and effort to instruct the customer about how to debug the script execution and then fix the issue. 

       

      What i usually do is , If the curl command is 

      set -o pipefail && curl --silent --show-error  --insecure 'https://<satellite-fqdn>/register?activation_keys=Capsule&download_utility=curl&force=true&location_id=2&organization_id=1&update_packages=false' --header 'Authorization: Bearer $token' | bash

       

      I suggest the CU to do this

       

      set -o pipefail && curl --silent --show-error  --insecure 'https://<satellite-fqdn>/register?activation_keys=Capsule&download_utility=curl&force=true&location_id=2&organization_id=1&update_packages=false' --header 'Authorization: Bearer $token' | sed 's/bash/bash -x/g' | bash -x

       

      which allows the main script as well as the function inside to be executed in bash debug mode. 

      But most of the time, a non-technical CU struggles to follow this approach, especially when they have to regenerate the command again and again for some reason. 

       

      The idea is to be able to DEBUG every command execution ( whether it's from the parent script or any function inside of it ).

       

      It would be great to have something like the following:

      • A checkbox called Enable Debug in the Register Host page of WebUI
      • A hammer option called --debug 1/0 where default value is 0 = disabled

      and either of these options, if enabled, should 

      • Add an option called "verbose=true" or "debug=true" in the curl command
      • The templates need to be designed in a way that, when this is passed, every bash or sh execution is executed with `-x`

       

      This would help support the team as well as customers, to help debug the Global Registration execution if any issue happens during normal execution . 

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

                Created:
                Updated: