Bug 1248084 - Enable sat6 tools repository failed in hammer
Enable sat6 tools repository failed in hammer
Status: CLOSED CURRENTRELEASE
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Content Management (Show other bugs)
6.1.0
Unspecified Unspecified
unspecified Severity high (vote)
: Unspecified
: --
Assigned To: Katello Bug Bin
sthirugn@redhat.com
: Reopened, Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-07-29 10:45 EDT by sthirugn@redhat.com
Modified: 2017-02-23 14:48 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-08-12 12:03:05 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)

  None (edit)
Description sthirugn@redhat.com 2015-07-29 10:45:59 EDT
Description of problem:
Enable sat6 tools repository failed in hammer

Version-Release number of selected component (if applicable):
Sat 6.1 GA Snap 15

How reproducible:
Always

Steps to Reproduce:
Using --releasever:
# LANG=en_US.UTF-8  hammer -v -u admin -p changeme --output=csv repository-set enable --product="Red Hat Enterprise Linux Server" --basearch="x86_64" --releasever="7Server" --name="Red Hat Satellite Tools 6 Beta (for RHEL 7 Server) (RPMs)" --organization-id="310"
[ERROR 2015-07-29 10:43:45 Exception] ["releasever"] cannot be specified for Red Hat Satellite Tools 6 Beta (for RHEL 7 Server) (RPMs) as that information is not substituable in /content/beta/rhel/server/7/$basearch/sat-tools/6/os 
Could not enable repository:
  ["releasever"] cannot be specified for Red Hat Satellite Tools 6 Beta (for RHEL 7 Server) (RPMs) as that information is not substituable in /content/beta/rhel/server/7/$basearch/sat-tools/6/os 
[ERROR 2015-07-29 10:43:45 Exception] 

RestClient::UnprocessableEntity (422 Unprocessable Entity):
    /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:80:in `put'
    /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.11/lib/hammer_cli/./apipie/command.rb:43:in `send_request'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.1.4.14/lib/hammer_cli_foreman/commands.rb:185:in `send_request'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.4.11/lib/hammer_cli/./apipie/command.rb:34: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.4.11/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:67:in `run'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.4.11/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:67:in `run'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.4.11/lib/hammer_cli/./apipie/../abstract.rb:23: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.4.11/bin/hammer:108
    /usr/bin/hammer:19:in `load'
    /usr/bin/hammer:19




Without using --releasever:
# LANG=en_US.UTF-8  hammer -v -u admin -p changeme --output=csv repository-set enable --product="Red Hat Enterprise Linux Server" --basearch="x86_64" --name="Red Hat Satellite Tools 6 Beta (for RHEL 7 Server) (RPMs)" --organization-id="310"
[ERROR 2015-07-29 10:44:50 Exception] Missing arguments for 'releasever'
Could not enable repository:
  Missing arguments for 'releasever'
[ERROR 2015-07-29 10:44:50 Exception] 

ApipieBindings::MissingArgumentsError (Missing arguments for 'releasever'):
    /usr/lib/ruby/gems/1.8/gems/apipie-bindings-0.0.11/lib/apipie_bindings/action.rb:62:in `validate!'
    /usr/lib/ruby/gems/1.8/gems/apipie-bindings-0.0.11/lib/apipie_bindings/api.rb:158: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.11/lib/hammer_cli/./apipie/command.rb:43:in `send_request'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.1.4.14/lib/hammer_cli_foreman/commands.rb:185:in `send_request'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.4.11/lib/hammer_cli/./apipie/command.rb:34: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.4.11/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:67:in `run'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.4.11/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:67:in `run'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.1.4.11/lib/hammer_cli/./apipie/../abstract.rb:23: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.4.11/bin/hammer:108
    /usr/bin/hammer:19:in `load'
    /usr/bin/hammer:19

Actual results:
Error as shown above

Expected results:
No error

Additional info:
Comment 2 Mike McCune 2015-07-30 09:34:22 EDT
This is behaving exactly as designed. There is no 'releasever' for that repo and the error message is stating so.

CLOSED:NOTABUG
Comment 4 sthirugn@redhat.com 2015-07-30 10:23:54 EDT
(In reply to Mike McCune from comment #2)
> This is behaving exactly as designed. There is no 'releasever' for that repo
> and the error message is stating so.
> 
> CLOSED:NOTABUG

Did you see the full description of the bug.  There is a section which says "Without using --releasever:" also errored.
Comment 5 sthirugn@redhat.com 2015-07-30 17:16:19 EDT
Verified in Sat 6.1 GA Snap 15.

hammer> repository-set enable --product="Red Hat Enterprise Linux Server" --basearch="x86_64"  --name="Red Hat Satellite Tools 6 Beta (for RHEL 7 Server) (RPMs)" --organization-id="4"Repository enabled

hammer> repository-set disable --product="Red Hat Enterprise Linux Server" --basearch="x86_64"  --name="Red Hat Satellite Tools 6 Beta (for RHEL 7 Server) (RPMs)" --organization-id="4"
Repository disabled

hammer> repository-set enable --product="Red Hat Enterprise Linux Server" --basearch="x86_64"  --name="Red Hat Enterprise Linux 6 Server (RPMs)" --organization-id="4" --releasever='6.7'
Repository enabled

hammer> repository-set disable --product="Red Hat Enterprise Linux Server" --basearch="x86_64"  --name="Red Hat Enterprise Linux 6 Server (RPMs)" --organization-id="4" --releasever='6.7'
Repository disabled
Comment 6 Bryan Kearney 2015-08-12 12:03:05 EDT
This bug was fixed in Satellite 6.1.1 which was delivered on 12 August, 2015.

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