diff --git a/go-controller/go.mod b/go-controller/go.mod index a9dece7c6eb..672eb196fde 100644 --- a/go-controller/go.mod +++ b/go-controller/go.mod @@ -4,7 +4,6 @@ go 1.13 require ( github.com/Mellanox/sriovnet v1.0.3-0.20210630121212-0453bd4b7fbc - github.com/Microsoft/go-winio v0.4.15 // indirect github.com/Microsoft/hcsshim v0.8.10-0.20200715222032-5eafd1556990 github.com/alexflint/go-filemutex v0.0.0-20171022225611-72bdc8eae2ae github.com/bhendo/go-powershell v0.0.0-20190719160123-219e7fb4e41e @@ -26,9 +25,7 @@ require ( github.com/onsi/gomega v1.14.0 github.com/ovn-org/libovsdb v0.6.1-0.20210914134040-e4215434d1ba github.com/pkg/errors v0.9.1 - github.com/prometheus/client_golang v1.7.1 - github.com/prometheus/procfs v0.2.0 // indirect - github.com/sirupsen/logrus v1.6.0 // indirect + github.com/prometheus/client_golang v1.11.0 github.com/spf13/afero v1.4.1 github.com/stretchr/testify v1.7.0 github.com/urfave/cli/v2 v2.2.0 @@ -43,12 +40,13 @@ require ( k8s.io/apimachinery v0.22.0 k8s.io/client-go v0.22.0 k8s.io/klog v0.0.0-20181102134211-b9b56d5dfc92 - k8s.io/klog/v2 v2.9.0 + k8s.io/klog/v2 v2.10.1-0.20210803102611-4171f3c1be1b k8s.io/utils v0.0.0-20210707171843-4b05e18ac7d9 ) replace ( github.com/gogo/protobuf => github.com/gogo/protobuf v1.3.2 + github.com/ovn-org/libovsdb => github.com/amorenoz/libovsdb v0.2.1-0.20211013063253-94fd06116518 k8s.io/api => k8s.io/api v0.22.0 k8s.io/apiextensions-apiserver => k8s.io/apiextensions-apiserver v0.22.0 k8s.io/apimachinery => k8s.io/apimachinery v0.22.0 diff --git a/go-controller/pkg/util/libovsdb.go b/go-controller/pkg/util/libovsdb.go index d9b8f8fcac1..9446d641120 100644 --- a/go-controller/pkg/util/libovsdb.go +++ b/go-controller/pkg/util/libovsdb.go @@ -27,7 +27,7 @@ const ( // newClient creates a new client object given the provided config // the stopCh is required to ensure the goroutine for ssl cert // update is not leaked -func newClient(cfg config.OvnAuthConfig, dbModel *model.DBModel, stopCh <-chan struct{}) (client.Client, error) { +func newClient(cfg config.OvnAuthConfig, dbModel *model.DatabaseModelRequest, stopCh <-chan struct{}) (client.Client, error) { options := []client.Option{ client.WithReconnect(OVSDBTimeout, &backoff.ZeroBackOff{}), client.WithLeaderOnly(true), @@ -48,6 +48,7 @@ func newClient(cfg config.OvnAuthConfig, dbModel *model.DBModel, stopCh <-chan s options = append(options, client.WithTLSConfig(tlsConfig)) } + dbModel.SetCompatibility(true) client, err := client.NewOVSDBClient(dbModel, options...) if err != nil { return nil, err @@ -95,7 +96,7 @@ func NewNBClientWithConfig(cfg config.OvnAuthConfig, stopCh <-chan struct{}) (cl return newClientWithMonitor(cfg, stopCh, dbModel) } -func newClientWithMonitor(cfg config.OvnAuthConfig, stopCh <-chan struct{}, dbModel *model.DBModel) (client.Client, error) { +func newClientWithMonitor(cfg config.OvnAuthConfig, stopCh <-chan struct{}, dbModel *model.DatabaseModelRequest) (client.Client, error) { c, err := newClient(cfg, dbModel, stopCh) if err != nil { return nil, err