rook / rook

Storage Orchestration for Kubernetes
https://rook.io
Apache License 2.0
12.04k stars 2.66k forks source link

SVG cleanup jobs fails due to missing env variable. #14235

Closed sp98 closed 1 month ago

sp98 commented 1 month ago

Is this a bug report or feature request?

Deviation from expected behavior: SVG cleanup job fails due to missing cephFS SubVolumeGroup env variable.

Expected behavior: SVG cleanup job should not fail

How to reproduce it (minimal and precise):

  1. Create rook ceph cluster.
  2. Create SVG subvolume group but don't provide spec.Name
  3. Add cleanup annotation to the subvolume group.
  4. Delete the subvolume group resource.
  5. Observe the cleanup job.

Jobs fails due to missing env variable because operator is only reading the subvolumeGroupName from spec.Name in the subvolumeGroupResource.

$ k logs cleanup-svg-9b7989c82f0b72ee4f9e1b92444f221b-qn99p -f
2024/05/17 10:53:30 maxprocs: Leaving GOMAXPROCS=8: CPU quota undefined
2024-05-17 10:53:30.650936 I | rookcmd: starting Rook v1.14.0-103.g3ddafdfe5 with arguments '/usr/local/bin/rook ceph clean CephFilesystemSubVolumeGroup'
2024-05-17 10:53:30.650954 I | rookcmd: flag values: --help=false, --log-level=DEBUG
2024-05-17 10:53:30.651594 C | rookcmd: cephFS SubVolumeGroup name is not available in the pod environment variables

File(s) to submit:

Logs to submit:

Cluster Status to submit:

Environment: