Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1483163 - Ipmitool 1.8.18-5.el7 prints verbose output by default after updating.
Ipmitool 1.8.18-5.el7 prints verbose output by default after updating.
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: ipmitool (Show other bugs)
7.4
Unspecified Unspecified
medium Severity medium
: rc
: ---
Assigned To: Josef Ridky
Rachel Sibley
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-08-18 18:35 EDT by Ryan Blakley
Modified: 2018-04-10 11:00 EDT (History)
4 users (show)

See Also:
Fixed In Version: ipmitool-1.8.18-7.el7
Doc Type: No Doc Update
Doc Text:
undefined
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-04-10 10:59:56 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:0832 None None None 2018-04-10 11:00 EDT

  None (edit)
Description Ryan Blakley 2017-08-18 18:35:52 EDT
Description of problem: After updating to the latest ipmitool 1.8.18-5.el7, some verbose output is being printed, downgrading hides the output unless -v is passed.


Version-Release number of selected component (if applicable): 1.8.18-5.el7 


Steps to Reproduce:
1. Run $ ipmitool -H 10.10.100.100 -v -I lanplus -U admin chassis power status


Actual results:
** Version 1.8.18-5.el7 
# ipmitool -H 10.10.100.100 -v -I lanplus -U admin chassis power status
Password: 
Running Get PICMG Properties my_addr 0x20, transit 0, target 0x20
Error response 0xc1 from Get PICMG Properities
Running Get VSO Capabilities my_addr 0x20, transit 0, target 0x20
Invalid completion code received: Invalid command
Discovered IPMB address 0x0
Chassis Power is on


Expected results:
** Version 1.8.15-7.el7
# ipmitool -H 10.10.100.100 -v -I lanplus -U admin chassis power status
Password: 
Chassis Power is on


Additional info:
**  So it appears that in 18-5 we changed some lprintf's from log debug to log info. Below is an example of what caused the "Running Get PICMG Properties" message to get printed.

* v1.8.15-7.el7
lprintf(LOG_DEBUG, "Running Get PICMG Properties my_addr %#x, transit %#x, target %#x",
                        intf->my_addr, intf->transit_addr, intf->target_addr);

* v1.8.18-5.el7
lprintf(LOG_INFO, "Running Get PICMG Properties my_addr %#x, transit %#x, target %#x",
                intf->my_addr, intf->transit_addr, intf->target_addr);


** It appears the below commit changed up a bunch of functions, and switched some lprintf's back to info from debug when adding the additional support. These messages should be hidden unless -v is passed to the command, especially the ones that print error.

$ git show f1c6118
commit f1c6118c722ba4f20f3bdb2324503821a33b4e3d
Author: Zdenek Styblik <stybla@turnovfree.net>
Date:   Thu Feb 5 18:43:49 2015 +0100

    ID:320 - Add VITA 46.11 support
    
    Commit adds support for VITA 46.11 by Dmitry Bazhenov.

diff --git a/include/ipmitool/Makefile.am b/include/ipmitool/Makefile.am
index 925881e..5a9062c 100644
--- a/include/ipmitool/Makefile.am
+++ b/include/ipmitool/Makefile.am
@@ -38,5 +38,5 @@ noinst_HEADERS = log.h bswap.h hpm2.h helper.h ipmi.h ipmi_cc.h ipmi_intf.h \
        ipmi_oem.h ipmi_sdradd.h ipmi_isol.h ipmi_sunoem.h ipmi_picmg.h \
        ipmi_fwum.h ipmi_main.h ipmi_tsol.h ipmi_firewall.h \
        ipmi_kontronoem.h ipmi_ekanalyzer.h ipmi_gendev.h ipmi_ime.h \
-       ipmi_delloem.h ipmi_dcmi.h
+       ipmi_delloem.h ipmi_dcmi.h ipmi_vita.h
 
