Bug 1076568

Summary: Org delete fails in hammer and UI with API error
Product: Red Hat Satellite Reporter: Tazim Kolhar <tkolhar>
Component: HammerAssignee: Adam Price <adprice>
Status: CLOSED ERRATA QA Contact: sthirugn <sthirugn>
Severity: high Docs Contact:
Priority: unspecified    
Version: NightlyCC: bbuckingham, bkearney, cwelton, jmontleo, mmccune, omaciel, sthirugn
Target Milestone: UnspecifiedKeywords: Regression, Reopened, TestBlocker, Triaged
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
URL: http://projects.theforeman.org/issues/9798
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-08-12 05:08:05 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:
Attachments:
Description Flags
foreman-debug none

Description Tazim Kolhar 2014-03-14 14:46:33 UTC
Created attachment 874461 [details]
foreman-debug

Description of problem:
 Org delete  fails

Version-Release number of selected component (if applicable):


How reproducible:
everytime

Steps to Reproduce:
1.# hammer organization delete --id 73
Could not delete the organization:
  Error: 500 Internal Server Error

2.
3.

Actual results:
delete fails

Expected results:
delete works

Additional info:

Comment 1 Og Maciel 2014-03-14 15:04:33 UTC
[root@qetello02 ~]# hammer -v organization delete --id 10
[ERROR 2014-03-14 10:59:21 Exception] Resource organization not found by id '10'
Could not delete the organization:
  Resource organization not found by id '10'
[ERROR 2014-03-14 10:59:21 Exception]

