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 1103624 - hammer: deleting a content host using --name raises: system found more than once
Summary: hammer: deleting a content host using --name raises: system found more than once
Keywords:
Status: CLOSED DUPLICATE of bug 1097586
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Hammer
Version: 6.0.3
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: Unspecified
Assignee: Brad Buckingham
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-06-02 08:41 UTC by Sachin Ghai
Modified: 2014-06-04 14:26 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-04 14:26:24 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Sachin Ghai 2014-06-02 08:41:03 UTC
Description of problem:

[root@dhcp207-55 ~]# hammer content-host list --organization-id 1
-------------------------------------|--------------------------
ID                                   | NAME                     
-------------------------------------|--------------------------
92c8c0a4-fcd8-4d00-a1de-900bf742c96e | vodka.katellolabs.org    
3df7dc32-3f50-4f45-9b73-ad38330e0fa9 | scroponok.katellolabs.org
6c39d196-203a-4ced-b2a2-09ba52dc3480 | scotch.katellolabs.org   
-------------------------------------|--------------------------


[root@dhcp207-55 ~]# hammer content-host delete --name scroponok.katellolabs.org --organization-id 1
Could not delete content host:
  Error: system found more than once

[root@dhcp207-55 ~]# hammer content-host list --organization-id 1
-------------------------------------|--------------------------
ID                                   | NAME                     
-------------------------------------|--------------------------
92c8c0a4-fcd8-4d00-a1de-900bf742c96e | vodka.katellolabs.org    
3df7dc32-3f50-4f45-9b73-ad38330e0fa9 | scroponok.katellolabs.org
6c39d196-203a-4ced-b2a2-09ba52dc3480 | scotch.katellolabs.org   
-------------------------------------|--------------------------

Version-Release number of selected component (if applicable):
sat6 beta snap7 compose2 (Satellite-6.0.3-RHEL-6-20140528.4)

How reproducible:
always

Steps to Reproduce:
1.
2.
3.

Actual results:
[root@dhcp207-55 ~]# hammer content-host delete --name scroponok.katellolabs.org --organization-id 1
Could not delete content host:
  Error: system found more than once


Expected results:
system should be unregistered and proper message should be raised, like: content-host deleted

Additional info:[root@dhcp207-55 ~]# hammer -v content-host delete --name scroponok.katellolabs.org --organization-id 1
[ERROR 2014-06-02 14:10:18 Exception] Error: system found more than once
Could not delete content host:
  Error: system found more than once
[ERROR 2014-06-02 14:10:18 Exception] 

HammerCLIForeman::ResolverError (system found more than once):
    /usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.1.1/lib/hammer_cli_foreman/id_resolver.rb:137:in `pick_result'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.1.1/lib/hammer_cli_foreman/id_resolver.rb:132:in `find_resource'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli_katello-0.0.4/lib/hammer_cli_katello/id_resolver.rb:23:in `system_id'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.1.1/lib/hammer_cli_foreman/commands.rb:96:in `send'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.1.1/lib/hammer_cli_foreman/commands.rb:96:in `get_resource_id'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.1.1/lib/hammer_cli_foreman/commands.rb:85:in `get_identifier'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.1.1/lib/hammer_cli_foreman/commands.rb:221:in `request_params'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.1/lib/hammer_cli/./apipie/command.rb:42:in `send_request'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.1.1/lib/hammer_cli_foreman/commands.rb:113:in `send_request'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.1/lib/hammer_cli/./apipie/command.rb:33:in `execute'
    /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:67:in `run'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.1/lib/hammer_cli/./apipie/../abstract.rb:22:in `run'
    /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/subcommand/execution.rb:11:in `execute'
    /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:67:in `run'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.1/lib/hammer_cli/./apipie/../abstract.rb:22:in `run'
    /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/subcommand/execution.rb:11:in `execute'
    /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:67:in `run'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.1/lib/hammer_cli/./apipie/../abstract.rb:22:in `run'
    /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:125:in `run'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.1/bin/hammer:100
    /usr/bin/hammer:19:in `load'
    /usr/bin/hammer:19

Comment 1 Sachin Ghai 2014-06-02 08:45:44 UTC
Please note of you use --id then delete cmd works:

[root@dhcp207-55 ~]# hammer content-host delete --id 3df7dc32-3f50-4f45-9b73-ad38330e0fa9 --organization-id 1
Content host deleted
[root@dhcp207-55 ~]# hammer content-host list --organization-id 1
-------------------------------------|-----------------------
ID                                   | NAME                  
-------------------------------------|-----------------------
92c8c0a4-fcd8-4d00-a1de-900bf742c96e | vodka.katellolabs.org 
6c39d196-203a-4ced-b2a2-09ba52dc3480 | scotch.katellolabs.org
-------------------------------------|-----------------------
[root@dhcp207-55 ~]#

Comment 2 RHEL Program Management 2014-06-02 09:05:15 UTC
Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

Comment 4 Bryan Kearney 2014-06-04 14:23:14 UTC
This requires a change to the index method of the content views controller. Look at the products index controller on how it accepts     

param :name, String, :desc => N_("Filter products by name")

Comment 5 Bryan Kearney 2014-06-04 14:26:24 UTC

*** This bug has been marked as a duplicate of bug 1097586 ***


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