RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1483163 - Ipmitool 1.8.18-5.el7 prints verbose output by default after updating.
Summary: Ipmitool 1.8.18-5.el7 prints verbose output by default after updating.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: ipmitool
Version: 7.4
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Josef Ridky
QA Contact: Rachel Sibley
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-08-18 22:35 UTC by Ryan Blakley
Modified: 2020-12-14 09:36 UTC (History)
4 users (show)

Fixed In Version: ipmitool-1.8.18-7.el7
Doc Type: No Doc Update
Doc Text:
undefined
Clone Of:
Environment:
Last Closed: 2018-04-10 14:59:56 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2018:0832 0 None None None 2018-04-10 15:00:01 UTC

Description Ryan Blakley 2017-08-18 22:35:52 UTC
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>
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 18:19:47 UTC
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 18:27:56 UTC
(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 19:14:30 UTC
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 08:30:01 UTC
(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 19:03:02 UTC
Hi Josef, yes IMO they should all be moved to LOG_DEBUG.

Comment 12 Rachel Sibley 2018-02-05 23:47:03 UTC
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 22:41:08 UTC
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 14:59:56 UTC
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.