Sync network cm sm#197
Open
MykolaSuperman wants to merge 8 commits intoaosedge:feature_release_9.1from
Open
Conversation
3853086 to
4f5abe2
Compare
added 8 commits
April 7, 2026 11:45
SMClient now supports ConnectListenerItf subscribers. On successful connection to CM, all registered listeners receive OnConnect callback. NetworkManager is subscribed in AosCore::Start. Signed-off-by: Mykola Solianko <mykola_solianko@epam.com>
Add pbconvert for InstanceNetworkStateInfo and implement SyncNetworkState in SMClient to send instance network state to CM on (re)connect. Signed-off-by: Mykola Solianko <mykola_solianko@epam.com>
Signed-off-by: Mykola Solianko <mykola_solianko@epam.com>
Release CM instances not present in SM state. Re-resolve pending connections for all SM instances on the node. Signed-off-by: Mykola Solianko <mykola_solianko@epam.com>
Receive SM network state via RPC and delegate to CM NetworkManager for reconciliation. Signed-off-by: Mykola Solianko <mykola_solianko@epam.com>
ResolvePendingConnections now removes from memory only. DB cleanup happens in SyncNetworkState when SM reports firewall rules applied. This prevents losing pending connections if SM crashes before applying resolved rules. Signed-off-by: Mykola Solianko <mykola_solianko@epam.com>
Add ReloadPendingConnections, keep pending in DB until SM confirms. Add 3 tests: ReleasesStaleInstances, ReResolvePendingConnections, ConfirmedPendingCleanedFromDB. Update NetworkProviderStub. Signed-off-by: Mykola Solianko <mykola_solianko@epam.com>
Add SMServiceStub SyncNetworkState handler. Add tests for SyncNetworkState RPC call and SubscribeConnectListener notification. Signed-off-by: Mykola Solianko <mykola_solianko@epam.com>
4f5abe2 to
7c517cf
Compare
mykola-kobets-epam
approved these changes
Apr 9, 2026
Collaborator
mykola-kobets-epam
left a comment
There was a problem hiding this comment.
Reviewed-by: Mykola Kobets <mykola_kobets@epam.com>
| ResolvePendingConnections(instanceIdent); | ||
| } | ||
|
|
||
| return ErrorEnum::eNone; |
Collaborator
There was a problem hiding this comment.
function returns eNone only so return value can be changed to void
| grpc::Status SMController::SyncNetworkState(grpc::ServerContext*, | ||
| const servicemanager::v5::SyncNetworkStateRequest* request, servicemanager::v5::SyncNetworkStateResponse* response) | ||
| { | ||
| LOG_DBG() << "SyncNetworkState" << Log::Field("nodeID", request->node_id().c_str()) |
Collaborator
There was a problem hiding this comment.
Sync network state
| { | ||
| std::lock_guard lock {mMutex}; | ||
|
|
||
| LOG_DBG() << "SyncNetworkState" << Log::Field("nodeID", nodeID) << Log::Field("instancesCount", instances.Size()); |
Collaborator
There was a problem hiding this comment.
Sync network state
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.