Skip to content

Commit

Permalink
DNM: Add additional logging to help debug issue
Browse files Browse the repository at this point in the history
Signed-off-by: Lee Yarwood <[email protected]>
  • Loading branch information
lyarwood committed Aug 16, 2023
1 parent 32b3cd9 commit 0ca26dd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/common/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,8 @@ func isResourceOwned(request *Request, expectedObj, foundObj client.Object) (boo
}
}

request.Logger.Info(fmt.Sprintf("lyarwood isResourceOwned False %s foundObj.GetAnnotations() %v vs %s expectedObj.GetAnnotations() %v", foundObj.GetName(), foundObj.GetAnnotations(), expectedObj.GetName(), expectedObj.GetAnnotations()))

return false, nil
}

Expand Down
4 changes: 4 additions & 0 deletions internal/operands/common-instancetypes/reconcile.go
Original file line number Diff line number Diff line change
Expand Up @@ -290,13 +290,17 @@ func (c *CommonInstancetypes) Reconcile(request *common.Request) ([]common.Recon
func (c *CommonInstancetypes) Cleanup(request *common.Request) ([]common.CleanupResult, error) {
var objects []client.Object

request.Logger.Info(fmt.Sprintf("lyarwood common-instancetypes Cleanup"))

// Before collecting resources to clean up ensure the corresponding CRD is available
if request.CrdList.CrdExists(virtualMachineClusterInstancetypeCrd) {
request.Logger.Info(fmt.Sprintf("lyarwood common-instancetypes removing %d virtualMachineClusterInstancetypes", len(c.virtualMachineClusterInstancetypes)))
for i := range c.virtualMachineClusterInstancetypes {
objects = append(objects, &c.virtualMachineClusterInstancetypes[i])
}
}
if request.CrdList.CrdExists(virtualMachineClusterPreferenceCrd) {
request.Logger.Info(fmt.Sprintf("lyarwood common-instancetypes %d removing virtualMachineClusterPreferences", len(c.virtualMachineClusterPreferences)))
for i := range c.virtualMachineClusterPreferences {
objects = append(objects, &c.virtualMachineClusterPreferences[i])
}
Expand Down

0 comments on commit 0ca26dd

Please sign in to comment.