Skip to content

Commit

Permalink
Merge pull request #42 from Karthik-K-N/fix-instanceid
Browse files Browse the repository at this point in the history
UPSTREAM: <carry>: Add check for valid Power VS instance id
  • Loading branch information
openshift-merge-robot committed Jun 30, 2023
2 parents 049e3ed + 2ca2ac3 commit 0e75226
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ibm/ibm_powervs_client.go
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 0e75226

Please sign in to comment.