Bug 1239118
| Summary: | Content View histories task can be deleted, causing ISE on versions list | ||
|---|---|---|---|
| Product: | Red Hat Satellite | Reporter: | Justin Sherrill <jsherril> |
| Component: | Content Management | Assignee: | Justin Sherrill <jsherril> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Tazim Kolhar <tkolhar> |
| Severity: | high | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 6.0.4 | CC: | bbuckingham, bkearney, cwelton, jquan, jsherril, meeveret, tkolhar |
| Target Milestone: | Unspecified | Keywords: | Triaged |
| Target Release: | Unused | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| URL: | http://projects.theforeman.org/issues/10996 | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2015-08-12 16:02:39 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: | |||
|
Description
Justin Sherrill
2015-07-03 15:01:10 UTC
Created from redmine issue http://projects.theforeman.org/issues/10996 Upstream bug assigned to jsherril To work around the issue:
# foreman-rake console
> Katello::ContentViewHistory.where(:task_id => nil).destroy_all
The only downside is that the content view histories tab will be missing some information. Thats the best we can do before the issue is fixed in the code.
Moving to POST since upstream bug http://projects.theforeman.org/issues/10996 has been closed ------------- Justin Sherrill Applied in changeset commit:katello|eee31ac5debab9dc0ef1252156420577d5f93d31. Please included test scenario. I believe this will require you to go into the rails console:
1. Create and publish a content view
2. Run the following:
# foreman-rake console
> Katello::ContentView.find_by_name("my_view_name").first.history.first.task.destroy
and then visit the Content > Content View > my_view_name
page to list the versions. The list should display with no errors.
Well still the same case from the same cu, the steps on Comment 7 does not work on Cu 's side. And I have got the whole database backup from cu. Will this help? Hi, Yes.
After working with another customer to resolve their issue, i realized the initial workaround was not sufficient for all cases. This one seemed to resolve it:
# foreman-rake console
> Katello::ContentViewHistory.all.each do |history|
history.destroy if history.task.nil?
end
Hi,
I tried the below verification steps on sat6 snap13
1. Create and publish a content view
2. Run the following:
# foreman-rake console
> Katello::ContentView.find_by_name("my_view_name").first.history.first.task.destroy
The above step is not working ?
are we suppose to execute the above command on sat6 ?
Can you please confirm ?
Thanks in advance
Thanks and Regards,
Tazim
Aplogies,
One small mistake in that command:
It should be:
Katello::ContentView.find_by_name("my_view_name").history.first.task.destroy
VERIFIED:
# rpm -qa | grep foreman
foreman-compute-1.7.2.32-1.el6_6sat.noarch
ruby193-rubygem-foreman_discovery-2.0.0.17-1.el6_6sat.noarch
rubygem-hammer_cli_foreman_docker-0.0.3.9-1.el6_6sat.noarch
foreman-debug-1.7.2.32-1.el6_6sat.noarch
ruby193-rubygem-foreman_docker-1.2.0.18-1.el6_6sat.noarch
ruby193-rubygem-foreman_gutterball-0.0.1.9-1.el6_6sat.noarch
foreman-postgresql-1.7.2.32-1.el6_6sat.noarch
rubygem-hammer_cli_foreman_discovery-0.0.1.10-1.el6_6sat.noarch
foreman-gce-1.7.2.32-1.el6_6sat.noarch
ruby193-rubygem-foreman_hooks-0.3.7-2.el6_6sat.noarch
ruby193-rubygem-foreman_bootdisk-4.0.2.13-1.el6_6sat.noarch
rubygem-hammer_cli_foreman_bootdisk-0.1.2.7-1.el6_6sat.noarch
foreman-selinux-1.7.2.13-1.el6_6sat.noarch
foreman-libvirt-1.7.2.32-1.el6_6sat.noarch
foreman-ovirt-1.7.2.32-1.el6_6sat.noarch
ruby193-rubygem-foreman-tasks-0.6.15.4-1.el6_6sat.noarch
foreman-proxy-1.7.2.5-1.el6_6sat.noarch
rubygem-hammer_cli_foreman-0.1.4.14-1.el6_6sat.noarch
intel-s3e3432-01.rhts.eng.bos.redhat.com-foreman-proxy-client-1.0-1.noarch
foreman-vmware-1.7.2.32-1.el6_6sat.noarch
intel-s3e3432-01.rhts.eng.bos.redhat.com-foreman-client-1.0-1.noarch
rubygem-hammer_cli_foreman_tasks-0.0.3.5-1.el6_6sat.noarch
intel-s3e3432-01.rhts.eng.bos.redhat.com-foreman-proxy-1.0-1.noarch
foreman-1.7.2.32-1.el6_6sat.noarch
ruby193-rubygem-foreman-redhat_access-0.2.1-1.el6_6sat.noarch
steps:
I tried the below verification steps on sat6 snap13
1. Create and publish a content view
2. Run the following:
# foreman-rake console Katello::ContentView.find_by_name("con_viewA").history.first.task.destroy
VERIFIED :
VERIFIED:
# rpm -qa | grep foreman
foreman-compute-1.7.2.32-1.el6_6sat.noarch
ruby193-rubygem-foreman_discovery-2.0.0.17-1.el6_6sat.noarch
rubygem-hammer_cli_foreman_docker-0.0.3.9-1.el6_6sat.noarch
foreman-debug-1.7.2.32-1.el6_6sat.noarch
ruby193-rubygem-foreman_docker-1.2.0.18-1.el6_6sat.noarch
ruby193-rubygem-foreman_gutterball-0.0.1.9-1.el6_6sat.noarch
foreman-postgresql-1.7.2.32-1.el6_6sat.noarch
rubygem-hammer_cli_foreman_discovery-0.0.1.10-1.el6_6sat.noarch
foreman-gce-1.7.2.32-1.el6_6sat.noarch
ruby193-rubygem-foreman_hooks-0.3.7-2.el6_6sat.noarch
ruby193-rubygem-foreman_bootdisk-4.0.2.13-1.el6_6sat.noarch
rubygem-hammer_cli_foreman_bootdisk-0.1.2.7-1.el6_6sat.noarch
foreman-selinux-1.7.2.13-1.el6_6sat.noarch
foreman-libvirt-1.7.2.32-1.el6_6sat.noarch
foreman-ovirt-1.7.2.32-1.el6_6sat.noarch
ruby193-rubygem-foreman-tasks-0.6.15.4-1.el6_6sat.noarch
foreman-proxy-1.7.2.5-1.el6_6sat.noarch
rubygem-hammer_cli_foreman-0.1.4.14-1.el6_6sat.noarch
intel-s3e3432-01.rhts.eng.bos.redhat.com-foreman-proxy-client-1.0-1.noarch
foreman-vmware-1.7.2.32-1.el6_6sat.noarch
intel-s3e3432-01.rhts.eng.bos.redhat.com-foreman-client-1.0-1.noarch
rubygem-hammer_cli_foreman_tasks-0.0.3.5-1.el6_6sat.noarch
intel-s3e3432-01.rhts.eng.bos.redhat.com-foreman-proxy-1.0-1.noarch
foreman-1.7.2.32-1.el6_6sat.noarch
ruby193-rubygem-foreman-redhat_access-0.2.1-1.el6_6sat.noarch
I tried the below verification steps on sat6 snap13
1. Create and publish a content view
2. Run the following:
# foreman-rake console Katello::ContentView.find_by_name("con_viewA").history.first.task.destroy
and then visit the Content > Content View > con_viewA
page to list the versions. The list should display with no errors.
This bug was fixed in Satellite 6.1.1 which was delivered on 12 August, 2015. |