User successfully adds storage to Log Management however any subsequent task that triggers helm upgrade fails.
VCF Operations 9.1.0
Resize storage of Log Management to any value in Gi which is not divisible by 256 causes milli-byte error.
Any additional storage added to Log Management triggers volume-resizer however the volume resizer python script throws an error in subsequent volume resizer check.
For example:
Considering recent storage extension of 3500 GB to Log Management.
Fleet Manager translates 3500Gi into raw bytes: 3758096384000 = 3500*1024*1024*1024 and sends this payload to the VMSP endpoint which formats raw bytes into human-readable strings (like Gi or Ti). It takes 3758096384000, divides it by 1024^4, gets the output "3.41Ti".
The ops-logs config map volume resizer script reads "3.41Ti" from the Package Deployment, passes it to Kubernetes, Kubernetes API server converts 3.41Ti to bytes which results in a fractional/decimal value. As Kubernetes refuses to store fractional bytes, it converts the value to "milli-bytes" to maintain precision as a whole integer, resulting in the value "2682808371773440m".
The ops-logs config map volume resizer script reads "3.41Ti" from the Package Deployment, passes it to Kubernetes, and Kubernetes creates the milli-byte disaster.
Any subsequent task that triggers a Helm upgrade again invokes the volume resizer python script throwing an error.
The volume-resizer Python script crashes while reading "milli-byte" string ("2682808371773440m") caused volume-resizer pods to enter in a crash loop and the Package Deployment fall into a Failed state and the Helm Release into an Unknown state.
This issue will be fixed in future release.
To resolve the issue, follow below steps:
Lifecycle > Build > VCF Management > Component > VCF services runtime and Identify a Control Plane node.vmware-system-user account, and elevate to root using below command: sudo su-kubectl get po -n ops-logskubectl get tasks -A | grep -E "Running|Queued"kubectl get secrets task-xxxxxxxxx -n vmsp-platform -o json | jq -r '.data.apidata' | base64 -d | jqkubectl delete task <e.g.-configure-component-vcbul23jwrfybiw4w3ed4hje6y> -n vmsp-platformkubectl get tasks -A | grep -E "Running|Queued"kubectl annotate cm ops-logs-config -n ops-logs helm.toolkit.fluxcd.io/driftDetection=disabledkubectl get cm volume-resizer-config-map -n ops-logs -o yaml --show-managed-fields=false > volume-resizer-config-map.yamlkubectl edit cm volume-resizer-config-map -n ops-logs try:
old_size_num = self.from_iec_to_number(old_size)
except:
old_size_num = 500
passkubectl edit pd operations-logs -n ops-logskubectl get pd operations-logs -n ops-logs -o jsonpath='{.spec.values.storage.volumeGroups.logStoreLogStore.capacity}'
kubectl get sts log-store -n ops-logs -o jsonpath='{.spec.volumeClaimTemplates[0].spec.resources.requests.storage}'kubectl annotate cm ops-logs-config -n ops-logs helm.toolkit.fluxcd.io/driftDetection=enabled --overwriteRecommend to configure a storage size that resolves to a whole integer in bytes, avoiding fractional byte conversions in Kubernetes. Ensure your desired volume size is perfectly divisible by 256.
Use the following formula:
Volume size = N * 256