Bug 1021039 - hammer CLI: All subcommands associated with "organization" and "location" fail
hammer CLI: All subcommands associated with "organization" and "location" fail
Status: CLOSED CURRENTRELEASE
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Provisioning (Show other bugs)
6.0.2
Unspecified Unspecified
unspecified Severity medium (vote)
: Unspecified
: --
Assigned To: Martin Bacovsky
Katello QA List
http://projects.theforeman.org/issues...
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-18 16:22 EDT by Apurva Bhole
Modified: 2016-04-22 12:40 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-04-24 13:07:24 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Foreman Issue Tracker 3370 None None None 2016-04-22 12:40 EDT

  None (edit)
Description Apurva Bhole 2013-10-18 16:22:46 EDT
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 11:29:24 EDT
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 15:40:14 EDT
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 16:27:44 EDT
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 09:00:39 EDT
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 14:03:07 EDT
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 12:34:47 EDT
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 12:39:38 EDT
(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 12:47:16 EDT
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 13:07:24 EDT
This was verified and delivered with MDP2. Closing it out.

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