Merge pull request #25607 from dagnello/vsphere-cpi-init-logging

Adding error check when read instance id failed
This commit is contained in:
Daniel Smith 2016-05-18 17:31:44 -07:00
commit c443329d67

View File

@ -94,6 +94,9 @@ func readInstanceID(cfg *VSphereConfig) (string, error) {
if err != nil {
return "", err
}
if out.Len() == 0 {
return "", fmt.Errorf("unable to retrieve Instance ID")
}
// Create context
ctx, cancel := context.WithCancel(context.Background())