-
Notifications
You must be signed in to change notification settings - Fork 635
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
use free subnet to create network #1245
Conversation
b60900a
to
5a66193
Compare
3459a08
to
021eeef
Compare
ece73e3
to
8a898e0
Compare
return err | ||
} | ||
// writeNetworkConfig writes networkConfig file to cni config path. | ||
func (e *CNIEnv) writeNetworkConfig(net *networkConfig) error { |
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.
Both the Ctrl-C or No space can cancel the write and maybe there is invalid data in file. Suggest to use atomic write and make sure that content is correct.
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.
If needed, maybe another PR
Signed-off-by: Ye Sijun <[email protected]>
8a898e0
to
a4b51e2
Compare
Seems to have caused a regression |
Signed-off-by: Ye Sijun [email protected]
We use increment id as the subnet part in the past, it is easy to cause subnet conflicts.
Introduce
GetFreeSubnet
to find a free subnet, and check conflict when specify a subnet