Project

General

Profile

Actions

Bug #13559

closed

Exception not printed with `%': malformed format string - T (ArgumentError) error

Added by Dirk Mayer almost 9 years ago. Updated almost 2 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Hammer core
Target version:
-
Difficulty:
Triaged:
No
Team Backlog:
Fixed in Releases:
Found in Releases:
In Kanboard:

Description

Using the following hammer command from command line failed withe a ruby exception:

hammer host create --environment-id 1 --architecture-id 1 --domain-id 1 --puppet-proxy-id 1 --operatingsystem-id 1 --hostgroup-id 2 --provision-method build --ip '172.17.31.12' --mac 'aa:aa:aa:aa:aa:aa' --name 'host1.localdomain' --subnet-id 1 --build 1 --enabled 1 --managed 1 --puppet-ca-proxy-id 1 --root-pass 'mycomplexpass' --interface 'primary=true,provision=true,type=interface'

Returning ruby exception:
/opt/theforeman/tfm/root/usr/share/gems/gems/fast_gettext-0.9.2/lib/fast_gettext/vendor/string.rb:70:in `%': malformed format string - T (ArgumentError)
from /opt/theforeman/tfm/root/usr/share/gems/gems/fast_gettext-0.9.2/lib/fast_gettext/vendor/string.rb:70:in `
'
from /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1/lib/hammer_cli/utils.rb:12:in `format'
from /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1/lib/hammer_cli/output/adapter/abstract.rb:27:in `print_error'
from /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1/lib/hammer_cli/output/output.rb:16:in `print_error'
from /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1/lib/hammer_cli/exception_handler.rb:45:in `print_error'
from /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1/lib/hammer_cli/exception_handler.rb:62:in `handle_general_exception'
from /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1/lib/hammer_cli/exception_handler.rb:28:in `handle_exception'
from /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1/lib/hammer_cli/abstract.rb:189:in `handle_exception'
from /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1/lib/hammer_cli/abstract.rb:26:in `rescue in run'
from /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1/lib/hammer_cli/abstract.rb:22:in `run'
from /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:133:in `run'
from /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-0.5.1/bin/hammer:125:in `<top (required)>'
from /usr/bin/hammer:23:in `load'
from /usr/bin/hammer:23:in `<main>'

The exactly same command worked with the version of hammer installed with foreman 1.9.3

The foreman installation is running on RHEL 7.2

rpms:
  1. yum list hammer_cli

Installed Packages
tfm-rubygem-hammer_cli.noarch 0.5.1-1.el7
tfm-rubygem-hammer_cli_foreman.noarch 0.5.1-1.el7
Available Packages
rubygem-hammer_cli.noarch 0.3.0-1.el7
rubygem-hammer_cli_foreman.noarch

Actions

Also available in: Atom PDF