Repository navigation
Fix network multinodes - #340
Merged
Merged
Conversation
mlohvynenko
reviewed
Nov 19, 2026
| @@ -0,0 +1,41 @@ | |||
| /* | |||
| * Copyright (C) 2025 EPAM Systems, Inc. | |||
Member
There was a problem hiding this comment.
Suggested change
| * Copyright (C) 2025 EPAM Systems, Inc. | |
| * Copyright (C) 2026 EPAM Systems, Inc. |
mlohvynenko
reviewed
Nov 19, 2026
| @@ -0,0 +1,24 @@ | |||
| /* | |||
| * Copyright (C) 2025 EPAM Systems, Inc. | |||
Member
There was a problem hiding this comment.
Suggested change
| * Copyright (C) 2025 EPAM Systems, Inc. | |
| * Copyright (C) 2026 EPAM Systems, Inc. |
mlohvynenko
approved these changes
Nov 19, 2026
mlohvynenko
left a comment
Member
There was a problem hiding this comment.
Reviewed-by: Mykhailo Lohvynenko <mykhailo_lohvynenko@epam.com>
al1img
approved these changes
Nov 23, 2026
al1img
left a comment
Collaborator
There was a problem hiding this comment.
Reviewed-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com>
MykolaSuperman
force-pushed
the
fix_network_multinodes
branch
from
November 23, 2026 16:36
1243cfe to
1ccc7ce
Compare
added 7 commits
November 23, 2026 18:37
Implement OnUnitNetworksUpdate of the pending update handler interface: write the unit networks update notification with the full set of unit network IDs to the instance network update stream of the node. Signed-off-by: Mykola Solianko <mykola_solianko@epam.com> Reviewed-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com> Reviewed-by: Mykhailo Lohvynenko <mykhailo_lohvynenko@epam.com>
Handle the unit networks update notification of the instance network update stream and pass the full set of unit network IDs to the network update handler. The set is full-state and the handler releases the networks missing in it, so the update that can't be converted completely is skipped. Signed-off-by: Mykola Solianko <mykola_solianko@epam.com> Reviewed-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com> Reviewed-by: Mykhailo Lohvynenko <mykhailo_lohvynenko@epam.com>
SM creates the provider network only for its own instances, so instances of different providers running on different nodes can't communicate: the node has no bridge and VLAN of the remote provider network. Make the network manager own the set of unit networks: the networks that have at least one allocated instance. The full set is sent to the node when it subscribes to the instance network updates and to all subscribed nodes when the set changes, so each SM can create the missing networks and release the ones that left the set. Add the update subscription listener interface, which SM controller uses to notify the network manager about nodes subscribed to the instance network updates. Signed-off-by: Mykola Solianko <mykola_solianko@epam.com> Reviewed-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com> Reviewed-by: Mykhailo Lohvynenko <mykhailo_lohvynenko@epam.com>
The provider network leaves the set of unit networks as soon as its last instance is released: all nodes remove the network and CM frees its VLAN ID and subnet. This also happens when the only instance of the provider is moved to another node or restarted on update: the instance is released on the old node before it is allocated on the new one, which has to install the image first. As a result, the network is recreated on all nodes, possibly with another VLAN ID and subnet, and the instance IP is not preserved. To avoid this, the network without instances should stay in the set of unit networks for some time. This time depends on how long the image installation takes on the unit, so add the networkRemoveTimeout parameter to CM config to make it configurable. The default value is 2 minutes. Signed-off-by: Mykola Solianko <mykola_solianko@epam.com> Reviewed-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com> Reviewed-by: Mykhailo Lohvynenko <mykhailo_lohvynenko@epam.com>
The provider network leaves the set of unit networks as soon as its last instance is released. When the only instance of the provider is moved to another node or restarted on update, it is released on the old node before it is allocated on the new one. So all nodes remove the network, CM frees its VLAN ID and subnet, and then the network is created again, possibly with another VLAN ID and subnet. Keep the network without instances in the set of unit networks for the network remove timeout. The removal is scheduled when the network is created, when its last instance is released and, on init, for the stored networks without instances. It is canceled when an instance is allocated in the network. When the timeout expires, the network leaves the set, SMs release it and CM removes it with its last host as before. As a result, the new network is announced to all nodes right after it is created, before its first instance is allocated. The removal time is not stored, so after CM restart the timeout starts again. Zero timeout disables the delay. Add Start and Stop methods to run and stop the thread that handles the removal timeouts. Signed-off-by: Mykola Solianko <mykola_solianko@epam.com> Reviewed-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com> Reviewed-by: Mykhailo Lohvynenko <mykhailo_lohvynenko@epam.com>
The network manager documents describe the provider network as created only on the nodes that run its instances and removed with the last instance, which is no longer true. Describe the set of unit networks in the CM network manager document: how the set is built, when it is sent to the nodes, the update subscription listener and the delayed network removal with the networkRemoveTimeout config parameter. Update the lifecycle diagram in the SM network manager document: the bridge, VLAN and masquerade of the unit network are created without instances and are removed only when the network leaves the unit networks. Signed-off-by: Mykola Solianko <mykola_solianko@epam.com> Reviewed-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com> Reviewed-by: Mykhailo Lohvynenko <mykhailo_lohvynenko@epam.com>
SM starts dnsmasq for each network by the hard-coded path /usr/sbin/dnsmasq. Yocto installs dnsmasq to /usr/bin, so on the target the process is not started: exec fails in the forked child and SM gets no error. Instances then have no DNS server on the bridge address and resolve names only through the CM DNS server. Start dnsmasq by name and let exec find it in PATH, so SM does not depend on where the distro installs the binary. Signed-off-by: Mykola Solianko <mykola_solianko@epam.com> Reviewed-by: Oleksandr Grytsov <oleksandr_grytsov@epam.com> Reviewed-by: Mykhailo Lohvynenko <mykhailo_lohvynenko@epam.com>
MykolaSuperman
force-pushed
the
fix_network_multinodes
branch
from
November 23, 2026 17:57
1ccc7ce to
d5c53fa
Compare
|
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.