mirror of https://github.com/docker/docs.git
commit
6da2128e23
|
@ -316,8 +316,8 @@ func (d *Driver) Create() error {
|
|||
return err
|
||||
}
|
||||
if ip != "" {
|
||||
|
||||
d.IPAddress = instance.IpAddress
|
||||
d.IPAddress = ip
|
||||
log.Debugf("Got the IP Address, it's %q", d.IPAddress)
|
||||
break
|
||||
}
|
||||
time.Sleep(5 * time.Second)
|
||||
|
@ -402,6 +402,8 @@ func (d *Driver) GetState() (state.State, error) {
|
|||
return state.Stopping, nil
|
||||
case "stopped":
|
||||
return state.Stopped, nil
|
||||
default:
|
||||
return state.Error, nil
|
||||
}
|
||||
return state.None, nil
|
||||
}
|
||||
|
@ -565,10 +567,6 @@ func (d *Driver) waitForInstance() error {
|
|||
time.Sleep(1 * time.Second)
|
||||
}
|
||||
|
||||
if err := d.updateDriver(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
|
@ -501,9 +501,11 @@ func (e *EC2) GetInstance(instanceId string) (EC2Instance, error) {
|
|||
return ec2Instance, fmt.Errorf("Error unmarshalling AWS response XML: %s", err)
|
||||
}
|
||||
|
||||
if len(unmarshalledResponse.ReservationSet) > 0 {
|
||||
reservationSet := unmarshalledResponse.ReservationSet[0]
|
||||
instance := reservationSet.InstancesSet[0]
|
||||
return instance, nil
|
||||
ec2Instance = reservationSet.InstancesSet[0]
|
||||
}
|
||||
return ec2Instance, nil
|
||||
}
|
||||
|
||||
func (e *EC2) StartInstance(instanceId string) error {
|
||||
|
|
Loading…
Reference in New Issue