Skip to content

Commit

Permalink
Merge pull request #10221 from jiefenghe/master
Browse files Browse the repository at this point in the history
configure the crictl yaml file to avoid the warning
  • Loading branch information
medyagh authored Jan 22, 2021
2 parents 1fe7615 + 4c57eb1 commit 8d1c938
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
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

0 comments on commit 8d1c938

Please sign in to comment.