Bug 1230153 - Cannot list Available-repositories in repository set using hammer cli in nightly
Summary: Cannot list Available-repositories in repository set using hammer cli in nig...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Hammer
Version: Nightly
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: Unspecified
Assignee: Brad Buckingham
QA Contact: Og Maciel
David O'Brien
URL:
Whiteboard:
: 1230155 (view as bug list)
Depends On:
Blocks: sat61-release-notes
TreeView+ depends on / blocked
 
Reported: 2015-06-10 11:08 UTC by Tazim Kolhar
Modified: 2019-06-13 21:25 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-10-15 18:20:09 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:1911 0 normal SHIPPED_LIVE Satellite 6.1.3 bug fix update 2015-10-15 22:19:19 UTC

Description Tazim Kolhar 2015-06-10 11:08:13 UTC
Description of problem:
Cannot list  Available-repositories in repository set using hammer cli in nightly

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

How reproducible:
everytime

Steps to Reproduce:
1.LANG=en_US.UTF-8 hammer -v -u admin -p changeme --output=csv repository-set available-repositories --product="Red Hat Enterprise Linux Server" --name="Red Hat Enterprise Virtualization Agents for RHEL 6 Server (RPMs)" --organization-id="302"
[ERROR 2015-06-07 22:37:26 Exception] Error: product not found
Error: product not found
[ERROR 2015-06-07 22:37:26 Exception] 

