diff options
author | Matthew Barth <msbarth@us.ibm.com> | 2017-08-23 13:18:01 -0500 |
---|---|---|
committer | Matthew Barth <msbarth@us.ibm.com> | 2017-08-28 09:46:43 -0500 |
commit | cac2ecf650a6b1b26e489e5c9d016b900d9dac0b (patch) | |
tree | 1c54b841ca55127c8891681371605fdad30a9a1e | |
parent | 8aa1141141f0b83a9b8aa4055c219ee83a0d0978 (diff) | |
download | talos-openbmc-cac2ecf650a6b1b26e489e5c9d016b900d9dac0b.tar.gz talos-openbmc-cac2ecf650a6b1b26e489e5c9d016b900d9dac0b.zip |
Add phosphor-fan-monitor init service
Updated the phosphor-fan-monitor service file to invoke the fan
monitoring application in 'monitor' mode (actively updating the
functional states of fans).
Created a phosphor-fan-monitor-init service to invoke the fan monitoring
application in 'init' mode where the fans are set to functional, such as
at poweron.
Resolves openbmc/openbmc#2187
Change-Id: If6d1763d69d69f55b7c69bd8b6496f6c9af70589
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
3 files changed, 20 insertions, 6 deletions
diff --git a/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan.bb b/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan.bb index e70bd5baa..79329b0df 100644 --- a/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan.bb +++ b/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan.bb @@ -103,9 +103,14 @@ TMPL_MONITOR = "phosphor-fan-monitor@.service" INSTFMT_MONITOR = "phosphor-fan-monitor@{0}.service" FMT_MONITOR = "../${TMPL_MONITOR}:${FAN_CONTROL_TGT}.requires/${INSTFMT_MONITOR}" +TMPL_MONITOR_INIT = "phosphor-fan-monitor-init@.service" +INSTFMT_MONITOR_INIT = "phosphor-fan-monitor-init@{0}.service" +FMT_MONITOR_INIT = "../${TMPL_MONITOR_INIT}:${POWERON_TGT}.requires/${INSTFMT_MONITOR_INIT}" + FILES_${PN}-monitor = "${sbindir}/phosphor-fan-monitor" -SYSTEMD_SERVICE_${PN}-monitor += "${TMPL_MONITOR}" +SYSTEMD_SERVICE_${PN}-monitor += "${TMPL_MONITOR} ${TMPL_MONITOR_INIT}" SYSTEMD_LINK_${PN}-monitor += "${@compose_list(d, 'FMT_MONITOR', 'OBMC_CHASSIS_INSTANCES')}" +SYSTEMD_LINK_${PN}-monitor += "${@compose_list(d, 'FMT_MONITOR_INIT', 'OBMC_CHASSIS_INSTANCES')}" # -------------------------------------- # phosphor-cooling-type specific configuration diff --git a/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan/phosphor-fan-monitor-init@.service b/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan/phosphor-fan-monitor-init@.service new file mode 100644 index 000000000..a01acad4c --- /dev/null +++ b/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan/phosphor-fan-monitor-init@.service @@ -0,0 +1,13 @@ +[Unit] +Description=Phosphor Fan Monitor Initialization +Wants=obmc-power-on@%i.target +After=obmc-power-on@%i.target +Conflicts=obmc-chassis-poweroff@%i.target + +[Service] +Restart=on-failure +ExecStart=/usr/bin/env phosphor-fan-monitor --init +SyslogIdentifier=phosphor-fan-monitor + +[Install] +RequiredBy=obmc-chassis-poweron@%i.target diff --git a/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan/phosphor-fan-monitor@.service b/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan/phosphor-fan-monitor@.service index 2392dcd74..09f349411 100644 --- a/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan/phosphor-fan-monitor@.service +++ b/meta-phosphor/common/recipes-phosphor/fans/phosphor-fan/phosphor-fan-monitor@.service @@ -1,15 +1,11 @@ [Unit] Description=Phosphor Fan Monitor Daemon -Wants=phosphor-fan-control@%i.service -Before=phosphor-fan-control@%i.service Conflicts=obmc-chassis-poweroff@%i.target [Service] Restart=on-failure -ExecStart=/usr/bin/env phosphor-fan-monitor +ExecStart=/usr/bin/env phosphor-fan-monitor --monitor SyslogIdentifier=phosphor-fan-monitor -Type=notify -NotifyAccess=all [Install] RequiredBy=obmc-fan-control-ready@%i.target |