Skip to content

Commit

Permalink
Set warnSlow flag to try when deleting a profile and in DeleteContain…
Browse files Browse the repository at this point in the history
…ersByLabel.
  • Loading branch information
xcarolan committed Sep 8, 2024
1 parent 8d928d0 commit 936d2a8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
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

0 comments on commit 936d2a8

Please sign in to comment.