#
2eb6029c |
| 13-Aug-2024 |
Amithash Prasasd <amithash@meta.com> |
Fix getManagedObjects on ObjectManager returning no objects
Currently, when calling getManagedObjects ``` busctl call xyz.openbmc_project.State.Host \ /xyz/openbmc_project/state/host0 org.freedeskto
Fix getManagedObjects on ObjectManager returning no objects
Currently, when calling getManagedObjects ``` busctl call xyz.openbmc_project.State.Host \ /xyz/openbmc_project/state/host0 org.freedesktop.DBus.ObjectManager \ GetManagedObjects ``` we end up getting no objects `a{oa{sa{sv}}} 0`. This is incorrect and we technically should return the managed objects. Looking further at the spec: ``` All returned object paths are children of the object path implementing this interface, i.e. their object paths start with the ObjectManager's object path plus '/'. ``` This implies that the the path owned by the object manager should not be the hostX sub-entries but `/xyz/openbmc_project/state`
Tested by building a harma image and in qemu calling introspect on each of the object paths and ensuring that we get the correct responses ``` busctl introspect xyz.openbmc_project.State.BMC \ /xyz/openbmc_project/state busctl introspect xyz.openbmc_project.State.BMC \ /xyz/openbmc_project/state/bmc0 busctl introspect xyz.openbmc_project.State.Host \ /xyz/openbmc_project/state busctl introspect xyz.openbmc_project.State.Host \ /xyz/openbmc_project/state/host0 busctl introspect xyz.openbmc_project.State.Chassis \ /xyz/openbmc_project/state busctl introspect xyz.openbmc_project.State.Chassis \ /xyz/openbmc_project/state/chassis0 ``` Also tested that we get the correct managed object ``` busctl call xyz.openbmc_project.State.Host /xyz/openbmc_project/state \ org.freedesktop.DBus.ObjectManager GetManagedObjects busctl call xyz.openbmc_project.State.BMC /xyz/openbmc_project/state \ org.freedesktop.DBus.ObjectManager GetManagedObjects busctl call xyz.openbmc_project.State.Chassis \ /xyz/openbmc_project/state \ org.freedesktop.DBus.ObjectManager GetManagedObjects ```
Change-Id: I525c8719c326cfbbe568c4f1f7fe95e3aa13c660 Signed-off-by: Amithash Prasad <amithash@meta.com>
show more ...
|
#
f566c964 |
| 22-Jul-2024 |
Amithash Prasasd <amithash@meta.com> |
Switch to Use phosphor-dbus-interface defined constants
We are redefining a lot of the constants which are already defined in the phosphor-dbus-interface auto-generated headers. This change switches
Switch to Use phosphor-dbus-interface defined constants
We are redefining a lot of the constants which are already defined in the phosphor-dbus-interface auto-generated headers. This change switches the code to use those instead of allowing compile time definition of those.
Allowing for compile time definition would probably break clients who are not aware of the new paths anyway.
Tested by build a harma image and loading in qemu to test the added interfaces are unchanged. ``` busctl introspect xyz.openbmc_project.State.BMC \ /xyz/openbmc_project/state/bmc0 busctl introspect xyz.openbmc_project.State.Host \ /xyz/openbmc_project/state/host0 busctl introspect xyz.openbmc_project.State.Chassis \ /xyz/openbmc_project/state/chassis0 ```
Change-Id: Ib4c77d2789c13f509b75a2b1837ea454e53e8ae9 Signed-off-by: Amithash Prasasd <amithash@meta.com>
show more ...
|
#
1b2c3c03 |
| 16-Aug-2024 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: re-format for clang-18
clang-format-18 isn't compatible with the clang-format-17 output, so we need to reformat the code with the latest version. The way clang-18 handles lambda forma
clang-format: re-format for clang-18
clang-format-18 isn't compatible with the clang-format-17 output, so we need to reformat the code with the latest version. The way clang-18 handles lambda formatting also changed, so we have made changes to the organization default style format to better handle lambda formatting.
See I5e08687e696dd240402a2780158664b7113def0e for updated style. See Iea0776aaa7edd483fa395e23de25ebf5a6288f71 for clang-18 enablement.
Change-Id: Ic16d6d63213bbdd91fcb8f5aa986b66865efda2f Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
#
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 ...
|
#
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 ...
|
#
78c066f6 |
| 13-Feb-2024 |
Patrick Williams <patrick@stwcx.xyz> |
prefer std::format over fmt
Now that std::format is implemented we aren't using complex enough fmt to warrant using it over the std version. Switch to std and remove the dependency.
Signed-off-by:
prefer std::format over fmt
Now that std::format is implemented we aren't using complex enough fmt to warrant using it over the std version. Switch to std and remove the dependency.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ib03cdb6a9db4d25de345bdb49b28157880c19bc1
show more ...
|
#
9e5cd389 |
| 10-May-2023 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: copy latest and re-format
clang-format-16 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest
clang-format: copy latest and re-format
clang-format-16 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest .clang-format from the docs repository and reformat the repository.
Change-Id: I2612058799afbcd10f98bd32d2e191b0be7e437b Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
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 ...
|
#
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 ...
|
#
70f36d8e |
| 14-Mar-2022 |
Potin Lai <potin.lai@quantatw.com> |
chassis-state-manager: Add multi-chassis support
Add multi-chassis management support, each chassis bus separates by giving a unique chassis id.
Current code only support single chassis, and alway
chassis-state-manager: Add multi-chassis support
Add multi-chassis management support, each chassis bus separates by giving a unique chassis id.
Current code only support single chassis, and alway assume bus name is "xyz.openbmc_project.State.Chassis".
This patch allow user to launch chassis-state-manager with a chassis id, and chassis id is added into service bus name for identification.
Because there are many places hardcode with bus name "xyz.openbmc_project.State.Chassis", if chassis id is 0, chassis-state-manager will request both "xyz.openbmc_project.State.Chassis" and "xyz.openbmc_project.State.Chassis0" bus name to meet backwards compatibility.
Tested on Bletchley: root@bletchley:~# busctl tree xyz.openbmc_project.State.Chassis `-/xyz `-/xyz/openbmc_project `-/xyz/openbmc_project/state `-/xyz/openbmc_project/state/chassis0 root@bletchley:~# busctl tree xyz.openbmc_project.State.Chassis0 `-/xyz `-/xyz/openbmc_project `-/xyz/openbmc_project/state `-/xyz/openbmc_project/state/chassis0 root@bletchley:~# busctl tree xyz.openbmc_project.State.Chassis1 `-/xyz `-/xyz/openbmc_project `-/xyz/openbmc_project/state `-/xyz/openbmc_project/state/chassis1 ......
patch dependencies: https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-state-manager/+/51465
Signed-off-by: Potin Lai <potin.lai@quantatw.com> Change-Id: I2ce3e9ab2c95a2688143f4e3775da164a5c33c19
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 ...
|
#
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
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 ...
|
#
cb781fe1 |
| 06-Apr-2018 |
Nagaraju Goruganti <ngorugan@in.ibm.com> |
Add Chassis POH Counter Added 32-bit counter, which shows how many hours the system has been running. The value is a cumulative one and includes all working hours since production. I
Add Chassis POH Counter Added 32-bit counter, which shows how many hours the system has been running. The value is a cumulative one and includes all working hours since production. If the chassis state is Powered-on, This will be incremented by one for every hour. It won't get updated when the chassis state is powered-off. Resolves openbmc/openbmc#2979 Change-Id: I18e9bb571d1a6e401b25450168249f70891be665 Signed-off-by: Nagaraju Goruganti <ngorugan@in.ibm.com>
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>
|
#
a90a31a9 |
| 13-Dec-2016 |
Andrew Geissler <andrewg@us.ibm.com> |
Initial chassis state management code This is just the basics to get the generated code compiling and to verify the basic dbus interfaces. Change-Id: I335964da456d8173e2ce792c66
Initial chassis state management code This is just the basics to get the generated code compiling and to verify the basic dbus interfaces. Change-Id: I335964da456d8173e2ce792c6614770da43303b4 Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
show more ...
|