Bug 1388618 - Trying to delete a Puppet content view version throws the error " TypeError: Value (NilClass) '' is not any of: ForemanTasks::Concerns::ActionSubject"
Summary: Trying to delete a Puppet content view version throws the error " TypeError: ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Content Views
Version: 6.2.2
Hardware: x86_64
OS: All
high
high
Target Milestone: Unspecified
Assignee: Justin Sherrill
QA Contact: jcallaha
URL:
Whiteboard:
Depends On:
Blocks: 1417081
TreeView+ depends on / blocked
 
Reported: 2016-10-25 18:52 UTC by Marcelo Moreira de Mello
Modified: 2019-12-16 07:13 UTC (History)
7 users (show)

Fixed In Version: rubygem-katello-3.0.0.97-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1417081 (view as bug list)
Environment:
Last Closed: 2017-03-06 08:33:35 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 17929 0 None None None 2017-01-04 17:59:41 UTC
Red Hat Knowledge Base (Solution) 2726601 0 None None None 2016-10-25 19:16:45 UTC
Red Hat Product Errata RHBA-2017:0447 0 normal SHIPPED_LIVE Satellite 6.2.8 Async Bug Release 2017-03-06 13:23:41 UTC

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


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