Bug 1701541
| Summary: | Registration fails when duplicate activation key names given to --activationkey option | ||
|---|---|---|---|
| Product: | Red Hat Satellite | Reporter: | momran |
| Component: | Hosts - Content | Assignee: | Jonathon Turel <jturel> |
| Status: | CLOSED ERRATA | QA Contact: | Stephen Wadeley <swadeley> |
| Severity: | low | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 6.5.0 | CC: | jturel, redakkan, wpoteat |
| Target Milestone: | 6.10.0 | Keywords: | FutureFeature, Reopened |
| Target Release: | Unused | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Enhancement | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2021-11-16 14:08:28 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
Red Hat Enterprise Linux 7 shipped it's final minor release on September 29th, 2020. 7.9 was the last minor releases scheduled for RHEL 7. From intial triage it does not appear the remaining Bugzillas meet the inclusion criteria for Maintenance Phase 2 and will now be closed. From the RHEL life cycle page: https://access.redhat.com/support/policy/updates/errata#Maintenance_Support_2_Phase "During Maintenance Support 2 Phase for Red Hat Enterprise Linux version 7,Red Hat defined Critical and Important impact Security Advisories (RHSAs) and selected (at Red Hat discretion) Urgent Priority Bug Fix Advisories (RHBAs) may be released as they become available." If this BZ was closed in error and meets the above criteria please re-open it flag for 7.9.z, provide suitable business and technical justifications, and follow the process for Accelerated Fixes: https://source.redhat.com/groups/public/pnt-cxno/pnt_customer_experience_and_operations_wiki/support_delivery_accelerated_fix_release_handbook Feature Requests can re-opened and moved to RHEL 8 if the desired functionality is not already present in the product. Please reach out to the applicable Product Experience Engineer[0] if you have any questions or concerns. [0] https://bugzilla.redhat.com/page.cgi?id=agile_component_mapping.html&product=Red+Hat+Enterprise+Linux+7 Created redmine issue https://projects.theforeman.org/issues/31498 from this bug Moving this bug to POST for triage into Satellite since the upstream issue https://projects.theforeman.org/issues/31498 has been resolved. *** Bug 1701543 has been marked as a duplicate of this bug. *** Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Moderate: Satellite 6.10 Release), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2021:4702 |
Description of problem: As a result of many individual parts of automation and inheritance related to server provisioning, we might end up with duplicate activation-keys. This apperently results in an SQL-error on the server trying to register: [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' HTTP error (500 - Internal Server Error): PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "katello_subscription_facet_activation_keys_sa_ak_id" DETAIL: Key (subscription_facet_id, activation_key_id)=(3530, 24) already exists. : INSERT INTO "katello_subscription_facet_activation_keys" ("subscription_facet_id", "activation_key_id") VALUES ($1, $2) RETURNING "id" In 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). The 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: ~~~ [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' ~~~ How reproducible: Steps to Reproduce: 1. Perform a complete a basic kickstart-based installation using satellite 2. Try to register the newly installed host using subscription-manager with a valid activation-key mentioned 2 times (or more). Actual results: The following error message is received, and the host registration fails: ~~~ HTTP error (500 - Internal Server Error): PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "katello_subscription_facet_activation_keys_sa_ak_id" DETAIL: Key (subscription_facet_id, activation_key_id)=(3530, 24) already exists. : INSERT INTO "katello_subscription_facet_activation_keys" ("subscription_facet_id", "activation_key_id") VALUES ($1, $2) RETURNING "id" ~~~ Expected results: subscription-manager would be able to intelligently identify that there is a duplicate activation key specified, and suppress it, resulting in a successful system registration.