History log of /openbmc/phosphor-state-manager/scheduled_host_transition_main.cpp (Results 1 – 8 of 8)
Revision Date Author Comments
# a0d7bb84 01-Mar-2023 Andrew Geissler <geissonator@yahoo.com>

scheduled_host_transition: change object path

Recently, it was noticed that both the
phosphor-scheduled-host-transition and phosphor-host-state-manager
services were implementing the same object on

scheduled_host_transition: change object path

Recently, it was noticed that both the
phosphor-scheduled-host-transition and phosphor-host-state-manager
services were implementing the same object on d-bus, but putting
different interfaces under them. This causes confusion because quite a
few services utilize the mapper-wait dependency:
mapper-wait@-xyz-openbmc_project-state-host%i.service

The dependency is meant to wait for the interfaces under
phosphor-host-state-manager but if the scheduled-host one starts first,
that will complete the mapper-wait dependency. This results in services
with a dependency on host-state starting before they should! It seems
the recent removal of mapper.target dependencies from the service files
has brought this bug to light.

The only other software within OpenBMC that accesses the scheduled-host
interface is in PLDM and some robot tests. If this change is approved
then I'll make the appropriate changes in those repos as we are changing
an existing d-bus object here (although a minimally used one).

Tested:
- Ensured that when xyz.openbmc_project.State.Host0 is stopped, the
"mapper wait /xyz/openbmc_project/state/host0" does not return.

Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Change-Id: I4addb971f7ddd464c2714aa3e87ef7ef07cb737c

show more ...


# 960017a4 17-Jan-2023 Andrew Geissler <geissonator@yahoo.com>

scheduled-host-transition: make backward compatible

Similar to what was done with the host and chassis code, ensure the old
d-bus service name, xyz.openbmc_project.State.ScheduledHostTransition,
is

scheduled-host-transition: make backward compatible

Similar to what was done with the host and chassis code, ensure the old
d-bus service name, xyz.openbmc_project.State.ScheduledHostTransition,
is registered when the host instance is 0.

This ensures any code or tools that had hard coded the service name
prior to the instance based support continue to work

Tested:
- Confirmed with this change that both
xyz.openbmc_project.State.ScheduledHostTransition and
xyz.openbmc_project.State.ScheduledHostTransition0 work

Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Change-Id: I1fb5ca622db01c931d70461d0ab4847c890b6df7

show more ...


# f053e6fe 22-Jul-2022 Patrick Williams <patrick@stwcx.xyz>

sdbusplus: use shorter type aliases

The sdbusplus headers provide shortened aliases for many types.
Switch to using them to provide better code clarity and shorter
lines. Possible replacements are

sdbusplus: use shorter type aliases

The sdbusplus headers provide shortened aliases for many types.
Switch to using them to provide better code clarity and shorter
lines. Possible replacements are for:
* bus_t
* exception_t
* manager_t
* match_t
* message_t
* object_t
* slot_t

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I41103c892db258a85640aa1442acd9a295c8a847

show more ...


# 211d972d 07-Apr-2022 Patrick Williams <patrick@stwcx.xyz>

sched-host-tran: support multi-host

The State.Host objects are now templated, so the ScheduledHostTransition
similarly needs to be templated.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Cha

sched-host-tran: support multi-host

The State.Host objects are now templated, so the ScheduledHostTransition
similarly needs to be templated.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I60751dbe5fff5e3c0c2c7a19515524cf5f6bc8f7

show more ...


# e426b589 28-May-2020 Andrew Geissler <geissonator@yahoo.com>

clang-format: update to latest from docs repo

This is from openbmc/docs/style/cpp/.clang-format

Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Change-Id: I5b80bb56845170

clang-format: update to latest from docs repo

This is from openbmc/docs/style/cpp/.clang-format

Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Change-Id: I5b80bb568451706afb6d268b41e1a5357a2ca6db

show more ...


# 1dbbef42 08-Mar-2020 Carol Wang <wangkair@cn.ibm.com>

sched-host-tran: store/restore the value of scheduled time and
requested transition

Store/restore the value of scheduled time and requested transition, in case
BMC is rebooted. After

sched-host-tran: store/restore the value of scheduled time and
requested transition

Store/restore the value of scheduled time and requested transition, in case
BMC is rebooted. After BMC is back, go on the host transition process based
on the stored values.

Tested:
1. Get current time
# date
Tue Mar 10 08:16:40 UTC 2020
2. Set scheduled time 08:25:00
# busctl set-property xyz.openbmc_project.State.ScheduledHostTransition \
/xyz/openbmc_project/state/host0 \
xyz.openbmc_project.State.ScheduledHostTransition ScheduledTime t 1583828700
3. Reboot BMC
4. Check sheduled time
# busctl get-property xyz.openbmc_project.State.ScheduledHostTransition \
/xyz/openbmc_project/state/host0 \
xyz.openbmc_project.State.ScheduledHostTransition ScheduledTime
t 1583828700
5. Do host transition after the scheduled time is reached.
6. Check the scheduled time again
# busctl get-property xyz.openbmc_project.State.ScheduledHostTransition \
/xyz/openbmc_project/state/host0 \
xyz.openbmc_project.State.ScheduledHostTransition ScheduledTime
t 0

Change-Id: I3bbae19a49e2fe84bf4e297e6daaa0461cbf2cb8
Signed-off-by: Carol Wang <wangkair@cn.ibm.com>

show more ...


# 6a5db3d3 20-Feb-2020 Carol Wang <wangkair@cn.ibm.com>

sched-host-tran: implement host transition process

Set the scheduled time and host transition to trigger power on/off.

Tested:
1. Check the state first
$ curl -k -H "X-Auth

sched-host-tran: implement host transition process

