-
Notifications
You must be signed in to change notification settings - Fork 418
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
call shutdown in LifecycleNode dtor to avoid leaving the device in un… #2450
Conversation
…known state. Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
@Barry-Xu-2018 @alsora could you take a look as 1st review? |
I agree with adding tests for destructing LifecycleNode under different states of lifecycle node. However, the code added in this PR indeed is difficult to check by tests. Maybe we should register a callback function (register_on_shutdown) in the tests to confirm that the state transitions to 'Finalized' when LifecycleNode is destructed. |
Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
@alsora requesting another review! thanks in advance. |
@Mergifyio backport iron humble |
✅ Backports have been created
|
#2450) * call shutdown in LifecycleNode dtor to avoid leaving the device in unknown state. Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com> * add test to verify LifecycleNode::shutdown is called on destructor. Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com> --------- Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com> (cherry picked from commit 04ea0bb)
#2450) * call shutdown in LifecycleNode dtor to avoid leaving the device in unknown state. Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com> * add test to verify LifecycleNode::shutdown is called on destructor. Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com> --------- Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com> (cherry picked from commit 04ea0bb)
#2450) (#2490) * call shutdown in LifecycleNode dtor to avoid leaving the device in unknown state. Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com> * add test to verify LifecycleNode::shutdown is called on destructor. Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com> --------- Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com> (cherry picked from commit 04ea0bb) Co-authored-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
#2450) (#2491) * call shutdown in LifecycleNode dtor to avoid leaving the device in unknown state. Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com> * add test to verify LifecycleNode::shutdown is called on destructor. Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com> --------- Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com> (cherry picked from commit 04ea0bb) Co-authored-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
…known state (2nd) (#2528) * Revert "Revert "call shutdown in LifecycleNode dtor to avoid leaving the device in un… (#2450)" (#2522)" This reverts commit 42b0b57. Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com> * lifecycle node dtor shutdown should be called only in primary state. Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com> * adjust warning message if the node is still in transition state in dtor. Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com> --------- Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
…known state (2nd) (#2528) * Revert "Revert "call shutdown in LifecycleNode dtor to avoid leaving the device in un… (#2450)" (#2522)" This reverts commit 42b0b57. Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com> * lifecycle node dtor shutdown should be called only in primary state. Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com> * adjust warning message if the node is still in transition state in dtor. Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com> --------- Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com> (cherry picked from commit 3bc364a)
…known state (2nd) (backport #2528) (#2542) * call shutdown in LifecycleNode dtor to avoid leaving the device in unknown state (2nd) (#2528) * Revert "Revert "call shutdown in LifecycleNode dtor to avoid leaving the device in un… (#2450)" (#2522)" This reverts commit 42b0b57. Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com> * lifecycle node dtor shutdown should be called only in primary state. Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com> * adjust warning message if the node is still in transition state in dtor. Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com> --------- Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com> (cherry picked from commit 3bc364a) * LifecycleNode shutdown on dtor only with valid context. (#2545) Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com> --------- Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com> Co-authored-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
* Revert "lifecycle node dtor shutdown should be called only in primary state. (#2543)" This reverts commit dceb612. Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com> * Revert "call shutdown in LifecycleNode dtor to avoid leaving the device in un… (#2450) (#2490)" This reverts commit f41a353. Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com> --------- Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
* Revert "lifecycle node dtor shutdown should be called only in primary state. (#2544)" This reverts commit 595badb. Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com> * Revert "call shutdown in LifecycleNode dtor to avoid leaving the device in un… (#2450) (#2491)" This reverts commit 0f9604d. Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com> --------- Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com>
…known state.
address #997