Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1354555 - unable to clear host from Satellite via rake tasks after host is deleted in candlepin
Summary: unable to clear host from Satellite via rake tasks after host is deleted in c...
Keywords:
Status: CLOSED DUPLICATE of bug 1357866
Alias: None
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Hosts - Content
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified vote
Target Milestone: Unspecified
Assignee: Justin Sherrill
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-07-11 14:45 UTC by Chris Duryee
Modified: 2016-12-01 23:02 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-12-01 23:02:12 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Foreman Issue Tracker 15908 None None None 2016-07-29 15:08:33 UTC

Description Chris Duryee 2016-07-11 14:45:28 UTC
Description of problem:

If you delete a candlepin consumer without deleting the katello record, the katello record does not disappear after running "foreman-rake katello:clean_backend_objects".

This bug is a less severe bug related to https://bugzilla.redhat.com/show_bug.cgi?id=1271500.

QE note: in the wild, this bug would normally occur if systems were being modified while a satellite was rebooted (see original bz). However, there are some "fake" steps to induce an out-of-sync condition that we can use to replicate this scenario more easily.

Version-Release number of selected component (if applicable): 6.2.0 snap 19.1


How reproducible: every time


Steps to Reproduce:
1. induce a situation where candlepin and katello are out of sync. For purposes of this bug, the best way is to register a Satellite to itself, then delete the host record in candlepin.

Detailed steps:

* set up a sat6, register system to itself
* edit /etc/candlepin/candlepin.conf:
 ** comment out "module.config.adapter_module=org.candlepin.katello.KatelloModule"
 ** change "candlepin.auth.basic.enable=false" to true
* restart tomcat
* run "curl -k https://localhost:8443/candlepin/admin/init" to create candlepin admin user
* run "curl -k -u admin:admin https://localhost:8443/candlepin/consumers/" to grab the UUID of the consumer to delete
* run "curl -k -u admin:admin -X DELETE 'https://localhost:8443/candlepin/consumers/<UUID>'"

* undo your changes to candlepin.conf
* katello-service restart

* ensure that web UI is not totally broken. It is OK if an error is raised when viewing details for the particular deleted host, but "content hosts" list should work still.

* run "foreman-rake katello:clean_backend_objects"

output:

[root@sat-snap-rhel7 ~]# foreman-rake katello:clean_backend_objects
System 1 sat-snap-rhel7.example.com 5a29a0a1-62f2-48f8-bc52-c94534832c02 is partially missing.  Cleaning.


Actual results: system still shows up in katello web UI

Expected results: system should disappear from katello web UI


note: katello:reindex does not seem to help either

Comment 2 Ivan Necas 2016-07-29 15:08:32 UTC
Created redmine issue http://projects.theforeman.org/issues/15908 from this bug

Comment 3 Bryan Kearney 2016-08-10 19:18:43 UTC
Upstream bug component is Hosts - Content

Comment 4 Bryan Kearney 2016-08-10 20:19:46 UTC
Upstream bug component is Hosts

Comment 5 Bryan Kearney 2016-08-10 22:19:20 UTC
Upstream bug component is Hosts - Content

Comment 6 Bryan Kearney 2016-08-17 20:16:01 UTC
Upstream bug assigned to jsherril@redhat.com

Comment 7 Justin Sherrill 2016-08-25 17:01:02 UTC
This was resolved as part of https://bugzilla.redhat.com/show_bug.cgi?id=1357866  moving to POST

Comment 9 Eric Helms 2016-12-01 23:02:12 UTC

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


Note You need to log in before you can comment on or make changes to this bug.