Skip to content

Commit

Permalink
UPSTREAM: <carry>: Add check for valid Power VS instance id
Browse files Browse the repository at this point in the history
  • Loading branch information
Karthik-K-N committed Jun 30, 2023
1 parent 049e3ed commit 2ca2ac3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ibm/ibm_powervs_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,9 @@ func (p *ibmPowerVSClient) populateNodeMetadata(nodeName string, node *NodeMetad
if pvsInstance == nil {
return errors.New("Could not retrieve a Power instance: name=" + nodeName)
}
if pvsInstance.PvmInstanceID == nil || *pvsInstance.PvmInstanceID == "" {
return fmt.Errorf("could not retrieve valid instance id for Power instance name: %s instance id: %v", nodeName, pvsInstance.PvmInstanceID)
}
node.WorkerID = *pvsInstance.PvmInstanceID
klog.Infof("Node %s worker id is %s", nodeName, node.WorkerID)

Expand Down

0 comments on commit 2ca2ac3

Please sign in to comment.