f15b9544 | 21-Jun-2024 |
Pavithra Barithaya <pavithrabarithaya07@gmail.com> |
clang-tidy: Enable modernize-use-nullptr check
This check converts the usage of null pointer constants (e.g. NULL, 0) to use the new C++11 and C23 nullptr keyword.
Change-Id: I8b1dc27f62e8825538d8f
clang-tidy: Enable modernize-use-nullptr check
This check converts the usage of null pointer constants (e.g. NULL, 0) to use the new C++11 and C23 nullptr keyword.
Change-Id: I8b1dc27f62e8825538d8f276c0f99375a1a5d158 Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@gmail.com>
show more ...
|
44acab71 | 21-Jun-2024 |
Pavithra Barithaya <pavithrabarithaya07@gmail.com> |
clang-tidy: Enable modernize-use-override check
This check adds override (introduced in C++11) to overridden virtual functions and removes virtual from those functions as it is not required.
Change
clang-tidy: Enable modernize-use-override check
This check adds override (introduced in C++11) to overridden virtual functions and removes virtual from those functions as it is not required.
Change-Id: I156fc5796ed1cf451491e446c211172f62316ecc Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@gmail.com>
show more ...
|
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 ...
|
66a93fc8 | 21-Jun-2024 |
Pavithra Barithaya <pavithrabarithaya07@gmail.com> |
clang-tidy: Enable modernize-raw-string-literal check
This check selectively replaces string literals containing escaped characters with raw string literals.
Change-Id: I76fd4cde664f10390e368170441
clang-tidy: Enable modernize-raw-string-literal check
This check selectively replaces string literals containing escaped characters with raw string literals.
Change-Id: I76fd4cde664f10390e36817044153d62380278bf Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@gmail.com>
show more ...
|
7c2eb72e | 21-Jun-2024 |
Pavithra Barithaya <pavithrabarithaya07@gmail.com> |
clang-tidy: Enable modernize-deprecated-headers check
Some headers from C library were deprecated in C++ and are no longer welcome in C++ codebases.
This check replaces C standard library headers w
clang-tidy: Enable modernize-deprecated-headers check
Some headers from C library were deprecated in C++ and are no longer welcome in C++ codebases.
This check replaces C standard library headers with their C++ alternatives and removes redundant ones.
The commit removes the header file as I don't see any usage of it the code.
Change-Id: Idb119ca3bdfa183713087b10e1dd2b524718abcb Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@gmail.com>
show more ...
|
2397289e | 21-Jun-2024 |
Pavithra Barithaya <pavithrabarithaya07@gmail.com> |
clang-tidy: Add some modernize checks
This commit adds some modernize tidy checks to enable usage of modern way of using c++ styles.
Change-Id: I64186a43a53d5895436b4de5072d75c61346ead2 Signed-off-
clang-tidy: Add some modernize checks
This commit adds some modernize tidy checks to enable usage of modern way of using c++ styles.
Change-Id: I64186a43a53d5895436b4de5072d75c61346ead2 Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@gmail.com>
show more ...
|
e2bc9c2d | 20-Jun-2024 |
Pavithra Barithaya <pavithrabarithaya07@gmail.com> |
clang-tidy: Add clang-analyzer checks
Change-Id: Ie2264b4a5455dcf1d7d8c7f3f2ab2040c98734c7 Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@gmail.com> |
a36b807d | 20-Jun-2024 |
Pavithra Barithaya <pavithrabarithaya07@gmail.com> |
clang-tidy: Add cert checks
This check corresponds to the CERT C++ Coding Standard rule.
Change-Id: Ic1bab0425b7b2599a356a93936c36174fc552252 Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@
clang-tidy: Add cert checks
This check corresponds to the CERT C++ Coding Standard rule.
Change-Id: Ic1bab0425b7b2599a356a93936c36174fc552252 Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@gmail.com>
show more ...
|
31584d20 | 20-Jun-2024 |
Pavithra Barithaya <pavithrabarithaya07@gmail.com> |
clang-tidy: Enable bugprone-forward-declaration-namespace check
This checks if an unused forward declaration is in a wrong namespace. The check inspects all unused forward declarations and checks if
clang-tidy: Enable bugprone-forward-declaration-namespace check
This checks if an unused forward declaration is in a wrong namespace. The check inspects all unused forward declarations and checks if there is any declaration/definition with the same name existing, which could indicate that the forward declaration is in a potentially wrong namespace.
Change-Id: Ie75495d7b054245d6328e7f946775d72220cbe1e Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@gmail.com>
show more ...
|
6d60e9be | 20-Jun-2024 |
Pavithra Barithaya <pavithrabarithaya07@gmail.com> |
Add clang-tidy to phosphor-state-manager
This commit enables clang-tidy and adds few tidy checks.
Change-Id: I9964abf2ffdd09150fb456c6e0a9d43be327c880 Signed-off-by: Pavithra Barithaya <pavithrabar
Add clang-tidy to phosphor-state-manager
This commit enables clang-tidy and adds few tidy checks.
Change-Id: I9964abf2ffdd09150fb456c6e0a9d43be327c880 Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@gmail.com>
show more ...
|
3c1351cc | 20-Jun-2024 |
Manojkiran Eda <manojkiran.eda@gmail.com> |
Add subproject support for gpioplus
In the current state, the repository fails to build using subprojects because gpioplus is marked as a hard dependency but is not defined as a subproject. This mis
Add subproject support for gpioplus
In the current state, the repository fails to build using subprojects because gpioplus is marked as a hard dependency but is not defined as a subproject. This missing dependency breaks the compilation process. By leveraging subproject support, we can include the necessary dependency and ensure successful compilation.
Tested By:
Was able to successfully build state-manager on x86 linux using the subprojects.
Change-Id: I80e29b384bbadf2d65723ea5d17f4dd4f5978b32 Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>
show more ...
|
54777961 | 20-Jun-2024 |
Pavithra Barithaya <pavithrabarithaya07@gmail.com> |
use fs.copyfile instead of deprecated copy
copy arg in configure_file API is deprecated since meson version 0.64.0. As we moved to meson version 1.1.1 we can leverage the filesystem module copyfile(
use fs.copyfile instead of deprecated copy
copy arg in configure_file API is deprecated since meson version 0.64.0. As we moved to meson version 1.1.1 we can leverage the filesystem module copyfile() to achieve the same result.
Tested by: Built the repo without any warning.
Change-Id: Ib4f44b535f8912ba53dcb5911a43569f2edbb8ef Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@gmail.com>
show more ...
|
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 ...
|
24b25a46 | 31-May-2024 |
Anusha Dathatri <anusha.dathatri@gmail.com> |
obmcutil: Add recoverystatus option
It is desired to know a systems current recovery status during any issue debug. Hence a new option is added to obmcutil command to know the recovery status.
Fixe
obmcutil: Add recoverystatus option
It is desired to know a systems current recovery status during any issue debug. Hence a new option is added to obmcutil command to know the recovery status.
Fixes openbmc/phosphor-state-manager#26
Tested: Set individual settings to On/Off and then verified that the overall recovery status shows On/Off/Undefined as intended.
Sample output:
recovery: Off hostReboot : Off bmcReboot : Off hostTimeout: Off hostCrash : Off
Change-Id: Ib66a4fa6d0baa288aa2119d31f782c71f35901e4 Signed-off-by: Anusha Dathatri <anusha.dathatri@gmail.com>
show more ...
|
1901ab74 | 09-May-2024 |
Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com> |
phosphor-discover-system-state: set after multi-user.target
Set the phosphor-discover-system-state service to run after multi-user.target to ensure the operation is successful. Avoid setting the Pow
phosphor-discover-system-state: set after multi-user.target
Set the phosphor-discover-system-state service to run after multi-user.target to ensure the operation is successful. Avoid setting the PowerRestoreDelay time still meet BMC not being ready. This is particularly important when facing network instability, which can delay the activation of multi-user.target.
Test Log: ``` .... May 09 18:18:49 bmc phosphor-bmc-state-manager[903]: BMC_READY May 09 18:18:49 bmc phosphor-bmc-state-manager[903]: Setting the BMCState field to xyz.openbmc_project.State.BMC.BMCState.Ready May 09 18:18:49 bmc systemd[1]: Started Reboot Host 1 If Enabled. May 09 18:18:49 bmc systemd[1]: Started Reboot Host 2 If Enabled. May 09 18:18:49 bmc systemd[1]: Started Reboot Host 3 If Enabled. May 09 18:18:49 bmc systemd[1]: Started Reboot Host 4 If Enabled. May 09 18:18:49 bmc systemd[1]: Started Reboot Host 5 If Enabled. May 09 18:18:49 bmc phosphor-discover-system-state[1206]: The LastbootCause is a watchdog. Power policy execution is currently allowed May 09 18:18:49 bmc systemd[1]: Started Reboot Host 6 If Enabled. May 09 18:18:49 bmc phosphor-discover-system-state[1207]: The LastbootCause is a watchdog. Power policy execution is currently allowed May 09 18:18:49 bmc phosphor-discover-system-state[1206]: One time not set, check user setting of power policy May 09 18:18:49 bmc phosphor-discover-system-state[1206]: Host power is off, processing power policy xyz.openbmc_project.Control.Power.RestorePolicy.Policy.AlwaysOn May 09 18:18:49 bmc phosphor-discover-system-state[1206]: power_policy=ALWAYS_POWER_ON, powering host on (0s delay) May 09 18:18:49 bmc phosphor-discover-system-state[1207]: One time not set, check user setting of power policy May 09 18:18:50 bmc phosphor-discover-system-state[1208]: The LastbootCause is a watchdog. Power policy execution is currently allowed May 09 18:18:50 bmc systemd[1]: Started Reboot Host 7 If Enabled. May 09 18:18:50 bmc phosphor-discover-system-state[1207]: Host power is off, processing power policy xyz.openbmc_project.Control.Power.RestorePolicy.Policy.AlwaysOn May 09 18:18:50 bmc phosphor-discover-system-state[1207]: power_policy=ALWAYS_POWER_ON, powering host on (0s delay) May 09 18:18:50 bmc phosphor-discover-system-state[1209]: The LastbootCause is a watchdog. Power policy execution is currently allowed May 09 18:18:50 bmc phosphor-discover-system-state[1208]: One time not set, check user setting of power policy May 09 18:18:50 bmc phosphor-host-state-manager[994]: Host state transition request of xyz.openbmc_project.State.Host.Transition.On ....
```
Change-Id: Ic97c331d41af6b3ca5673e711107d475362c72c3 Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com>
show more ...
|
75ac2be3 | 22-Apr-2024 |
Anusha Dathatri <anusha.dathatri@gmail.com> |
chassis_service:Create /run/openbmc at start up
Create /run/openbmc directory on startup as other applications and services within phosphor-state-manager assume it to be already created. The chassis
chassis_service:Create /run/openbmc at start up
Create /run/openbmc directory on startup as other applications and services within phosphor-state-manager assume it to be already created. The chassis service is the best place to create the dir because it always runs first.
Fixes openbmc/phosphor-state-manager#22
Tested: Restarted daemon xyz.openbmc_project.State.Chassis@0.service and confirmed the presence of /run/openbmc directory
Change-Id: I7b9fedbbd50749e65e8bf8833da70c0422e4f4fe Signed-off-by: adathatri <anusha.dathatri@gmail.com>
show more ...
|
966f2362 | 18-Apr-2024 |
Patrick Williams <patrick@stwcx.xyz> |
host-gpios: enable by default
We should tend to have a default meson.option policy that enables as much code as possible so that it is covered by CI. The `host-gpios` option was disabled and we did
host-gpios: enable by default
We should tend to have a default meson.option policy that enables as much code as possible so that it is covered by CI. The `host-gpios` option was disabled and we did not have a PACKAGECONFIG for it in openbmc/openbmc. With Ia737a5645dcf472efdc75a9af7260eff60ef90ed, I have added a PACKAGECONFIG for this setting and it will be disabled by default in our Yocto builds. Enable it here to regain the CI coverage.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I952095a294059a27ae1066d6abdc9abcc5ba709a
show more ...
|
cadaab77 | 18-Apr-2024 |
Patrick Williams <patrick@stwcx.xyz> |
phosphor-host-condition-gpio: enable multi-host support
The current implementation fails with:
``` [ 18.664351] systemd[1]: phosphor-host-condition-gpio@1.service: Two services allocated for the
phosphor-host-condition-gpio: enable multi-host support
The current implementation fails with:
``` [ 18.664351] systemd[1]: phosphor-host-condition-gpio@1.service: Two services allocated for the same bus name xyz.openbmc_project.State.HostCondition.Gpio, refusing operation. ```
Add the host id into the reserved bus name to avoid collisions.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ia4f291d20df913d3f506d976a961a770a81724fc
show more ...
|
306c5ff2 | 04-Apr-2024 |
Patrick Williams <patrick@stwcx.xyz> |
host-reboot: move to PSM subdir
Per the project anti-patterns[1], scripts are suppose to be installed in a package-named subdirectory within libexec. Move appropriately and update the service file.
host-reboot: move to PSM subdir
Per the project anti-patterns[1], scripts are suppose to be installed in a package-named subdirectory within libexec. Move appropriately and update the service file.
[1]: https://github.com/openbmc/docs/blob/master/anti-patterns.md#background-4
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ie62e032707f374da4af20c38bbf358a8c442d690
show more ...
|
8a373d57 | 02-Apr-2024 |
Konstantin Aladyshev <aladyshev22@gmail.com> |
meson: Fix local cereal build
Currently local build is failing with a message: """ cereal| Exception: Failed to configure the CMake subproject: Could NOT find Boost (missing: Boost_INCLUDE_DIR seria
meson: Fix local cereal build
Currently local build is failing with a message: """ cereal| Exception: Failed to configure the CMake subproject: Could NOT find Boost (missing: Boost_INCLUDE_DIR serialization) Subproject subprojects/cereal is buildable: NO (disabling) """ Since cereal requires boost only for the sandbox build and this functionality is not needed, add option to skip building performance sandbox comparison to solve the issue.
Tested: "meson setup build" no longer fails with the cereal error.
Change-Id: Icbfd6cb7735565da9f3c255a1a9a83abf1fa1660 Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
show more ...
|
73d7ad00 | 14-Mar-2024 |
Peter Yin <peter.yin@quantatw.com> |
PSM: host-state: prevent incorrect dbus events on initialization
The DC log is generated by phosphor-sel-logger to listen for changes in the Host CurrentHostState.
A dbus event should not be genera
PSM: host-state: prevent incorrect dbus events on initialization
The DC log is generated by phosphor-sel-logger to listen for changes in the Host CurrentHostState.
A dbus event should not be generated when initializing the properties within the host state manager.
The dbus events should only be generated on actual state changes to prevent invalid state change logs.
Change-Id: I1ea3067889844751deead2113b5d1b69a20ce811 Signed-off-by: Peter Yin <peter.yin@quantatw.com>
show more ...
|
b62410b3 | 01-Mar-2024 |
Patrick Williams <patrick@stwcx.xyz> |
remove 'flush' failure modes
The `flush` failure mode is impossible to use for a multi-host system. If one of the services or targets fail on one host, it would cause the pending operations for the
remove 'flush' failure modes
The `flush` failure mode is impossible to use for a multi-host system. If one of the services or targets fail on one host, it would cause the pending operations for the other host to be flushed from the systemd job queue. This leaves the other hosts in an indeterminate state.
We need to use `fail` in order to allow jobs targeting other hosts to continue operating. This triggers the OnFailure for the target(s), including ones which are pending awaiting dependencies.
As a result of this change, we may need to tweak some of the existing services to add correct OnFailures.
Tested: Ran on a yosemite4 image in QEMU, which always fails part of the boot sequence due to a missing PLDM-based satellite management controller. After a few host reboot attempts the system settles into a stable state on all hosts.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I2071219c9c139723785ba05bed18a6ff808ad565
show more ...
|
8be7ec45 | 04-Mar-2024 |
Thang Tran <thuutran@amperecomputing.com> |
Correct the value of CHASSIS_ON_FILE
Issue: When BMC turns on the host then reboot BMC. The BMC can not turn off/on or power cycle the host.
Root cause: After commit [1], this repo is using std::fo
Correct the value of CHASSIS_ON_FILE
Issue: When BMC turns on the host then reboot BMC. The BMC can not turn off/on or power cycle the host.
Root cause: After commit [1], this repo is using std::format instead fmt::format. The value of CHASSIS_ON_FILE was not updated in that commit. It makes the /run/openbmc/chassis@0-on file is not removed when Chassis' Power state is On, therefore, the BMC can not turn on the host.
Solution: This commit corrects the value of CHASSIS_ON_FILE.
[1] https://github.com/openbmc/phosphor-state-manager/commit/78c066f6078704fd202c8a4b02fcf73091481ef1
Change-Id: Ib741022774aac9a5cb3a4adc87bae8583df97ce2 Signed-off-by: Thang Tran <thuutran@amperecomputing.com>
show more ...
|
31cddb75 | 27-Feb-2024 |
Andrew Geissler <geissonator@yahoo.com> |
Add option to enable/disable forced warm reboots
Some OpenBMC systems don't support a forced warm reboot. Provide a compile option to enable/disable.
Tested: - Confirmed that if feature is disabled
Add option to enable/disable forced warm reboots
Some OpenBMC systems don't support a forced warm reboot. Provide a compile option to enable/disable.
Tested: - Confirmed that if feature is disabled, then AllowedHostTransitions did not have ForceWarmReboot option.
Change-Id: I207b8fa7e3f60efbf406397ff4df980a5d2677ed Signed-off-by: Andrew Geissler <geissonator@yahoo.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 ...
|