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

[BUG REPORT] PVC failed to resize #466

Open
tobmad opened this issue May 25, 2024 · 0 comments · Fixed by #468
Open

[BUG REPORT] PVC failed to resize #466

tobmad opened this issue May 25, 2024 · 0 comments · Fixed by #468

Comments

@tobmad
Copy link

tobmad commented May 25, 2024

Is this a BUG REPORT or FEATURE REQUEST?

BUG REPORT

Versions

CCM Version: v1.27.2

Environment:

  • Kubernetes version (use kubectl version): 1.27.10
  • OS (e.g. from /etc/os-release):
  • Kernel (e.g. uname -a):
  • Others:

What happened?

There is a chance that resizeing block volume PVCs (Persitent Volume Claim) resulting in the PV (Persistent Volume) getting the wrong size.
E.g. Increasing PVC from 50 Gi to 51 Gi, caused the PV to be 51 bytes

What you expected to happen?

Expected both PV and PVC to be 51 Gi after resizing

How to reproduce it (as minimally and precisely as possible)?

Create a PVC and pod, then wait for it to be ready

apiVersion: v1
kind: Pod
metadata:
  name: volume-pvc
spec:
  containers:
    - name: frontend
      image: nginx
      volumeMounts:
        - mountPath: /usr/share/nginx/html
          name: volume-pvc
  volumes:
    - name: volume-pvc
      persistentVolumeClaim:
        claimName: persistent-volume-claim
---
apiVersion: v1
kind: PersistentVolume
metadata:
  name: persistent-volume-claim
spec:
  storageClassName: oci-bv
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 50Gi

Edit the PVC to increase the size

apiVersion: v1
kind: PersistentVolume
metadata:
  name: persistent-volume-claim
spec:
  storageClassName: oci-bv
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 51Gi

It does not always happen, but it seems to happen more often the more PVCs are resized at the same time.

Anything else we need to know?

The faulty PV can be fixed by adding Gi to the capacity and will work as expected after that. It is only the PV that is misconfigured

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant