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 1619370 - Cannot remove packages from content host web UI
Summary: Cannot remove packages from content host web UI
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Hosts - Content
Version: 6.4
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: 6.4.0
Assignee: Jonathon Turel
QA Contact: Jameer Pathan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-08-20 15:59 UTC by Jonathon Turel
Modified: 2019-11-05 23:32 UTC (History)
3 users (show)

Fixed In Version: tfm-rubygem-katello-3.7.0.17-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-16 19:02:20 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 24651 0 None None None 2018-08-20 16:00:01 UTC

Description Jonathon Turel 2018-08-20 15:59:59 UTC
An error is raised such as this:

<pre>
2018-08-17T13:21:24 [I|app|] Started PUT "/api/v2/hosts/3/packages/remove" for ::1 at 2018-08-17 13:21:24 +0000                                                             
2018-08-17T13:21:24 [I|app|e3f5e] Processing by Katello::Api::V2::HostPackagesController#remove as JSON                                                                     
2018-08-17T13:21:24 [I|app|e3f5e]   Parameters: {"id"=>3, "packages"=>[{"id"=>2790, "name"=>"walrus", "nvrea"=>"walrus-0.71-1.noarch", "nvra"=>"walrus-0.71-1.noarch", "selec
ted"=>true}], "api_version"=>"v2", "host_id"=>"3", "host_package"=>{"id"=>3, "packages"=>[{"id"=>2790, "name"=>"walrus", "nvrea"=>"walrus-0.71-1.noarch", "nvra"=>"walrus-0.7
1-1.noarch", "selected"=>true}]}}                                                                                                                                           
2018-08-17T13:21:24 [I|app|e3f5e] Current user set to admin (admin)                                                                                                         
2018-08-17T13:21:24 [D|app|e3f5e] Current location set to none
2018-08-17T13:21:24 [D|app|e3f5e] Current organization set to Default Organization                                                                                          
2018-08-17T13:21:24 [E|app|e3f5e] Katello::HttpErrors::BadRequest: {"id"=>2790, "name"=>"walrus", "nvrea"=>"walrus-0.71-1.noarch", "nvra"=>"walrus-0.71-1.noarch", "selected"
=>true} is not a valid package name                                                                                                                                         

</pre>

We should be sending an array of package names and not an array of hashes with misc. package data from the table

Comment 1 Jonathon Turel 2018-08-20 16:00:03 UTC
Created from redmine issue http://projects.theforeman.org/issues/24651

Comment 2 Jonathon Turel 2018-08-20 16:00:09 UTC
Upstream bug assigned to None

Comment 4 Satellite Program 2018-08-20 16:14:12 UTC
Upstream bug assigned to jturel

Comment 5 Satellite Program 2018-08-20 16:14:13 UTC
Upstream bug assigned to jturel

Comment 7 Satellite Program 2018-08-23 16:14:28 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/24651 has been resolved.

Comment 9 Jameer Pathan 2018-08-30 12:15:54 UTC
need info 

@satellite6.4.0 snap19

$rpm -q satellite
satellite-6.4.0-12.el7sat.noarch


steps:
1)set up content host with some installed packages
2)go to hosts > content hosts > select host
3)go to Installed Packages page of that host(Packages > Installed)
4)select packages and remove them. 

observation:

<pre>
Started PUT "/api/v2/hosts/3/packages/remove" for 10.65.197.187 at 2018-08-30 06:36:57 -0400
2018-08-30T06:36:57 [I|app|f8e5e] Processing by Katello::Api::V2::HostPackagesController#remove as JSON
2018-08-30T06:36:57 [I|app|f8e5e]   Parameters: {"id"=>3, "packages"=>["httpd", "httpd-manual", "httpd-tools"], "api_version"=>"v2", "host_id"=>"3", "host_package"=>{"id"=>3, "packages"=>["httpd", "httpd-manual", "httpd-tools"]}}
2018-08-30T06:36:57 [I|app|f8e5e] Current user: admin (administrator)
2018-08-30T06:36:57 [I|app|f8e5e] Current user: foreman_admin (administrator)
2018-08-30T06:36:57 [I|kat|f8e5e] GET: https://<hostname>/pulp/api/v2/users/: {"content_type"=>"application/json", "accept"=>"application/json"}
Response: 200: [{"_id": {"$oid": "5b839acc02a07d5154a80bc9"}, "name": "admin", "roles": ["super-users"], "_ns": "users", "login": "admin", "_href": "/pulp/api/v2/users/admin/"}]
2018-08-30T06:36:57 [I|app|f8e5e] Current user: admin (administrator)
2018-08-30T06:36:57 [I|app|f8e5e]   Rendering /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.7.0.17/app/views/katello/api/v2/common/async.json.rabl within katello/api/v2/layouts/resource
2018-08-30T06:36:57 [I|app|f8e5e]   Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.7.0.17/app/views/katello/api/v2/common/async.json.rabl within katello/api/v2/layouts/resource (59.8ms)
2018-08-30T06:36:57 [I|app|f8e5e] Completed 202 Accepted in 619ms (Views: 54.4ms | ActiveRecord: 74.8ms)
</pre>

packages got removed

is above steps are enough to verify this bug or is there anything else i need to do?

Comment 10 Jonathon Turel 2018-09-05 14:12:45 UTC
Jameer,

I think the procedure you mentioned is a good test of the fix. Thanks for testing this one!

Comment 11 Bryan Kearney 2018-10-16 19:02:20 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/RHSA-2018:2927


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