| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There is a pervasive issue within OpenBMC where a dbus service may be
started and on the bus, but before mapper can introspect it, a dependent
service queries mapper for that objects information.
In most situations a service writer can avoid this by using the
Wants=mapper-wait@-xyz* syntax. This does not work however if two or
more dbus services implement the same dbus object path.
The host_check_main application is one service that is hitting this
issue. It requires the /xyz/openbmc_project/control/host0 object path
which is implemented by two dbus services.
The solution here is to first try mapper, but if that fails to use a
hard coded dbus service name. The value of mapper for this type of
function is up for debate within the community but for now, get a
compromise in that first tries mapper, and if not available tries the hard
coded well-known service name.
Tested:
Verified the following within QEMU:
- Good path works as expected, mapper response used
- GetObject fails for mapper call, successfully used hard coded path
- Service not available on dbus, verified exception reported
Change-Id: I14dfaf2ce43392a19a2a5a3131534f55c6eb6f4a
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
|
|
|
|
|
|
|
| |
Installs into bin instead of sbin per guidelines.
Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I53614a64fa37f2b3bc2841794bf5aa8c137c31df
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adds new subcommand to request the OS state.
Adds bootprogress and osstate to the output of state/status subcommands.
Tested: The output of `obmcutil state` must look like:
```
CurrentBMCState : xyz.openbmc_project.State.BMC.BMCState.Ready
CurrentPowerState : xyz.openbmc_project.State.Chassis.PowerState.Off
CurrentHostState : xyz.openbmc_project.State.Host.HostState.Off
BootProgress : xyz.openbmc_project.State.Boot.Progress.ProgressStages.Unspecified
OperatingSystemState: xyz.openbmc_project.State.OperatingSystem.Status.OSStatus.Inactive
```
Change-Id: I59937986317fe2ac487d355a627de1070ba813f8
Signed-off-by: Alexander Filippov <a.filippov@yadro.com>
|
|
|
|
|
|
|
|
| |
Use the defaults in the pkg check where the default error message is
sufficient to identify which package is missing.
Change-Id: I21df28b0ad0a337e3af746b7cfb06ae9cc8f6087
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
| |
Change-Id: I9b8289e433bfcf918d430c012ec8879b58e523b0
Signed-off-by: Anthony Wilson <wilsonan@us.ibm.com>
|
|
|
|
|
|
|
|
| |
Testing: Verified obmc-phosphor-image build installs it correctly
in obmc-phosphor-image/1.0-r0/rootfs/usr/sbin/obmcutil
Change-Id: I386e726a653496ccd77549fa63603ddfb647bd78
Signed-off-by: Anthony Wilson <wilsonan@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
| |
Error handling was added to the bus.call() routine,
which effectively deprecated the is_method_error()
check. Errors should now be handled in a try/catch
block.
Change-Id: I1dcbbaa91db443445ef6bb2f616bd37f06731d36
Signed-off-by: Anthony Wilson <wilsonan@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Refactors any uses of the mapbox variant specific api and converts them
to an api compatible with std::variant and mapbox variant.
Tested:
Built and run through the unit test suite.
Change-Id: Ie9b83fd638c495859fe98b5de86d9d3c7c1a27af
Signed-off-by: William A. Kennington III <wak@google.com>
|
|
|
|
|
|
|
|
|
| |
We are currently transitively depending on sdbusplus to provide the
definition of assert(). Add the necessary include we should have
requested.
Change-Id: I9e348edc851fc922916942f522748f0bc59d5399
Signed-off-by: William A. Kennington III <wak@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The option to block/wait for a state transition to complete has
been added. The transition is expected to occur within a set
timeout window and will terminate if the desired state has not
been observed within that window. It may be possible for the
state transition to complete outside this window, but it is
assumed to be a failure.
Change-Id: Icb9ff29f51b8712469fd9957b7e4b287704cb314
Signed-off-by: Anthony Wilson <wilsonan@us.ibm.com>
|
|
|
|
|
|
|
|
|
| |
In anticipation of new options being added to the program,
this change should make it easier and cleaner to integrate
those options.
Change-Id: Ie996c34ef9c8493d68bc17d6e7a6d39a537ba2cd
Signed-off-by: Anthony Wilson <wilsonan@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The base functions of these options have been implemented, so
power ons/offs can be performed. However, the 'verbose' and
'wait' functionality associated with them from the python
version of the script has not been implemented here (yet).
So there is no error checking in the case of on/off failures
at this moment.
'chassiskill' has also not been implemented here and is planned
to be implemented in its own script. The option may be added to
this script as a call to the other script when that gets
implemented.
Change-Id: I739f0a74e90fb4727fd3333d2a601da1dc49799c
Signed-off-by: Anthony Wilson <wilsonan@us.ibm.com>
|
|
|
|
|
| |
Change-Id: I50dea20337599d33a6f90aad3d39df4874228936
Signed-off-by: Anthony Wilson <wilsonan@us.ibm.com>
|
|
|
|
|
| |
Change-Id: I6deccd1210a528a92f429935b8a043b922cfbcf2
Signed-off-by: Anthony Wilson <wilsonan@us.ibm.com>
|
|
|
|
|
| |
Change-Id: I8b477a165d984f16fbb94a0b94d249ccb52ec378
Signed-off-by: Anthony Wilson <wilsonan@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Due to space, security, and performance concerns obmcutil is
being converted to shell script. Have implemented the basic
state interface queries (bmc, chassis, and host).
Moved to phosphor-state-manager repo as this tool mostly deals
with setting and querying state interfaces.
Change-Id: Ib42da06a45e386dd1cc150ac85b638bdf87bdb9d
Signed-off-by: Anthony Wilson <wilsonan@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is aimed at replacing the ad-hoc timer implementation contained in
each of our openbmc daemons, with a single well-tested timer
implementation.
Tested:
Compiled
Change-Id: I3e562ab72820442aa137a2d517e476192ea6c1bd
Signed-off-by: William A. Kennington III <wak@google.com>
|
|
|
|
|
|
|
|
| |
[discover_system_state.cpp:93]: (performance) Function parameter 'value'
should be passed by const reference.
Change-Id: I25fd43f7993d4d2d94731dbd8d9f490623933d6b
Signed-off-by: Patrick Venture <venture@google.com>
|
|
|
|
|
|
|
| |
Update configure.ac to choose the c++17 standard
Change-Id: I9d96c8e5c7182c9647939621cb4ad1c971479f2d
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
It isn't safe to assume that the interface passed in to
GetSubtree will be the first one in the output, so need
to traverse the whole structure.
Tested: phosphor-discover-system-state was failing with the
C++ mapper, but works with this fix.
Change-Id: Ibc29280f9d51d8067e764da1745d30378bf7068d
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
|
|
|
|
|
|
|
| |
Just some minor spelling fixes on the namespaces
Change-Id: I9ed639a4d78b7fbc6f796ed8f74eee9316c429e0
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This property is set to the timestamp of the last time
the chassis power state changed. It is persisted
so it survives reboots.
Resolves openbmc/openbmc#3300
Tested: Various incantations of power cycling, reboots,
and AC pulls.
Change-Id: I19f244e0490bc9b921454e393989a9cbd283e2dd
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In preparation for the chassis manager class persisting
another data member, some changes need to be made to the
POH serialization code to make it consistent with saving
individual data members in separate files.
1) Remove the load()/save() functions from the Chassis class.
Cereal only requires those when archiving a custom object,
like when the Host class uses oarchive(*this).
2) Remove the Cereal version define from the Chassis class.
That is also only used when a custom object is serialized,
and in fact the version wasn't being stored in the serialized
data anyway.
3) Rename the POH serialization/deserialization functions to be
specifically for the POH counter.
These don't affect how or where POH value is persisted.
Tested: Verify the POH value still increments and survives
reboots.
Change-Id: I065e1a24e018b66f284c6a00f9a34d24eaaedc36
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use the uptime value to calculate the time of the last
BMC reboot when the LastRebootTime property is read.
Calculates it on the fly instead of once at startup so that
if someone changes the BMC time the value will still be
accurate.
Resolves openbmc/openbmc#3159
Tested: Verify the property returns the right value.
Change-Id: I4bc8d2cdf18c225b24c98d9567d053c3246b7506
Signed-off-by: Matt Spinler <spinler@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Making the query to the power state manager can fail if that daemon
does not come up before the chassis state manager. Since we added
exceptions to sdbusplus for call errors, we get an unhandled exception
if this daemon is not running. Since the pgood daemon will announce the
power status when it starts up, we can just assume the power is off if
the call fails. Eventually it will become correct. This restores the
same behavior we had in the past.
Tested:
Ran on a zaius machine and it no longer fails / prints errors in the
common cases and eventually gets to the proper state.
Change-Id: I78809d747219f1096e0ea36905199a35e3b93caa
Signed-off-by: William A. Kennington III <wak@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In order to support error handling for message operations, we need to
make sure we are catching exceptions thrown by sdbusplus.
Tested:
Built / ran on a fully tray pulled zaius. Correctly detected the
host was off and did the automatic transition to boot the machine
at BMC start. Chassis power commands still work as expected and
show up as state transitions.
Change-Id: I3468209b215df6535bb5357a62335da151d81897
Signed-off-by: William A. Kennington III <wak@google.com>
|
|
|
|
|
| |
Change-Id: I8204f1c76d2de82950ff7df49f7577df79ba7358
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
The class provides for a timer, callback invocation on timer expiry, and
timer control/cleanup. This will be used in subsequent commits.
Change-Id: Ic8f43264a47903732b590a360ef0d8af765d5a20
Signed-off-by: Nagaraju Goruganti <ngorugan@in.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
https://gerrit.openbmc-project.xyz/#/c/9774/ introduced a new
minimum host-start target. This allows additional services to
be added to the host-start process that should only be run during
fresh boots of the system.
The phosphor-host-state application needs to now look for this
obmc-host-startmin@.target to determine when the host is started
or stopped. The obmc-host-start@.target should still be started
to boot (under the covers it just calls host-startmin).
The reason for this change is that only the minimum target will be
called in auto reboot situations (host boot errors, host reboot
requests) and this application needs to monitor for all of these.
Tested: Built this with the referenced commit above and
verified on/off/reboot all were processed and displayed
properly by phosphor-host-state-manager
Change-Id: I66877ecc975761e18f75797da10480ee42767ca9
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
|
|
|
|
|
|
|
|
|
| |
Change IndentWrappedFunctionNames to true in the .clang-format
file to indent function definitions that don't fit in a
single line.
Change-Id: Id017dfab9b5a98cac170ac7d146c8711ea3aec74
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
|
|
|
|
|
| |
Change-Id: I232af39d8ded90fa3eb37b74d1435ddbf19fffb1
Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
|
|
|
|
|
| |
Change-Id: Ieac823c5b77674d5ed6979d97481a368e05c95e6
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
Resolves openbmc/openbmc#2181
Change-Id: I807dd94efcea1118060f8594c7f69e333a3ea682
Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
In this commit, discover_system_state is extended to accept a
command line argument such that the user can specify a particular
host. This will allow discover_system_state to run for host1,
host2, or any other host!
Resolves openbmc/openbmc#1466
Change-Id: Ib58a4bc1fd5dfe10a6455778eac779eb0b2085e0
Signed-off-by: Michael Tritz <mtritz@us.ibm.com>
|
|
|
|
|
|
|
|
|
| |
This commit provides a fix for an issue in which the cereal
deserialize() would crash the phosphor-host-state-manager,
incase persistence file is empty in restore path.
Change-Id: I5f7774166b5a719fa035b2a2cd4f041303a1e6bf
Signed-off-by: Jayanth Othayoth <ojayanth@in.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
Resolves openbmc/openbmc#2131
Change-Id: I0559d378088971e3ba03bbb84111f297dd8b3514
Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
Resolves openbmc/openbmc#2032
Change-Id: Iaee1fcae2a758324266cd8afdc2a738f7838aca4
Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
|
|
|
|
|
| |
Change-Id: I1b00a932db2533b83fa0bd7bb4fbd62c0299bff7
Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>
|
|
|
|
|
| |
Change-Id: Ie44e421ad690527d1883f03dcde9d499282ecacc
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
|
|
|
|
|
| |
Change-Id: Ic65a6dab922ef08e68205d4e16bb849baff353c4
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
|
|
|
|
|
|
|
|
| |
Add API to retrieve all settings objects of interest to this repo, in
one shot.
Change-Id: Ie74d39f4d6b1d262e6e5721208efc94003eee46c
Signed-off-by: Deepak Kodihalli <dkodihal@in.ibm.com>
|
|
|
|
|
|
|
| |
Resolves openbmc/openbmc#1785
Change-Id: I5f23ce50dc357489c7b7eece8bab3bfd6a61ffae
Signed-off-by: Dhruvaraj Subhashchandran <dhruvaraj@in.ibm.com>
|
|
|
|
|
|
|
|
|
|
| |
This will ensure the system is immedidately powered
off when a chassis off request is issued
Resolves openbmc/openbmc#1933
Change-Id: I7a6ab93e3b8e1f2b4e590cafc926775b989f107b
Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
| |
Using irreversible ensures no other conflicting units
are started (or even queued)
Resolves openbmc/openbmc#1161
Change-Id: Ia937fc0271be896e5bc469129335ae29c7a79d69
Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The shutdown target provides the soft power off
function and also handles situations where the
service should be skipped
Resolves openbmc/openbmc#1286
Resolves openbmc/openbmc#1670
Change-Id: I2c1705f09f7840107ae0cc15ede02eafd50fcbbd
Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
|
|
|
|
|
|
|
|
| |
The host gets one additional boot try when switching
over to the alternate SBE seeprom side
Change-Id: Ifbf3bfaf649bc15737aa2e03414c0d5fee216b2e
Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
|