summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert "Use shutdown target to stop the host"Andrew Geissler2017-05-241-5/+1
| | | | | | | | | | | | | This reverts commit c99ad19b76f233f2c31a02d133770377572fc92a. Unfortunately this was not ready for prime time yet. The host ipmid server calls the host state code to power down, which ends up calling the host-ipmid code for a power down. Resolves openbmc/openbmc#1657 Change-Id: I699dba427c5104c7278d04a61224441edf3df216 Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
* Use shutdown target to stop the hostAndrew Geissler2017-05-231-1/+5
| | | | | | | | | | | The shutdown target will use the soft power off application which allows the host to properly shut itself down before power is removed from the chassis Resolves openbmc/openbmc#1286 Change-Id: I7be630237571847a9fa6c37b0b9a8fddf568e47b Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
* Remove use of system managerJosh D. King2017-05-191-17/+1
| | | | | | | | | Host state manager used to use system manager in order to check whether it is running or not. Now we are directly checking the target. Change-Id: Idb3a72685b58770833c2c9056b9c75ac67703dc5 Signed-off-by: Josh D. King <jdking@us.ibm.com>
* Check Quiesce State before issuing auto rebootJosh D. King2017-05-181-1/+2
| | | | | | | | | | | Quiesce state was going into a reboot when we issued a power off command. Added logic to check the state before autoReboot occurs. Resolves openbmc/openbmc#1475 Change-Id: I5cd9375a1c68b89e0b777ff436f90e553f2e6b32 Signed-off-by: Josh D. King <jdking@us.ibm.com>
* bmc: use latest sdbusplus match APIsPatrick Williams2017-05-112-40/+22
| | | | | Change-Id: I02aca5f8c7e633c6de7608194a0bdb0874ef2090 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* chassis: use latest sdbusplus match APIsPatrick Williams2017-05-112-38/+18
| | | | | Change-Id: I1be75ab5af362d683be76afb47d8c411f0f4a4b2 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* add libtool to .gitignorePatrick Williams2017-05-111-1/+1
| | | | | Change-Id: I18230ad8caf1b440eb5437d4f9298af84a262460 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* host: use latest sdbusplus match APIsPatrick Williams2017-05-112-43/+22
| | | | | Change-Id: Iec0ae14c49c07568110bdebeaa0505db40d92540 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* Fix null char snprintf bug in host on fileAndrew Geissler2017-05-091-1/+2
| | | | | Change-Id: I337fa2c810300c920cbc7373349d32a757359497 Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
* Add journal entry for BOOTCOUNTSaqib Khan2017-05-052-17/+40
| | | | | | | | | | Update the jounal entry in the host state code to indicate we may have hit the HOST BOOTCOUNT. Resolves openbmc/openbmc#1424 Change-Id: I2bfd73f6051efb408eb4c683cebe95fda4700859 Signed-off-by: Saqib Khan <khansa@us.ibm.com>
* Update gitignore for new state applicationAndrew Geissler2017-05-031-0/+2
| | | | | Change-Id: Ifdc97aa9dc8659b55caae29d0c1ff8eb948fd45e Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
* Create file if host is runningAndrew Geissler2017-05-032-1/+19
| | | | | | | | This file is used by the host start services to know if they should actually run or not Change-Id: I62c5af0cd54a40ed272a59871dc26a3e125070a2 Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
* Send heartbeat command to hostAndrew Geissler2017-05-031-6/+59
| | | | | Change-Id: I450b447382bf86d75e713287e21159eb99e4373a Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
* Adding host control signal monitoring supportAndrew Geissler2017-05-031-1/+58
| | | | | | | | Adds in support to subscribe and monitor for the signal indicating the host command has been processed Change-Id: Icab302fc5bd75ecd1d6804d7ab3196e6cceda3b1 Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
* Create initial skeleton of host check codeAndrew Geissler2017-05-032-1/+28
| | | | | | | | | | | | | This sequence of commits will be the application that runs after a BMC reset when it's detected that pgood is on. This applications job is to check whether the host is running, and if it is, to create a specific file in the filesystem that will prevent the host power on targets services from executing. Change-Id: If5d26a443a0d8fd1873df166a6a5d45290eb6401 Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
* Look for new quiesce targetJosh D. King2017-04-201-1/+1
| | | | | | | | Changed target name from: obmc-quiesce-host -> obmc-host-quiesce Change-Id: I72fbc52d1ab5503fe633dc65b9228263546daeda Signed-off-by: Josh D. King <jdking@us.ibm.com>
* {chassis,host}_state_manager: Fix 'Recieved' typoAndrew Jeffery2017-04-192-4/+4
| | | | | Change-Id: I90ef5d88595a226dd7115d6c224928cf30b5c7d8 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
* Remove Chassis power on messages when powering offJosh D. King2017-04-172-2/+74
| | | | | | | | | | | Currently Chassis state services show incorrect states when a target exits. To fix this, a bus call is used on the target to determine its ActiveState. Doing that helps to determine if the target is already powered on and is now powering down. Change-Id: I55bc87fa9ff647212fe545b7edd7df8a85e9e223 Signed-off-by: Josh D. King <jdking@us.ibm.com>
* Remove Hosts power on messages when powering offJosh D. King2017-04-172-3/+76
| | | | | | | | | | | Currently Host state services show incorrect states when a target exits. To fix this, a bus call is used on the target to determine its ActiveState. Doing that helps to determine if the target is already powered on and is now powering down. Change-Id: Id91dc8156308372fc1649526a7b6dedee94eeb01 Signed-off-by: Josh D. King <jdking@us.ibm.com>
* Refactor action target names Host-start-stopJosh D. King2017-04-131-2/+2
| | | | | | | | | The target change is: obmc-chassis-stop -> obmc-host-stop obmc-chassis-start -> obmc-host-start Change-Id: I70fc0af68c9b493231aa9e4e698d33ae9d57cfc4 Signed-off-by: Josh D. King <jdking@us.ibm.com>
* Refactor action target names Power-on-offJosh D. King2017-04-111-2/+2
| | | | | | | | | The target change is: obmc-power-chassis-on -> obmc-chassis-poweron obmc-power-chassis-off -> obmc-chassis-poweroff Change-Id: I31af899b1b32de6f7c747264be19f14b43c4c4ee Signed-off-by: Josh D. King <jdking@us.ibm.com>
* discover_system_state refactor in C++Michael Tritz2017-03-302-1/+158
| | | | | | | | | This commit refactors the system state discovery script from openbmc/skeleton in C++ in order to use the sdbusplus library. Change-Id: Ie431b147cbdcd92ac8cf20916235011b6a5a3f4c Signed-off-by: Michael Tritz <mtritz@us.ibm.com>
* Move object_mapper per dbus path conventions.Leonel Gonzalez2017-03-201-1/+1
| | | | | | | Partial fix for openbmc/openbmc#1112. Change-Id: Ib8a1e10867aed4af5376076a7f12f4e38ef9c79f Signed-off-by: Leonel Gonzalez <lgonzalez@us.ibm.com>
* Use the Host BOOTCOUNT to keep track of rebootsSaqib Khan2017-03-201-1/+38
| | | | | | | | | | | | | We will use the existing HOST BOOTCOUNT to determine if the Host should perform a reboot before going to the quiesce state. When the counter reaches 0, the BOOTCOUNT will be reset to 2 and the HOST will enter the quiesce state. Resolves openbmc/openbmc#1181 Change-Id: Ib67792476993899c6c21f3917f4b760040f23a2e Signed-off-by: Saqib Khan <khansa@us.ibm.com>
* Resolve obmc-standby.target into a pathJosh D. King2017-02-281-10/+34
| | | | | | | | | | A slight modification to bmc_state_manager.cpp. Added a systemd call GetUnit to derive the obmc-standby.target instead of using a hard coded string such as obmc_2dstandby_2etarget. Change-Id: Ica1e1e9c327e68190e800e88c0db865922c7443f Signed-off-by: Josh D. King <jdking@us.ibm.com>
* Add quiesce to the HOST stateSaqib Khan2017-02-241-1/+3
| | | | | | | | If the autoreboot is set to false, then the system state query will reflect quiesce state. Change-Id: I2c98646b9b97733e0cf0bd2db77f542074618a9a Signed-off-by: Saqib Khan <khansa@us.ibm.com>
* Change obj path from BMC to lower case bmcJosh D. King2017-02-231-1/+1
| | | | | | | | Quick fix and simply modified configure.ac to make BMC_OBJPATH's value to lower case. Change-Id: If1b9cd2d596d68f2d3e05a6af3dbc5fc4db6af6b Signed-off-by: Josh D. King <jdking@us.ibm.com>
* Import phosphor-logging header files from new directorySaqib Khan2017-02-204-4/+4
| | | | | | | | | Phase2: Changing the phosphor-logging header files import from base dir to files under phosphor-logging folder. Once all projects import from the new dir, the files in the base dir will be deleted. Change-Id: I7152da5f0737171b9919bd082b09aa8ce4761430 Signed-off-by: Saqib Khan <khansa@us.ibm.com>
* State manager auto-reboot logic for quiesce stateMichael Tritz2017-02-202-0/+92
| | | | | | | | | | These changes will add logic to state manager so that, when the system reaches quiesce state, it will either reboot or not, per the user preference. Change-Id: I72952cd9528620fabeb499109e3790298fdd976b Signed-off-by: Michael Tritz <mtritz@us.ibm.com>
* Add discovery of initial stateJosh D. King2017-02-102-1/+55
| | | | | | | | | | | | Added the method discoverInitialState that will be used to determine if the obmc-standby.target is either active or inactive. This catches the race condition that could happen if just our app was restarted and the signal had already been given and we had missed it. Change-Id: Iadcdcbd2d1045fa62491e9af6e2402d4b17c4a60 Signed-off-by: Josh D. King <jdking@us.ibm.com>
* Add libsdbusplus dependencyAdriana Kobylak2017-02-022-2/+4
| | | | | | | | The state-manager uses libsdbusplus, add a dependency on it. Change-Id: I7d2bcc58a079e373d4ad101974d5972d846f4bc9 Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
* Send initial transition value to base classAndrew Geissler2017-02-011-4/+4
| | | | | | | | Fix to not redundantly call the systemd target when initially discovering chassis state Change-Id: I5673ab59581c9ddfb00df52af05184602654836d Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
* Use systemd targets to track host statesAndrew Geissler2017-02-012-43/+91
| | | | | Change-Id: I5ab174d945c1dfb265a02f9095d3eaeb0ba562db Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
* Use systemd target states to track chassis on/off statesAndrew Geissler2017-02-012-55/+85
| | | | | Change-Id: Id76074cc500fa8d147d3d219af62f8d224881b18 Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
* Call new chassis power targets during on/off requestsAndrew Geissler2017-02-012-0/+38
| | | | | | | | | New targets were introduced recently to support just the power on and off of the chassis (no boot of host). This code change makes use of these new targets. Change-Id: Ibf942a9ed27ccc982a36cd755afdf6171cb5c0a6 Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
* build: use phosphor-dbus-interfaces directlyPatrick Williams2017-01-308-1217/+13
| | | | | Change-Id: I03c12767b554cfd90760dc17f1ce159cd2b8a962 Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
* Process system state changesJosh D. King2017-01-262-5/+88
| | | | | | | | | | We are currently subscribed to the systemd to get a signal notifying us when the obmc-standby.target is ready. Things may change in the future but this is what we have decided to do for now. Change-Id: I81ecdcb45123feb611cf88916c0f9caadcd82dfe Signed-off-by: Josh D. King <jdking@us.ibm.com>
* Add BMC state transition of rebootJosh D. King2017-01-262-12/+39
| | | | | | | | | | This commit should support the transition to reboot a BMC using systemd. Later commits will handle the remaining transition monitoring for updating the current state. Change-Id: I1fb14b8775de4d2cbc522aa3405c8917291bf3cc Signed-off-by: Josh D. King <jdking@us.ibm.com>
* Subscribe to systemd on startupJosh D. King2017-01-262-1/+61
| | | | | | | | | | | Added code for the implementation of the method subscribeToSystemdSignals. The reason for this is because we want to catch the obmc-standby.target signal and be notified when it is done which means the BMC is READY. Change-Id: I824b83676db8cb211f5bee954f98a719a773a62b Signed-off-by: Josh D. King <jdking@us.ibm.com>
* Add base support for BMC state managementJosh D. King2017-01-258-3/+504
| | | | | | | | | | | This is the starting code needing to build the application. Still more to do, this is just the layout for the additional commits that will be done for the state management. Change-Id: Ief1dc96c84b34630e60ef40c99d4faf5b6f6e02e Signed-off-by: Josh D. King <jdking@us.ibm.com>
* Fix missing systemd linkingMatthew Barth2017-01-191-0/+3
| | | | | | | Discovered LT_INIT is required to link to systemd Change-Id: I7755386034ccba1675f5b28fd642264f1584bc9f Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
* Replace op with phosphor in state application namesAndrew Geissler2017-01-162-8/+8
| | | | | | | | The correct naming convention for these applications is to start with phosphor-, not op-. Change-Id: I24373f5d4498f7fb90fb6b8a3b5b29dccca93f4d Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
* Use pgood signal to keep internal state updatedAndrew Geissler2017-01-132-1/+66
| | | | | Change-Id: I35a2e67afc877488ceb1a0e0255b99b9db792201 Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
* Determine chassis power state on application startupAndrew Geissler2017-01-132-3/+50
| | | | | Change-Id: I406b2a6c7af1e4c26af0e43a432a130c967d84bc Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
* Initial chassis state management codeAndrew Geissler2017-01-139-16/+551
| | | | | | | | 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>
* Move tracing over to phosphor-logging interfacesAndrew Geissler2017-01-122-16/+21
| | | | | Change-Id: I1af70670f4e6e941c2656cfc2877789903e9aec0 Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
* Create instance specific host state objectAndrew Geissler2017-01-091-2/+6
| | | | | | | | Some day we may support multiple host instances. For now we're just going to hard code to instance 0. Change-Id: I2c52d138177172563da5ddf0217053324a6999fd Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
* Default requestedHostTransition to value on startupAndrew Geissler2017-01-091-0/+2
| | | | | | | | | | The persistence and enforcement of the requested state will come in a different chain of commits. For now, we just want this to match up with what we read from the system target for our current state. Change-Id: Iaeb60e074c3bfc6046bf00b72f512cab1012342c Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
* Support reboot transition request in host interfaceAndrew Geissler2017-01-091-3/+36
| | | | | Change-Id: Ic09ccf710f13697fd203ca1b96c3b5084a76511b Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
* Process system state changesAndrew Geissler2017-01-092-9/+59
| | | | | | | | | | | Use the system state signal to know when to change the state of the host The signal we look at may change with future skeleton refactors but this is the best signal for now Change-Id: Ibba7cc5628994425520c21cdf122d2710f8164aa Signed-off-by: Andrew Geissler <andrewg@us.ibm.com>
OpenPOWER on IntegriCloud