Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1230153 - Cannot list Available-repositories in repository set using hammer cli in nightly
Cannot list Available-repositories in repository set using hammer cli in nig...
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Hammer (Show other bugs)
Nightly
x86_64 Linux
unspecified Severity high (vote)
: 6.1.3
: Unused
Assigned To: Brad Buckingham
Og Maciel
David O'Brien
: ReleaseNotes, Triaged
: 1230155 (view as bug list)
Depends On:
Blocks: sat61-release-notes
  Show dependency treegraph
 
Reported: 2015-06-10 07:08 EDT by Tazim Kolhar
Modified: 2018-08-30 17 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-10-15 14:20:09 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
Red Hat Product Errata RHBA-2015:1911 normal SHIPPED_LIVE Satellite 6.1.3 bug fix update 2015-10-15 18:19:19 EDT

  None (edit)
Description Tazim Kolhar 2015-06-10 07:08:13 EDT
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 17:49:25 EDT
I reproduced this, the workaround is to use ID instead of product name.
Comment 3 Mike McCune 2015-07-09 18:36:01 EDT
*** Bug 1230155 has been marked as a duplicate of this bug. ***
Comment 5 Brad Buckingham 2015-09-16 12:15:35 EDT
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 15:35:52 EDT
# 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 15:36:42 EDT
Verified using a system with Satellite-6.1.0-RHEL-7-20151002.0 compose
Comment 9 errata-xmlrpc 2015-10-15 14:20:09 EDT
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.