08148283 | 08-Oct-2024 |
Andrew Geissler <geissonator@yahoo.com> |
phosphor-set-chassis-transition: ensure only run once
If a user were to power their system on, and then off, and then off again, they will see their CurrentPowerState set to TransitioningToOff.
Alt
phosphor-set-chassis-transition: ensure only run once
If a user were to power their system on, and then off, and then off again, they will see their CurrentPowerState set to TransitioningToOff.
Although it's a bit of an unusual use case, it's fairly common in the lab/dev environment when users want to quickly ensure their system is in a powered off or on state (without first looking at its current state).
Similar to what is in the host transition services, ensure we only run the chassis transition services once per power on or off.
Tested: - Ensured multiple power off requests will not leave CurrentPowerState in TransitioningToOff state
Change-Id: I4040072ed0b42f37c9488994b0f7a5975a2bb7c9 Signed-off-by: Andrew Geissler <geissonator@yahoo.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 ...
|
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 ...
|
8e9f24d3 | 23-Feb-2024 |
Patrick Williams <patrick@stwcx.xyz> |
phosphor-discover-system-state: improve service description
A multi-host system currently starts 8 instances of this service with less than useful service descriptions. Improve the description to i
phosphor-discover-system-state: improve service description
A multi-host system currently starts 8 instances of this service with less than useful service descriptions. Improve the description to include the host in question.
``` [ OK ] Started Reboot If Enabled. [ OK ] Started Reboot If Enabled. [ OK ] Started Reboot If Enabled. [ OK ] Started Reboot If Enabled. [ OK ] Started Reboot If Enabled. [ OK ] Started Reboot If Enabled. [ OK ] Started Reboot If Enabled. [ OK ] Started Reboot If Enabled. ```
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: I3867c30dedf12937db8f96df2d4b34d715828f05
show more ...
|
c568ac1a | 02-Jan-2024 |
Andrew Geissler <geissonator@yahoo.com> |
scheduled-host: fix dependency syntax
Noticed recently that the scheduled host service is missing the "@" for its dependency on the host state service. This results in the scheduled host service sta
scheduled-host: fix dependency syntax
Noticed recently that the scheduled host service is missing the "@" for its dependency on the host state service. This results in the scheduled host service starting before the host state which is not good if a scheduled power on is needed at BMC startup.
Tested: - Confirmed the scheduled host service now starts after the host state service
Change-Id: Ic0f63e18859dc782e84f841c3f1dc2b5b01034d7 Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
show more ...
|
74d7a552 | 14-Nov-2023 |
Thang Tran <thuutran@amperecomputing.com> |
Support Chassis TransitioningToOff/On state
When BMC turns on/off the host, it asserts/de-asserts the PSON to turn on/off the power. After that, BMC takes a little bit of time to change Chassis's st
Support Chassis TransitioningToOff/On state
When BMC turns on/off the host, it asserts/de-asserts the PSON to turn on/off the power. After that, BMC takes a little bit of time to change Chassis's state from Off/On to On/Off. During this time, BMC should show a temporary state instead of directly jumping to On/Off state.
As defined in the PDI the "CurrentPowerState" property of "Chassis" interface has 4 options[1]: - On - Off - TransitioningToOn - TransitioningToOff
This commit supports 2 more states: TransitioningToOn and TransitioningToOff. 2 states are updated before PSON is asserted or de-asserted.
[1]: https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/yaml/xyz/openbmc_project/State/Chassis.interface.yaml
Tested: 1. Update phosphor-state-manager recipe to add 2 services. 2. Turn on the host. $ipmitool power on 3. Check the journalctl logs. $journalctl | grep phosphor-chassis-state-manager 4. Chassis Power State is changed from TransitioningToOn to On. 5. Turn off the host. $ipmitool power off 6. Check the journalctl logs. $journalctl | grep phosphor-chassis-state-manager 7. Chassis Power State is changed from TransitioningToOff to Off.
Change-Id: I474882c87510351b5c64438b33d62072629e27e7 Signed-off-by: Thang Tran <thuutran@amperecomputing.com>
show more ...
|
db8feba1 | 16-Aug-2023 |
George Liu <liuxiwei@inspur.com> |
meson: Replace configure_file with fs.copyfile
configure_file is deprecated since 0.64.0, and replace it with fs.copyfile.
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I9da6cfc78f1350
meson: Replace configure_file with fs.copyfile
configure_file is deprecated since 0.64.0, and replace it with fs.copyfile.
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I9da6cfc78f1350e7d3bd755db1ecf19a23c86c5c
show more ...
|
b0986c07 | 31-May-2023 |
Andrew Geissler <geissonator@yahoo.com> |
bmc-ready: auto power restart function update
This service is responsible for executing the auto power restart logic for the system. Prior to this change, it would run as a oneshot service during th
bmc-ready: auto power restart function update
This service is responsible for executing the auto power restart logic for the system. Prior to this change, it would run as a oneshot service during the multi-user.target. This meant the BMC would not achieve "Ready" state until after this service has completed.
With the recent changes to support not allowing a power on of the system until the BMC is "Ready", we need to change this service so it is not holding up that state change.
Systems that enable this new feature to only allow a power on when the BMC is in a "Ready" state will need to ensure they have a non-zero PowerRestoreDelay set for their system. This allows the service in this commit to start, the BMC to get to "Ready" and then the power on request to be made (if needed).
If in the future there's a need to enable this new feature and also have a 0s delay, then this service will need to be enhanced to wait for BMC "Ready".
Tested: - Set policy to AlwaysOn, confirmed service started, BMC hit "Ready", service waited 30s, and then issued power on without issue.
Signed-off-by: Andrew Geissler <geissonator@yahoo.com> Change-Id: I1ecb8ed9e1cd6babfa2c0fdb51e8a9bd6c83e214
show more ...
|
afe12d69 | 28-Apr-2023 |
Andrew Geissler <geissonator@yahoo.com> |
optional service to log info log on chassis poweron
This commit introduces a new service that will log an informational log on every chassis power on.
This new informational error is being created
optional service to log info log on chassis poweron
This commit introduces a new service that will log an informational log on every chassis power on.
This new informational error is being created for a couple of reasons: - An easy eye catcher when reviewing logs to easily distinguish between major boots of the system (ones including a chassis power cycle) - A mechanism for other OpenBMC software which utilizes the log to report back to the user when errors from the current boot need attention
This service needs to run before any of the power/vrm services run to ensure any logs from those services can be correlated to running after the current power on has started.
By default this service will not be installed but can be brought in via a bbappend if desired.
Tested: - Built new service into a flash image and confirmed - Info log was logged as expected during power on (prior to any vrm, power, or fan functions) - Info log was not logged when rebooting the BMC from a host running state
Signed-off-by: Andrew Geissler <geissonator@yahoo.com> Change-Id: If78c076d86efabed6b0093e9f4116502a4d9da93
show more ...
|
46068d9b | 14-Feb-2023 |
Brad Bishop <bradleyb@fuzziesquirrel.com> |
treewide: remove dependencies on mapper.target
The mapper is dbus activated now, so these explicit dependency declarations are unnecessary and redundant.
Change-Id: I9898fa6c9918a6ab4fe166acf5d335f
treewide: remove dependencies on mapper.target
The mapper is dbus activated now, so these explicit dependency declarations are unnecessary and redundant.
Change-Id: I9898fa6c9918a6ab4fe166acf5d335f89c1540fd Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
show more ...
|
b640ec47 | 26-Jan-2023 |
Andrew Geissler <geissonator@yahoo.com> |
update service file deps in accordance with recent refactoring
As noted in the following mailing list thread: https://lists.ozlabs.org/pipermail/openbmc/2022-November/032457.html
and implemented vi
update service file deps in accordance with recent refactoring
As noted in the following mailing list thread: https://lists.ozlabs.org/pipermail/openbmc/2022-November/032457.html
and implemented via this series of commits: https://gerrit.openbmc.org/q/topic:op-power-control-ref
Some systemd services had their names changed. Update this service file to reflect this.
Signed-off-by: Andrew Geissler <geissonator@yahoo.com> Change-Id: I8fdefbeb3d5100bc42eb365c59ad80d6b2119c26
show more ...
|
44a03f9d | 20-Jan-2023 |
Andrew Geissler <geissonator@yahoo.com> |
service-deps: add missing target monitor dep
The target and service monitor software makes d-bus calls to the dump manager service and does not handle it missing in a graceful manner. Ensure the dum
service-deps: add missing target monitor dep
The target and service monitor software makes d-bus calls to the dump manager service and does not handle it missing in a graceful manner. Ensure the dump manager service is running before starting this service.
Signed-off-by: Andrew Geissler <geissonator@yahoo.com> Change-Id: I46223fae1a202893ec3be7c9d8fd08ba430f3e8b
show more ...
|
d0fa61c5 | 20-Jan-2023 |
Andrew Geissler <geissonator@yahoo.com> |
service-deps: add missing discover system state dep
The discover system state software makes d-bus calls to the settings service and does not handle it missing in a graceful manner. Ensure the setti
service-deps: add missing discover system state dep
The discover system state software makes d-bus calls to the settings service and does not handle it missing in a graceful manner. Ensure the setting service is running before starting this service.
Signed-off-by: Andrew Geissler <geissonator@yahoo.com> Change-Id: Icb362b2472c3efb135941a7124fc9c3b4b069a00
show more ...
|
cd5a32a6 | 20-Jan-2023 |
Andrew Geissler <geissonator@yahoo.com> |
service-deps: add missing host state dependencies
The host state manager code makes d-bus calls to both the settings and dump manager services. The code does not handle these services not being avai
service-deps: add missing host state dependencies
The host state manager code makes d-bus calls to both the settings and dump manager services. The code does not handle these services not being available in a graceful manner (a project for another day) so for now, ensure these services are defined as needed.
Signed-off-by: Andrew Geissler <geissonator@yahoo.com> Change-Id: Ide188832dc0e3c71f90d338ac0a06bd2e10c3f19
show more ...
|
a5eefd0f | 20-Jan-2023 |
Andrew Geissler <geissonator@yahoo.com> |
service-deps: remove logging as dependency
With the introduction of the following best practice: https://github.com/openbmc/docs/commit/43421bdd06dece37b2acc4c656d7839bfedcc681
It was determined th
service-deps: remove logging as dependency
With the introduction of the following best practice: https://github.com/openbmc/docs/commit/43421bdd06dece37b2acc4c656d7839bfedcc681
It was determined that phosphor-logging should be a d-bus activated service. That is, this service will be activated when called so there is no reason to specifically list it as a dependency in service files.
Signed-off-by: Andrew Geissler <geissonator@yahoo.com> Change-Id: I8d871768bd3e515741825287bed4646a51c9b996
show more ...
|
69a250dd | 10-Nov-2022 |
Andrew Geissler <geissonator@yahoo.com> |
improve new chassis power services
A few miscellaneous changes to improve descriptions and update where these services are actually installed by the bitbake recipes.
Signed-off-by: Andrew Geissler
improve new chassis power services
A few miscellaneous changes to improve descriptions and update where these services are actually installed by the bitbake recipes.
Signed-off-by: Andrew Geissler <geissonator@yahoo.com> Change-Id: Ic4471edcc589cd28f153a708d53f5a9b53fa2913
show more ...
|
86a1ebf9 | 10-Nov-2022 |
Andrew Geissler <geissonator@yahoo.com> |
move chassis power services to phosphor-state-manager
Move the generic services which are used to power on and off the chassis into phosphor-state-manager. This will make the use of phosphor-state-m
move chassis power services to phosphor-state-manager
Move the generic services which are used to power on and off the chassis into phosphor-state-manager. This will make the use of phosphor-state-manager for chassis power control more straightforward.
These services are directly copied from openbmc/openbmc/ meta-phosphor/recipes-phosphor/chassis/obmc-op-control-power/ and renamed to match with the existing naming conventions.
The only change to these files was if a Wants/Before/After service name was changing as a part of this.
A follow on commit will improve some of the Description fields.
The following email has more details on this change: https://lists.ozlabs.org/pipermail/openbmc/2022-November/032457.html
Signed-off-by: Andrew Geissler <geissonator@yahoo.com> Change-Id: I35d555139897cf58a26e36d1558ab7f5225d34bd
show more ...
|
27d1e14c | 27-Jul-2022 |
NodeMan97 <corey.hardesty@icloud.com> |
Ensure POR reset is logged
In situations where the last reboot cause is not changed to POR, specifically after unexpected AC losses, bmc-state-manager fails to update the property. Therefore after a
Ensure POR reset is logged
In situations where the last reboot cause is not changed to POR, specifically after unexpected AC losses, bmc-state-manager fails to update the property. Therefore after a power cycle the last reboot cause property is set to unknown. Thankfully, chassis-state-manager generates a file indicating an AC loss occurred and that can be used to identify that the last reboot cause was a power-on-cycle. It was necessary to add an "After xyz.openbmc_project.State.Chassis" dependency to bmc-state-managers service file to ensure the AC loss was generated prior to bmc-state-manager executing.
Tested:
- Ensured that when the system was power cycled that the last reboot cause was set to "POR" when the chassis lost power file was present.
- Verified that when the file was not present the last reboot cause was set accordingly (typically unknown)
Change-Id: Ifa6d5d6f89c221477ee2f2fa1ed15adade359e45 Signed-off-by: NodeMan97 <corey.hardesty@icloud.com>
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 ...
|
1662ba6b | 18-Mar-2022 |
Andrew Geissler <geissonator@yahoo.com> |
secure-boot: add service to run new secure check
Tested: - Built image with new service installed and verified that when QuiesceOnHwError was not set, we just got this: Mar 18 16:09:46 p10bmc syst
secure-boot: add service to run new secure check
Tested: - Built image with new service installed and verified that when QuiesceOnHwError was not set, we just got this: Mar 18 16:09:46 p10bmc systemd[1]: Starting Phosphor BMC Security Check... Mar 18 16:09:46 p10bmc phosphor-secure-boot-check[435]: bmc-secure-boot gpio found and indicates it is NOT enabled Mar 18 16:09:46 p10bmc phosphor-secure-boot-check[435]: Read 0 from secure_boot Mar 18 16:09:46 p10bmc phosphor-secure-boot-check[435]: Read 0 from abr_image Mar 18 16:09:47 p10bmc systemd[1]: Finished Phosphor BMC Security Check.
- When QuiesceOnHwError was set, we got this: Mar 18 16:37:10 p10bmc systemd[1]: Starting Phosphor BMC Security Check... Mar 18 16:37:10 p10bmc phosphor-secure-boot-check[1001]: bmc-secure-boot gpio found and indicates it is NOT enabled Mar 18 16:37:10 p10bmc phosphor-secure-boot-check[1001]: Read 0 from secure_boot Mar 18 16:37:10 p10bmc phosphor-secure-boot-check[1001]: Read 0 from abr_image Mar 18 16:37:10 p10bmc phosphor-secure-boot-check[1001]: The system is not secure Mar 18 16:37:10 p10bmc systemd[1]: Finished Phosphor BMC Security Check.
AND a log: "Severity" : { "type" : "s", "data" : "xyz.openbmc_project.Logging.Entry.Level.Warning" }, "Message" : { "type" : "s", "data" : "xyz.openbmc_project.State.Error.SecurityCheckFail" }, "EventId" : { "type" : "s", "data" : "BD8D3405 00000055 2E2D0010 00000000 00000000 00000000 00000000 00000000 00000000" }, "AdditionalData" : { "type" : "as", "data" : [ "SECURE_BOOT_GPIO=0", "SYSFS_ABR_IMAGE_VAL=0", "SYSFS_SECURE_BOOT_VAL=0", "_PID=1001" ] },
Signed-off-by: Andrew Geissler <geissonator@yahoo.com> Change-Id: I6513280d30672907341b8f3fc583644ebec4cdc5
show more ...
|
106152c6 | 12-Apr-2022 |
Potin Lai <potin.lai@quantatw.com> |
phosphor-reset-sensor-states@.service: support multi-host
Update service file to support-multi host feature
Signed-off-by: Potin Lai <potin.lai@quantatw.com> Change-Id: Iea28c9bc9f18c7cd9a8a657e4fa
phosphor-reset-sensor-states@.service: support multi-host
Update service file to support-multi host feature
Signed-off-by: Potin Lai <potin.lai@quantatw.com> Change-Id: Iea28c9bc9f18c7cd9a8a657e4fa59c06d191dfa6
show more ...
|
f9938711 | 08-Apr-2022 |
Patrick Williams <patrick@stwcx.xyz> |
Host@.service: depend on templated chassis service
The Host@N services are depending on a Chassis@0 service which may never exist on multi-host systems. For now assume a 1:1 mapping between Host:Ch
Host@.service: depend on templated chassis service
The Host@N services are depending on a Chassis@0 service which may never exist on multi-host systems. For now assume a 1:1 mapping between Host:Chassis instances and update the dependency to match so that multi-host systems do not block forever waiting for a Chassis@0 service which will never start.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ic280f2714a2876de2acd6a0bc4d4fde97b2941d5
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 ...
|
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 ...
|