forked from rook/rook
Ceph reports bytes_quota in `ceph fs subvolumegroup info` as the JSON string "infinite" when no quota is set, and as a number otherwise. The subvolumeGroupInfo.BytesQuota field is typed int64, so json.Unmarshal fails with "cannot unmarshal string into Go value of type int64" for any subvolume group without a quota (the default). That unmarshal error is returned from getCephFSSubVolumeGroupInfo and swallowed in CreateCephFSSubVolumeGroup: exec.ExitStatus reports ok=false for the wrapped error, so the non-ENOENT guard does not fire and the dedicated resize path (which enforces --no-shrink) is skipped. Add an UnmarshalJSON on subvolumeGroupInfo that accepts either a number or the "infinite" sentinel, mapping "infinite" to 0 (unlimited) so the existing CmpInt64 comparison keeps working. Add a table-driven test covering the finite and infinite cases. Signed-off-by: Anas Khan <83116240+anxkhn@users.noreply.github.com>