Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DNM: Fix Fail-Safe after reboot #559

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from
Draft

Conversation

adigie
Copy link
Member

@adigie adigie commented Feb 25, 2025

  • Add Fail-Safe marker and store it before adding/updating NOC.
  • Check if marker is present in settings during boot.
  • Delete all Fabric data, even if they are not complete.

TODO: replace with commit fromtree

@adigie adigie force-pushed the fail-safe branch 2 times, most recently from 595ef2b to ee2397a Compare February 25, 2025 13:42
@github-actions github-actions bot added the tests label Feb 25, 2025
@adigie adigie force-pushed the fail-safe branch 4 times, most recently from 7ec58e6 to f00901a Compare February 27, 2025 15:06
@adigie adigie added the DNM label Feb 27, 2025
@adigie adigie changed the title Fix Fail-Safe after reboot DNM: Fix Fail-Safe after reboot Feb 27, 2025
adigie added 7 commits March 3, 2025 13:19
* Rename FailSafeCommitMarkerKey to FabricTableCommitMarkerKey

Commit marker was moved from FailSafeContext to FabricTable in #20010,
however name of the key wasn't changed and it's misleading.

This commit changes the name of the method returning commit marker key,
but keeps the key name for backward compatibility.

Signed-off-by: Adrian Gielniewski <adrian.gielniewski@nordicsemi.no>

* Remove declaration of non-existent method

CommitToStorage was removed in #20010.

Signed-off-by: Adrian Gielniewski <adrian.gielniewski@nordicsemi.no>

---------

Signed-off-by: Adrian Gielniewski <adrian.gielniewski@nordicsemi.no>
(cherry picked from commit 4c7bbe0e1182acfeddfc2194ca2250c23f74bbda)
…ing CommitPendingFabricData (#37819)

* Always clean up all data in FabricTable::Delete

Always try to cleanup all fabric data regardless if fabric was
initialized, as there may be some partial data stored if a device was
reset during committing changes to storage.

Signed-off-by: Adrian Gielniewski <adrian.gielniewski@nordicsemi.no>

* Test FabricTable Delete

Test if Delete invokes delegates, as this is needed to cleanup all
fabric related settings after device is reset during committing changes
to storage.

Signed-off-by: Adrian Gielniewski <adrian.gielniewski@nordicsemi.no>

* Fix test

Signed-off-by: Adrian Gielniewski <adrian.gielniewski@nordicsemi.no>

* Fix return value

Make Delete return the same errors as before the changes.

Signed-off-by: Adrian Gielniewski <adrian.gielniewski@nordicsemi.no>

---------

Signed-off-by: Adrian Gielniewski <adrian.gielniewski@nordicsemi.no>
(cherry picked from commit e95b91368ad52de36eda2e25282a00a7d74620dc)
FailSafeContext needs storage for marker.

Upstream PR #: 37807

Signed-off-by: Adrian Gielniewski <adrian.gielniewski@nordicsemi.no>
Upstream PR #: 37807

Signed-off-by: Adrian Gielniewski <adrian.gielniewski@nordicsemi.no>
Upstream PR #: 37807

Signed-off-by: Adrian Gielniewski <adrian.gielniewski@nordicsemi.no>
Upstream PR #: 37807

Signed-off-by: Adrian Gielniewski <adrian.gielniewski@nordicsemi.no>
Test if:
* Marker is stored during AddNOC.
* Marker is not stored during UpdateNOC.
* Marker is cleared During DisarmFailSafe and after timer expiry.

Upstream PR #: 37807

Signed-off-by: Adrian Gielniewski <adrian.gielniewski@nordicsemi.no>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant