Project

General

Profile

Actions

Bug #13495

closed

All package/package-groups commands along with host-name raises failed with error: found more than one host

Added by Sachin Ghai over 8 years ago. Updated about 6 years ago.

Status:
Rejected
Priority:
Normal
Assignee:
-
Category:
Hosts
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1303570
Description of problem:
I was trying to perform package/package-group install/remove/upgrade operations via hammer. All these operations works fine if pass the host-id. However If I use --host option with host-name, hammer raises error as below:

[root@cloud-q~]# hammer -u admin -p changeme host package install --host cloud-qe-3.lab.redhat.com --packages zsh

Could not install packages:
Error: found more than one host

~]# hammer -u admin -p changeme host package-group install --host cloud-qe-3.lab.redhat.com --groups 'Development Tools'
Could not install package-groups:
Error: found more than one host

Version-Release number of selected component (if applicable):
katello-2.5.0-3.nightly.el7.noarch
foreman-release-1.11.0-0.develop.201601211808gitd546fd0.el7.noarch
tfm-rubygem-hammer_cli_katello-0.0.20-1.el7.noarch
tfm-rubygem-hammer_cli-0.5.1-2.el7.noarch

How reproducible:
always

Steps to Reproduce:
1. Any package/package-group sub-command with --host instead of --host-id
2.
3.

Actual results:
Could not install package-groups:
Error: found more than one host

Expected results:

Additional info:

[ERROR 2016-02-01 05:22:56 Exception] Error: found more than one host
Could not install packages:
Error: found more than one host
[ERROR 2016-02-01 05:22:56 Exception]

HammerCLIForeman::ResolverError (found more than one host):
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.5.1/lib/hammer_cli_foreman/id_resolver.rb:201:in `pick_result'
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.5.1/lib/hammer_cli_foreman/id_resolver.rb:160:in `find_resource'
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.5.1/lib/hammer_cli_foreman/id_resolver.rb:143:in `get_id'
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.5.1/lib/hammer_cli_foreman/id_resolver.rb:133:in `block (2 levels) in define_id_finders'
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.5.1/lib/hammer_cli_foreman/commands.rb:153:in `get_resource_id'
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.5.1/lib/hammer_cli_foreman/commands.rb:222:in `block in customized_options'
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.5.1/lib/hammer_cli_foreman/commands.rb:219:in `each'
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.5.1/lib/hammer_cli_foreman/commands.rb:219:in `customized_options'
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.5.1/lib/hammer_cli_foreman/commands.rb:243:in `request_params'
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1/lib/hammer_cli/apipie/command.rb:43:in `send_request'
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-0.5.1/lib/hammer_cli_foreman/commands.rb:189:in `send_request'
/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman_tasks-0.0.8/lib/hammer_cli_foreman_tasks/async_command.rb:14: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.5.1/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.5.1/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.5.1/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.5.1/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.5.1/bin/hammer:125:in `<top (required)>'
/usr/bin/hammer:23:in `load'
/usr/bin/hammer:23:in `<main>'

Actions #1

Updated by Eric Helms over 8 years ago

  • Category changed from Hammer to Hosts
  • Translation missing: en.field_release set to 86
Actions #2

Updated by Eric Helms over 8 years ago

  • Translation missing: en.field_release changed from 86 to 144
Actions #3

Updated by Eric Helms about 8 years ago

  • Translation missing: en.field_release changed from 144 to 168
Actions #4

Updated by Eric Helms about 8 years ago

  • Translation missing: en.field_release deleted (168)
Actions #5

Updated by Justin Sherrill about 8 years ago

  • Status changed from New to Rejected
  • Translation missing: en.field_release set to 166

This should be working properly

Actions

Also available in: Atom PDF