calculate the correct machine-type

This commit is contained in:
upodroid 2023-07-26 23:10:06 +00:00
parent a6776f4e39
commit a65d207507

View File

@ -768,12 +768,15 @@ func (g *GCERunner) updateKernelArguments(instance *compute.Instance, image stri
}
func (g *GCERunner) machineType(machine string) string {
var ret string
if machine == "" && *instanceType != "" {
machine = *instanceType
ret = *instanceType
} else if machine != "" {
ret = machine
} else {
machine = defaultGCEMachine
ret = defaultGCEMachine
}
return fmt.Sprintf("zones/%s/machineTypes/%s", *zone, machine)
return fmt.Sprintf("zones/%s/machineTypes/%s", *zone, ret)
}
func (g *GCERunner) rebootInstance(instance *compute.Instance) error {
// wait until the instance will not response to SSH