summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Williams <patrick@stwcx.xyz>2022-10-06 14:59:44 +0300
committerPatrick Williams <patrick@stwcx.xyz>2022-10-06 22:51:03 +0300
commitb147d05c8f50ac7867e75364070df0bf063c510f (patch)
tree53e220057204df55f731b6a2d7534068035e9f88
parentdcf21296b65e3b203824f4f4f9cee08318a3c252 (diff)
downloadopenbmc-b147d05c8f50ac7867e75364070df0bf063c510f.tar.xz
meta-phosphor: phosphor-fan: workaround multi-chassis crashes
Partially resolves openbmc/phosphor-fan-presence#26. The phosphor-fan package installs templated service files based on the OBMC_CHASSIS_INSTANCES, but there is currently nothing in those templates which is templated. As a result, all but the first instance continuously crashes due to the dbus name already being taken. Hack around this for now by only using CHASSIS="0" until a more complete solution is identified. Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ia0bebb1670d45cb91555ff7af9ba502abd7460e1
-rw-r--r--meta-phosphor/recipes-phosphor/fans/phosphor-fan_git.bb27
1 files changed, 17 insertions, 10 deletions
diff --git a/meta-phosphor/recipes-phosphor/fans/phosphor-fan_git.bb b/meta-phosphor/recipes-phosphor/fans/phosphor-fan_git.bb
index a8eecf8e6a..d9fbf418a1 100644
--- a/meta-phosphor/recipes-phosphor/fans/phosphor-fan_git.bb
+++ b/meta-phosphor/recipes-phosphor/fans/phosphor-fan_git.bb
@@ -58,31 +58,38 @@ PV = "1.0+git${SRCPV}"
PR = "r1"
S = "${WORKDIR}/git"
+
+# OBMC_CHASSIS_ZERO_ONLY: hacky way to fix the templates until
+# openbmc/phosphor-fan-presence#26 is resolved. This should likely be
+# returned to OBMC_CHASSIS_INSTANCES.
+OBMC_CHASSIS_ZERO_ONLY = "0"
+
SYSTEMD_PACKAGES = "${FAN_PACKAGES}"
SYSTEMD_SERVICE:${PN}-presence-tach += "${TMPL_TACH}"
-SYSTEMD_LINK:${PN}-presence-tach += "${@compose_list(d, 'FMT_TACH', 'OBMC_CHASSIS_INSTANCES')}"
+SYSTEMD_LINK:${PN}-presence-tach += "${@compose_list(d, 'FMT_TACH', 'OBMC_CHASSIS_ZERO_ONLY')}"
# JSON mode also gets linked into multi-user
SYSTEMD_LINK:${PN}-presence-tach += "${@bb.utils.contains('PACKAGECONFIG', 'json', \
- compose_list(d, 'FMT_TACH_MUSR', 'OBMC_CHASSIS_INSTANCES'), '', d)}"
+ compose_list(d, 'FMT_TACH_MUSR', 'OBMC_CHASSIS_ZERO_ONLY'), '', d)}"
SYSTEMD_SERVICE:${PN}-control += "${TMPL_CONTROL}"
SYSTEMD_SERVICE:${PN}-control += "${@bb.utils.contains('PACKAGECONFIG', 'json', '', '${TMPL_CONTROL_INIT}', d)}"
# JSON: Linked to multi-user and poweron
# YAML: Linked to fans-ready and fan control-init poweron
SYSTEMD_LINK:${PN}-control += "${@bb.utils.contains('PACKAGECONFIG', 'json', \
- compose_list(d, 'FMT_CONTROL_MUSR', 'OBMC_CHASSIS_INSTANCES'), \
- compose_list(d, 'FMT_CONTROL', 'OBMC_CHASSIS_INSTANCES'), d)}"
+ compose_list(d, 'FMT_CONTROL_MUSR', 'OBMC_CHASSIS_ZERO_ONLY'), \
+ compose_list(d, 'FMT_CONTROL', 'OBMC_CHASSIS_ZERO_ONLY'), d)}"
SYSTEMD_LINK:${PN}-control += "${@bb.utils.contains('PACKAGECONFIG', 'json', \
- compose_list(d, 'FMT_CONTROL_PWRON', 'OBMC_CHASSIS_INSTANCES'), \
- compose_list(d, 'FMT_CONTROL_INIT', 'OBMC_CHASSIS_INSTANCES'), d)}"
+ compose_list(d, 'FMT_CONTROL_PWRON', 'OBMC_CHASSIS_ZERO_ONLY'), \
+ compose_list(d, 'FMT_CONTROL_INIT', 'OBMC_CHASSIS_ZERO_ONLY'), d)}"
SYSTEMD_SERVICE:${PN}-monitor += "${TMPL_MONITOR}"
SYSTEMD_SERVICE:${PN}-monitor += "${@bb.utils.contains('PACKAGECONFIG', 'json', '', '${TMPL_MONITOR_INIT}', d)}"
+
# JSON: power on and multi-user links. YAML: fans-ready and fan monitor init links
SYSTEMD_LINK:${PN}-monitor += "${@bb.utils.contains('PACKAGECONFIG', 'json', \
- compose_list(d, 'FMT_MONITOR_PWRON', 'OBMC_CHASSIS_INSTANCES'), \
- compose_list(d, 'FMT_MONITOR_FANSREADY', 'OBMC_CHASSIS_INSTANCES'), d)}"
+ compose_list(d, 'FMT_MONITOR_PWRON', 'OBMC_CHASSIS_ZERO_ONLY'), \
+ compose_list(d, 'FMT_MONITOR_FANSREADY', 'OBMC_CHASSIS_ZERO_ONLY'), d)}"
SYSTEMD_LINK:${PN}-monitor += "${@bb.utils.contains('PACKAGECONFIG', 'json', \
- compose_list(d, 'FMT_MONITOR_MUSR', 'OBMC_CHASSIS_INSTANCES'), \
- compose_list(d, 'FMT_MONITOR_INIT', 'OBMC_CHASSIS_INSTANCES'), d)}"
+ compose_list(d, 'FMT_MONITOR_MUSR', 'OBMC_CHASSIS_ZERO_ONLY'), \
+ compose_list(d, 'FMT_MONITOR_INIT', 'OBMC_CHASSIS_ZERO_ONLY'), d)}"
SYSTEMD_SERVICE:sensor-monitor += "sensor-monitor.service"
SYSTEMD_LINK:sensor-monitor += "../sensor-monitor.service:${MULTI_USR_TGT}.wants/sensor-monitor.service"