Skip to content

Commit

Permalink
Merge pull request #4505 from npinaeva/configurable-db-timeout
Browse files Browse the repository at this point in the history
Bump OVSDBTimeout and make it configurable.
  • Loading branch information
trozet authored Jul 26, 2024
2 parents e4f63cc + b07fbde commit 4d3c99f
Show file tree
Hide file tree
Showing 21 changed files with 82 additions and 69 deletions.
14 changes: 14 additions & 0 deletions go-controller/pkg/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ const DefaultAPIServer = "http://localhost:8443"
// Default IANA-assigned UDP port number for VXLAN
const DefaultVXLANPort = 4789

const DefaultDBTxnTimeout = time.Second * 100

// The following are global config parameters that other modules may access directly
var (
// Build information. Populated at build-time.
Expand Down Expand Up @@ -67,6 +69,7 @@ var (
OpenFlowProbe: 180, // in Seconds
OfctrlWaitBeforeClear: 0, // in Milliseconds
MonitorAll: true,
OVSDBTxnTimeout: DefaultDBTxnTimeout,
LFlowCacheEnable: true,
RawClusterSubnets: "10.128.0.0/14/23",
Zone: types.OvnDefaultZone,
Expand Down Expand Up @@ -247,6 +250,9 @@ type DefaultConfig struct {
// instead of conditionally monitoring the data relevant to this node only.
// By default monitor-all is enabled.
MonitorAll bool `gcfg:"monitor-all"`
// OVSDBTxnTimeout is the timeout for db transaction, may be useful to increase for high-scale clusters.
// default value is 100 seconds.
OVSDBTxnTimeout time.Duration `gcfg:"db-txn-timeout"`
// The boolean flag indicates if ovn-controller should
// enable/disable the logical flow in-memory cache it uses
// when processing Southbound database logical flow changes.
Expand Down Expand Up @@ -630,6 +636,7 @@ func PrepareTestConfig() error {
OvnKubeNode = savedOvnKubeNode
ClusterManager = savedClusterManager
EnableMulticast = false
Default.OVSDBTxnTimeout = 5 * time.Second

if err := completeConfig(); err != nil {
return err
Expand Down Expand Up @@ -799,6 +806,13 @@ var CommonFlags = []cli.Flag{
Destination: &cliConfig.Default.MonitorAll,
Value: Default.MonitorAll,
},
&cli.DurationFlag{
Name: "db-txn-timeout",
Usage: "OVSDBTxnTimeout is the timeout for db transaction in seconds, " +
"may be useful to increase for high-scale clusters. default value is 60 seconds.",
Destination: &cliConfig.Default.OVSDBTxnTimeout,
Value: Default.OVSDBTxnTimeout,
},
&cli.BoolFlag{
Name: "enable-lflow-cache",
Usage: "Enable the logical flow in-memory cache it uses " +
Expand Down
4 changes: 2 additions & 2 deletions go-controller/pkg/libovsdb/libovsdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ func NewSBClientWithConfig(cfg config.OvnAuthConfig, promRegistry prometheus.Reg
return nil, err
}

ctx, cancel := context.WithTimeout(context.Background(), types.OVSDBTimeout*2)
ctx, cancel := context.WithTimeout(context.Background(), config.Default.OVSDBTxnTimeout*2)
go func() {
<-stopCh
cancel()
Expand Down Expand Up @@ -211,7 +211,7 @@ func NewNBClientWithConfig(cfg config.OvnAuthConfig, promRegistry prometheus.Reg
return nil, err
}

ctx, cancel := context.WithTimeout(context.Background(), types.OVSDBTimeout*2)
ctx, cancel := context.WithTimeout(context.Background(), config.Default.OVSDBTxnTimeout*2)
go func() {
<-stopCh
cancel()
Expand Down
4 changes: 2 additions & 2 deletions go-controller/pkg/libovsdb/ops/acl.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
libovsdbclient "github.com/ovn-org/libovsdb/client"
libovsdb "github.com/ovn-org/libovsdb/ovsdb"

"github.com/ovn-org/ovn-kubernetes/go-controller/pkg/config"
"github.com/ovn-org/ovn-kubernetes/go-controller/pkg/nbdb"
"github.com/ovn-org/ovn-kubernetes/go-controller/pkg/types"
)

// GetACLName returns the ACL name if it has one otherwise returns
Expand All @@ -29,7 +29,7 @@ type aclPredicate func(*nbdb.ACL) bool

// FindACLsWithPredicate looks up ACLs from the cache based on a given predicate
func FindACLsWithPredicate(nbClient libovsdbclient.Client, p aclPredicate) ([]*nbdb.ACL, error) {
ctx, cancel := context.WithTimeout(context.Background(), types.OVSDBTimeout)
ctx, cancel := context.WithTimeout(context.Background(), config.Default.OVSDBTxnTimeout)
defer cancel()
acls := []*nbdb.ACL{}
err := nbClient.WhereCache(p).List(ctx, &acls)
Expand Down
4 changes: 2 additions & 2 deletions go-controller/pkg/libovsdb/ops/address_set.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
libovsdbclient "github.com/ovn-org/libovsdb/client"
libovsdb "github.com/ovn-org/libovsdb/ovsdb"

"github.com/ovn-org/ovn-kubernetes/go-controller/pkg/config"
"github.com/ovn-org/ovn-kubernetes/go-controller/pkg/nbdb"
"github.com/ovn-org/ovn-kubernetes/go-controller/pkg/types"
)

type addressSetPredicate func(*nbdb.AddressSet) bool
Expand All @@ -33,7 +33,7 @@ func getNonZeroAddressSetMutableFields(as *nbdb.AddressSet) []interface{} {
// FindAddressSetsWithPredicate looks up address sets from the cache based on a
// given predicate
func FindAddressSetsWithPredicate(nbClient libovsdbclient.Client, p addressSetPredicate) ([]*nbdb.AddressSet, error) {
ctx, cancel := context.WithTimeout(context.Background(), types.OVSDBTimeout)
ctx, cancel := context.WithTimeout(context.Background(), config.Default.OVSDBTxnTimeout)
defer cancel()
found := []*nbdb.AddressSet{}
err := nbClient.WhereCache(p).List(ctx, &found)
Expand Down
6 changes: 3 additions & 3 deletions go-controller/pkg/libovsdb/ops/chassis.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ import (
libovsdbclient "github.com/ovn-org/libovsdb/client"
"k8s.io/apimachinery/pkg/util/sets"

"github.com/ovn-org/ovn-kubernetes/go-controller/pkg/config"
"github.com/ovn-org/ovn-kubernetes/go-controller/pkg/sbdb"
"github.com/ovn-org/ovn-kubernetes/go-controller/pkg/types"
)

// ListChassis looks up all chassis from the cache
func ListChassis(sbClient libovsdbclient.Client) ([]*sbdb.Chassis, error) {
ctx, cancel := context.WithTimeout(context.Background(), types.OVSDBTimeout)
ctx, cancel := context.WithTimeout(context.Background(), config.Default.OVSDBTxnTimeout)
defer cancel()
searchedChassis := []*sbdb.Chassis{}
err := sbClient.List(ctx, &searchedChassis)
Expand All @@ -21,7 +21,7 @@ func ListChassis(sbClient libovsdbclient.Client) ([]*sbdb.Chassis, error) {

// ListChassisPrivate looks up all chassis private models from the cache
func ListChassisPrivate(sbClient libovsdbclient.Client) ([]*sbdb.ChassisPrivate, error) {
ctx, cancel := context.WithTimeout(context.Background(), types.OVSDBTimeout)
ctx, cancel := context.WithTimeout(context.Background(), config.Default.OVSDBTxnTimeout)
defer cancel()
found := []*sbdb.ChassisPrivate{}
err := sbClient.List(ctx, &found)
Expand Down
4 changes: 2 additions & 2 deletions go-controller/pkg/libovsdb/ops/lbgroup.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
libovsdbclient "github.com/ovn-org/libovsdb/client"
libovsdb "github.com/ovn-org/libovsdb/ovsdb"

"github.com/ovn-org/ovn-kubernetes/go-controller/pkg/config"
"github.com/ovn-org/ovn-kubernetes/go-controller/pkg/nbdb"
"github.com/ovn-org/ovn-kubernetes/go-controller/pkg/types"
)

// CreateOrUpdateLoadBalancerGroup creates or updates the provided load balancer
Expand Down Expand Up @@ -76,7 +76,7 @@ type loadBalancerGroupPredicate func(*nbdb.LoadBalancerGroup) bool
// FindLoadBalancerGroupsWithPredicate looks up load balancer groups from the
// cache based on a given predicate
func FindLoadBalancerGroupsWithPredicate(nbClient libovsdbclient.Client, p loadBalancerGroupPredicate) ([]*nbdb.LoadBalancerGroup, error) {
ctx, cancel := context.WithTimeout(context.Background(), types.OVSDBTimeout)
ctx, cancel := context.WithTimeout(context.Background(), config.Default.OVSDBTxnTimeout)
defer cancel()
groups := []*nbdb.LoadBalancerGroup{}
err := nbClient.WhereCache(p).List(ctx, &groups)
Expand Down
5 changes: 2 additions & 3 deletions go-controller/pkg/libovsdb/ops/loadbalancer.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@ package ops
import (
"context"

"github.com/ovn-org/ovn-kubernetes/go-controller/pkg/types"

libovsdbclient "github.com/ovn-org/libovsdb/client"
libovsdb "github.com/ovn-org/libovsdb/ovsdb"

"github.com/ovn-org/ovn-kubernetes/go-controller/pkg/config"
"github.com/ovn-org/ovn-kubernetes/go-controller/pkg/nbdb"
)

Expand Down Expand Up @@ -133,7 +132,7 @@ func DeleteLoadBalancers(nbClient libovsdbclient.Client, lbs []*nbdb.LoadBalance
// ListLoadBalancers looks up all load balancers from the cache
func ListLoadBalancers(nbClient libovsdbclient.Client) ([]*nbdb.LoadBalancer, error) {
lbs := []*nbdb.LoadBalancer{}
ctx, cancel := context.WithTimeout(context.Background(), types.OVSDBTimeout)
ctx, cancel := context.WithTimeout(context.Background(), config.Default.OVSDBTxnTimeout)
defer cancel()
err := nbClient.List(ctx, &lbs)
return lbs, err
Expand Down
5 changes: 3 additions & 2 deletions go-controller/pkg/libovsdb/ops/model_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"fmt"
"reflect"

"github.com/ovn-org/ovn-kubernetes/go-controller/pkg/config"
"github.com/ovn-org/ovn-kubernetes/go-controller/pkg/types"

"github.com/ovn-org/libovsdb/client"
Expand Down Expand Up @@ -464,7 +465,7 @@ func (m *modelClient) where(opModel *operationModel) error {
// no indexes available
return errNoIndexes
}
ctx, cancel := context.WithTimeout(context.Background(), types.OVSDBTimeout)
ctx, cancel := context.WithTimeout(context.Background(), config.Default.OVSDBTxnTimeout)
defer cancel()
var err error
if err = m.client.Where(copyModel).List(ctx, opModel.ExistingResult); err != nil {
Expand All @@ -484,7 +485,7 @@ func (m *modelClient) where(opModel *operationModel) error {
}

func (m *modelClient) whereCache(opModel *operationModel) error {
ctx, cancel := context.WithTimeout(context.Background(), types.OVSDBTimeout)
ctx, cancel := context.WithTimeout(context.Background(), config.Default.OVSDBTxnTimeout)
defer cancel()
var err error
if err = m.client.WhereCache(opModel.ModelPredicate).List(ctx, opModel.ExistingResult); err != nil {
Expand Down
4 changes: 2 additions & 2 deletions go-controller/pkg/libovsdb/ops/portgroup.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ import (

libovsdbclient "github.com/ovn-org/libovsdb/client"
libovsdb "github.com/ovn-org/libovsdb/ovsdb"
"github.com/ovn-org/ovn-kubernetes/go-controller/pkg/config"
"github.com/ovn-org/ovn-kubernetes/go-controller/pkg/nbdb"
"github.com/ovn-org/ovn-kubernetes/go-controller/pkg/types"
)

type portGroupPredicate func(group *nbdb.PortGroup) bool

// FindPortGroupsWithPredicate looks up port groups from the cache based on a
// given predicate
func FindPortGroupsWithPredicate(nbClient libovsdbclient.Client, p portGroupPredicate) ([]*nbdb.PortGroup, error) {
ctx, cancel := context.WithTimeout(context.Background(), types.OVSDBTimeout)
ctx, cancel := context.WithTimeout(context.Background(), config.Default.OVSDBTxnTimeout)
defer cancel()
found := []*nbdb.PortGroup{}
err := nbClient.WhereCache(p).List(ctx, &found)
Expand Down
4 changes: 2 additions & 2 deletions go-controller/pkg/libovsdb/ops/qos.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ import (

libovsdbclient "github.com/ovn-org/libovsdb/client"
libovsdb "github.com/ovn-org/libovsdb/ovsdb"
"github.com/ovn-org/ovn-kubernetes/go-controller/pkg/config"
"github.com/ovn-org/ovn-kubernetes/go-controller/pkg/nbdb"
"github.com/ovn-org/ovn-kubernetes/go-controller/pkg/types"
)

type QoSPredicate func(*nbdb.QoS) bool

// FindQoSesWithPredicate looks up QoSes from the cache based on a
// given predicate
func FindQoSesWithPredicate(nbClient libovsdbclient.Client, p QoSPredicate) ([]*nbdb.QoS, error) {
ctx, cancel := context.WithTimeout(context.Background(), types.OVSDBTimeout)
ctx, cancel := context.WithTimeout(context.Background(), config.Default.OVSDBTxnTimeout)
defer cancel()
found := []*nbdb.QoS{}
err := nbClient.WhereCache(p).List(ctx, &found)
Expand Down
12 changes: 6 additions & 6 deletions go-controller/pkg/libovsdb/ops/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (

libovsdbclient "github.com/ovn-org/libovsdb/client"
libovsdb "github.com/ovn-org/libovsdb/ovsdb"
"github.com/ovn-org/ovn-kubernetes/go-controller/pkg/config"
"github.com/ovn-org/ovn-kubernetes/go-controller/pkg/nbdb"
"github.com/ovn-org/ovn-kubernetes/go-controller/pkg/types"
"k8s.io/apimachinery/pkg/util/sets"
)

Expand Down Expand Up @@ -39,7 +39,7 @@ func GetLogicalRouter(nbClient libovsdbclient.Client, router *nbdb.LogicalRouter
// FindLogicalRoutersWithPredicate looks up logical routers from the cache based on a
// given predicate
func FindLogicalRoutersWithPredicate(nbClient libovsdbclient.Client, p logicalRouterPredicate) ([]*nbdb.LogicalRouter, error) {
ctx, cancel := context.WithTimeout(context.Background(), types.OVSDBTimeout)
ctx, cancel := context.WithTimeout(context.Background(), config.Default.OVSDBTxnTimeout)
defer cancel()
found := []*nbdb.LogicalRouter{}
err := nbClient.WhereCache(p).List(ctx, &found)
Expand Down Expand Up @@ -142,7 +142,7 @@ type logicalRouterPortPredicate func(*nbdb.LogicalRouterPort) bool
// FindLogicalRouterPortWithPredicate looks up logical router port from
// the cache based on a given predicate
func FindLogicalRouterPortWithPredicate(nbClient libovsdbclient.Client, p logicalRouterPortPredicate) ([]*nbdb.LogicalRouterPort, error) {
ctx, cancel := context.WithTimeout(context.Background(), types.OVSDBTimeout)
ctx, cancel := context.WithTimeout(context.Background(), config.Default.OVSDBTxnTimeout)
defer cancel()
found := []*nbdb.LogicalRouterPort{}
err := nbClient.WhereCache(p).List(ctx, &found)
Expand Down Expand Up @@ -249,7 +249,7 @@ type logicalRouterPolicyPredicate func(*nbdb.LogicalRouterPolicy) bool
// FindLogicalRouterPoliciesWithPredicate looks up logical router policies from
// the cache based on a given predicate
func FindLogicalRouterPoliciesWithPredicate(nbClient libovsdbclient.Client, p logicalRouterPolicyPredicate) ([]*nbdb.LogicalRouterPolicy, error) {
ctx, cancel := context.WithTimeout(context.Background(), types.OVSDBTimeout)
ctx, cancel := context.WithTimeout(context.Background(), config.Default.OVSDBTxnTimeout)
defer cancel()
found := []*nbdb.LogicalRouterPolicy{}
err := nbClient.WhereCache(p).List(ctx, &found)
Expand Down Expand Up @@ -557,7 +557,7 @@ type logicalRouterStaticRoutePredicate func(*nbdb.LogicalRouterStaticRoute) bool
// FindLogicalRouterStaticRoutesWithPredicate looks up logical router static
// routes from the cache based on a given predicate
func FindLogicalRouterStaticRoutesWithPredicate(nbClient libovsdbclient.Client, p logicalRouterStaticRoutePredicate) ([]*nbdb.LogicalRouterStaticRoute, error) {
ctx, cancel := context.WithTimeout(context.Background(), types.OVSDBTimeout)
ctx, cancel := context.WithTimeout(context.Background(), config.Default.OVSDBTxnTimeout)
defer cancel()
found := []*nbdb.LogicalRouterStaticRoute{}
err := nbClient.WhereCache(p).List(ctx, &found)
Expand Down Expand Up @@ -1001,7 +1001,7 @@ func GetNAT(nbClient libovsdbclient.Client, nat *nbdb.NAT) (*nbdb.NAT, error) {
// FindNATsWithPredicate looks up NATs from the cache based on a given predicate
func FindNATsWithPredicate(nbClient libovsdbclient.Client, predicate natPredicate) ([]*nbdb.NAT, error) {
nats := []*nbdb.NAT{}
ctx, cancel := context.WithTimeout(context.Background(), types.OVSDBTimeout)
ctx, cancel := context.WithTimeout(context.Background(), config.Default.OVSDBTxnTimeout)
defer cancel()
err := nbClient.WhereCache(predicate).List(ctx, &nats)
return nats, err
Expand Down
4 changes: 2 additions & 2 deletions go-controller/pkg/libovsdb/ops/switch.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
libovsdbclient "github.com/ovn-org/libovsdb/client"
libovsdb "github.com/ovn-org/libovsdb/ovsdb"

"github.com/ovn-org/ovn-kubernetes/go-controller/pkg/config"
"github.com/ovn-org/ovn-kubernetes/go-controller/pkg/nbdb"
"github.com/ovn-org/ovn-kubernetes/go-controller/pkg/types"
)

// LOGICAL_SWITCH OPs
Expand All @@ -20,7 +20,7 @@ type switchPredicate func(*nbdb.LogicalSwitch) bool
// based on a given predicate
func FindLogicalSwitchesWithPredicate(nbClient libovsdbclient.Client, p switchPredicate) ([]*nbdb.LogicalSwitch, error) {
found := []*nbdb.LogicalSwitch{}
ctx, cancel := context.WithTimeout(context.Background(), types.OVSDBTimeout)
ctx, cancel := context.WithTimeout(context.Background(), config.Default.OVSDBTxnTimeout)
defer cancel()
err := nbClient.WhereCache(p).List(ctx, &found)
return found, err
Expand Down
4 changes: 2 additions & 2 deletions go-controller/pkg/libovsdb/ops/template_var.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ import (

libovsdbclient "github.com/ovn-org/libovsdb/client"
libovsdb "github.com/ovn-org/libovsdb/ovsdb"
"github.com/ovn-org/ovn-kubernetes/go-controller/pkg/config"
"github.com/ovn-org/ovn-kubernetes/go-controller/pkg/nbdb"
"github.com/ovn-org/ovn-kubernetes/go-controller/pkg/types"
)

type chassisTemplateVarPredicate func(*nbdb.ChassisTemplateVar) bool

// ListTemplateVar looks up all chassis template variables.
func ListTemplateVar(nbClient libovsdbclient.Client) ([]*nbdb.ChassisTemplateVar, error) {
ctx, cancel := context.WithTimeout(context.Background(), types.OVSDBTimeout)
ctx, cancel := context.WithTimeout(context.Background(), config.Default.OVSDBTxnTimeout)
defer cancel()

templatesList := []*nbdb.ChassisTemplateVar{}
Expand Down
4 changes: 2 additions & 2 deletions go-controller/pkg/libovsdb/ops/transact.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/ovn-org/libovsdb/client"
"github.com/ovn-org/libovsdb/model"
"github.com/ovn-org/libovsdb/ovsdb"
"github.com/ovn-org/ovn-kubernetes/go-controller/pkg/types"
"github.com/ovn-org/ovn-kubernetes/go-controller/pkg/config"
)

// TransactWithRetry will attempt a transaction several times if it receives an error indicating that the client
Expand Down Expand Up @@ -41,7 +41,7 @@ func TransactAndCheck(c client.Client, ops []ovsdb.Operation) ([]ovsdb.Operation

klog.V(5).Infof("Configuring OVN: %+v", ops)

ctx, cancel := context.WithTimeout(context.TODO(), types.OVSDBTimeout)
ctx, cancel := context.WithTimeout(context.TODO(), config.Default.OVSDBTxnTimeout)
defer cancel()

results, err := TransactWithRetry(ctx, c, ops)
Expand Down
6 changes: 3 additions & 3 deletions go-controller/pkg/ovn/controller/unidling/unidle.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
libovsdbclient "github.com/ovn-org/libovsdb/client"
"github.com/ovn-org/libovsdb/model"
"github.com/ovn-org/libovsdb/ovsdb"
"github.com/ovn-org/ovn-kubernetes/go-controller/pkg/config"
"github.com/ovn-org/ovn-kubernetes/go-controller/pkg/sbdb"
ovntypes "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/types"

"github.com/ovn-org/ovn-kubernetes/go-controller/pkg/util"
kapi "k8s.io/api/core/v1"
Expand Down Expand Up @@ -62,7 +62,7 @@ func NewController(recorder record.EventRecorder, serviceInformer cache.SharedIn
klog.Info("Populating Initial ContollerEvent events")

var controllerEvents []sbdb.ControllerEvent
ctx, cancel := context.WithTimeout(context.Background(), ovntypes.OVSDBTimeout)
ctx, cancel := context.WithTimeout(context.Background(), config.Default.OVSDBTxnTimeout)
defer cancel()
err := sbClient.List(ctx, &controllerEvents)
if err != nil {
Expand Down Expand Up @@ -178,7 +178,7 @@ func (uc *unidlingController) handleLbEmptyBackendsEvent(event sbdb.ControllerEv
if err != nil {
return err
}
ctx, cancel := context.WithTimeout(context.Background(), ovntypes.OVSDBTimeout)
ctx, cancel := context.WithTimeout(context.Background(), config.Default.OVSDBTxnTimeout)
defer cancel()
result, err := uc.sbClient.Transact(ctx, op...)
if err != nil {
Expand Down
3 changes: 1 addition & 2 deletions go-controller/pkg/ovn/controller/unidling/unidle_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
"github.com/ovn-org/ovn-kubernetes/go-controller/pkg/kube"
"github.com/ovn-org/ovn-kubernetes/go-controller/pkg/sbdb"
libovsdbtest "github.com/ovn-org/ovn-kubernetes/go-controller/pkg/testing/libovsdb"
"github.com/ovn-org/ovn-kubernetes/go-controller/pkg/types"
"golang.org/x/net/context"
kapi "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down Expand Up @@ -100,7 +99,7 @@ var _ = Describe("Unidling Controller", func() {
// Controller_Event is deleted
Eventually(
func() int {
ctx, _ := context.WithTimeout(context.Background(), types.OVSDBTimeout)
ctx, _ := context.WithTimeout(context.Background(), config.Default.OVSDBTxnTimeout)
var events []sbdb.ControllerEvent
err = sbClient.List(ctx, &events)
Expect(err).NotTo(HaveOccurred())
Expand Down
Loading

0 comments on commit 4d3c99f

Please sign in to comment.