diff --git a/include/ipmitool/ipmi_intf.h b/include/ipmitool/ipmi_intf.h
index f9f6592..6b6e247 100644
--- a/include/ipmitool/ipmi_intf.h
+++ b/include/ipmitool/ipmi_intf.h
@@ -168,6 +168,7 @@ struct ipmi_intf {
        int abort;
        int noanswer;
        int picmg_avail;
+       int vita_avail;
        IPMI_OEM manufacturer_id;
 
        struct ipmi_session * session;
----------------cut---------------- 
diff --git a/lib/ipmi_picmg.c b/lib/ipmi_picmg.c
index 914d11d..9dfa0d1 100644
--- a/lib/ipmi_picmg.c
+++ b/lib/ipmi_picmg.c
@@ -2325,37 +2325,39 @@ picmg_discover(struct ipmi_intf *intf) {
        struct ipmi_rq req;
        struct ipmi_rs *rsp;
        char msg_data;
+       uint8_t picmg_avail = 0;
 
-       if (intf->picmg_avail == 0) {
-               memset(&req, 0, sizeof(req));
-               req.msg.netfn = IPMI_NETFN_PICMG;
-               req.msg.cmd = PICMG_GET_PICMG_PROPERTIES_CMD;
-               msg_data    = 0x00;
-               req.msg.data = &msg_data;
-               req.msg.data_len = 1;
-               msg_data = 0;
-
-               lprintf(LOG_DEBUG, "Running Get PICMG Properties my_addr %#x, transit %#x, target %#x",
-                       intf->my_addr, intf->transit_addr, intf->target_addr);
-               rsp = intf->sendrecv(intf, &req);
-               if (rsp && !rsp->ccode) {
-                       if ( (rsp->data[0] == 0) &&
-                                       ((rsp->data[1] & 0x0F) == PICMG_ATCA_MAJOR_VERSION
-                                       || (rsp->data[1] & 0x0F) == PICMG_AMC_MAJOR_VERSION) )  {
-                               intf->picmg_avail = 1;
-                               lprintf(LOG_DEBUG, "Discovered PICMG Extension %d.%d",
-                                               (rsp->data[1] & 0x0f), (rsp->data[1] >> 4));
-                       }
-               } else {
-                       if (rsp == NULL) {
-                               lprintf(LOG_DEBUG,"No Response from Get PICMG Properties");
-                       } else {
-                               lprintf(LOG_DEBUG,"Error Response %#x from Get PICMG Properities", rsp->ccode);
-                       }
-               }
-       }
-       if (intf->picmg_avail == 0) {
-               lprintf(LOG_DEBUG, "No PICMG Extenstion discovered");
+       memset(&req, 0, sizeof(req));
+       req.msg.netfn = IPMI_NETFN_PICMG;
+       req.msg.cmd = PICMG_GET_PICMG_PROPERTIES_CMD;
+       msg_data    = 0x00;
+       req.msg.data = &msg_data;
+       req.msg.data_len = 1;
+       msg_data = 0;
+
+       lprintf(LOG_INFO, "Running Get PICMG Properties my_addr %#x, transit %#x, target %#x",
+               intf->my_addr, intf->transit_addr, intf->target_addr);
+       rsp = intf->sendrecv(intf, &req);
+       if (rsp == NULL) {
+           lprintf(LOG_INFO,"No response from Get PICMG Properties");
+       } else if (rsp->ccode != 0) {
+           lprintf(LOG_INFO,"Error response %#x from Get PICMG Properities",
+                   rsp->ccode);
+       } else if (rsp->data_len < 4) {
+           lprintf(LOG_INFO,"Invalid Get PICMG Properties response length %d",
+                   rsp->data_len);
+       } else if (rsp->data[0] != 0) {
+           lprintf(LOG_INFO,"Invalid Get PICMG Properties group extension %#x",
+                   rsp->data[0]);
+       } else if ((rsp->data[1] & 0x0F) != PICMG_ATCA_MAJOR_VERSION
+               && (rsp->data[1] & 0x0F) != PICMG_AMC_MAJOR_VERSION) {
+           lprintf(LOG_INFO,"Unknown PICMG Extension Version %d.%d",
+                   (rsp->data[1] & 0x0F), (rsp->data[1] >> 4));
+       } else {
+           picmg_avail = 1;
+           lprintf(LOG_INFO, "Discovered PICMG Extension Version %d.%d",
+                   (rsp->data[1] & 0x0f), (rsp->data[1] >> 4));
        }
-       return intf->picmg_avail;
+
+       return picmg_avail;
 }
----------------cut----------------
Comment 5 Rachel Sibley 2017-11-17 13:19:47 EST
I'm still seeing the errors when running in verbose using the latest build

~]# rpm -q ipmitool
ipmitool-1.8.18-6.el7.x86_64

~]# ipmitool chassis power status -v
Running Get VSO Capabilities my_addr 0x20, transit 0, target 0
Invalid completion code received: Invalid command
Discovered IPMB address 0x0
Chassis Power is on

