Project

General

Profile

Actions

Bug #36051

closed

ForeignKeyViolation on ACS create when invalid --ssl-* argument is provided

Added by Quinn James about 1 year ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Alternate Content Sources
Target version:
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=2159963

Description of problem:
PG::ForeignKeyViolation: ERROR is shown when trying to create an ACS via hammer and providing non-existent index for --ssl-ca-cert-id, --ssl-client-cert-id, --ssl-client-key-id argument.

The same error is shown for Simplified ACS creation, where these args are not applicable.

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

How reproducible:
always

Steps to Reproduce:
1. Have a Satellite with some Prods and Capsules you could refer to in 2.
2. Try to create an ACS:
  1. hammer alternate-content-source create --alternate-content-source-type simplified --name "Test SACS" --smart-proxy-ids 1,2 --product-ids 1 --content-type yum --ssl-ca-cert-id 2
  2. hammer alternate-content-source create --alternate-content-source-type simplified --name "Test SACS" --smart-proxy-ids 1,2 --product-ids 1 --content-type yum --ssl-client-cert-id 2
  3. hammer alternate-content-source create --alternate-content-source-type simplified --name "Test SACS" --smart-proxy-ids 1,2 --product-ids 1 --content-type yum --ssl-client-key-id 2

Note: No content-credential with id=2 exists on the Satellite.

Actual results:
Could not create the Alternate Content Source.:
PG::ForeignKeyViolation: ERROR: insert or update on table "katello_alternate_content_sources" violates foreign key constraint "katello_alternate_content_sources_ssl_client_cert_id"
DETAIL: Key (ssl_client_cert_id)=(2) is not present in table "katello_content_credentials".

Expected results:
Some wrapping error message for Custom ACS, in case of Simplified ACS some validation and same message as we have for the other not-applicable args (Validation failed: Ssl ca cert must be blank)

Actions #1

Updated by Ian Ballou about 1 year ago

  • Subject changed from ForeignKeyViolation on ACS create when invalid --ssl-* argument is provided to ForeignKeyViolation on ACS create when invalid --ssl-* argument is provided
  • Category set to Repositories
  • Assignee set to Quinn James
  • Target version set to Katello 4.8.0
  • Triaged changed from No to Yes
Actions #2

Updated by The Foreman Bot about 1 year ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/10454 added
Actions #3

Updated by The Foreman Bot about 1 year ago

  • Fixed in Releases Katello 4.8.0 added
Actions #4

Updated by Anonymous about 1 year ago

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

Updated by Jeremy Lenz about 1 year ago

  • Category changed from Repositories to Alternate Content Sources
Actions

Also available in: Atom PDF