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

Hammer command for generating registration command does not validate if the activation key exists.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 6.18.0
    • API, Hammer
    • None
    • False
    • sat-endeavour
    • None
    • None
    • None
    • None

      Description of problem:

      Hammer command for generating registration command does not validate if the activation key exists.

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

      satellite-6.18.1-1.el9sat.noarch

      How reproducible:

      Always

      Steps to Reproduce:

      Execute the following command on the Satellite with a non-existent activation key. 

      hammer host-registration generate-command --activation-key <>

      Actual results:

      The registration command is generated even when the activation key is not present.

       

      hammer> host-registration generate-command --activation-key CAP-M-1
      set -o pipefail && curl --silent --show-error   'https://satellite.example.com/register?activation_keys=CAP-M-1' --header 'Authorization: Bearer' | bash

       

      This will result in 404 error when client is registered using the above command.

       

      Couldn't find activation key 'CAP-M-1' (HTTP error code 404: Not Found)

       

      Expected results:

      Ideally, there should be some kind of validation for value provided for the activation key. 

              Unassigned Unassigned
              rhn-support-msunil Manu Sunil
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: