Project

General

Profile

Bug #15908

unable to clear host from Katello via rake tasks after host is deleted in candlepin

Added by Ivan Necas over 2 years ago. Updated 8 months ago.

Status:
Duplicate
Priority:
Normal
Category:
Hosts
Target version:
Difficulty:
easy
Triaged:
Bugzilla link:
Pull request:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1354555
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.

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


Related issues

Related to Katello - Bug #15602: cannot delete or unregister a host if it no longer exists in candlepinResolved2016-07-07
Has duplicate Katello - Bug #15721: Helper rake tasks not fully updated for Host Unification and Scoped searchClosed2016-07-18

History

#1 Updated by Justin Sherrill over 2 years ago

  • Subject changed from unable to clear host from Katello via rake tasks after host is deleted in candlepin to unable to clear host from Katello via rake tasks after host is deleted in candlepin
  • Status changed from New to Duplicate
  • Assignee set to Justin Sherrill
  • Legacy Backlogs Release (now unused) set to 166
  • Difficulty set to easy

This is likely a dupe of 15721 and possibly related to 15602

#2 Updated by Justin Sherrill over 2 years ago

  • Has duplicate Bug #15721: Helper rake tasks not fully updated for Host Unification and Scoped search added

#3 Updated by Justin Sherrill over 2 years ago

  • Related to Bug #15602: cannot delete or unregister a host if it no longer exists in candlepin added

Also available in: Atom PDF