Project

General

Profile

Actions

Bug #4427

closed

`host info` fails after adding a parameter to a host => malformed format string - ArgumentError

Added by Bob Jones about 10 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Difficulty:
Triaged:
Team Backlog:
Fixed in Releases:
Found in Releases:
In Kanboard:

Description

I believe this bug is similar to that found in Bug #4136. That bug was reported as fixed in version 0.0.18, however that is the version I am running and am getting the error.

hammer host info --id=22 fails if a parameter has been added to the host:
/usr/lib/ruby/gems/1.8/gems/hammer_cli-0.0.18/lib/hammer_cli/utils.rb:12:in `%': malformed format string - %{ (ArgumentError)
from /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.0.18/lib/hammer_cli/utils.rb:12:in `format'
from /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.0.18/lib/hammer_cli/output/adapter/abstract.rb:27:in `print_error'
from /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.0.18/lib/hammer_cli/output/output.rb:16:in `print_error'
from /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.0.18/lib/hammer_cli/exception_handler.rb:42:in `print_error'
from /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.0.18/lib/hammer_cli/exception_handler.rb:58:in `handle_general_exception'
from /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.0.18/lib/hammer_cli/exception_handler.rb:25:in `send'
from /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.0.18/lib/hammer_cli/exception_handler.rb:25:in `handle_exception'
from /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.0.18/lib/hammer_cli/./apipie/../abstract.rb:177:in `handle_exception'
from /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.0.18/lib/hammer_cli/./apipie/../abstract.rb:26:in `run'
from /usr/lib/ruby/gems/1.8/gems/clamp-0.6.2/lib/clamp/command.rb:125:in `run'
from /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.0.18/bin/hammer:61
from /usr/bin/hammer:19:in `load'
from /usr/bin/hammer:19

Version-Release number of selected component (if applicable):
rubygem-foreman_api-0.1.11-1.el6.noarch
foreman-postgresql-1.4.0-1.el6.noarch
rubygem-hammer_cli_foreman-0.0.18-1.el6.noarch
foreman-release-1.4.0-1.el6.noarch
foreman-proxy-1.4.0-1.el6.noarch
foreman-installer-1.4.0-1.el6.noarch
foreman-1.4.0-1.el6.noarch

Actions #1

Updated by Bob Jones about 10 years ago

Updated to latest foreman release and behavior is the same:

Version-Release number of selected component (if applicable):
rubygem-foreman_api-0.1.11-1.el6.noarch
foreman-installer-1.4.1-1.el6.noarch
foreman-release-1.4.1-2.el6.noarch
rubygem-hammer_cli_foreman-0.0.18-1.el6.noarch
foreman-postgresql-1.4.1-2.el6.noarch
foreman-1.4.1-2.el6.noarch
foreman-proxy-1.4.1-1.el6.noarch

Actions #2

Updated by Tomáš Strachota over 8 years ago

  • Target version set to hammer-cli 0.6.0
Actions #3

Updated by Tomáš Strachota about 8 years ago

  • Target version changed from hammer-cli 0.6.0 to hammer-cli 0.7.0
Actions #4

Updated by Tomáš Strachota over 6 years ago

  • Target version deleted (hammer-cli 0.7.0)
Actions #5

Updated by Tomáš Strachota over 6 years ago

  • Status changed from New to Closed

Tested with latest hammer-cli-foreman 0.11.0 and the issue is fixed in that version:

> hammer host set-parameter --host-id 8 --name testparam --value testvalue
New host parameter created
> hammer host info --id 8
...
Parameters:               
    testparam => testvalue
...
Actions

Also available in: Atom PDF