Skip to content
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

Automatic IP allocation follow up #13540

Merged
merged 7 commits into from
Jun 6, 2024

Conversation

markylaing
Copy link
Contributor

@markylaing markylaing commented Jun 3, 2024

Addresses remaining discussions in #13379.

Depends on #13543
Closes #13422

@markylaing markylaing self-assigned this Jun 3, 2024
.golangci.yml Outdated Show resolved Hide resolved
@markylaing
Copy link
Contributor Author

Marking as draft until #13543 is merged.

Signed-off-by: Mark Laing <mark.laing@canonical.com>
@markylaing markylaing marked this pull request as ready for review June 6, 2024 09:18
The caller can now return a boolean to indicate if the IP address is
valid or not. The error value is used to indicate if an error occurred
during validation.

Signed-off-by: Mark Laing <mark.laing@canonical.com>
Signed-off-by: Mark Laing <mark.laing@canonical.com>
…from ovn.

This keeps the code path similar between drivers for easier context
switching.

Signed-off-by: Mark Laing <mark.laing@canonical.com>
Signed-off-by: Mark Laing <mark.laing@canonical.com>
Signed-off-by: Mark Laing <mark.laing@canonical.com>
When creating a network forward, the `checkAddressNotInUse` function was
using the value of `listenAddressNet` directly (it is available in
scope), and not the given `net.IP` argument. For automatic IP
allocation, `listenAddressNet` will have been unspecified. This meant
that allocating an IP for a network forward was not correctly validating
the randomly assigned IP addresses and would have led to a bug.

Signed-off-by: Mark Laing <mark.laing@canonical.com>
@markylaing
Copy link
Contributor Author

@tomponline I've rebased and fixed a couple of things I found on revisiting it.

The last commit of this PR isn't from a comment on #13379 - it's a bugfix. I just found it today (can open a separate PR if you'd prefer but kept it here since it's all related)

Copy link
Member

@tomponline tomponline left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@tomponline tomponline merged commit 9387ded into canonical:main Jun 6, 2024
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Follow up: Automatic IP allocation
2 participants