Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 513609

Summary: ipmitool wrong commandline parsing
Product: Red Hat Enterprise Linux 5 Reporter: Karel Volný <kvolny>
Component: OpenIPMIAssignee: Jan Safranek <jsafrane>
Status: CLOSED ERRATA QA Contact: BaseOS QE <qe-baseos-auto>
Severity: medium Docs Contact:
Priority: low    
Version: 5.3CC: rvokal
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-12-02 12:20:37 UTC Type: ---
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
patch proposal none

Description Karel Volný 2009-07-24 13:31:53 UTC
Description of problem:
While testing bug #311231 I have found that ipmitool does not check the number of arguments on the commandline.

Version-Release number of selected component (if applicable):
OpenIPMI-2.0.16-5.el5

How reproducible:
always

Steps to Reproduce:
1. ipmitool sol set retry-count 0 1
  
Actual results:
Error requesting SOL parameter 'Set In Progress (0)': Invalid command on LUN
Error fetching SOL parameters for retry-count update

Expected results:
Error: Wrong number of parameters. Usage:

SOL set parameters and values:

  set-in-progress             set-complete | set-in-progress | commit-write
  enabled                     true | false
  force-encryption            true | false
  force-authentication        true | false
  privilege-level             user | operator | admin | oem
  character-accumulate-level  <in 5 ms increments>
  character-send-threshold    N
  retry-count                 N
  retry-interval              <in 10 ms increments>
  non-volatile-bit-rate       serial | 9.6 | 19.2 | 38.4 | 57.6 | 115.2
  volatile-bit-rate           serial | 9.6 | 19.2 | 38.4 | 57.6 | 115.2  

Additional info:
Please refer to bug #311231 comment #19.

Comment 1 Jan Safranek 2009-08-25 12:48:21 UTC
ipmitool *checks* number of input parameters, but it forgets to describe them. The correct syntax of sol set is:
ipmitool sol set <name> <value> [channel] [noguard]

where 'channel' is channel number and 'noguard' is indication, whether the 'set' operation should be automatically wrapped into set-in-progress, commit-write and set-complete operations by ipmitool (to ensure transaction safety; default) or the user invokes these operation manually (by using 'noguard' parameter).

I'll add note to man page and help output.

Comment 2 Jan Safranek 2009-08-25 13:13:16 UTC
Created attachment 358568 [details]
patch proposal

patch sent upstream (it arrived to the list, but I can't see it in the archive...)

Comment 3 Jan Safranek 2009-08-25 13:21:16 UTC
here is the archive link: http://www.mail-archive.com/ipmitool-devel@lists.sourceforge.net/msg01286.html

Comment 9 errata-xmlrpc 2009-12-02 12:20:37 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2009-1629.html