@@ -24,7 +24,6 @@ import (
24
24
"github.com/golang/glog"
25
25
"github.com/pkg/errors"
26
26
"github.com/spf13/cobra"
27
- "k8s.io/minikube/pkg/minikube/config"
28
27
"k8s.io/minikube/pkg/minikube/driver"
29
28
"k8s.io/minikube/pkg/minikube/exit"
30
29
"k8s.io/minikube/pkg/minikube/kubeconfig"
@@ -51,10 +50,11 @@ func runStop(cmd *cobra.Command, args []string) {
51
50
defer api .Close ()
52
51
53
52
for _ , n := range cc .Nodes {
54
- nonexistent := stop (api , * cc , n )
53
+ machineName := driver .MachineName (* cc , n )
54
+ nonexistent := stop (api , machineName )
55
55
56
56
if ! nonexistent {
57
- out .T (out .Stopped , `Node "{{.node_name}}" stopped.` , out.V {"node_name" : n . Name })
57
+ out .T (out .Stopped , `Node "{{.node_name}}" stopped.` , out.V {"node_name" : machineName })
58
58
}
59
59
}
60
60
@@ -67,9 +67,8 @@ func runStop(cmd *cobra.Command, args []string) {
67
67
}
68
68
}
69
69
70
- func stop (api libmachine.API , cluster config. ClusterConfig , n config. Node ) bool {
70
+ func stop (api libmachine.API , machineName string ) bool {
71
71
nonexistent := false
72
- machineName := driver .MachineName (cluster , n )
73
72
74
73
tryStop := func () (err error ) {
75
74
err = machine .StopHost (api , machineName )
0 commit comments