Project

General

Profile

Feature #31498

b'Registration fails when duplicate activation key names given to --activationkey option'

Added by Jonathon Turel 11 months ago. Updated 10 months ago.

Status:
Closed
Priority:
Normal
Category:
Hosts
Target version:
Difficulty:
Triaged:
Yes
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

b'Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1701541 \n\n*Description of problem:*\n\nAs a result of many individual parts of automation and inheritance related to server provisioning, we might end up with duplicate activation-keys. \n\nThis apperently results in an SQL-error on the server trying to register:\n\n[root@hostname ]# subscription-manager register --name="hostname.example.com" --org=\'Example\' --activationkey=\'act-auto-attach-vdc,act-Verification-cv-soe-7Server,act-Verification-cv-soe-7Server\'\nHTTP error (500 - Internal Server Error): PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "katello_subscription_facet_activation_keys_sa_ak_id"\nDETAIL: Key (subscription_facet_id, activation_key_id)=(3530, 24) already exists.\n: INSERT INTO "katello_subscription_facet_activation_keys" ("subscription_facet_id", "activation_key_id") VALUES ($1, $2) RETURNING "id"\n\n\nIn order to avoid encountering the error described above, the customer would like to have an enhanced version of subscription-manager, which is capable of identifying multiple activation key values specified using the --activationkey command-line option, and automatically supressing the duplicate values (if any).\n\n\nThe customer would test to confirm that the requirement is successfully implemented by executing a \'subscription-manager register\' command that has duplicate activation key values specified using the --activationkey command-line option. For example:\n~~\n[root@hostname ]# subscription-manager register --name="hostname.example.com" --org=\'Example\' --activationkey=\'act-auto-attach-vdc,act-Verification-cv-soe-7Server,act-Verification-cv-soe-7Server\'\n~~\n\n\n*How reproducible:*\n\n\n*Steps to Reproduce:*\n1. Perform a complete a basic kickstart-based installation using satellite\n2. Try to register the newly installed host using subscription-manager with a valid activation-key mentioned 2 times (or more).\n\n\n*Actual results:*\n\nThe following error message is received, and the host registration fails:\n~~~\nHTTP error (500 - Internal Server Error): PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "katello_subscription_facet_activation_keys_sa_ak_id"\nDETAIL: Key (subscription_facet_id, activation_key_id)=(3530, 24) already exists.\n: INSERT INTO "katello_subscription_facet_activation_keys" ("subscription_facet_id", "activation_key_id") VALUES ($1, $2) RETURNING "id"\n~~~\n\n\n*Expected results:*\n\nsubscription-manager would be able to intelligently identify that there is a duplicate activation key specified, and suppress it, resulting in a successful system registration.'

Associated revisions

Revision 7f1e3952 (diff)
Added by Jonathon Turel 11 months ago

Fixes #31498 - de-duplicate activation key names at registration time

History

#1 Updated by The Foreman Bot 11 months ago

  • Assignee set to Jonathon Turel
  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/9076 added

#2 Updated by The Foreman Bot 11 months ago

  • Fixed in Releases Katello 4.0.0 added

#3 Updated by Jonathon Turel 11 months ago

  • Status changed from Ready For Testing to Closed

#4 Updated by Samir Jha 10 months ago

  • Triaged changed from No to Yes
  • Target version set to Katello 4.0.0
  • Subject changed from b'Registration fails when duplicate activation key names given to --activationkey option' to b'Registration fails when duplicate activation key names given to --activationkey option'

Also available in: Atom PDF