Project

General

Profile

Actions

Bug #24559

closed

Hostgroups should use AssociationExistsValidator for content_source

Added by Andrew Kofink over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
Difficulty:
trivial
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

$ hammer hostgroup create --name potato --content-source-id 92 # does not exist
Could not create the hostgroup:
  PG::ForeignKeyViolation: ERROR:  insert or update on table "hostgroups" violates foreign key constraint "hostgroups_content_source_id_fk" 
  DETAIL:  Key (content_source_id)=(92) is not present in table "smart_proxies".
  : INSERT INTO "hostgroups" ("name", "created_at", "updated_at", "title", "content_source_id", "lookup_value_matcher") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "id" 

This isn't specific to hammer.


Related issues 2 (0 open2 closed)

Related to Katello - Bug #21689: Specifying wrong foreign key id for object (such as host or hostgroup) via hammer/api throws SQL errorClosedAndrew Kofink11/16/2017Actions
Related to Katello - Bug #24528: Content Source resource_name is smart_proxy, which is confusing to usersClosedAndrew KofinkActions
Actions #1

Updated by Andrew Kofink over 5 years ago

  • Related to Bug #21689: Specifying wrong foreign key id for object (such as host or hostgroup) via hammer/api throws SQL error added
Actions #2

Updated by Andrew Kofink over 5 years ago

  • Related to Bug #24528: Content Source resource_name is smart_proxy, which is confusing to users added
Actions #3

Updated by The Foreman Bot over 5 years ago

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

Updated by Justin Sherrill over 5 years ago

  • Triaged changed from No to Yes
Actions #5

Updated by Andrew Kofink over 5 years ago

  • Status changed from Ready For Testing to Closed
Actions

Also available in: Atom PDF