Project

General

Profile

Actions

Feature #31498

closed

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

Added by Jonathon Turel about 4 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Normal
Category:
Hosts
Target version:
Difficulty:
Triaged:
Yes
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.'

Actions #1

Updated by The Foreman Bot about 4 years ago

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

Updated by The Foreman Bot about 4 years ago

  • Fixed in Releases Katello 4.0.0 added
Actions #3

Updated by Jonathon Turel about 4 years ago

  • Status changed from Ready For Testing to Closed
Actions #4

Updated by Samir Jha about 4 years ago

  • 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'
  • Target version set to Katello 4.0.0
  • Triaged changed from No to Yes
Actions

Also available in: Atom PDF