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

Detect slow docker when deleting containers and profile #19580

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
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
3 changes: 2 additions & 1 deletion pkg/drivers/kic/oci/oci.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ import (
func DeleteContainersByLabel(ociBin string, label string) []error {
var deleteErrs []error
ctx := context.Background()
cs, err := ListContainersByLabel(ctx, ociBin, label)
//set warnSlow to true to give a warning for slow dockers
cs, err := ListContainersByLabel(ctx, ociBin, label, true)
if err != nil {
return []error{fmt.Errorf("listing containers by label %q", label)}
}
Expand Down
3 changes: 2 additions & 1 deletion pkg/minikube/delete/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ func PossibleLeftOvers(ctx context.Context, cname string, driverName string) {

klog.Infof("deleting possible leftovers for %s (driver=%s) ...", cname, driverName)
delLabel := fmt.Sprintf("%s=%s", oci.ProfileLabelKey, cname)
cs, err := oci.ListContainersByLabel(ctx, bin, delLabel)
//set warnSlow to true to enable slow docker warning
cs, err := oci.ListContainersByLabel(ctx, bin, delLabel, true)
if err == nil && len(cs) > 0 {
for _, c := range cs {
out.Step(style.DeletingHost, `Deleting container "{{.name}}" ...`, out.V{"name": cname})
Expand Down