mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 11:21:47 +00:00
Merge pull request #25607 from dagnello/vsphere-cpi-init-logging
Adding error check when read instance id failed
This commit is contained in:
commit
c443329d67
@ -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())
|
||||
|
Loading…
Reference in New Issue
Block a user