437f0b27 | 21-Jun-2024 |
Pavithra Barithaya <pavithrabarithaya07@gmail.com> |
clang-tidy: Enable modernize-use-emplace check
The check flags insertions to an STL-style container done by calling the push_back, push, or push_front methods with an explicitly-constructed temporar
clang-tidy: Enable modernize-use-emplace check
The check flags insertions to an STL-style container done by calling the push_back, push, or push_front methods with an explicitly-constructed temporary of the container element type. In this case, the corresponding emplace equivalent methods result in less verbose and potentially more efficient code.
Change-Id: I1e7ae19ef1400c83717b2df48f3314ba4e96423e Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@gmail.com>
show more ...
|
75f38ee4 | 10-Feb-2021 |
Andrew Geissler <geissonator@yahoo.com> |
hypervisor: reset requested host state on power off
The hypervisor only supports a one-shot Standby->Running transition request. To make things more user friendly, reset the requested transition on
hypervisor: reset requested host state on power off
The hypervisor only supports a one-shot Standby->Running transition request. To make things more user friendly, reset the requested transition on server power off's since there's no reason to keep around the previous requests.
Tested: - Built image with all related changes and verified hypervisor state correctly tracked with BootProgress and that requesting an On transition successfully made it to the hypervisor.
Signed-off-by: Andrew Geissler <geissonator@yahoo.com> Change-Id: I0f06dde6f6f0c203ed69c238acdb95fcfd8a1d15
show more ...
|
ef7abe19 | 25-Feb-2020 |
Carol Wang <wangkair@cn.ibm.com> |
sched-host-tran: handle with BMC time changing
Handle with different processes when BMC time is changed after scheduled time is set.
Tested: Case1: BMC time is changed to be later than current time
sched-host-tran: handle with BMC time changing
Handle with different processes when BMC time is changed after scheduled time is set.
Tested: Case1: BMC time is changed to be later than current time but still earlier than scheduled time 1. Get current time # date Tue Feb 25 07:07:44 UTC 2020 # date +%s 1582614271 2. Schedule time, do host transition after at 07:20:00 around # busctl get-property xyz.openbmc_project.State.ScheduledHostTransition \ /xyz/openbmc_project/state/host0 \ xyz.openbmc_project.State.ScheduledHostTransition ScheduledTime t 1582615256 3. Change BMC time to 07:19:00 around # busctl set-property xyz.openbmc_project.Time.Manager \ /xyz/openbmc_project/time/bmc xyz.openbmc_project.Time.EpochTime Elapsed \ t 1582615136000000 # date Tue Feb 25 07:19:20 UTC 2020 # date +%s 1582615187 4. Host transition is done after 1 minute around, instead of waiting 13 mins around.
Case2: BMC time is changed after scheduled time is reached Following Case1, the scheduled time is reached already, 1. Change BMC time to 07:10:00 around # busctl set-property xyz.openbmc_project.Time.Manager \ /xyz/openbmc_project/time/bmc xyz.openbmc_project.Time.EpochTime Elapsed \ t 1582614600000000 2. APP shows "The function Scheduled Host Transition is disabled", because the scheduled time is reached already and the scheduled time has been set to 0 after host transition is triggered.
Case3: BMC time is changed to be bigger than scheduled time before scheduled time is reached 1. Set scheduled time 07:08:00 around # busctl set-property xyz.openbmc_project.State.ScheduledHostTransition \ /xyz/openbmc_project/state/host0 \ xyz.openbmc_project.State.ScheduledHostTransition ScheduledTime t 1582787314 2. Change BMC time to 07:10:00 around # busctl set-property xyz.openbmc_project.Time.Manager \ /xyz/openbmc_project/time/bmc xyz.openbmc_project.Time.EpochTime Elapsed \ t 1582787434000000 3. It will do host transition as requested.
Case4: BMC time is changed to be earlier than current time 1. Set scheduled time 07:10:00 around # busctl set-property xyz.openbmc_project.State.ScheduledHostTransition \ /xyz/openbmc_project/state/host0 \ xyz.openbmc_project.State.ScheduledHostTransition ScheduledTime t 1582787434 2. Change BMC time to 07:08:00 around # busctl set-property xyz.openbmc_project.Time.Manager \ /xyz/openbmc_project/time/bmc xyz.openbmc_project.Time.EpochTime Elapsed \ t 1582787314000000 3. App will wait 2 minutes more to do host transition.
Change-Id: I23228be944d1b2f71161317228c8b16d7f5ca4eb 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-Token: $token" https://
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 ...
|
75a2614f | 09-Aug-2019 |
Andrew Geissler <geissonator@yahoo.com> |
sysd_monitor: Handle default for errors to monitor
If default is input, replace it with the three default errors to monitor for
Tested: - Relied on unit test
Change-Id: Ife92e74242d72b322f46f7f08d
sysd_monitor: Handle default for errors to monitor
If default is input, replace it with the three default errors to monitor for
Tested: - Relied on unit test
Change-Id: Ife92e74242d72b322f46f7f08d5a47068b31977d Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
show more ...
|