Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1202820

Summary: content view deletion causes candlepin comsumers to be deleted
Product: Red Hat Satellite Reporter: Justin Sherrill <jsherril>
Component: Content ManagementAssignee: Justin Sherrill <jsherril>
Status: CLOSED CURRENTRELEASE QA Contact: Tazim Kolhar <tkolhar>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.0.4CC: bbuckingham, bkearney, cwelton, jsherril, sghai, tkolhar
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
URL: http://projects.theforeman.org/issues/9478
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-08-12 13:55:24 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
content host shifted to other content view none

Description Justin Sherrill 2015-03-17 13:50:53 UTC
This commit https://github.com/Katello/katello/commit/729f9f4

caused this code:  https://github.com/Katello/katello/blob/master/app/lib/actions/katello/system/reassign.rb#L30

to stop reassigning in candlepin.

We need to add a call to CandlepiN::Consumer::Update

Comment 1 Justin Sherrill 2015-03-17 13:50:54 UTC
Created from redmine issue http://projects.theforeman.org/issues/9478

Comment 2 Bryan Kearney 2015-03-17 14:05:56 UTC
Upstream bug assigned to jsherril

Comment 4 Bryan Kearney 2015-03-20 16:05:19 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/9478 has been closed
-------------
David Davis
Also, I think the same thing might apply to activation keys:

https://github.com/Katello/katello/commit/9b12978171daf71e3df53c635cb0d992da5616f2

https://github.com/Katello/katello/blob/master/app/lib/actions/katello/activation_key/reassign.rb#L21


-------------
Justin Sherrill
Applied in changeset commit:katello|5c0446e0b9c6b66f357394f9466ba5b1d290f508.

Comment 6 Tazim Kolhar 2015-04-24 10:07:44 UTC
hi

please provide verification steps

thanks

Comment 7 Justin Sherrill 2015-04-29 14:15:56 UTC
1.  Create and publish a content view
2.  Register a system to that content view in Library
3.  Go to Content Views > click your view > click Remove
4.  Select Library, and click next
5.  Assign the system to some other view
6.  Click next and submit the removal

The removal should complete successfully.

7.  Now to go the content hosts page and click on the content host you registered and moved.  No error should occur.

Comment 8 Tazim Kolhar 2015-04-30 09:11:28 UTC
VERIFIED :

# rpm -qa | grep foreman
ruby193-rubygem-foreman_docker-1.2.0.10-1.el6_6sat.noarch
ruby193-rubygem-foreman_gutterball-0.0.1.9-1.el6_6sat.noarch
foreman-debug-1.7.2.18-1.el6_6sat.noarch
foreman-vmware-1.7.2.18-1.el6_6sat.noarch
rubygem-hammer_cli_foreman_bootdisk-0.1.2.6-1.el6_6sat.noarch
rubygem-hammer_cli_foreman_discovery-0.0.1.8-1.el6_6sat.noarch
puppet-foreman_scap_client-0.3.3-8.el6_6sat.noarch
foreman-1.7.2.18-1.el6_6sat.noarch
foreman-libvirt-1.7.2.18-1.el6_6sat.noarch
ruby193-rubygem-foreman_hooks-0.3.7-2.el6_6sat.noarch
ruby193-rubygem-foreman_bootdisk-4.0.2.12-1.el6_6sat.noarch
rubygem-hammer_cli_foreman-0.1.4.10-1.el6_6sat.noarch
foreman-postgresql-1.7.2.18-1.el6_6sat.noarch
foreman-selinux-1.7.2.13-1.el6_6sat.noarch
qe-sat6-rhel66.usersys.redhat.com-foreman-proxy-1.0-2.noarch
foreman-compute-1.7.2.18-1.el6_6sat.noarch
foreman-gce-1.7.2.18-1.el6_6sat.noarch
ruby193-rubygem-foreman_discovery-2.0.0.12-1.el6_6sat.noarch
foreman-proxy-1.7.2.4-1.el6_6sat.noarch
qe-sat6-rhel66.usersys.redhat.com-foreman-client-1.0-1.noarch
qe-sat6-rhel66.usersys.redhat.com-foreman-proxy-client-1.0-1.noarch
foreman-ovirt-1.7.2.18-1.el6_6sat.noarch
ruby193-rubygem-foreman-redhat_access-0.1.0-1.el6_6sat.noarch
rubygem-hammer_cli_foreman_tasks-0.0.3.4-1.el6_6sat.noarch
ruby193-rubygem-foreman-tasks-0.6.12.4-1.el6_6sat.noarch

steps:
1.  Create and publish a content view con_viewA
2.  Register a system to that content view in Library
3.  Go to Content Views > click your view > click Remove
4.  Select Library, and click next
5.  Assign the system to some other view (con_viewB)
6.  Click next and submit the removal

Now to go the content hosts page and click on the content host you registered and moved.  No error should occur. Content host shifted to con_viewB

Comment 9 Tazim Kolhar 2015-04-30 09:11:58 UTC
Created attachment 1020474 [details]
content host shifted to other content view

Comment 10 Justin Sherrill 2015-05-06 18:56:15 UTC
*** Bug 1217073 has been marked as a duplicate of this bug. ***

Comment 11 Bryan Kearney 2015-08-11 13:28:51 UTC
This bug is slated to be released with Satellite 6.1.

Comment 12 Bryan Kearney 2015-08-12 13:55:24 UTC
This bug was fixed in version 6.1.1 of Satellite which was released on 12 August, 2015.