Bug 1053573

Summary: Hammer : CLI `os info` fails after the adding parameter to os
Product: Red Hat Satellite Reporter: Tazim Kolhar <tkolhar>
Component: ProvisioningAssignee: Ohad Levy <ohadlevy>
Status: CLOSED CURRENTRELEASE QA Contact: Sachin Ghai <sghai>
Severity: medium Docs Contact:
Priority: unspecified    
Version: NightlyCC: cwelton, dcleal, mbacovsk, ohadlevy, omaciel, sghai
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
URL: http://projects.theforeman.org/issues/4136
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-07-02 14:08:27 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
foreman-debug none

Description Tazim Kolhar 2014-01-15 12:45:38 UTC
Created attachment 850477 [details]
foreman-debug

Description of problem:
`os info` fails after the adding parameter to os 

Version-Release number of selected component (if applicable):
# rpm -qa | grep foreman
rubygem-hammer_cli_foreman-0.0.15-1.el6.noarch
foreman-installer-1.4.0-0.develop.201401102003gitcc00eed.el6.noarch
foreman-selinux-1.4.0-0.develop.201311220906gite342a0b.el6.noarch
rubygem-foreman_api-0.1.9-1.el6.noarch
foreman-compute-1.4.0-0.develop.201401111533git229d743.el6.noarch
foreman-proxy-1.4.0-0.develop.201401031522gitd3509e6.el6.noarch
foreman-libvirt-1.4.0-0.develop.201401111533git229d743.el6.noarch
foreman-release-1.4.0-0.develop.201401111533git229d743.el6.noarch
foreman-1.4.0-0.develop.201401111533git229d743.el6.noarch
foreman-ovirt-1.4.0-0.develop.201401111533git229d743.el6.noarch
foreman-postgresql-1.4.0-0.develop.201401111533git229d743.el6.noarch


How reproducible:
everytime

Steps to Reproduce:
1.# hammer os set_parameter --os-id 6 --name testname --value testvalue
New operating system parameter created

2.# hammer os info --id 6
Id:                  6
Name:                testos 4.3
Release name:        
Family:              Debian
Installation media:  
Architectures:       
Partition tables:    
Config templates:    
Parameters:          
/usr/lib/ruby/gems/1.8/gems/hammer_cli-0.0.14/lib/hammer_cli/utils.rb:12:in `%': malformed format string - %{ (ArgumentError)
	from /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.0.14/lib/hammer_cli/utils.rb:12:in `format'
	from /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.0.14/lib/hammer_cli/output/adapter/abstract.rb:27:in `print_error'
	from /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.0.14/lib/hammer_cli/output/output.rb:16:in `print_error'
	from /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.0.14/lib/hammer_cli/exception_handler.rb:42:in `print_error'
	from /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.0.14/lib/hammer_cli/exception_handler.rb:58:in `handle_general_exception'
	from /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.0.14/lib/hammer_cli/exception_handler.rb:25:in `send'
	from /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.0.14/lib/hammer_cli/exception_handler.rb:25:in `handle_exception'
	from /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.0.14/lib/hammer_cli/abstract.rb:177:in `handle_exception'
	from /usr/lib/ruby/gems/1.8/gems/hammer_cli-0.0.14/lib/hammer_cli/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.14/bin/hammer:61
	from /usr/bin/hammer:19:in `load'
	from /usr/bin/hammer:19

3.

Actual results:
os info fails

Expected results:
os info should work

Additional info:

Comment 1 RHEL Program Management 2014-01-15 12:56:12 UTC
Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

Comment 4 Martin Bacovsky 2014-02-04 09:29:51 UTC
This issue was fixed in hammer 0.0.18

Comment 6 Sachin Ghai 2014-05-06 09:15:27 UTC
Verified with Satellite-6.0.3-RHEL-6-20140430.4

os_info works


[root@qetello02 yum.repos.d]# hammer os set-parameter --name 'testparam' --value 'works' --os-id 68
New operating system parameter created


[root@qetello02 yum.repos.d]# hammer os info --id 68
Id:                   68
Name:                 testos 2
Release name:         
Family:               
Installation media:   
Architectures:        
Partition tables:     
Config templates:     
Default OS templates: 
Parameters:           
 1) testparam => works

Comment 7 Bryan Kearney 2014-07-02 14:08:27 UTC
This was delivered with 6.0.3, which is the Satellite 6 Beta.

Comment 8 Bryan Kearney 2014-07-02 14:09:45 UTC
This was delivered in 6.0.3, the Beta version of Satellite 6.0