File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 11package host
22
33import (
4- "errors"
54 "regexp"
65
76 "github.com/docker/machine/libmachine/auth"
@@ -19,9 +18,8 @@ import (
1918)
2019
2120var (
22- validHostNamePattern = regexp .MustCompile (`^[a-zA-Z0-9][a-zA-Z0-9\-\.]*$` )
23- errMachineMustBeRunningForUpgrade = errors .New ("machine must be running to upgrade" )
24- stdSSHClientCreator SSHClientCreator = & StandardSSHClientCreator {}
21+ validHostNamePattern = regexp .MustCompile (`^[a-zA-Z0-9][a-zA-Z0-9\-\.]*$` )
22+ stdSSHClientCreator SSHClientCreator = & StandardSSHClientCreator {}
2523)
2624
2725type SSHClientCreator interface {
@@ -171,7 +169,10 @@ func (h *Host) Upgrade() error {
171169 }
172170
173171 if machineState != state .Running {
174- return errMachineMustBeRunningForUpgrade
172+ log .Info ("Starting machine so machine can be upgraded..." )
173+ if err := h .Start (); err != nil {
174+ return err
175+ }
175176 }
176177
177178 provisioner , err := provision .DetectProvisioner (h .Driver )
You can’t perform that action at this time.
0 commit comments