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

core: add methods to configure macvlan interface for container and point to latest rtnetlink #73

Merged
merged 2 commits into from
Nov 12, 2021

Conversation

flouthoc
Copy link
Collaborator

Following PR makes these following changes

Adds core methods to create macvlan interface.

* Creates macvlan for specified master veth with given mode.
* Moves and rename macvlan to container namespace.
* Turn up macvlan interface.

Signed-off-by: Aditya Rajan <arajan@redhat.com>
@flouthoc
Copy link
Collaborator Author

@Luap99 @mheon @baude @lsm5 Could we get this in. I'll rig this with podman config in a follow up PR.

@flouthoc flouthoc changed the title core: add methods to configure macvlan interface for container and point to laster rtnetlink core: add methods to configure macvlan interface for container and point to latest rtnetlink Nov 12, 2021
tokio::spawn(_connection);

//generate a random name on host to prevent collision.
//check https://github.com/containernetworking/plugins/blob/master/plugins/main/macvlan/macvlan.go#L176
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is important for our use-case to work.

Copy link
Member

@Luap99 Luap99 left a comment

Choose a reason for hiding this comment

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

Just a small nit, otherwise LGTM

src/network/core_utils.rs Outdated Show resolved Hide resolved
src/network/core_utils.rs Outdated Show resolved Hide resolved
adds core methods to create macvlan interface.

* Creates macvlan for specified master veth with given mode.
* Moves and rename macvlan to container namespace.
* Turn up macvlan interface

Reference: https://www.cni.dev/plugins/current/main/macvlan/

Signed-off-by: Aditya Rajan <arajan@redhat.com>
Copy link
Member

@Luap99 Luap99 left a comment

Choose a reason for hiding this comment

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

LGTM

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Nov 12, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: flouthoc, Luap99

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@Luap99
Copy link
Member

Luap99 commented Nov 12, 2021

/lgtm

@openshift-ci openshift-ci bot added the lgtm label Nov 12, 2021
@openshift-merge-robot openshift-merge-robot merged commit 6236f95 into containers:main Nov 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants