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

Fix veth device name conflict when multi network enabled #115

Merged
merged 1 commit into from Dec 21, 2020

Conversation

horizen
Copy link

@horizen horizen commented Dec 20, 2020

follow cni plugin dependency veth device

  • galaxy-underlay-veth
  • galaxy-veth
  • galaxy-k8s-vlan
    when multi network enable for example flannel and k8s-vlan, the veth device name may conflict。

this patch use different suffix for galaxy-k8s-vlan and galaxy-underlay-veth plugin but keep galaxy-veth device name not changed for backward compatibility.

@@ -171,8 +176,8 @@ func DeleteVeth(netnsPath, ifName string) error {
}

// DeleteHostVeth deletes veth device in the host network namespace
func DeleteHostVeth(containerId string) error {
hostIfName := HostVethName(containerId, "")
func DeleteHostVeth(containerId, suffix string) error {
Copy link
Contributor

Choose a reason for hiding this comment

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

这个修改好像没用上?我看没有地方有传过非空的suffix

Copy link
Author

Choose a reason for hiding this comment

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

主要是出于和HostVethName API保持一致的考虑。

@chenchun chenchun merged commit edb7e1a into tkestack:master Dec 21, 2020
@chenchun
Copy link
Contributor

Thanks for fixing this @horizen

@chenchun chenchun added this to the v1.0.8 milestone Dec 21, 2020
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.

None yet

2 participants