Skip to content

Commit 9b1699e

Browse files
committed
fix(apinet): cleanup nics when cache is ready
1 parent 1db3685 commit 9b1699e

File tree

1 file changed

+7
-7
lines changed
  • cmd/libvirt-provider/app

1 file changed

+7
-7
lines changed

cmd/libvirt-provider/app/app.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -335,13 +335,6 @@ func Run(ctx context.Context, opts Options) error {
335335
return err
336336
}
337337

338-
setupLog.Info("Initializing network interface plugin")
339-
340-
if err := nicPlugin.Init(ctx, providerHost); err != nil {
341-
setupLog.Error(err, "failed to initialize network plugin")
342-
return err
343-
}
344-
345338
setupLog.Info("Configuring machine store", "Directory", providerHost.MachineStoreDir())
346339
machineStore, err := host.NewStore(host.Options[*api.Machine]{
347340
NewFunc: func() *api.Machine { return &api.Machine{} },
@@ -478,6 +471,13 @@ func Run(ctx context.Context, opts Options) error {
478471
}
479472
}
480473

474+
setupLog.Info("Initializing network interface plugin")
475+
476+
if err := nicPlugin.Init(ctx, providerHost); err != nil {
477+
setupLog.Error(err, "failed to initialize network plugin")
478+
return err
479+
}
480+
481481
g.Go(func() error {
482482
return runMetricsServer(ctx, setupLog, opts.Servers.Metrics)
483483
})

0 commit comments

Comments
 (0)