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 1388618

Summary: Trying to delete a Puppet content view version throws the error " TypeError: Value (NilClass) '' is not any of: ForemanTasks::Concerns::ActionSubject"
Product: Red Hat Satellite Reporter: Marcelo Moreira de Mello <mmello>
Component: Content ViewsAssignee: Justin Sherrill <jsherril>
Status: CLOSED ERRATA QA Contact: jcallaha
Severity: high Docs Contact:
Priority: high    
Version: 6.2.2CC: bbuckingham, bkearney, cwelton, dlezzoum, jcallaha, jsherril, mmello
Target Milestone: UnspecifiedKeywords: PrioBumpGSS, Triaged
Target Release: Unused   
Hardware: x86_64   
OS: All   
Whiteboard:
Fixed In Version: rubygem-katello-3.0.0.97-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1417081 (view as bug list) Environment:
Last Closed: 2017-03-06 08:33:35 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:
Bug Depends On:    
Bug Blocks: 1417081    

Description Marcelo Moreira de Mello 2016-10-25 18:52:15 UTC
Description of problem:

Trying to delete a Puppet content view version throws the error " TypeError: Value (NilClass) '' is not any of: ForemanTasks::Concerns::ActionSubject". 


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


How reproducible:
Usually happens with content views created prior the upgrade to 6.2. I was not able to reproduce it with a new content view after upgrading it. 


During the troubleshoot this is the error we got:

passenger debug:
-------------------
[ 2016-10-24 16:11:49.9416 47968/7f2884bd4700 agents/HelperAgent/RequestHandler.h:1384 ]: [Client 20] Processed client data: consumed 4911 bytes
[ 2016-10-24 16:11:49.9417 47968/7f2884bd4700 agents/HelperAgent/RequestHandler.h:1362 ]: [Client 20] Processing client data: "{"id":38,"environment_ids":[],"content_view_version_ids":[110]}"
[ 2016-10-24 16:11:49.9417 47968/7f2886a9d700 Pool2/Implementation.cpp:1274 ]: [App 48122 stderr] [ 2016-10-24 16:11:49.9415 48336/0x00000007a043d8(Worker 1) request_handler/thread_handler.rb:130 ]: Accepted new request on socket main socket


foreman logs:
--------------------
2016-10-24 15:55:31 [app] [I] Started PUT "/katello/api/v2/content_views/38/remove?organization_id=1" for 10.10.58.68 at 2016-10-24 15:55:31 -0400
2016-10-24 15:55:31 [app] [D] Value for params[:environment_ids] was set to nil, because it was one of [], [null] or [null, null, ...]. Go to http://guides.rubyonrails.org/security.html#unsafe-query-generation for more information.
2016-10-24 15:55:31 [app] [I] Processing by Katello::Api::V2::ContentViewsController#remove as JSON
2016-10-24 15:55:31 [app] [I]   Parameters: {"id"=>"38", "environment_ids"=>nil, "content_view_version_ids"=>[110], "organization_id"=>"1", "api_version"=>"v2", "content_view"=>{"id"=>"38"}}
2016-10-24 15:55:31 [app] [D] Setting current user thread-local variable to admin
2016-10-24 15:55:31 [foreman-tasks/action] [E] Value (NilClass) '' is not any of: ForemanTasks::Concerns::ActionSubject. (TypeError)


Actual results:
Does not delete the content view version


Expected results:
Delete the content view version


Additional info:

Comment 2 Marcelo Moreira de Mello 2016-10-25 19:16:45 UTC
Created KCS https://access.redhat.com/solutions/2726601

Comment 6 Justin Sherrill 2017-01-04 17:59:40 UTC
Created redmine issue http://projects.theforeman.org/issues/17929 from this bug

Comment 7 Satellite Program 2017-01-09 03:02:40 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/17929 has been resolved.

Comment 8 jcallaha 2017-02-15 16:32:23 UTC
Verified in Satellite 6.2.8 Snap 2.

Steps:
1. Create a content view with puppet content
2. Publish
3. In the foreman console run
   Katello::ContentView.find_by(:name => '<content view name>').versions.first.content_view_puppet_environments.destroy_all
4. Attempt to remove the content view version

I was unable to remove the version in 6.2.7, but had no issues when upgraded to 6.2.8.

Comment 10 errata-xmlrpc 2017-03-06 08:33:35 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:0447

Comment 11 Djebran Lezzoum 2017-11-17 09:48:58 UTC
qe_test_coverage removed as per discussion in PR https://github.com/SatelliteQE/robottelo/pull/5582