Bug #4427

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

Added by Bob Jones over 3 years ago. Updated 15 days ago.

Status:Closed
Priority:Normal
Assigned To:-
Category:-
Target version:-
Difficulty: Bugzilla link:
Found in release: Pull request:
Story points-
Velocity based estimate-

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

History

#1 Updated by Bob Jones over 3 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

#2 Updated by Tomáš Strachota almost 2 years ago

  • Target version set to hammer-cli 0.6.0

#3 Updated by Tomáš Strachota over 1 year ago

  • Target version changed from hammer-cli 0.6.0 to hammer-cli 0.7.0

#4 Updated by Tomáš Strachota 18 days ago

  • Target version deleted (hammer-cli 0.7.0)

#5 Updated by Tomáš Strachota 15 days 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
...

Also available in: Atom PDF