Merge pull request #1018 from priteau/openstack-state-fix

Properly return error when invalid instance state is found
pull/919/head
Ross Smith II 12 years ago
commit fd4dd284fb

@ -75,8 +75,7 @@ func WaitForState(conf *StateChangeConf) (i interface{}, err error) {
}
if !found {
fmt.Errorf("unexpected state '%s', wanted target '%s'", currentState, conf.Target)
return
return nil, fmt.Errorf("unexpected state '%s', wanted target '%s'", currentState, conf.Target)
}
log.Printf("Waiting for state to become: %s currently %s (%d%%)", conf.Target, currentState, currentProgress)

Loading…
Cancel
Save