-
Notifications
You must be signed in to change notification settings - Fork 5k
vfkit: Bump to Preferred driver on macOs #20808
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,7 @@ import ( | |
"fmt" | ||
"os/exec" | ||
"path/filepath" | ||
"runtime" | ||
|
||
"github.com/docker/machine/libmachine/drivers" | ||
"github.com/google/uuid" | ||
|
@@ -41,13 +42,17 @@ const ( | |
) | ||
|
||
func init() { | ||
priority := registry.Unknown | ||
if runtime.GOOS == "darwin" { | ||
priority = registry.Preferred | ||
} | ||
if err := registry.Register(registry.DriverDef{ | ||
Name: driver.VFKit, | ||
Init: func() drivers.Driver { return vfkit.NewDriver("", "") }, | ||
Config: configure, | ||
Status: status, | ||
Default: true, | ||
Priority: registry.Experimental, | ||
Priority: priority, | ||
}); err != nil { | ||
panic(fmt.Sprintf("register failed: %v", err)) | ||
} | ||
|
@@ -104,7 +109,7 @@ func configure(cfg config.ClusterConfig, n config.Node) (interface{}, error) { | |
func status() registry.State { | ||
_, err := exec.LookPath("vfkit") | ||
if err != nil { | ||
return registry.State{Error: err, Fix: "Run 'brew tap cfergeau/crc && brew install vfkit'", Doc: docURL} | ||
return registry.State{Error: err, Fix: "Run 'brew install vfkit'", Doc: docURL} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. π There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. sure There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
} | ||
return registry.State{Installed: true, Healthy: true, Running: true} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think is better than preffered registry.Default so it be the same level as qemu,
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
based on comment from @nirs I agree to bump prefered.