Skip to content

Commit

Permalink
optimize the coordinator log (#2126)
Browse files Browse the repository at this point in the history
* optimize the log

Signed-off-by: [email protected] <[email protected]>

* optimize the log

Signed-off-by: [email protected] <[email protected]>

* optimize the log

Signed-off-by: [email protected] <[email protected]>

* optimize the log

Signed-off-by: [email protected] <[email protected]>

---------

Signed-off-by: [email protected] <[email protected]>
  • Loading branch information
weizhoublue authored Aug 3, 2023
1 parent 46783a9 commit 548e129
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/coordinator/cmd/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ func (c *coordinator) coordinatorFirstInvoke(podFirstInterface string) error {
}

if !exist {
return fmt.Errorf("in multi-NIC mode, underlay mode can only work with underlay mode. please check pod's multus annotations")
return fmt.Errorf("when creating interface %s in underlay mode, it detects that the auxiliary interface %s was not created by previous interface. please enable coordinator plugin in previous interface", c.currentInterface, podFirstInterface)
}
}
return nil
case ModeOverlay:
// in overlay mode, it should no veth0 and currentInterface isn't eth0
if c.currentInterface == podFirstInterface {
return fmt.Errorf("in overlay mode, underlay mode can only work with underlay mode. please check pod's multus annotations")
return fmt.Errorf("when creating interface %s in overlay mode, it detects that the current interface is first interface named %s, this plugin should not work for it. please modify in the CNI configuration", c.currentInterface, podFirstInterface)
}

exist, err := networking.CheckInterfaceExist(c.netns, defaultUnderlayVethName)
Expand All @@ -67,7 +67,7 @@ func (c *coordinator) coordinatorFirstInvoke(podFirstInterface string) error {
}

if exist {
return fmt.Errorf("in multi-NIC mode, overlay mode can't work with underlay mode. please check pod's multus annotations")
return fmt.Errorf("when creating interface %s in overlay mode, it detects that the auxiliary interface %s of underlay mode exists. It seems that the previous interface work in underlay mode. ", c.currentInterface, defaultUnderlayVethName)
}

c.firstInvoke, err = networking.IsFirstModeOverlayInvoke(c.netns, c.interfacePrefix)
Expand Down

0 comments on commit 548e129

Please sign in to comment.