Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions controllers/utils/base_reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,9 @@ func (r *ReconcilerBase) InitFromMgr(mgr ctrl.Manager, client cloud.Client) {
func (r *ReconciliationRunner) GetParent(child client.Object, parent client.Object) CloudStackReconcilerMethod {
return func() (ctrl.Result, error) {
err := GetOwnerOfKind(r.RequestCtx, r.K8sClient, child, parent)
if err != nil && strings.Contains(err.Error(), "couldn't find owner of kind") {
return r.RequeueWithMessage(err.Error())
}
return ctrl.Result{}, err
}
}
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ func CheckAffinityGroupInProject(client *cloudstack.CloudStackClient, clusterNam

for _, affinity := range vm.Affinitygroup {
affinityIds = append(affinityIds, affinity.Id)
affinity, _, _ := client.AffinityGroup.GetAffinityGroupByID(affinity.Id, cloudstack.WithProject(project))
affinity, _, err := client.AffinityGroup.GetAffinityGroupByID(affinity.Id, cloudstack.WithProject(project))
if err != nil {
Fail("Failed to get affinity group for " + affinity.Id + " : " + err.Error())
}
Expand Down