HammerCLIForeman::ResolverError (product not found):
    /usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.2.0/lib/hammer_cli_foreman/id_resolver.rb:200:in `pick_result'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.2.0/lib/hammer_cli_foreman/id_resolver.rb:160:in `find_resource'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.2.0/lib/hammer_cli_foreman/id_resolver.rb:143:in `get_id'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.2.0/lib/hammer_cli_foreman/id_resolver.rb:133:in `product_id'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.2.0/lib/hammer_cli_foreman/commands.rb:149:in `send'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.2.0/lib/hammer_cli_foreman/commands.rb:149:in `get_resource_id'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.2.0/lib/hammer_cli_foreman/commands.rb:218:in `customized_options'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.2.0/lib/hammer_cli_foreman/commands.rb:215:in `each'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.2.0/lib/hammer_cli_foreman/commands.rb:215:in `customized_options'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.2.0/lib/hammer_cli_foreman/commands.rb:239:in `request_params'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli_katello-0.0.14/lib/hammer_cli_katello/repository_set.rb:58:in `request_params'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.2.0/lib/hammer_cli/./apipie/command.rb:43:in `send_request'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.2.0/lib/hammer_cli_foreman/commands.rb:185:in `send_request'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.2.0/lib/hammer_cli_foreman/commands.rb:275:in `send_request'
    /usr/lib/ruby/gems/1.8/gems/hammer_cli_foreman-0.2.0/lib/hammer_cli_foreman/commands.rb:298: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.2.0/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.2.0/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.2.0/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.2.0/bin/hammer:108
    /usr/bin/hammer:19:in `load'
    /usr/bin/hammer:19

2.Stacktrace

  File "/usr/lib64/python2.7/unittest/case.py", line 369, in run
    testMethod()
  File "/home/jenkins/workspace/satellite6-automation-upstream-rhel66-cli/tests/foreman/cli/test_repository_set.py", line 57, in test_repositoryset_available_repositories
    self.assertEqual(result.return_code, 0)
  File "/usr/lib64/python2.7/unittest/case.py", line 553, in assertEqual
    assertion_func(first, second, msg=msg)
  File "/usr/lib64/python2.7/unittest/case.py", line 546, in _baseAssertEqual
    raise self.failureException(msg)
'70 != 0\n--------------------
3.

Actual results:
the command fails

Expected results:
the command works fine

Additional info:
will attach foreman-debug when system is up and running

Comment 2 Mike McCune 2015-07-09 21:49:25 UTC
I reproduced this, the workaround is to use ID instead of product name.

Comment 3 Mike McCune 2015-07-09 22:36:01 UTC
*** Bug 1230155 has been marked as a duplicate of this bug. ***

Comment 5 Brad Buckingham 2015-09-16 16:15:35 UTC
I am not able to reproduce this bug on either the upstream or downstream; therefore, moving it to ON_QA for verification.

upstream: (lastest code)

$ LANG=en_US.UTF-8 bundle exec hammer -v -u admin -p changeme --output=csv repository-set list --product="Red Hat Enterprise Linux Server" --name="Red Hat Enterprise Virtualization Agents for RHEL 6 Server (RPMs)" --organization-id=1
ID,Type,Name
1699,yum,Red Hat Enterprise Virtualization Agents for RHEL 6 Server (RPMs)

downstream: (6.1.1 with ruby193-rubygem-katello-2.2.0.66-1.el7sat.noarch)

# LANG=en_US.UTF-8 hammer -v -u admin -p changeme --output=csv repository-set list --product="Red Hat Enterprise Linux Server" --name="Red Hat Enterprise Virtualization Agents for RHEL 6 Server (RPMs)" --organization-id=1
ID,Type,Name
1699,yum,Red Hat Enterprise Virtualization Agents for RHEL 6 Server (RPMs)

Comment 6 Og Maciel 2015-10-05 19:35:52 UTC
# hammer -v -u admin -p changeme --output=csv repository-set available-repositories --product="Red Hat Enterprise Linux Server" --name="Red Hat Enterprise Virtualization Agents for RHEL 6 Server (RPMs)" --organization-id=1
Name,Arch,Release,Enabled
Red Hat Enterprise Virtualization Agents for RHEL 6 Server RPMs i386 6.1,i386,6.1,false
Red Hat Enterprise Virtualization Agents for RHEL 6 Server RPMs x86_64 6.1,x86_64,6.1,false
Red Hat Enterprise Virtualization Agents for RHEL 6 Server RPMs i386 6.2,i386,6.2,false
Red Hat Enterprise Virtualization Agents for RHEL 6 Server RPMs x86_64 6.2,x86_64,6.2,false
Red Hat Enterprise Virtualization Agents for RHEL 6 Server RPMs i386 6.3,i386,6.3,false
Red Hat Enterprise Virtualization Agents for RHEL 6 Server RPMs x86_64 6.3,x86_64,6.3,false
Red Hat Enterprise Virtualization Agents for RHEL 6 Server RPMs i386 6.4,i386,6.4,false
Red Hat Enterprise Virtualization Agents for RHEL 6 Server RPMs x86_64 6.4,x86_64,6.4,false
Red Hat Enterprise Virtualization Agents for RHEL 6 Server RPMs i386 6.5,i386,6.5,false
Red Hat Enterprise Virtualization Agents for RHEL 6 Server RPMs x86_64 6.5,x86_64,6.5,false
Red Hat Enterprise Virtualization Agents for RHEL 6 Server RPMs i386 6.6,i386,6.6,false
Red Hat Enterprise Virtualization Agents for RHEL 6 Server RPMs x86_64 6.6,x86_64,6.6,false
Red Hat Enterprise Virtualization Agents for RHEL 6 Server RPMs i386 6.7,i386,6.7,false
Red Hat Enterprise Virtualization Agents for RHEL 6 Server RPMs x86_64 6.7,x86_64,6.7,false
Red Hat Enterprise Virtualization Agents for RHEL 6 Server RPMs i386 6Server,i386,6Server,false
Red Hat Enterprise Virtualization Agents for RHEL 6 Server RPMs x86_64 6Server,x86_64,6Server,false

Comment 7 Og Maciel 2015-10-05 19:36:42 UTC
Verified using a system with Satellite-6.1.0-RHEL-7-20151002.0 compose

Comment 9 errata-xmlrpc 2015-10-15 18:20:09 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/RHBA-2015:1911


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