-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RBMC: Use sibling fields in role determination
Now that the sibling information is available, use it in role determination. At a high level the new rules are: 1. If something is wrong with the sibling, choose active. 2. If the sibling already has a role, choose the opposite. 3. Otherwise, choose based on position. There will be cases that that would require the local BMC to be passive, such as if it isn't provisioned. These would be checked before even looking at any sibling fields. The role determination function now also returns if there was an error case detected. This is needed so that in the future: 1. An error log can be created based on that specific case. 2. Eventually, the previous role will be used in role determination, before defaulting to the role based on position. However, we won't want to do that if the role was only passive because of an error. (Meaning the fact that there was an error will need to be persisted.) Tested: New unit tests pass. And in simulation: ``` phosphor-rbmc-state-manager[956]: Role = active due to the sibling already being passive phosphor-rbmc-state-manager[1005]: Role = passive due to the sibling already being active ``` Signed-off-by: Matt Spinler <[email protected]>
- Loading branch information
Showing
5 changed files
with
181 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters