Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes in volumes directory's underlying filesystem are not reflected in driver's state at runtime #22

Open
rzetelskik opened this issue Jul 19, 2023 · 0 comments
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. triage/accepted Indicates an issue or PR is ready to be actively worked on.

Comments

@rzetelskik
Copy link
Member

If you run the provisioner with volumes-dir pointing to a directory with preexisting volume state files, it will account for them when building the state, which will also be reflected in CSIStorageCapacity.

$ ls -ls --block-size=K /mnt/persistent-volumes
total 4K
0K drwxr-x--- 6 root root 1K Jul  7 15:16 347e0693-f832-4fc1-a2dc-4928843b3238
4K -rw-r--r-- 1 root root 1K Jul  7 15:15 347e0693-f832-4fc1-a2dc-4928843b3238.json
$ df -h -BK /mnt/persistent-volumes/
Filesystem     1K-blocks    Used Available Use% Mounted on
/dev/loop5     20961280K 343484K 20617796K   2% /mnt/persistent-volumes
$ kubectl get csistoragecapacities.storage.k8s.io  csisc-6pnmh -ogo-template --template '{{ .capacity }}'
15718392Ki%

Yet if you delete the volume state file from the volumes directory, the change won't be reflected in the CSIStorageCapacity:

$ ls -ls --block-size=K /mnt/persistent-volumes
total 0K
$ df -h -BK /mnt/persistent-volumes/
Filesystem     1K-blocks    Used Available Use% Mounted on
/dev/loop5     20961280K 179204K 20782076K   1% /mnt/persistent-volumes
$ kubectl get csistoragecapacities.storage.k8s.io  csisc-6pnmh -ogo-template --template '{{ .capacity }}'
15718392Ki%

This can lead to the driver being unable to provision PVs despite having enough available storage.

The expected behaviour is for the driver to update capacity on changes in the filesystem of its volumes directory.

cc @zimnx

@rzetelskik rzetelskik added kind/bug Categorizes issue or PR as related to a bug. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Jul 19, 2023
@tnozicka tnozicka added priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Jul 20, 2023
@tnozicka tnozicka assigned rzetelskik and unassigned zimnx May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/important-longterm Important over the long term, but may not be staffed and/or may need multiple releases to complete. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

No branches or pull requests

3 participants