Skip kata manager processing#2407
Conversation
|
Fixes #2398 |
ad3fea3 to
87a65f9
Compare
72a6f85 to
7419b11
Compare
31de6ea to
bbfb1e7
Compare
| if err != nil { | ||
| logger.Info("Couldn't update", "Error", err) | ||
| return gpuv1.NotReady, err | ||
| return gpuv1.NotReady, fmt.Errorf("error deleting kata RuntimeClass '%s': %v", rc.Name, err) |
There was a problem hiding this comment.
Should we just log a warning if deletion fails? I'm not sure this warrants returning an error and setting ClusterPolicy status to NotReady.
There was a problem hiding this comment.
Yes I thought about it. I am in two minds.
But it should reconcile eventually, or if it is a permanent issue (that we can list and filter the runtimeclasses and not delete them for some reason) - then I believe we should bubble the error forth.
There was a problem hiding this comment.
My reasoning for just logging a warning is that this deletion shouldn't block normal reconciliation. I don't think failure to delete these objects has an adverse effect. Not a strong opinion though.
There was a problem hiding this comment.
Fixed. Just a logger level 1 message and no break.
| // KataManagerAnnotationHashKey is the annotation indicating the hash of the kata-manager configuration | ||
| KataManagerAnnotationHashKey = "nvidia.com/kata-manager.last-applied-hash" | ||
| // DefaultKataArtifactsDir is the default directory to store kata artifacts on the host | ||
| DefaultKataArtifactsDir = "/opt/nvidia-gpu-operator/artifacts/runtimeclasses/" |
There was a problem hiding this comment.
Should this be removed as well?
… enabled=false remove kata manager transformation test keep the state added, but return false on the enabled call Signed-off-by: Rajat Chopra <rajatc@nvidia.com>
Signed-off-by: Rajat Chopra <rajatc@nvidia.com>
…ailure Signed-off-by: Rajat Chopra <rajatc@nvidia.com>
Signed-off-by: Rajat Chopra <rajatc@nvidia.com>
01e72c0 to
4a8eceb
Compare
Description
Do not process anything about kata manager. The operand stands deprecated. Any changes to cluster policy with respect to that section must not be responded to. Remove it from state manager.
Checklist
make lint)make validate-generated-assets)make validate-modules)Testing
Manual testing on cluster with kataManager enabled=true manually on the CRD.
Prior to this fix, there is a panic in the logs. After the fix in this PR, it runs clean.