mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 20:24:09 +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 {
|
if err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
|
if out.Len() == 0 {
|
||||||
|
return "", fmt.Errorf("unable to retrieve Instance ID")
|
||||||
|
}
|
||||||
|
|
||||||
// Create context
|
// Create context
|
||||||
ctx, cancel := context.WithCancel(context.Background())
|
ctx, cancel := context.WithCancel(context.Background())
|
||||||
|
Loading…
Reference in New Issue
Block a user