Host registration fails with the error: "Validation failed: Host has already been taken"

Solution Verified - Updated -

Environment

  • Red Hat Satellite 6.3.1
  • Red Hat Satellite 6.2.15

Issue

  • Host registration to Satellite fails with:
    "Validation Failed: Host has already been taken"

  • Alternatively, reregistrations may fail as well (with XXXX being a registration UUID):
    "Consumer with id XXXX-XXXX-XXXX-XXXXXX could not be found"

Resolution

  • This issue is resolved with release of Red Hat Satellite 6.3.3.

  • Should you run into this issue, please open a ticket with Red Hat Support.

Diagnostic Steps

Ensure that you are running into this bug by doing the following:

1) Enter the foreman-rake console

# foreman-rake console

2) Destroy the content & subscription facets, then the host itself using rails:

 irb(main):001:0> Host.find_by_name("rhel7.example.com").content_facet.destroy!
 irb(main):002:0> Host.find_by_name("rhel7.example.com").subscription_facet.destroy!
 irb(main):003:0> Host.find_by_name("rhel7.example.com").destroy!

3) Try once again to register the host, and you should see the message:

Validation Failed: Host has already been taken

4) Subsequent attempts to register (with force) will yield the message:

Consumer with id  XXXX-XXXX-XXXX-XXXXXX could not be found

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments