#
3ff5a360 |
| 17-Jun-2024 |
Manojkiran Eda <manojkiran.eda@gmail.com> |
Fix spelling mistakes using codespell
This commit corrects various spelling mistakes throughout the repository. The corrections were made automatically using `codespell`[1] tool.
[1]: https://githu
Fix spelling mistakes using codespell
This commit corrects various spelling mistakes throughout the repository. The corrections were made automatically using `codespell`[1] tool.
[1]: https://github.com/codespell-project/codespell
Change-Id: I1068afac44652ab3d9bfe58bb6e19d359d84f20e Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>
show more ...
|
#
54ce6395 |
| 23-Feb-2024 |
Andrew Geissler <geissonator@yahoo.com> |
supportedTransitions: Add in support for new prop
This new property was added [1] to allow users to define the specific host transition operations they want to allow.
This commit starts with the de
supportedTransitions: Add in support for new prop
This new property was added [1] to allow users to define the specific host transition operations they want to allow.
This commit starts with the default, allowing all operations. Future commits will provide mechanisms to configure this.
Tested: ``` busctl get-property xyz.openbmc_project.State.Host /xyz/openbmc_project/state/host0 xyz.openbmc_project.State.Host AllowedHostTransitions as 5 "xyz.openbmc_project.State.Host.Transition.On" "xyz.openbmc_project.State.Host.Transition.Off" "xyz.openbmc_project.State.Host.Transition.Reboot" "xyz.openbmc_project.State.Host.Transition.GracefulWarmReboot" "xyz.openbmc_project.State.Host.Transition.ForceWarmReboot" ```
[1]: https://gerrit.openbmc.org/c/openbmc/phosphor-dbus-interfaces/+/68933
Change-Id: Ifdac18ab67e3e68d49b9bca9446ba84ee954f96c Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
show more ...
|
#
9a286db2 |
| 17-Jan-2024 |
Patrick Williams <patrick@stwcx.xyz> |
reduce dbus string constants
There are a large number of dbus constants scattered throughout the code that could/should be obtained from phosphor-dbus-interface values. Perform minor refactoring to
reduce dbus string constants
There are a large number of dbus constants scattered throughout the code that could/should be obtained from phosphor-dbus-interface values. Perform minor refactoring to greatly reduce the number of string constants.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ie8700bc90611d21eee7160f4686bc978fe0a0eb4
show more ...
|
#
7e969cb9 |
| 23-Aug-2023 |
Patrick Williams <patrick@stwcx.xyz> |
sdbus++: use non-deprecated namespaces
The sdbusplus repository has deprecated some namespaces and they are currently only enabled with the SDBUSPP_REMOVE_DEPRECATED_NAMESPACE guard. Switch to the
sdbus++: use non-deprecated namespaces
The sdbusplus repository has deprecated some namespaces and they are currently only enabled with the SDBUSPP_REMOVE_DEPRECATED_NAMESPACE guard. Switch to the new namespace names.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I9f67e74a02616d8ea2241c18758308f2b669672d
show more ...
|
#
928bbf15 |
| 14-Feb-2023 |
Andrew Geissler <geissonator@yahoo.com> |
move systemd subscribe to util function
This code is replicated in multiple source files in this repo, put it in the util repo so everyone can call it in one place.
Tested: - Verified systemd signa
move systemd subscribe to util function
This code is replicated in multiple source files in this repo, put it in the util repo so everyone can call it in one place.
Tested: - Verified systemd signals seen and system boots
Signed-off-by: Andrew Geissler <geissonator@yahoo.com> Change-Id: I8bf0343c79012cc91dea033038894a011fd37ef5
show more ...
|
#
bd28f025 |
| 22-Nov-2022 |
William A. Kennington III <wak@google.com> |
treewide: Remove uses of bind
Bind is less compatible with function wrappers like function2 and more terse to read.
Change-Id: I34474b71758db1ffee301729c585c4d555df2064 Signed-off-by: William A. Ke
treewide: Remove uses of bind
Bind is less compatible with function wrappers like function2 and more terse to read.
Change-Id: I34474b71758db1ffee301729c585c4d555df2064 Signed-off-by: William A. Kennington III <wak@google.com>
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 ...
|
#
128ea8e3 |
| 22-Jun-2022 |
Andrew Geissler <geissonator@yahoo.com> |
host-reboot: enforce host boot count on host crash
The host reboot path can be triggered via paths outside of the normal RequestedHostTransition property set. For example, if the host crashes, it ju
host-reboot: enforce host boot count on host crash
The host reboot path can be triggered via paths outside of the normal RequestedHostTransition property set. For example, if the host crashes, it just triggers an automatic reboot using the systemd targets, which means the check to prevent continuous host reboots is not run.
This commit ensures we decrement the reboot counter when a host crash occurs, and it also ensures we check that count when deciding if a reboot should occur.
While testing, it was found when we end in the host Quiesce state (after all reboot attempts have expired), the host stayed in Quiesce, even after issuing a power off. The fix for that was to ensure the obmc-host-quiesce@.target conflicted with obmc-host-stop@.target to ensure it would properly run on the power off request and update the host state to Off.
Tested: - Verified that AttemptsLeft was properly decremented on host crashes - Verified that when AttempsLeft reached 0, the reboot was halted and the host state was moved to Quiesced - Verified that once in Quiesced, system could be powered off, and a boot worked fine (and AttempsLeft was back to 3)
Signed-off-by: Andrew Geissler <geissonator@yahoo.com> Change-Id: I8d101b987517e160becc712ed70950f1d3204397
show more ...
|
#
b4cbfac1 |
| 09-May-2022 |
NodeMan97 <corey.hardesty@icloud.com> |
Host reboot configuration support
Redfish API now supports a mechanism for the users of the system to configure the number of times a BMC should restart the host firmware when in an error path befor
Host reboot configuration support
Redfish API now supports a mechanism for the users of the system to configure the number of times a BMC should restart the host firmware when in an error path before giving up. Originally the function "attemptsLeft(uint32_t)" ignored the passed in value and and always set this number to a hardcoded 3(without the user knowing). Changes made here allow for this property to be set by an external user over D-bus for values other than 3.
To compliment this functionality and the new DBus property "RetryAttempts" an override was created to ensure that when "RetryAttempts" is set by an external user that the "AttemptsLeft" property is updated accordingly.
Versioning was added to avoid a serialization error that would occur if a system was loaded using the previous version that did not include this new property.
Testing: - Using the newly defined cereal version of '2' performed correctly. - Removing the new property and reverting cereal class version back to '1' behaved properly. - built and ran with Docker along with the web changes. - verified update of "AttemptsLeft" through a p10bmc running on simics through busctl. - verified that when the "RetryAttempts" policy value is changed by either bmcweb or dbus set-property() that "AttemptsLeft" updates accordingly.
busctl set-property xyz.openbmc_project.State.Host ... RetryAttempts u 1 busctl get-property xyz.openbmc_project.State.Host ... RetryAttempts service@p10bmc: u 1
busctl get-property xyz.openbmc_project.State.Host ... AttemptsLeft service@p10bmc: u 1
busctl set-property xyz.openbmc_project.State.Host ... RetryAttempts u 3 busctl set-property xyz.openbmc_project.State.Host ... AttemptLeft u 8 busctl get-property xyz.openbmc_project.State.Host ... AttemptLeft u 3 service@p10bmc: u 3
Signed-off-by: Corey Hardesty <corey.hardesty@icloud.com> Change-Id: I70a8457c88fb76e118937d79e8dbe15518df7264
show more ...
|
#
ba182f0c |
| 23-Mar-2022 |
Allen.Wang <Allen_Wang@quantatw.com> |
phosphor-state-manager: Support multi-host for persist files
phosphor-host-state-manager and phosphor-chassis-state-manager store informations in files then restore that on service starting. Since s
phosphor-state-manager: Support multi-host for persist files
phosphor-host-state-manager and phosphor-chassis-state-manager store informations in files then restore that on service starting. Since state-managers already change to multi-host now, information should store into different files from each service instance.
forbackward capability, if there are legacy persist file exist, rename it to the new file format of instance ;0',i.e, rename files: 'requestedHostTransition' to 'host0-PersistData', 'POHCounter' to 'chassis-POHCounter', 'chassisStateChangeTime' to 'chassis0-StateChangeTime'
Changes: a.phosphor-host-state-manager: '/var/lib/phosphor-state-manager/requestedHostTransition' this file not only store requestedHostTransition now, rename to PersistData and add host-N prefix for each service. For example, bus xyz.openbmc_project.State.Host1 store data to '/var/lib/phosphor-state-manager/host1-PersistData' xyz.openbmc_project.State.Host2 store date to '/var/lib/phosphor-state-manager/host2-PersistData'
b.phosphor-chassis-state-manager:
There are two files to store informations '/var/lib/phosphor-state-manager/POHCounter', '/var/lib/phosphor-state-manager/chassisStateChangeTime' change to: '/var/lib/phosphor-state-manager/chassis1-POHCounter', '/var/lib/phosphor-state-manager/chassis2-POHCounter' ... '/var/lib/phosphor-state-manager/chassis1-StateChangeTime' '/var/lib/phosphor-state-manager/chassis2-StateChangeTime' ... for each service.
Tested on Bletchley HW,
set xyz.openbmc_project.State.Host1 RequestedHostTransition to On 'busctl set-property xyz.openbmc_project.State.Host1 /xyz/openbmc_project/state/host1 xyz.openbmc_project.State.Host RequestedHostTransition s "xyz.openbmc_project.State.Host.Transition.On"'
This request will store in file: 'cat /var/lib/phosphor-state-manager/host1-PersistData' { "value0": { "cereal_class_version": 1, "value0": "xyz.openbmc_project.State.Host.Transition.On", "value1": "xyz.openbmc_project.State.Boot.Progress.ProgressStages.Unspecified", "value2": "xyz.openbmc_project.State.OperatingSystem.Status.OSStatus.Inactive" }
restart xyz.openbmc_project.State.Host1~Host6 or reboot BMC, 'RequestedHostTransition' for host1 still "On" 'busctl get-property xyz.openbmc_project.State.Host1 /xyz/openbmc_project/state/host1 xyz.openbmc_project.State.Host RequestedHostTransition' s "xyz.openbmc_project.State.Host.Transition.On" 'RequestedHostTransition' of the rest 5 Hosts are default value "xyz.openbmc_project.State.Host.Transition.Off"
Also, set POHCounter of xyz.openbmc_project.State.Chassis2 'busctl set-property xyz.openbmc_project.State.Chassis2 /xyz/openbmc_project/state/chassis2 xyz.openbmc_project.State.PowerOnHours POHCounter u 5' it will restore after service restart or BMC reboot, 'busctl get-property xyz.openbmc_project.State.Chassis2 /xyz/openbmc_project/state/chassis2 xyz.openbmc_project.State.PowerOnHours POHCounter' u 5
Change-Id: I739c62707bb805e7c25f399a2fea06beee5543a0 Signed-off-by: Allen.Wang <Allen_Wang@quantatw.com>
show more ...
|
#
76070747 |
| 05-Apr-2022 |
Patrick Williams <patrick@stwcx.xyz> |
sdbusplus: object: don't use 'bool' argument constructor
`sdbusplus::server::object_t` has long had an enum-based parameter for signal action, but maintained a backwards compatible boolean mapping.
sdbusplus: object: don't use 'bool' argument constructor
`sdbusplus::server::object_t` has long had an enum-based parameter for signal action, but maintained a backwards compatible boolean mapping. It is time to remove this boolean to make it more observable which actions are being used in applications. Map all `true` occurrences to `action::defer_emit`.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I5cfac1360e8c769889b33bef98cfd44778018a44
show more ...
|
#
6ed41eab |
| 05-Apr-2022 |
Patrick Williams <patrick@stwcx.xyz> |
filesystem: use non-experimental version
std::experimental::filesystem has been deprecated since at least C++17. Switch to the std::filesystem one.
Signed-off-by: Patrick Williams <patrick@stwcx.x
filesystem: use non-experimental version
std::experimental::filesystem has been deprecated since at least C++17. Switch to the std::filesystem one.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I7717a804a3d5c96f8717764c088529d65ad4e96c
show more ...
|
#
c328a4cf |
| 18-Mar-2022 |
Potin Lai <potin.lai@quantatw.com> |
discover-system-state: add multi-host support
Add HostObjects class to fetch paths of settings d-bus objects under /xyz/openbmc_project/control/hostX .
Signed-off-by: Potin Lai <potin.lai@quantatw.
discover-system-state: add multi-host support
Add HostObjects class to fetch paths of settings d-bus objects under /xyz/openbmc_project/control/hostX .
Signed-off-by: Potin Lai <potin.lai@quantatw.com> Change-Id: I1dc55ec389e94e6c85aa7031b304f8c4ed15dc71
show more ...
|
#
79b45003 |
| 10-Feb-2022 |
Allen.Wang <Allen_Wang@quantatw.com> |
host-state-manager: Add multi-host support
Add support management multiple host state with multi process. Each process obtain a d-bus object for corresponding host.
TESTED : Built the openbmc image
host-state-manager: Add multi-host support
Add support management multiple host state with multi process. Each process obtain a d-bus object for corresponding host.
TESTED : Built the openbmc image for Facebook Bletchley hardware. Verified Host State buses/objects created successfully
root@bletchley:~# busctl tree xyz.openbmc_project.State.Host1 └─/xyz └─/xyz/openbmc_project └─/xyz/openbmc_project/state └─/xyz/openbmc_project/state/host1 root@bletchley:~# busctl tree xyz.openbmc_project.State.Host2 └─/xyz └─/xyz/openbmc_project └─/xyz/openbmc_project/state └─/xyz/openbmc_project/state/host2 ...
Built with host id 0 : expose both Host and Host0 name to keep backwards compatibility. 'busctl |grep xyz.openbmc_project.State.Host' ... xyz.openbmc_project.State.Host 8398 phosphor-host-s root :1.212 xyz.openbmc_project.State.Host@0.service xyz.openbmc_project.State.Host0 8398 phosphor-host-s root :1.212 xyz.openbmc_project.State.Host@0.service ...
Signed-off-by: Allen.Wang <Allen_Wang@quantatw.com> Change-Id: Ie18007122a5df9e33f387e691eaa9979ce18ed0e
show more ...
|
#
8ffdb269 |
| 20-Sep-2021 |
Andrew Geissler <geissonator@yahoo.com> |
lg2: convert state-manager
This converts the rest of phosphor-state-manager over to the lg2 interface.
Signed-off-by: Andrew Geissler <geissonator@yahoo.com> Change-Id: I3878ec950b6a2b1ada93544cc02
lg2: convert state-manager
This converts the rest of phosphor-state-manager over to the lg2 interface.
Signed-off-by: Andrew Geissler <geissonator@yahoo.com> Change-Id: I3878ec950b6a2b1ada93544cc021cecf14edfb46
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: I5b80bb568451706afb6d268b41e1a5357a
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 ...
|
#
47b96128 |
| 11-Feb-2020 |
Andrew Geissler <geissonator@yahoo.com> |
diag-mode: support entry into diagnostic mode
See DiagnosticMode definition in phosphor-dbus-interfaces for more information: https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/xyz/open
diag-mode: support entry into diagnostic mode
See DiagnosticMode definition in phosphor-dbus-interfaces for more information: https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/xyz/openbmc_project/State/Host.interface.yaml
This target will be started by other software entities within OpenBMC so phosphor-host-state-manager will monitor for this target to start and update its state accordingly. System defined behavior will then transition the system out of this state (quiesce, off, warm-reboot) and state-manager will update as needed when those are seen.
Signed-off-by: Andrew Geissler <geissonator@yahoo.com> Change-Id: Ide599058dfe5596c3f40c9c295dd1259853b15a7
show more ...
|
#
e4039a8b |
| 11-Feb-2020 |
Andrew Geissler <geissonator@yahoo.com> |
change systemd signal handler to be more specific
Future commits will utilize a new signal handler looking at different systemd signals so make the existing one more specific.
Signed-off-by: Andrew
change systemd signal handler to be more specific
Future commits will utilize a new signal handler looking at different systemd signals so make the existing one more specific.
Signed-off-by: Andrew Geissler <geissonator@yahoo.com> Change-Id: I97da05919b90bba3e2fe512d45767ad4f7e1bfff
show more ...
|
#
769a62f1 |
| 06-Dec-2019 |
Andrew Geissler <geissonator@yahoo.com> |
meson: fix up compile errors found by meson
meson enables more error checking by default so in preperation for moving to it, fix all errors in the code it has found.
This breaks down into the follo
meson: fix up compile errors found by meson
meson enables more error checking by default so in preperation for moving to it, fix all errors in the code it has found.
This breaks down into the following issues: - Unused variables: remove where applicable, otherwise void out - Extra ';' - Local includes need to use ""
Signed-off-by: Andrew Geissler <geissonator@yahoo.com> Change-Id: I94d9b4d2ffc85ae46d941e1a190fafd4ba5bd893
show more ...
|
#
58a18013 |
| 19-Jan-2018 |
Andrew Geissler <geissonator@yahoo.com> |
Apply clang code format to this state repo
Change-Id: I232af39d8ded90fa3eb37b74d1435ddbf19fffb1 Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
|
#
0a838735 |
| 05-Oct-2017 |
Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com> |
Enable Cereal class versioning
Cereal class versioning helps to handle data de-serialization across different class versions that differ in the way, a particular data is serialized.
For more readin
Enable Cereal class versioning
Cereal class versioning helps to handle data de-serialization across different class versions that differ in the way, a particular data is serialized.
For more reading, refer Cereal official documentation; http://uscilab.github.io/cereal/serialization_functions.html
Change-Id: Ic5d01090b7a7679ef2bf638da786abbd033007bc Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
show more ...
|
#
4e6534f5 |
| 19-Sep-2017 |
Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com> |
Add persistancy for boot progress and os status
Resolves openbmc/openbmc#2181
Change-Id: I807dd94efcea1118060f8594c7f69e333a3ea682 Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>
|
#
033fc3bd |
| 30-Aug-2017 |
Andrew Geissler <andrewg@us.ibm.com> |
Move all restore state policy into discover_state
Doing this so the host state code can set it's requested host transition state without calling the override function. Need to initialize it to the p
Move all restore state policy into discover_state
Doing this so the host state code can set it's requested host transition state without calling the override function. Need to initialize it to the persisted cereal value but not act on it.
The phosphor_discover_state application will ensure the appropriate action is taken based on the system state and the persisted value of the last requested host state.
Resolves openbmc/openbmc#2210
Change-Id: I7bef12fe314c7dfe137494fd46ddb35309063fc5 Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
show more ...
|
#
7b90a62b |
| 08-Aug-2017 |
Andrew Geissler <andrewg@us.ibm.com> |
Decrement reboot counter on all boot attempts
OpenBMC will control the default amount of boot attemps allowed on systems. If an external entity requests to set the boot count, it will be treated as
Decrement reboot counter on all boot attempts
OpenBMC will control the default amount of boot attemps allowed on systems. If an external entity requests to set the boot count, it will be treated as a command to reset the boot count to the OpenBMC configured default.
Resolves openbmc/openbmc#1676 Resolves openbmc/openbmc#1646
Change-Id: I7d03272d174685a72e1bdff4d7e2142fc69b7edf Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
show more ...
|
#
2710e730 |
| 19-Jun-2017 |
Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com> |
Implementation of OS status, boot count and boot progress
Change-Id: I1b00a932db2533b83fa0bd7bb4fbd62c0299bff7 Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>
|