Bug 1382166

Summary: Registration doesn't require UUID while deleting content host does
Product: Red Hat Satellite Reporter: Taft Sanders <tasander>
Component: RegistrationAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED DUPLICATE QA Contact: Katello QA List <katello-qa-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.2.2CC: bbuckingham, cduryee, dmoessne, tasander
Target Milestone: Unspecified   
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-02 19:46:02 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:

Description Taft Sanders 2016-10-05 23:15:42 UTC
Description of problem:
When registering to a Satellite from a host, the Satellite will accept a registration if the UUID of the system is not passed. When removing the host from the Satellite webui that was registered not passing a UUID errors complaining about a host not having a UUID.

Version-Release number of selected component (if applicable):
Satellite 6.2.2

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:
Satellite delete host task fails due to missing UUID.

Expected results:
Host should delete reguardless of missing information based on host id

Additional info:
foreman=# \d katello_systems
                                        Table "public.katello_systems"
     Column      |            Type             |                          Modifiers                           
-----------------+-----------------------------+--------------------------------------------------------------
 id              | integer                     | not null default nextval('katello_systems_id_seq'::regclass)
 uuid            | character varying(255)      | **(THIS SHOULD BE NOT NULL)**
 name            | character varying(255)      | 
 location        | character varying(255)      | 
 environment_id  | integer                     | 
 created_at      | timestamp without time zone | not null
 updated_at      | timestamp without time zone | not null
 type            | character varying(255)      | default 'Katello::System'::character varying
 content_view_id | integer                     | 
 host_id         | integer                     | 
Indexes:
    "katello_systems_pkey" PRIMARY KEY, btree (id)
    "index_katello_systems_on_host_id" btree (host_id)
    "index_systems_on_content_view_id" btree (content_view_id)
    "index_systems_on_environment_id" btree (environment_id)
Foreign-key constraints:
    "katello_systems_host_id" FOREIGN KEY (host_id) REFERENCES hosts(id)
    "systems_content_view_id_fk" FOREIGN KEY (content_view_id) REFERENCES katello_content_views(id)
    "systems_environment_id_fk" FOREIGN KEY (environment_id) REFERENCES katello_environments(id)
Referenced by:
    TABLE "katello_system_repositories" CONSTRAINT "katello_system_repositories_system_id_fk" FOREIGN KEY (system_id) REFERENCES katello_systems(id)
    TABLE "katello_system_activation_keys" CONSTRAINT "system_activation_keys_system_id_fk" FOREIGN KEY (system_id) REFERENCES katello_systems(id)

Comment 7 Chris Duryee 2016-11-02 19:46:02 UTC
This is fixed by the same patch that 1330072 fixes (removal of legacy system code and tables).

Marking as duplicate since it's the same root cause.

*** This bug has been marked as a duplicate of bug 1330072 ***