Hide Forgot
Description of problem: hammer erratum list --organization-id : exception if organization has more one product or product repositories Version-Release number of selected component (if applicable): * candlepin-0.9.54.14-1.el7.noarch * candlepin-selinux-0.9.54.14-1.el7.noarch * foreman-1.13.2.1-2.el7sat.noarch * foreman-compute-1.13.2.1-2.el7sat.noarch * foreman-debug-1.13.2.1-2.el7sat.noarch * foreman-discovery-image-3.1.1-16.el7sat.noarch * foreman-ec2-1.13.2.1-2.el7sat.noarch * foreman-gce-1.13.2.1-2.el7sat.noarch * foreman-installer-1.13.2-1.el7sat.noarch * foreman-installer-katello-3.2.1-1.el7sat.noarch * foreman-libvirt-1.13.2.1-2.el7sat.noarch * foreman-openstack-1.13.2.1-2.el7sat.noarch * foreman-ovirt-1.13.2.1-2.el7sat.noarch * foreman-postgresql-1.13.2.1-2.el7sat.noarch * foreman-proxy-1.13.2-1.el7sat.noarch * foreman-rackspace-1.13.2.1-2.el7sat.noarch * foreman-selinux-1.13.2-1.el7sat.noarch * foreman-vmware-1.13.2.1-2.el7sat.noarch * katello-3.2.0-3.el7sat.noarch * katello-certs-tools-2.4.0-1.el7sat.noarch * katello-client-bootstrap-1.2.2-2.el7sat.noarch * katello-common-3.2.0-3.el7sat.noarch * katello-debug-3.2.0-3.el7sat.noarch * katello-default-ca-1.0-1.noarch * katello-installer-base-3.2.1-1.el7sat.noarch * katello-selinux-3.0.1-1.el7sat.noarch * katello-server-ca-1.0-1.noarch * katello-service-3.2.0-3.el7sat.noarch * openldap-2.4.40-13.el7.x86_64 * pulp-client-1.0-1.noarch * pulp-docker-plugins-2.0.4-1.el7sat.noarch * pulp-katello-1.0.2-1.el7sat.noarch * pulp-ostree-plugins-1.1.3-1.el7sat.noarch * pulp-puppet-plugins-2.9.3-1.el7sat.noarch * pulp-puppet-tools-2.9.3-1.el7sat.noarch * pulp-rpm-plugins-2.9.3-1.el7sat.noarch * pulp-selinux-2.9.3-2.el7sat.noarch * pulp-server-2.9.3-2.el7sat.noarch * python-ldap-2.4.15-2.el7.x86_64 * tfm-rubygem-ldap_fluff-0.4.3-1.el7sat.noarch * tfm-rubygem-net-ldap-0.15.0-1.el7sat.noarch How reproducible: Always Steps to Reproduce: 1.Create one organization - Org. 2. Create 2 products with one repository in each product and synchronize them. Make sure both the repositories have some erratum. 3. Now run the cli command: hammer erratum list --organization-id="Org-id" where Org-id is the id or Org return by hammer when created the Org Actual results: HammerCLIForeman::ResolverError (found more than one repository): /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.8.0/lib/hammer_cli_foreman/id_resolver.rb:209:in `pick_result' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.8.0/lib/hammer_cli_foreman/id_resolver.rb:168:in `find_resource' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_katello-0.1.2/lib/hammer_cli_katello/id_resolver.rb:85:in `repository_id' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.8.0/lib/hammer_cli_foreman/commands.rb:154:in `get_resource_id' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.8.0/lib/hammer_cli_foreman/commands.rb:223:in `block in customized_options' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.8.0/lib/hammer_cli_foreman/commands.rb:220:in `each' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.8.0/lib/hammer_cli_foreman/commands.rb:220:in `customized_options' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.8.0/lib/hammer_cli_foreman/commands.rb:244:in `request_params' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.8.0/lib/hammer_cli/apipie/command.rb:43:in `send_request' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.8.0/lib/hammer_cli_foreman/commands.rb:190:in `send_request' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.8.0/lib/hammer_cli_foreman/commands.rb:280:in `send_request' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.8.0/lib/hammer_cli_foreman/commands.rb:303:in `execute' /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:68:in `run' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.8.0/lib/hammer_cli/abstract.rb:22:in `run' /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/subcommand/execution.rb:11:in `execute' /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:68:in `run' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.8.0/lib/hammer_cli/abstract.rb:22:in `run' /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/subcommand/execution.rb:11:in `execute' /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:68:in `run' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.8.0/lib/hammer_cli/abstract.rb:22:in `run' /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:133:in `run' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.8.0/bin/hammer:125:in `<top (required)>' /usr/bin/hammer:23:in `load' /usr/bin/hammer:23:in `<main>' Expected results: hammer should return the erratum info of all Org products repositories Additional info: 1. the same error is returned if a product contain 2 repositories e.g. hammer erratum list --product-id="Product-id" where Product-id is the product id that contain 2 repositories 2. on 6.2 this command work as expected
Hammer erratum list by organization has been fixed by https://github.com/Katello/hammer-cli-katello/pull/502 Hammer erratum list by product would be a new feature request rather than a regression. It currently works as designed. Could you open up a new BZ to enhance hammer erratum command to honor the product-id?
Hi Christine, Ok will open a new bug for product-id, Concerning this bug, for the moment it's failing on the latest 6.3 build, wait next 6.3 build to verify
This test is still failing Versions: * candlepin-2.0.40-1.el7.noarch * candlepin-selinux-2.0.40-1.el7.noarch * foreman-1.15.2-1.el7sat.noarch * foreman-cli-1.15.2-1.el7sat.noarch * foreman-compute-1.15.2-1.el7sat.noarch * foreman-debug-1.15.2-1.el7sat.noarch * foreman-discovery-image-3.1.1-22.el7sat.noarch * foreman-ec2-1.15.2-1.el7sat.noarch * foreman-gce-1.15.2-1.el7sat.noarch * foreman-installer-1.15.2-1.el7sat.noarch * foreman-installer-katello-3.4.4-1.el7sat.noarch * foreman-libvirt-1.15.2-1.el7sat.noarch * foreman-openstack-1.15.2-1.el7sat.noarch * foreman-ovirt-1.15.2-1.el7sat.noarch * foreman-postgresql-1.15.2-1.el7sat.noarch * foreman-proxy-1.15.2-1.el7sat.noarch * foreman-rackspace-1.15.2-1.el7sat.noarch * foreman-selinux-1.15.2-1.el7sat.noarch * foreman-vmware-1.15.2-1.el7sat.noarch * katello-3.4.4-2.el7sat.noarch * katello-ca-consumer-sat-r220-02.lab.eng.rdu2.redhat.com-1.0-4.noarch * katello-certs-tools-2.4.0-1.el7sat.noarch * katello-client-bootstrap-1.4.0-1.el7sat.noarch * katello-common-3.4.4-2.el7sat.noarch * katello-debug-3.4.4-2.el7sat.noarch * katello-default-ca-1.0-1.noarch * katello-installer-base-3.4.4-1.el7sat.noarch * katello-selinux-3.0.2-1.el7sat.noarch * katello-server-ca-1.0-1.noarch * katello-service-3.4.4-2.el7sat.noarch * openldap-2.4.44-5.el7.x86_64 * pulp-client-1.0-1.noarch * pulp-docker-plugins-2.3.0-1.el7sat.noarch * pulp-katello-1.0.2-1.el7sat.noarch * pulp-ostree-plugins-1.2.1-1.el7sat.noarch * pulp-puppet-plugins-2.12.2-1.el7sat.noarch * pulp-puppet-tools-2.12.2-1.el7sat.noarch * pulp-rpm-plugins-2.12.2-2.el7sat.noarch * pulp-selinux-2.12.2-2.el7sat.noarch * pulp-server-2.12.2-2.el7sat.noarch * python-ldap-2.4.15-2.el7.x86_64 * tfm-rubygem-ldap_fluff-0.4.6-1.el7sat.noarch * tfm-rubygem-net-ldap-0.15.0-1.el7sat.noarch automation log _______________________________________________________________________ 2017-08-05 11:10:59 - robottelo.ssh - INFO - >>> LANG=en_US.UTF-8 hammer -v -u admin -p changeme --output=csv erratum list --organization-id="92" --per-page="10000" 2017-08-05 11:11:01 - robottelo.ssh - INFO - <<< stderr [ERROR 2017-08-05 11:11:01 Exception] Error: found more than one repository Error: found more than one repository [ERROR 2017-08-05 11:11:01 Exception] HammerCLIForeman::ResolverError (found more than one repository): /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.10.2/lib/hammer_cli_foreman/id_resolver.rb:209:in `pick_result' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.10.2/lib/hammer_cli_foreman/id_resolver.rb:168:in `find_resource' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_katello-0.10.0/lib/hammer_cli_katello/id_resolver.rb:83:in `repository_id' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.10.2/lib/hammer_cli_foreman/commands.rb:130:in `get_resource_id' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.10.2/lib/hammer_cli_foreman/commands.rb:199:in `block in customized_options' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.10.2/lib/hammer_cli_foreman/commands.rb:196:in `each' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.10.2/lib/hammer_cli_foreman/commands.rb:196:in `customized_options' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.10.2/lib/hammer_cli_foreman/commands.rb:220:in `request_params' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.10.2/lib/hammer_cli/apipie/command.rb:43:in `send_request' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.10.2/lib/hammer_cli_foreman/commands.rb:166:in `send_request' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.10.2/lib/hammer_cli_foreman/commands.rb:256:in `send_request' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.10.2/lib/hammer_cli_foreman/commands.rb:279:in `execute' /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:68:in `run' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.10.2/lib/hammer_cli/abstract.rb:29:in `run' /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/subcommand/execution.rb:11:in `execute' /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:68:in `run' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.10.2/lib/hammer_cli/abstract.rb:29:in `run' /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/subcommand/execution.rb:11:in `execute' /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:68:in `run' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.10.2/lib/hammer_cli/abstract.rb:29:in `run' /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:133:in `run' /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.10.2/bin/hammer:147:in `<top (required)>' /usr/bin/hammer:23:in `load' /usr/bin/hammer:23:in `<main>'
(In reply to Djebran Lezzoum from comment #5) > This test is still failing > > Versions: > * candlepin-2.0.40-1.el7.noarch > * candlepin-selinux-2.0.40-1.el7.noarch > * foreman-1.15.2-1.el7sat.noarch > * foreman-cli-1.15.2-1.el7sat.noarch > * foreman-compute-1.15.2-1.el7sat.noarch > * foreman-debug-1.15.2-1.el7sat.noarch > * foreman-discovery-image-3.1.1-22.el7sat.noarch > * foreman-ec2-1.15.2-1.el7sat.noarch > * foreman-gce-1.15.2-1.el7sat.noarch > * foreman-installer-1.15.2-1.el7sat.noarch > * foreman-installer-katello-3.4.4-1.el7sat.noarch > * foreman-libvirt-1.15.2-1.el7sat.noarch > * foreman-openstack-1.15.2-1.el7sat.noarch > * foreman-ovirt-1.15.2-1.el7sat.noarch > * foreman-postgresql-1.15.2-1.el7sat.noarch > * foreman-proxy-1.15.2-1.el7sat.noarch > * foreman-rackspace-1.15.2-1.el7sat.noarch > * foreman-selinux-1.15.2-1.el7sat.noarch > * foreman-vmware-1.15.2-1.el7sat.noarch > * katello-3.4.4-2.el7sat.noarch > * katello-ca-consumer-sat-r220-02.lab.eng.rdu2.redhat.com-1.0-4.noarch > * katello-certs-tools-2.4.0-1.el7sat.noarch > * katello-client-bootstrap-1.4.0-1.el7sat.noarch > * katello-common-3.4.4-2.el7sat.noarch > * katello-debug-3.4.4-2.el7sat.noarch > * katello-default-ca-1.0-1.noarch > * katello-installer-base-3.4.4-1.el7sat.noarch > * katello-selinux-3.0.2-1.el7sat.noarch > * katello-server-ca-1.0-1.noarch > * katello-service-3.4.4-2.el7sat.noarch > * openldap-2.4.44-5.el7.x86_64 > * pulp-client-1.0-1.noarch > * pulp-docker-plugins-2.3.0-1.el7sat.noarch > * pulp-katello-1.0.2-1.el7sat.noarch > * pulp-ostree-plugins-1.2.1-1.el7sat.noarch > * pulp-puppet-plugins-2.12.2-1.el7sat.noarch > * pulp-puppet-tools-2.12.2-1.el7sat.noarch > * pulp-rpm-plugins-2.12.2-2.el7sat.noarch > * pulp-selinux-2.12.2-2.el7sat.noarch > * pulp-server-2.12.2-2.el7sat.noarch > * python-ldap-2.4.15-2.el7.x86_64 > * tfm-rubygem-ldap_fluff-0.4.6-1.el7sat.noarch > * tfm-rubygem-net-ldap-0.15.0-1.el7sat.noarch > > > > automation log > _______________________________________________________________________ > 2017-08-05 11:10:59 - robottelo.ssh - INFO - >>> LANG=en_US.UTF-8 hammer -v > -u admin -p changeme --output=csv erratum list --organization-id="92" > --per-page="10000" > 2017-08-05 11:11:01 - robottelo.ssh - INFO - <<< stderr > [ERROR 2017-08-05 11:11:01 Exception] Error: found more than one repository > Error: found more than one repository > [ERROR 2017-08-05 11:11:01 Exception] > > HammerCLIForeman::ResolverError (found more than one repository): > > /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.10.2/lib/ > hammer_cli_foreman/id_resolver.rb:209:in `pick_result' > > /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.10.2/lib/ > hammer_cli_foreman/id_resolver.rb:168:in `find_resource' > > /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_katello-0.10.0/lib/ > hammer_cli_katello/id_resolver.rb:83:in `repository_id' > > /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.10.2/lib/ > hammer_cli_foreman/commands.rb:130:in `get_resource_id' > > /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.10.2/lib/ > hammer_cli_foreman/commands.rb:199:in `block in customized_options' > > /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.10.2/lib/ > hammer_cli_foreman/commands.rb:196:in `each' > > /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.10.2/lib/ > hammer_cli_foreman/commands.rb:196:in `customized_options' > > /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.10.2/lib/ > hammer_cli_foreman/commands.rb:220:in `request_params' > > /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.10.2/lib/ > hammer_cli/apipie/command.rb:43:in `send_request' > > /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.10.2/lib/ > hammer_cli_foreman/commands.rb:166:in `send_request' > > /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.10.2/lib/ > hammer_cli_foreman/commands.rb:256:in `send_request' > > /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.10.2/lib/ > hammer_cli_foreman/commands.rb:279:in `execute' > > /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command. > rb:68:in `run' > > /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.10.2/lib/ > hammer_cli/abstract.rb:29:in `run' > > /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/ > subcommand/execution.rb:11:in `execute' > > /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command. > rb:68:in `run' > > /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.10.2/lib/ > hammer_cli/abstract.rb:29:in `run' > > /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/ > subcommand/execution.rb:11:in `execute' > > /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command. > rb:68:in `run' > > /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.10.2/lib/ > hammer_cli/abstract.rb:29:in `run' > > /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command. > rb:133:in `run' > > /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.10.2/bin/hammer: > 147:in `<top (required)>' > /usr/bin/hammer:23:in `load' > /usr/bin/hammer:23:in `<main>' Did you bring in the code from the attached foreman issue? The errors you're showing are the ones before the fix from the attached foreman issue.
Hi Christine, checked the lasted satellite snap 12, that fix is not shipped.
Moving to POST and setting 'Fixed in Version' to katello-3.5.0, based upon the status of the upstream issue.
Hammer is correctly listing errata by Organization on Satellite 6.3 snap 18. Also it can list erratum list present in a product, but only if it has only on repository. If it has more than one user must list errata list using also repository-id: hammer erratum list --product-id=13 --repository-id=3 Once listing errata as a new feature as filled in another BZ, I'm moving this one to VERIFIED state.
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/RHSA-2018:0336