-
Notifications
You must be signed in to change notification settings - Fork 64
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
Add Docker network label if custom ipam config #2400
base: master
Are you sure you want to change the base?
Conversation
ad0b4a3
to
102ab21
Compare
On-device testingGiven two releases where the only delta is a network config change, one without custom ipam config:
and one with custom ipam config:
Engine network metadata is as follows. First, for the release without custom ipam:
and for the release with custom ipam:
Note the presence of the |
src/compose/network.ts
Outdated
// changes, this label informs the Supervisor that | ||
// there's an ipam diff that requires recreating the network. | ||
if (net.config.ipam.config.length > 0) { | ||
net.config.labels['io.balena.network.ipam'] = 'true'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like us to use theio.balena.private
namespace, I would prefer something like io.balena.private.ipam.config
perhaps? io.balena.private.network.ipam
works too, although the network
part might not totally be necessary since we are already configuring networks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to io.balena.private.ipam.config
!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only left one minor comment.
Since this is a major
update, could you make sure to write some detailed release notes on the PR body so those get published to the balenaCloud release
If you add a ## Release Notes
section, flowzone will use that for release notes on GH and bC
102ab21
to
0750d4a
Compare
Thanks for taking a look @pipex ! I updated per your suggestions, and also added some release notes above. |
In a target release where the only change is the addition or removal of a custom ipam config, the Supervisor does not recreate the network due to ignoring ipam config differences when comparing current and target network (in network.isEqualConfig). This commit implements the addition of a network label if the target compose object includes a network with custom ipam. With the label, the Supervisor will detect a difference between a network with a custom ipam and a network without, without needing to compare the ipam configs themselves. This is a major change, as devices running networks with custom ipam configs will have their networks recreated to add the network label. Closes: #2251 Change-type: major See: https://balena.fibery.io/Work/Project/Supervisor-maintenance-work-(Dec-2024)-948 Signed-off-by: Christina Ying Wang <[email protected]>
0750d4a
to
9afb7ef
Compare
In a target release where the only change is the addition or removal of a custom ipam config, the Supervisor does not recreate the network due to ignoring ipam config differences when comparing current and target network (in network.isEqualConfig). This commit implements the addition of a network label if the target compose object includes a network with custom ipam. With the label, the Supervisor will detect a difference between a network with a custom ipam and a network without, without needing to compare the ipam configs themselves.
This is a major change, as devices running networks with custom ipam configs
will have their services & networks recreated to add the network label.
Closes: #2251
Change-type: major
Release Notes
This release resolves a bug where a target release with only a network custom IPAM config change does not get applied by the Supervisor.
When receiving a target release with a custom IPAM config, the Supervisor will add the
io.balena.private.ipam.config
label to Docker networks with custom IPAM configs. As a result, these networks will be properly recreated.This is a major change. Devices that currently have services using networks with custom IPAM configurations will experience: