diff options
author | Adriana Kobylak <anoo@us.ibm.com> | 2017-04-11 19:06:59 +0300 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2017-05-25 07:22:57 +0300 |
commit | fcaf72e102830f0be043b58edea60fbb40f3bd73 (patch) | |
tree | 1de2d6ad8e2c08d15f8781e182cc53e60fe77503 /meta-phosphor | |
parent | e35e6203f68f661f7f785f54e257095cbbca8908 (diff) | |
download | openbmc-fcaf72e102830f0be043b58edea60fbb40f3bd73.tar.xz |
Block host power on when ActivationBlocksTransition exists
Add a dependency to the power on target so that it waits to
start until the ActivationBlocksTransition interface is not
present on any of the Software subtrees, which would indicate
that a code update is in progress.
Closes openbmc/openbmc#1344
Change-Id: I926d209ce4d3106e09e35a35c1e9cfde1ec2f613
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
Diffstat (limited to 'meta-phosphor')
4 files changed, 16 insertions, 11 deletions
diff --git a/meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-chassis-poweron@.target b/meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-chassis-poweron@.target index bb7e7978e..55f6d919b 100644 --- a/meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-chassis-poweron@.target +++ b/meta-phosphor/common/recipes-core/systemd/obmc-targets/obmc-chassis-poweron@.target @@ -4,6 +4,8 @@ Wants={SYSTEMD_DEFAULT_TARGET} After={SYSTEMD_DEFAULT_TARGET} Wants=mapper-wait@-xyz-openbmc_project-state-chassis%i.service After=mapper-wait@-xyz-openbmc_project-state-chassis%i.service +Wants=mapper-subtree-remove@-xyz-openbmc\x5fproject-software\x3Axyz.openbmc_project.Software.ActivationBlocksTransition.service +After=mapper-subtree-remove@-xyz-openbmc\x5fproject-software\x3Axyz.openbmc_project.Software.ActivationBlocksTransition.service Conflicts=obmc-chassis-poweroff@%i.target RefuseManualStop=yes OnFailure=obmc-chassis-poweroff@%i.target diff --git a/meta-phosphor/common/recipes-phosphor/dbus/phosphor-mapper.bb b/meta-phosphor/common/recipes-phosphor/dbus/phosphor-mapper.bb index 6131bc389..b0666043c 100644 --- a/meta-phosphor/common/recipes-phosphor/dbus/phosphor-mapper.bb +++ b/meta-phosphor/common/recipes-phosphor/dbus/phosphor-mapper.bb @@ -14,7 +14,10 @@ DEPENDS += "systemd" DEPENDS += "autoconf-archive-native" DBUS_SERVICE_${PN} += "xyz.openbmc_project.ObjectMapper.service" -SYSTEMD_SERVICE_${PN} = "mapper-wait@.service mapper-wait-until-removed@.service" +SYSTEMD_SERVICE_${PN} += " \ + mapper-wait@.service \ + mapper-subtree-remove@.service \ + " RDEPENDS_libmapper += "libsystemd" RDEPENDS_${PN} += " \ python-xml \ diff --git a/meta-phosphor/common/recipes-phosphor/dbus/phosphor-mapper/mapper-subtree-remove@.service b/meta-phosphor/common/recipes-phosphor/dbus/phosphor-mapper/mapper-subtree-remove@.service new file mode 100644 index 000000000..75dd9ab16 --- /dev/null +++ b/meta-phosphor/common/recipes-phosphor/dbus/phosphor-mapper/mapper-subtree-remove@.service @@ -0,0 +1,10 @@ +[Unit] +Description=mapper subtree-remove %I +Wants=obmc-mapper.target +After=obmc-mapper.target + +[Service] +Type=oneshot +RemainAfterExit=no +Restart=no +ExecStart={sbindir}/mapper subtree-remove %I diff --git a/meta-phosphor/common/recipes-phosphor/dbus/phosphor-mapper/mapper-wait-until-removed@.service b/meta-phosphor/common/recipes-phosphor/dbus/phosphor-mapper/mapper-wait-until-removed@.service deleted file mode 100644 index 1dd0124ee..000000000 --- a/meta-phosphor/common/recipes-phosphor/dbus/phosphor-mapper/mapper-wait-until-removed@.service +++ /dev/null @@ -1,10 +0,0 @@ -[Unit] -Description=Wait for %I to be removed -Wants=obmc-mapper.target -After=obmc-mapper.target - -[Service] -Type=oneshot -RemainAfterExit=yes -Restart=no -ExecStart={sbindir}/mapper wait-until-removed %I |