Bug 1021039

Summary: hammer CLI: All subcommands associated with "organization" and "location" fail
Product: Red Hat Satellite Reporter: Apurva Bhole <abhole>
Component: ProvisioningAssignee: Martin Bacovsky <mbacovsk>
Status: CLOSED CURRENTRELEASE QA Contact: Katello QA List <katello-qa-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.0.2CC: cwelton, dcleal, jmontleo, omaciel, skottler
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
URL: http://projects.theforeman.org/issues/3370
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-04-24 17:07:24 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:

Description Apurva Bhole 2013-10-18 20:22:46 UTC
Description of problem:
All subcommands associated with hammer organization fail with message "The server does not support such operation."

Version-Release number of selected component (if applicable):
# rpm -qa | grep foreman
katello-configure-foreman-1.4.7-5.el6sat.noarch
foreman-1.3.0-18.el6sat.noarch
foreman-proxy-1.3.0-3.el6sat.noarch
ruby193-rubygem-foreman-katello-engine-0.0.17-6.el6sat.noarch
ruby193-rubygem-katello-foreman-engine-0.0.11-3.el6sat.noarch
katello-foreman-all-1.4.6-39.el6sat.noarch
ruby193-rubygem-foreman_api-0.1.6-1.el6sat.noarch
rubygem-foreman_api-0.1.6-1.el6sat.noarch
rubygem-hammer_cli_foreman-0.0.7-2.el6sat.noarch
foreman-postgresql-1.3.0-18.el6sat.noarch
katello-configure-foreman-proxy-1.4.7-5.el6sat.noarch

How reproducible:
always

Steps to Reproduce:
1. hammer organization create --name sampleOrg
2. hammer organization list

Actual results:
The server does not support such operation.

Expected results:
The commands must work normally

Comment 2 Martin Bacovsky 2013-10-21 15:29:24 UTC
The issue here is that in katello cli the organizations are under 'org' command while in Foreman it is the 'organization' command. If you change the organization in your commands to 'org' it should work. I'll check why the server replied it doesn't support such op. Might be orgs turned off or some error.

For the user this may be awkward and the question is how we want it to behave.

Comment 3 Apurva Bhole 2013-10-22 19:40:14 UTC
The same issue exist with the 'location' command as well.

Steps to Reproduce:
1. hammer location create --name sampleLocation
2. hammer location list

Actual results:
The server does not support such operation.

Expected results:
The commands must work normally

Comment 4 Apurva Bhole 2013-10-22 20:27:44 UTC
rpm -qa | grep hammer
rubygem-hammer_cli-0.0.7-2.el6sat.noarch
rubygem-hammer_cli_foreman-0.0.7-2.el6sat.noarch

Comment 5 Martin Bacovsky 2013-10-23 13:00:39 UTC
This is caused by rubygem-foreman_api that was generated with apipie lib with a bug. I'll update hammer CLI foreman deps. It will need version 0.1.7.

As a workaround you could try; gem install foreman_api && service httpd restart

Comment 6 Martin Bacovsky 2013-10-23 18:03:07 UTC
rubygem-hammer_cli_foreman >= 0.0.8 fixes this issue. This package and related rubygem-foreman_api should be part of Snap 7

Comment 8 Corey Welton 2013-10-25 16:34:47 UTC
The initial report for 'organization' appears to be fixed. This does not appeared fixed for comment #3 ('location'), however.

[root@cloud-qe-21 ~]# hammer location create --name sampleLocation
The server does not support such operation.
[root@cloud-qe-21 ~]#  hammer location list
The server does not support such operation.

[root@cloud-qe-21 ~]# rpm -qa | grep hammer
rubygem-hammer_cli-0.0.7-2.el6sat.noarch
rubygem-hammer_cli_foreman-0.0.8-2.el6sat.noarch

Satellite-6.0.2-RHEL-6-20131023.1

Comment 9 Dominic Cleal 2013-10-25 16:39:38 UTC
(In reply to Corey Welton from comment #8)
> The initial report for 'organization' appears to be fixed. This does not
> appeared fixed for comment #3 ('location'), however.
> 
> [root@cloud-qe-21 ~]# hammer location create --name sampleLocation
> The server does not support such operation.

Sat6 doesn't ship with locations enabled: check /etc/foreman/settings.yaml, it should have ":locations_enabled: false", but organisations enabled.

I think this error message is accurate.

Comment 10 Corey Welton 2013-10-25 16:47:16 UTC
Indeed, that makes sense. There is presently no "locations_enabled" in the settings.yaml, so it defaults to false.  Locations being enabled is not really in scope for testing atm, so I think we can consider this one Verified.

Satellite-6.0.2-RHEL-6-20131023.1

Comment 14 Bryan Kearney 2014-04-24 17:07:24 UTC
This was verified and delivered with MDP2. Closing it out.