Set the scheduled time and host transition to trigger power on/off.

Tested:
1. Check the state first
$ curl -k -H "X-Auth-Token: $token" https://$bmc/xyz/openbmc_project/state/host0
{
"data": {
"AttemptsLeft": 3,
"BootProgress": "xyz.openbmc_project.State.Boot.Progress.ProgressStages.Unspecified",
"CurrentHostState": "xyz.openbmc_project.State.Host.HostState.Off",
"OperatingSystemState": "xyz.openbmc_project.State.OperatingSystem.Status.OSStatus.Inactive",
"RequestedHostTransition": "xyz.openbmc_project.State.Host.Transition.Off",
"RequestedTransition": "xyz.openbmc_project.State.Host.Transition.On",
"ScheduledTime": 0
},
"message": "200 OK",
"status": "ok"
}
2. Set a time in future
# busctl set-property xyz.openbmc_project.State.ScheduledHostTransition \
/xyz/openbmc_project/state/host0 \
xyz.openbmc_project.State.ScheduledHostTransition ScheduledTime t 1582184830
# busctl get-property xyz.openbmc_project.State.ScheduledHostTransition \
/xyz/openbmc_project/state/host0 \
xyz.openbmc_project.State.ScheduledHostTransition ScheduledTime
t 1582184830
3. Check the state again after scheduled time
Jan 15 06:38:20 WS-Seq-FW-2 phosphor-host-state-manager[442]: Host State transaction request
$ curl -k -H "X-Auth-Token: $token" https://$bmc/xyz/openbmc_project/state/host0
{
"data": {
"AttemptsLeft": 3,
"BootProgress": "xyz.openbmc_project.State.Boot.Progress.ProgressStages.Unspecified",
"CurrentHostState": "xyz.openbmc_project.State.Host.HostState.Running",
"OperatingSystemState": "xyz.openbmc_project.State.OperatingSystem.Status.OSStatus.Inactive",
"RequestedHostTransition": "xyz.openbmc_project.State.Host.Transition.On",
"RequestedTransition": "xyz.openbmc_project.State.Host.Transition.On",
"ScheduledTime": 0
},
"message": "200 OK",
"status": "ok"
}
4. Set quested transition to off
# busctl set-property xyz.openbmc_project.State.ScheduledHostTransition \
/xyz/openbmc_project/state/host0 \
xyz.openbmc_project.State.ScheduledHostTransition RequestedTransition \
s "xyz.openbmc_project.State.Host.Transition.Off"
# busctl set-property xyz.openbmc_project.State.ScheduledHostTransition \
/xyz/openbmc_project/state/host0 \
xyz.openbmc_project.State.ScheduledHostTransition ScheduledTime t 1582250580
$ curl -k -H "X-Auth-Token: $token" https://$bmc/xyz/openbmc_project/state/host0
{
"data": {
"AttemptsLeft": 3,
"BootProgress": "xyz.openbmc_project.State.Boot.Progress.ProgressStages.Unspecified",
"CurrentHostState": "xyz.openbmc_project.State.Host.HostState.Off",
"OperatingSystemState": "xyz.openbmc_project.State.OperatingSystem.Status.OSStatus.Inactive",
"RequestedHostTransition": "xyz.openbmc_project.State.Host.Transition.Off"
"RequestedTransition": "xyz.openbmc_project.State.Host.Transition.Off",
"ScheduledTime": 0
},
"message": "200 OK",
"status": "ok"
}

Change-Id: Ib9f3a3984005d9187a9b98603ec1598d8992869e
Signed-off-by: Carol Wang <wangkair@cn.ibm.com>

show more ...


# 71230efd 18-Feb-2020 Carol Wang <wangkair@cn.ibm.com>

sched-host-tran: add base interfaces for Scheduled Host Transition

Implement interfaces to get/set scheduledTime and requestedTransition.

Tested:
1. Check scheduledTime
# b

sched-host-tran: add base interfaces for Scheduled Host Transition

Implement interfaces to get/set scheduledTime and requestedTransition.

Tested:
1. Check scheduledTime
# busctl get-property xyz.openbmc_project.State.ScheduledHostTransition \
/xyz/openbmc_project/state/host0 \
xyz.openbmc_project.State.ScheduledHostTransition ScheduledTime
t 0
# busctl set-property xyz.openbmc_project.State.ScheduledHostTransition \
/xyz/openbmc_project/state/host0 \
xyz.openbmc_project.State.ScheduledHostTransition ScheduledTime t 1
# busctl get-property xyz.openbmc_project.State.ScheduledHostTransition \
/xyz/openbmc_project/state/host0 \
xyz.openbmc_project.State.ScheduledHostTransition ScheduledTime
t 1
2. Check requestedTransition
# busctl get-property xyz.openbmc_project.State.ScheduledHostTransition \
/xyz/openbmc_project/state/host0 \
xyz.openbmc_project.State.ScheduledHostTransition RequestedTransition
s "xyz.openbmc_project.State.Host.Transition.On"
# busctl set-property xyz.openbmc_project.State.ScheduledHostTransition \
/xyz/openbmc_project/state/host0 \
xyz.openbmc_project.State.ScheduledHostTransition RequestedTransition \
s "xyz.openbmc_project.State.Host.Transition.Off"
# busctl get-property xyz.openbmc_project.State.ScheduledHostTransition \
/xyz/openbmc_project/state/host0 \
xyz.openbmc_project.State.ScheduledHostTransition RequestedTransition
s "xyz.openbmc_project.State.Host.Transition.Off"

Change-Id: Ie7da8034d37c1069db043772f35982ca821826ae
Signed-off-by: Carol Wang <wangkair@cn.ibm.com>

show more ...