Skip to content
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

configure the crictl yaml file to avoid the warning #10221

Merged
merged 3 commits into from
Jan 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion pkg/minikube/cruntime/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,10 @@ func (r *Docker) Version() (string, error) {

// SocketPath returns the path to the socket file for Docker
func (r *Docker) SocketPath() string {
return r.Socket
if r.Socket != "" {
return r.Socket
}
return "/var/run/dockershim.sock"
}

// Available returns an error if it is not possible to use this runtime on a host
Expand All @@ -108,6 +111,10 @@ func (r *Docker) Enable(disOthers, forceSystemd bool) error {
}
}

if err := populateCRIConfig(r.Runner, r.SocketPath()); err != nil {
return err
}

if forceSystemd {
if err := r.forceSystemd(); err != nil {
return err
Expand Down
5 changes: 0 additions & 5 deletions test/integration/start_stop_delete_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -286,12 +286,7 @@ func testPulledImages(ctx context.Context, t *testing.T, profile string, version
Tags []string `json:"repoTags"`
}{}

// crictl includes warnings in STDOUT before printing JSON output
// this step trims the warnings before JSON output begins
// See #10175 for details on fixing these warnings
stdout := rr.Stdout.String()
index := strings.Index(stdout, "{")
stdout = stdout[index:]

err = json.Unmarshal([]byte(stdout), &jv)
if err != nil {
Expand Down