[root@dell-pet710-01 ~]# ipmitool sensor -v
Running Get VSO Capabilities my_addr 0x20, transit 0, target 0
Invalid completion code received: Invalid command
Discovered IPMB address 0x0
Sensor ID              : Temp (0x1)
 Entity ID             : 3.1
 Sensor Type (Threshold)  : Temperature
 Sensor Reading        :  Unable to read sensor: Device Not Present
Comment 6 Ryan Blakley 2017-11-17 13:27:56 EST
(In reply to Rachel Sibley from comment #5)
> I'm still seeing the errors when running in verbose using the latest build
> 
> ~]# rpm -q ipmitool
> ipmitool-1.8.18-6.el7.x86_64
> 
> ~]# ipmitool chassis power status -v
> Running Get VSO Capabilities my_addr 0x20, transit 0, target 0
> Invalid completion code received: Invalid command
> Discovered IPMB address 0x0
> Chassis Power is on
> 
> [root@dell-pet710-01 ~]# ipmitool sensor -v
> Running Get VSO Capabilities my_addr 0x20, transit 0, target 0
> Invalid completion code received: Invalid command
> Discovered IPMB address 0x0
> Sensor ID              : Temp (0x1)
>  Entity ID             : 3.1
>  Sensor Type (Threshold)  : Temperature
>  Sensor Reading        :  Unable to read sensor: Device Not Present

Yeah after looking at the commit that was posted, it's missing a bunch of the lprint's that changed from debug to info.
Comment 8 Rachel Sibley 2017-11-27 14:14:30 EST
Hi Josef, yes if updating the level to LOG_DEBUG will suppress these messages from normal operation. What about the "Invalid completion code received: Invalid command" message, this is printed each time, should it be excluded from debug messages?
Comment 9 Josef Ridky 2018-01-03 03:30:01 EST
(In reply to Rachel Sibley from comment #8)
> Hi Josef, yes if updating the level to LOG_DEBUG will suppress these
> messages from normal operation. What about the "Invalid completion code
> received: Invalid command" message, this is printed each time, should it be
> excluded from debug messages?

Yes, this message has (as several others) log level LOG_INFO.
So, to be sure, I should all LOG_INFO change to LOG_DEBUG, am I right?
Comment 10 Rachel Sibley 2018-01-04 14:03:02 EST
Hi Josef, yes IMO they should all be moved to LOG_DEBUG.
Comment 12 Rachel Sibley 2018-02-05 18:47:03 EST
Thanks Josef, using your scratch build, the behavior below is what I expect to see, looks good.

~]# rpm -q ipmitool
ipmitool-1.8.18-6.el7.x86_64

~]# ipmitool chassis power status -v
Chassis Power is on

~]# ipmitool sensor -v
Sensor ID              : Pwr Unit Status (0x1)
 Entity ID             : 21.1
 Sensor Type (Discrete): Power Unit

Sensor ID              : IPMI Watchdog (0x3)
 Entity ID             : 7.1
 Sensor Type (Discrete): Watchdog2
Comment 16 Rachel Sibley 2018-02-11 17:41:08 EST
ALL TESTS PASSED

Verified the errors are suppressed when print in verbose output using the official version (ipmitool-1.8.18-7.el7.x86_64).

~]# yum install ipmitool

~]# rpm -q ipmitool
ipmitool-1.8.18-7.el7.x86_64

~]# ipmitool chassis power status -v
Chassis Power is on

~]# ipmitool sensor -v
Sensor ID              : BB +12.0V (0xd0)
 Entity ID             : 7.1
 Sensor Type (Threshold)  : Voltage
 Sensor Reading        : 11.778 (+/- 0) Volts
 Status                : ok
 Lower Non-Recoverable : na
 Lower Critical        : 10.738
 Lower Non-Critical    : 11.050
 Upper Non-Critical    : 12.870
 Upper Critical        : 13.234
 Upper Non-Recoverable : na
 Positive Hysteresis   : 0.052
 Negative Hysteresis   : 0.052
 Assertion Events      : 
 Assertions Enabled    : lnc- lcr- unc+ ucr+ 
 Deassertions Enabled  : lnc- lcr- unc+ ucr+
Comment 19 errata-xmlrpc 2018-04-10 10:59:56 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:0832

Note You need to log in before you can comment on or make changes to this bug.