RestClient::ResourceNotFound (404 Resource Not Found):
    /usr/lib/ruby/gems/1.8/gems/rest-client-1.6.1/lib/restclient/abstract_response.rb:48:in `return!'
    /usr/lib/ruby/gems/1.8/gems/rest-client-1.6.1/lib/restclient/request.rb:220:in `process_result'
    /usr/lib/ruby/gems/1.8/gems/rest-client-1.6.1/lib/restclient/request.rb:169:in `transmit'
    /usr/lib/ruby/1.8/net/http.rb:543:in `start'
    /usr/lib/ruby/gems/1.8/gems/rest-client-1.6.1/lib/restclient/request.rb:166:in `transmit'
    /usr/lib/ruby/gems/1.8/gems/rest-client-1.6.1/lib/restclient/request.rb:60:in `execute'
    /usr/lib/ruby/gems/1.8/gems/rest-client-1.6.1/lib/restclient/request.rb:31:in `execute'
    /usr/lib/ruby/gems/1.8/gems/rest-client-1.6.1/lib/restclient/resource.rb:80:in `delete'
    /usr/lib/ruby/gems/1.8/gems/katello_api-0.0.8/lib/katello_api/base.rb:70:in `send'
    /usr/lib/ruby/gems/1.8/gems/katello_api-0.0.8/lib/katello_api/base.rb:70:in `http_call'
    /usr/lib/ruby/gems/1.8/gems/katello_api-0.0.8/lib/katello_api/base.rb:51:in `perform_call'
    /usr/lib/ruby/gems/1.8/gems/katello_api-0.0.8/lib/katello_api/resources/organization.rb:64:in `destroy'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.0.18/lib/hammer_cli/./apipie/resource.rb:53:in `send'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.0.18/lib/hammer_cli/./apipie/resource.rb:53:in `call'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.0.18/lib/hammer_cli_foreman/commands.rb:62:in `send_request'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.0.18/lib/hammer_cli/./apipie/write_command.rb:10: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.0.18/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.0.18/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.0.18/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.0.18/bin/hammer:77
    /usr/bin/hammer:19:in `load'
    /usr/bin/hammer:19

Comment 2 RHEL Program Management 2014-03-14 15:16:05 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 5 Bryan Kearney 2014-05-23 18:15:12 UTC
Adam, some more label expansion business.

Comment 6 Adam Price 2014-05-28 22:10:58 UTC
as of 28-may-2014, i am able to delete an organization by its name and label.

Comment 7 Adam Price 2014-05-30 20:14:03 UTC
since #1096241 has been merged into master, you should now be able to delete an org by its id as well.

Comment 9 sthirugn@redhat.com 2014-06-06 21:36:26 UTC
Verified the following three scenarios. Note: One new scenario failed which is logged in a new bug: https://bugzilla.redhat.com/show_bug.cgi?id=1105736

# hammer organization delete --id=3
Organization deleted

# hammer organization delete --name=deleteorg2
Organization deleted

# hammer organization delete --label=org1
Organization deleted

Version Tested:
* apr-util-ldap-1.3.9-3.el6_0.1.x86_64
* candlepin-0.9.7-1.el6_5.noarch
* candlepin-scl-1-5.el6_4.noarch
* candlepin-scl-quartz-2.1.5-5.el6_4.noarch
* candlepin-scl-rhino-1.7R3-1.el6_4.noarch
* candlepin-scl-runtime-1-5.el6_4.noarch
* candlepin-selinux-0.9.7-1.el6_5.noarch
* candlepin-tomcat6-0.9.7-1.el6_5.noarch
* elasticsearch-0.90.10-4.el6sat.noarch
* foreman-1.6.0.14-1.el6sat.noarch
* foreman-compute-1.6.0.14-1.el6sat.noarch
* foreman-gce-1.6.0.14-1.el6sat.noarch
* foreman-libvirt-1.6.0.14-1.el6sat.noarch
* foreman-ovirt-1.6.0.14-1.el6sat.noarch
* foreman-postgresql-1.6.0.14-1.el6sat.noarch
* foreman-proxy-1.6.0.6-1.el6sat.noarch
* foreman-selinux-1.6.0-4.el6sat.noarch
* foreman-vmware-1.6.0.14-1.el6sat.noarch
* katello-1.5.0-25.el6sat.noarch
* katello-ca-1.0-1.noarch
* katello-certs-tools-1.5.5-1.el6sat.noarch
* katello-installer-0.0.45-1.el6sat.noarch
* openldap-2.4.23-32.el6_4.1.x86_64
* pulp-katello-0.3-3.el6sat.noarch
* pulp-nodes-common-2.4.0-0.18.beta.el6sat.noarch
* pulp-nodes-parent-2.4.0-0.18.beta.el6sat.noarch
* pulp-puppet-plugins-2.4.0-0.18.beta.el6sat.noarch
* pulp-puppet-tools-2.4.0-0.18.beta.el6sat.noarch
* pulp-rpm-plugins-2.4.0-0.18.beta.el6sat.noarch
* pulp-selinux-2.4.0-0.18.beta.el6sat.noarch
* pulp-server-2.4.0-0.18.beta.el6sat.noarch
* python-ldap-2.3.10-1.el6.x86_64
* ruby193-rubygem-net-ldap-0.3.1-3.el6sat.noarch
* ruby193-rubygem-runcible-1.1.0-2.el6sat.noarch

Comment 10 Bryan Kearney 2014-07-02 14:08:51 UTC
This was delivered with 6.0.3, which is the Satellite 6 Beta.

Comment 11 Bryan Kearney 2014-07-02 14:10:20 UTC
This was delivered in 6.0.3, the Beta version of Satellite 6.0

Comment 12 Bryan Kearney 2014-07-02 14:14:50 UTC
This was delivered in the Satellite 6 Beta (6.0.3)

Comment 13 Og Maciel 2015-03-03 19:32:01 UTC
Our automation has shown a regression for this issue (both running against nightly and downstream builds):

[root@qe-foreman-rhel66 ~]# hammer -v -d -u admin -p changeme organization create --name bz-1061658-organization
[ INFO 2015-03-03 14:24:17 Init] Initialization of Hammer CLI (0.1.4) has started...
[DEBUG 2015-03-03 14:24:17 Init] Running at ruby 1.8.7-p374
[ INFO 2015-03-03 14:24:17 Init] Configuration from the file /etc/hammer/cli_config.yml has been loaded
[ INFO 2015-03-03 14:24:17 Init] Configuration from the file /etc/hammer/cli.modules.d/foreman.yml has been loaded
[ INFO 2015-03-03 14:24:17 Init] Configuration from the file /etc/hammer/cli.modules.d/foreman_bootdisk.yml has been loaded
[ INFO 2015-03-03 14:24:17 Init] Configuration from the file /etc/hammer/cli.modules.d/gutterball.yml has been loaded
[ INFO 2015-03-03 14:24:17 Init] Configuration from the file /etc/hammer/cli.modules.d/import.yml has been loaded
[ INFO 2015-03-03 14:24:17 Init] Configuration from the file /etc/hammer/cli.modules.d/katello.yml has been loaded
[ INFO 2015-03-03 14:24:17 Init] Configuration from the file /root/.hammer/cli.modules.d/foreman_docker.yml has been loaded
/usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.4/lib/hammer_cli/./apipie/../abstract.rb:68: warning: already initialized constant DEFAULT_LABEL_INDENT
[DEBUG 2015-03-03 14:24:18 Connection] Registered: foreman
[DEBUG 2015-03-03 14:24:18 API] Global headers: {
        :content_type => "application/json",
    "Accept-Language" => "en",
              :accept => "application/json;version=2"
}
[ INFO 2015-03-03 14:24:18 Modules] Extension module hammer_cli_foreman (0.1.4) loaded
[ INFO 2015-03-03 14:24:18 HammerCLI::MainCommand] subcommand organization (HammerCLIForeman::Organization) was removed.
[ INFO 2015-03-03 14:24:18 HammerCLI::MainCommand] subcommand organization (HammerCLIKatello::Organization) was created.
[ INFO 2015-03-03 14:24:18 Modules] Extension module hammer_cli_import (0.10.10) loaded
[ INFO 2015-03-03 14:24:18 Modules] Extension module hammer_cli_katello (0.0.8) loaded
[DEBUG 2015-03-03 14:24:18 Init] Using locale 'en'
[DEBUG 2015-03-03 14:24:18 Init] 'mo' files for locale domain 'hammer-cli' loaded from '/usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.4/locale'
[DEBUG 2015-03-03 14:24:18 Init] 'mo' files for locale domain 'hammer-cli@system' loaded from '/usr/share/locale'
[DEBUG 2015-03-03 14:24:18 Init] 'mo' files for locale domain 'hammer-cli-foreman' loaded from '/usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.1.4/locale'
[DEBUG 2015-03-03 14:24:18 Init] 'mo' files for locale domain 'hammer-cli-foreman@system' loaded from '/usr/share/locale'
[DEBUG 2015-03-03 14:24:18 Init] 'mo' files for locale domain 'hammer-cli-katello' loaded from '/usr/lib/ruby/gems/1.8/gems/hammer_cli_katello-0.0.8/locale'
[ INFO 2015-03-03 14:24:18 HammerCLI::MainCommand] Called with options: {"option_verbose"=>true, "option_password"=>"***", "option_username"=>"admin", "option_debug"=>true}
[ INFO 2015-03-03 14:24:18 HammerCLIKatello::Organization] Called with options: {}
[ INFO 2015-03-03 14:24:18 HammerCLIKatello::Organization::CreateCommand] Called with options: {"option_name"=>"bz-1061658-organization"}
[ INFO 2015-03-03 14:24:18 API] POST /katello/api/organizations
[DEBUG 2015-03-03 14:24:18 API] Params: {
            "name" => "bz-1061658-organization",
    "organization" => {
        "name" => "bz-1061658-organization"
    }
}
[DEBUG 2015-03-03 14:24:18 API] Headers: {}
[DEBUG 2015-03-03 14:24:20 API] Response: {
            "created_at" => "2015-03-03T19:24:18Z",
          "ignore_types" => [],
    "apply_info_task_id" => nil,
                 "title" => "bz-1061658-organization",
                 "label" => "bz-1061658-organization",
       "katello_default" => true,
                    "id" => 425,
            "updated_at" => "2015-03-03T19:24:18Z",
              "ancestry" => nil,
        "service_levels" => [],
                  "name" => "bz-1061658-organization",
          "default_info" => {
        "distributor" => [],
             "system" => []
    },
         "service_level" => nil,
           "description" => nil
}
[DEBUG 2015-03-03 14:24:20 API] Response headers: {
                 :status => "201 Created",
           :x_request_id => "a18b78f48a223439e0218845d0d3c46c",
             :set_cookie => [
        [0] "request_method=POST; path=/",
        [1] "_session_id=BAh7B0kiD3Nlc3Npb25faWQGOgZFRkkiJTliMzE4MWI2ZWQ0NTA1YmZmMGUwMmE3MGQ0ZTUwZTNhBjsAVEkiC2xvY2FsZQY7AEYiB2Vu--53918d578f5d1283b3da68a472cd777feb4a8068; path=/; HttpOnly"
    ],
              :x_runtime => "1.318421",
           :content_type => "application/json; charset=utf-8",
             :connection => "close",
          :cache_control => "max-age=0, private, must-revalidate",
      :transfer_encoding => "chunked",
                   :etag => "\"29ffcb0d91fa179e02089b07abf0111d\"",
        :foreman_version => "1.8.0-develop",
           :x_rack_cache => "invalidate, pass",
        :x_ua_compatible => "IE=Edge,chrome=1",
                   :date => "Tue, 03 Mar 2015 19:24:18 GMT",
           :x_powered_by => "Phusion Passenger 4.0.18",
                 :server => "Apache/2.2.15 (Red Hat)",
               :location => "https://localhost/katello/organizations/425-bz-1061658-organization",
        :apipie_checksum => "9a5b7544f5a152ec68b02fa9933700b8",
    :foreman_api_version => "2"
}
Organization created
[root@qe-foreman-rhel66 ~]# hammer -u admin -p changeme organization info --id 425
/usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.4/lib/hammer_cli/./apipie/../abstract.rb:68: warning: already initialized constant DEFAULT_LABEL_INDENT
Id:                     425
Name:                   bz-1061658-organization
Users:

Smart proxies:
    qe-foreman-rhel66.usersys.redhat.com
Subnets:

Compute resources:

Installation media:

Templates:
    Alterator default (provision)
    Alterator default finish (finish)
    Alterator default PXELinux (PXELinux)
    alterator_pkglist ()
    AutoYaST default (provision)
    AutoYaST default PXELinux (PXELinux)
    AutoYaST SLES default (provision)
    Boot disk iPXE - generic host (Bootdisk)
    Boot disk iPXE - host (Bootdisk)
    coreos_cloudconfig ()
    CoreOS provision (provision)
    CoreOS PXELinux (PXELinux)
    epel ()
    fix_hosts ()
    FreeBSD (mfsBSD) finish (finish)
    FreeBSD (mfsBSD) provision (provision)
    FreeBSD (mfsBSD) PXELinux (PXELinux)
    freeipa_register ()
    Grubby default (script)
    http_proxy ()
    Jumpstart default (provision)
    Jumpstart default finish (finish)
    Jumpstart default PXEGrub (PXEGrub)
    Junos default finish (finish)
    Junos default SLAX (provision)
    Junos default ZTP config (ZTP)
    Katello Kickstart Default (provision)
    Katello Kickstart Default Finish (finish)
    Katello Kickstart Default User Data (user_data)
    Kickstart default (provision)
    Kickstart default finish (finish)
    Kickstart default iPXE (iPXE)
    Kickstart default PXELinux (PXELinux)
    Kickstart default user data (user_data)
    kickstart_networking_setup ()
    Kickstart RHEL default (provision)
    Preseed default (provision)
    Preseed default finish (finish)
    Preseed default iPXE (iPXE)
    Preseed default PXELinux (PXELinux)
    Preseed default user data (user_data)
    puppet.conf ()
    PXEGrub default local boot (PXEGrub)
    PXELinux default local boot (PXELinux)
    PXELinux default memdisk (PXELinux)
    PXELinux global default (PXELinux)
    redhat_register ()
    saltstack_minion ()
    subscription_manager_registration ()
    UserData default (user_data)
    WAIK default PXELinux (PXELinux)
Domains:

Environments:

Hostgroups:

Parameters:

Created at:             2015/03/03 19:24:18
Updated at:             2015/03/03 19:24:18
Label:                  bz-1061658-organization
Description:
Red Hat Repository URL: https://cdn.redhat.com

[root@qe-foreman-rhel66 ~]# hammer -v -d -u admin -p changeme organization delete --id 425
[ INFO 2015-03-03 14:24:56 Init] Initialization of Hammer CLI (0.1.4) has started...
[DEBUG 2015-03-03 14:24:56 Init] Running at ruby 1.8.7-p374
[ INFO 2015-03-03 14:24:56 Init] Configuration from the file /etc/hammer/cli_config.yml has been loaded
[ INFO 2015-03-03 14:24:56 Init] Configuration from the file /etc/hammer/cli.modules.d/foreman.yml has been loaded
[ INFO 2015-03-03 14:24:56 Init] Configuration from the file /etc/hammer/cli.modules.d/foreman_bootdisk.yml has been loaded
[ INFO 2015-03-03 14:24:56 Init] Configuration from the file /etc/hammer/cli.modules.d/gutterball.yml has been loaded
[ INFO 2015-03-03 14:24:56 Init] Configuration from the file /etc/hammer/cli.modules.d/import.yml has been loaded
[ INFO 2015-03-03 14:24:56 Init] Configuration from the file /etc/hammer/cli.modules.d/katello.yml has been loaded
[ INFO 2015-03-03 14:24:56 Init] Configuration from the file /root/.hammer/cli.modules.d/foreman_docker.yml has been loaded
/usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.4/lib/hammer_cli/./apipie/../abstract.rb:68: warning: already initialized constant DEFAULT_LABEL_INDENT
[DEBUG 2015-03-03 14:24:56 Connection] Registered: foreman
[DEBUG 2015-03-03 14:24:56 API] Global headers: {
    "Accept-Language" => "en",
        :content_type => "application/json",
              :accept => "application/json;version=2"
}
[ INFO 2015-03-03 14:24:56 Modules] Extension module hammer_cli_foreman (0.1.4) loaded
[ INFO 2015-03-03 14:24:56 HammerCLI::MainCommand] subcommand organization (HammerCLIForeman::Organization) was removed.
[ INFO 2015-03-03 14:24:56 HammerCLI::MainCommand] subcommand organization (HammerCLIKatello::Organization) was created.
[ INFO 2015-03-03 14:24:56 Modules] Extension module hammer_cli_import (0.10.10) loaded
[ INFO 2015-03-03 14:24:56 Modules] Extension module hammer_cli_katello (0.0.8) loaded
[DEBUG 2015-03-03 14:24:56 Init] Using locale 'en'
[DEBUG 2015-03-03 14:24:56 Init] 'mo' files for locale domain 'hammer-cli' loaded from '/usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.4/locale'
[DEBUG 2015-03-03 14:24:56 Init] 'mo' files for locale domain 'hammer-cli@system' loaded from '/usr/share/locale'
[DEBUG 2015-03-03 14:24:56 Init] 'mo' files for locale domain 'hammer-cli-foreman' loaded from '/usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.1.4/locale'
[DEBUG 2015-03-03 14:24:56 Init] 'mo' files for locale domain 'hammer-cli-foreman@system' loaded from '/usr/share/locale'
[DEBUG 2015-03-03 14:24:56 Init] 'mo' files for locale domain 'hammer-cli-katello' loaded from '/usr/lib/ruby/gems/1.8/gems/hammer_cli_katello-0.0.8/locale'
[ INFO 2015-03-03 14:24:56 HammerCLI::MainCommand] Called with options: {"option_debug"=>true, "option_username"=>"admin", "option_verbose"=>true, "option_password"=>"***"}
[ INFO 2015-03-03 14:24:56 HammerCLIKatello::Organization] Called with options: {}
[ INFO 2015-03-03 14:24:56 HammerCLIKatello::Organization::DeleteCommand] Called with options: {"option_id"=>"425"}
[ INFO 2015-03-03 14:24:56 API] DELETE /katello/api/organizations/425
[DEBUG 2015-03-03 14:24:56 API] Params: {}
[DEBUG 2015-03-03 14:24:56 API] Headers: {
    :params => {}
}
[DEBUG 2015-03-03 14:24:56 API] 500 Internal Server Error
{
    "error" => {
        "message" => "Value (NilClass) '' is not any of: ForemanTasks::Concerns::ActionSubject."
    }
}
[ERROR 2015-03-03 14:24:56 Exception] Value (NilClass) '' is not any of: ForemanTasks::Concerns::ActionSubject.
Could not delete the organization:
  Value (NilClass) '' is not any of: ForemanTasks::Concerns::ActionSubject.
[ERROR 2015-03-03 14:24:56 Exception]

RestClient::InternalServerError (500 Internal Server Error):
    /usr/lib/ruby/gems/1.8/gems/rest-client-1.6.7/lib/restclient/abstract_response.rb:48:in `return!'
    /usr/lib/ruby/gems/1.8/gems/rest-client-1.6.7/lib/restclient/request.rb:230:in `process_result'
    /usr/lib/ruby/gems/1.8/gems/rest-client-1.6.7/lib/restclient/request.rb:178:in `transmit'
    /usr/lib/ruby/1.8/net/http.rb:543:in `start'
    /usr/lib/ruby/gems/1.8/gems/rest-client-1.6.7/lib/restclient/request.rb:172:in `transmit'
    /usr/lib/ruby/gems/1.8/gems/rest-client-1.6.7/lib/restclient/request.rb:64:in `execute'
    /usr/lib/ruby/gems/1.8/gems/rest-client-1.6.7/lib/restclient/request.rb:33:in `execute'
    /usr/lib/ruby/gems/1.8/gems/rest-client-1.6.7/lib/restclient/resource.rb:97:in `delete'
    /usr/lib/ruby/gems/1.8/gems/apipie-bindings-0.0.11/lib/apipie_bindings/api.rb:279:in `send'
    /usr/lib/ruby/gems/1.8/gems/apipie-bindings-0.0.11/lib/apipie_bindings/api.rb:279:in `call_client'
    /usr/lib/ruby/gems/1.8/gems/apipie-bindings-0.0.11/lib/apipie_bindings/api.rb:210:in `http_call'
    /usr/lib/ruby/gems/1.8/gems/apipie-bindings-0.0.11/lib/apipie_bindings/api.rb:161:in `call'
    /usr/lib/ruby/gems/1.8/gems/apipie-bindings-0.0.11/lib/apipie_bindings/resource.rb:14:in `call'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.4/lib/hammer_cli/./apipie/command.rb:43:in `send_request'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.1.4/lib/hammer_cli_foreman/commands.rb:179:in `send_request'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman_tasks-0.0.3/lib/hammer_cli_foreman_tasks/async_command.rb:14:in `execute'
    /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:68:in `run'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.4/lib/hammer_cli/./apipie/../abstract.rb:23: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:68:in `run'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.4/lib/hammer_cli/./apipie/../abstract.rb:23: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:68:in `run'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.4/lib/hammer_cli/./apipie/../abstract.rb:23:in `run'
    /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:126:in `run'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.4/bin/hammer:108
    /usr/bin/hammer:19:in `load'
    /usr/bin/hammer:19

Comment 14 Mike McCune 2015-03-03 19:55:01 UTC
*** Bug 1061658 has been marked as a duplicate of this bug. ***

Comment 15 Mike McCune 2015-03-12 22:35:45 UTC
Moving to high, reproduced this on SNAP6-C2

Comment 16 Mike McCune 2015-03-17 02:25:53 UTC
Updated summary as this error above occurs both in the CLI and UI

Comment 17 Adam Price 2015-03-17 19:58:22 UTC
Created redmine issue http://projects.theforeman.org/issues/9798 from this bug

Comment 18 Adam Price 2015-03-17 20:03:22 UTC
pull-request opened

https://github.com/Katello/katello/pull/5117

Comment 19 Bryan Kearney 2015-03-21 00:01:34 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/9798 has been closed
-------------
Anonymous
Applied in changeset commit:katello|a312e17ec9748fe1823723b3ace71bc04d165ebb.

Comment 22 sthirugn@redhat.com 2015-03-26 20:22:54 UTC
Verified as per Comment 13

Version Tested: Satellite-6.1.0-RHEL-7-20150324.0

hammer> organization create --name bz-106158-organization
Organization created

hammer> organization list
---|------------------------|------------------------|------------
ID | NAME                   | LABEL                  | DESCRIPTION
---|------------------------|------------------------|------------
3  | bz-106158-organization | bz-106158-organization |            
1  | Default Organization   | Default_Organization   |            
---|------------------------|------------------------|------------

hammer> organization info --id=3
Id:                     3
Name:                   bz-106158-organization
Users:                  

Smart proxies:          
    ibm-x3250m4-05.lab.eng.rdu2.redhat.com
Subnets:                

Compute resources:      

Installation media:     

Templates:              
    Boot disk iPXE - generic host (Bootdisk)
    Boot disk iPXE - host (Bootdisk)
    Kickstart default iPXE (iPXE)
    Kickstart default PXELinux (PXELinux)
    puppet.conf ()
    PXELinux global default (PXELinux)
    Satellite Kickstart Default (provision)
    Satellite Kickstart Default Finish (finish)
    Satellite Kickstart Default User Data (user_data)
    subscription_manager_registration ()
Domains:                

Environments:           

Hostgroups:             

Parameters:             

Created at:             2015/03/26 20:20:17
Updated at:             2015/03/26 20:20:17
Label:                  bz-106158-organization
Description:            
Red Hat Repository URL: https://cdn.redhat.com

hammer> organization delete --id=3
[............................................................................] [100%]

Comment 23 Bryan Kearney 2015-08-11 13:32:42 UTC
This bug is slated to be released with Satellite 6.1.

Comment 24 errata-xmlrpc 2015-08-12 05:08:05 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-2015:1592