Bug 1483163
| Summary: | Ipmitool 1.8.18-5.el7 prints verbose output by default after updating. | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Ryan Blakley <rblakley> |
| Component: | ipmitool | Assignee: | Josef Ridky <jridky> |
| Status: | CLOSED ERRATA | QA Contact: | Rachel Sibley <rasibley> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 7.4 | CC: | jridky, ovasik, rasibley, thozza |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| 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 14:59:56 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: | |||
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 (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. 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? (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? Hi Josef, yes IMO they should all be moved to LOG_DEBUG. 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 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+ 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 |
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----------------