summaryrefslogtreecommitdiff
path: root/usr/src/lib/fm
diff options
context:
space:
mode:
authorYuri Pankov <ypankov@tintri.com>2022-05-31 22:28:18 +0300
committerRobert Mustacchi <rm@fingolfin.org>2022-06-03 16:33:46 +0000
commit22e991d5bb9d07bf7dd2a65bc080922753a3100b (patch)
tree47ff666fa59ae14bbca3cab035a47ffb96776755 /usr/src/lib/fm
parentfeea3b2dd6c0c3b59dfb1ab0f992b01906567d90 (diff)
downloadillumos-joyent-22e991d5bb9d07bf7dd2a65bc080922753a3100b.tar.gz
14720 fac_prov_ipmi: missing thresholds should not be considered error
Reviewed by: Alexander Eremin <aeremin@tintri.com> Reviewed by: Andrew Giles <agiles@tintri.com> Reviewed by: Ben Jameson <bjameson@tintri.com> Reviewed by: Toomas Soome <tsoome@me.com> Approved by: Gordon Ross <gordon.w.ross@gmail.com>
Diffstat (limited to 'usr/src/lib/fm')
-rw-r--r--usr/src/lib/fm/topo/modules/common/fac_prov_ipmi/fac_prov_ipmi.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/usr/src/lib/fm/topo/modules/common/fac_prov_ipmi/fac_prov_ipmi.c b/usr/src/lib/fm/topo/modules/common/fac_prov_ipmi/fac_prov_ipmi.c
index b3a81fdb51..55387afe12 100644
--- a/usr/src/lib/fm/topo/modules/common/fac_prov_ipmi/fac_prov_ipmi.c
+++ b/usr/src/lib/fm/topo/modules/common/fac_prov_ipmi/fac_prov_ipmi.c
@@ -24,7 +24,7 @@
*/
/*
* Copyright 2019 Joyent, Inc.
- * Copyright 2019 by Western Digital Corporation
+ * Copyright 2022 Tintri by DDN, Inc. All rights reserved.
*/
#include <unistd.h>
#include <stdio.h>
@@ -1606,6 +1606,15 @@ make_sensor_node(topo_mod_t *mod, tnode_t *pnode, struct sensor_data *sd,
if (ipmi_get_sensor_thresholds(hdl, &thresh,
sd->sd_fs_sdr->is_fs_number) != 0) {
+ /*
+ * Some sensors report supporting reading thresholds, but Get
+ * Sensor Thresholds returns Invalid Command. Do not consider
+ * this an error so we could continue enumerating sensors for
+ * the entity.
+ */
+ if (ipmi_errno(hdl) == EIPMI_INVALID_COMMAND)
+ return (0);
+
topo_mod_dprintf(mod, "Failed to get sensor thresholds for "
"node %s (%s)\n", topo_node_name(fnode), ipmi_errmsg(hdl));
return (topo_mod_seterrno(mod, EMOD_PARTIAL_ENUM));