Support for sharing files with the host system (#103)

* Support for sharing files with the host system

* Integration tests

* Added back TestVMGarbageCollection comment
This commit is contained in:
Nikolay Edigaryev
2023-07-04 18:10:53 +04:00
committed by GitHub
parent 6a325daf74
commit d57d18d380
24 changed files with 764 additions and 2 deletions
+13
View File
@@ -113,6 +113,19 @@ func New(opts ...Option) (*Controller, error) {
ReadHeaderTimeout: 60 * time.Second,
}
// Ensure cluster settings object is present
if err := controller.store.Update(func(txn storepkg.Transaction) error {
_, err := txn.GetClusterSettings()
if errors.Is(err, storepkg.ErrNotFound) {
return txn.SetClusterSettings(v1.ClusterSettings{})
}
return err
}); err != nil {
return nil, fmt.Errorf("%w: failed to ensure cluster settings object is present: %v",
ErrInitFailed, err)
}
return controller, nil
}