Skip to content

Commit

Permalink
some fixes
Browse files Browse the repository at this point in the history
Signed-off-by: zhangzujian <zhangzujian.7@gmail.com>
  • Loading branch information
zhangzujian committed Jul 19, 2024
1 parent bf8c010 commit e369d2c
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 8 deletions.
6 changes: 5 additions & 1 deletion cmd/cni/cni.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,12 @@ func main() {
// must ensure that the goroutine does not jump from OS thread to thread
runtime.LockOSThread()

funcs := skel.CNIFuncs{
Add: cmdAdd,
Del: cmdDel,
}
about := fmt.Sprintf("CNI kube-ovn plugin %s", versions.VERSION)
skel.PluginMain(cmdAdd, nil, cmdDel, version.All, about)
skel.PluginMainFuncs(funcs, version.All, about)
}

func cmdAdd(args *skel.CmdArgs) error {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ require (
replace (
github.com/mdlayher/arp => github.com/kubeovn/arp v0.0.0-20240218024213-d9612a263f68
github.com/openshift/client-go => github.com/openshift/client-go v0.0.1
github.com/ovn-org/libovsdb => github.com/kubeovn/libovsdb v0.0.0-20240218023647-f0bc3ce57fcd
github.com/ovn-org/libovsdb => github.com/kubeovn/libovsdb v0.0.0-20230517064328-9d5a1383643f
k8s.io/api => k8s.io/api v0.30.3
k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.30.3
k8s.io/apimachinery => k8s.io/apimachinery v0.30.3
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1045,8 +1045,8 @@ github.com/kubeovn/go-iptables v0.0.0-20230322103850-8619a8ab3dca h1:fTMjoho2et9
github.com/kubeovn/go-iptables v0.0.0-20230322103850-8619a8ab3dca/go.mod h1:jY1XeGzkx8ASNJ+SqQSxTESNXARkjvt+I6IJOTnzIjw=
github.com/kubeovn/gonetworkmanager/v2 v2.0.0-20230905082151-e28c4d73a589 h1:y9exo1hjCsq7jsGUzt11kxhTiEGrGSQ0ZqibAiZk2PQ=
github.com/kubeovn/gonetworkmanager/v2 v2.0.0-20230905082151-e28c4d73a589/go.mod h1:49upX+/hUyppWIqu58cumojyIwXdkA8k6reA/mQlKuI=
github.com/kubeovn/libovsdb v0.0.0-20240218023647-f0bc3ce57fcd h1:GhgvSBFKEkVNgDq8IslC04NVuoznreZH/Imz/cr6bhs=
github.com/kubeovn/libovsdb v0.0.0-20240218023647-f0bc3ce57fcd/go.mod h1:pTnlGt1JZrncr6pJn/Fhnp3FFTMQRaTVxiSKBLVGa5s=
github.com/kubeovn/libovsdb v0.0.0-20230517064328-9d5a1383643f h1:HDjnbJZN+2T3XH7usjtO2+PYDA2fyrLGYjypEA/87pM=
github.com/kubeovn/libovsdb v0.0.0-20230517064328-9d5a1383643f/go.mod h1:NHoQwGSKygdpFb8y7HBS6b1HP4EtJ14zzLrnd/A1fmY=
github.com/kubeovn/ovsdb v0.0.0-20240410091831-5dd26006c475 h1:KZba2Kj9TXCUdUSqOR3eiy4VvkkIyhDVImYmYs6GQWU=
github.com/kubeovn/ovsdb v0.0.0-20240410091831-5dd26006c475/go.mod h1:LAd0qoeAAm/QyZcpxN2BnpndM2/dhZt+/kokPvcxKcE=
github.com/kubernetes-csi/external-snapshotter/client/v4 v4.2.0 h1:nHHjmvjitIiyPlUHk/ofpgvBcNcawJLtf4PYHORLjAA=
Expand Down
2 changes: 1 addition & 1 deletion pkg/ipam/ipam.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func (ipam *IPAM) GetStaticAddress(podName, nicName, ip string, mac *string, sub
}
ips, err = checkAndAppendIpsForDual(ips, macStr, podName, nicName, subnet, checkConflict)
if err != nil {
klog.Errorf("failed to append allocate ip %v mac %s for %s", ips, mac, podName)
klog.Errorf("failed to append allocate ip %v mac %v for %s", ips, mac, podName)
return "", "", "", err
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/ovn_leader_checker/ovn.go
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ func compactOvnDatabase(db string) {
}

if len(output) != 0 {
klog.V(5).Infof("compact ovn%s database: %s", string(output))
klog.V(5).Infof("compact ovn%s database: %s", db, string(output))
}
}

Expand Down
4 changes: 2 additions & 2 deletions pkg/ovs/ovn-nb-suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/cenkalti/backoff/v4"
"github.com/go-logr/stdr"
"github.com/ovn-org/libovsdb/client"
"github.com/ovn-org/libovsdb/database/inmemory"
"github.com/ovn-org/libovsdb/database"
"github.com/ovn-org/libovsdb/model"
"github.com/ovn-org/libovsdb/ovsdb"
"github.com/ovn-org/libovsdb/ovsdb/serverdb"
Expand Down Expand Up @@ -702,7 +702,7 @@ func newOVSDBServer(t *testing.T, dbModel model.ClientDBModel, schema ovsdb.Data
require.NoError(t, err)
serverSchema := serverdb.Schema()

db := inmemory.NewDatabase(map[string]model.ClientDBModel{
db := database.NewInMemoryDatabase(map[string]model.ClientDBModel{
schema.Name: dbModel,
serverSchema.Name: serverDBModel,
})
Expand Down

0 comments on commit e369d2c

Please sign in to comment.