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

Only create target PVC in other namespaces using upload populator #3462

Open
mengkai514 opened this issue Oct 15, 2024 · 2 comments
Open

Only create target PVC in other namespaces using upload populator #3462

mengkai514 opened this issue Oct 15, 2024 · 2 comments
Labels

Comments

@mengkai514
Copy link

What happened:
When I use the upload populator to create a PVC in the 'mk' namespace, the populator controller only creates the target PVC, but it does not create 'prime-pvc' and 'prime-pvc-scratch', nor does it create a pod. However, it works normally in the 'default' namespace.

What you expected to happen:
Create 'prime-pvc' 、 'prime-pvc-scratch' and 'upload-pod'.

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

apiVersion: cdi.kubevirt.io/v1beta1
kind: VolumeUploadSource
metadata:
name: my-upload-source
spec:
contentType: kubevirt

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: my-pvc-ns
namespace: mk
spec:
dataSourceRef:
apiGroup: cdi.kubevirt.io
kind: VolumeUploadSource
name: my-upload-source
accessModes: ReadWriteMany
resources:
requests:
storage: 1Gi
storageClassName: managed-nfs-storage

Additional context:
Add any other context about the problem here.

Environment:

  • CDI version (use kubectl get deployments cdi-deployment -o yaml): v1.60.3
  • Kubernetes version (use kubectl version): 1.28
@aglitke
Copy link
Member

aglitke commented Oct 21, 2024

Thanks for your report. In order to understand what is happening in your cluster please provide the cdi-deployment log and the events / full yaml for the PVC in question.

@mengkai514
Copy link
Author

@aglitke The cdi-deployment log:

{"level":"debug","ts":"2024-10-21T12:43:51Z","logger":"controller.import-controller","msg":"reconciling Import PVCs","PVC":{"name":"my-pvc-ns","namespace":"mk"}}
{"level":"debug","ts":"2024-10-21T12:43:51Z","logger":"controller.import-controller","msg":"PVC annotation not found, skipping pvc","PVC":{"name":"my-pvc-ns","namespace":"mk"},"annotation":"cdi.kubevirt.io/storage.import.endpoint"}
{"level":"debug","ts":"2024-10-21T12:43:51Z","logger":"controller.upload-controller","msg":"reconciling Upload PVCs","PVC":{"name":"my-pvc-ns","namespace":"mk"}}
{"level":"debug","ts":"2024-10-21T12:43:51Z","logger":"controller.upload-controller","msg":"PVC not bound, skipping pvc","PVC":{"name":"my-pvc-ns","namespace":"mk"},"Phase":"Pending"}
{"level":"debug","ts":"2024-10-21T12:43:51Z","logger":"controller.clone-controller","msg":"reconciling Clone PVCs","PVC":{"name":"my-pvc-ns","namespace":"mk"}}
{"level":"debug","ts":"2024-10-21T12:43:51Z","logger":"controller.clone-controller","msg":"PVC annotation not found, skipping pvc","PVC":{"name":"my-pvc-ns","namespace":"mk"},"annotation":"k8s.io/CloneRequest"}
{"level":"debug","ts":"2024-10-21T12:43:51Z","logger":"controller.clone-controller","msg":"PVC annotation not found, skipping pvc","PVC":{"name":"my-pvc-ns","namespace":"mk"},"annotation":"k8s.io/CloneRequest"}
{"level":"debug","ts":"2024-10-21T12:43:51Z","logger":"controller.clone-controller","msg":"PVC not bound, skipping pvc","PVC":{"name":"my-pvc-ns","namespace":"mk"},"Phase":"Pending"}
{"level":"debug","ts":"2024-10-21T12:43:51Z","logger":"controller.clone-controller","msg":"Should not reconcile this PVC","PVC":{"name":"my-pvc-ns","namespace":"mk"},"checkPVC(AnnCloneRequest)":false,"NOT has annotation(AnnCloneOf)":true,"isBound":false,"has finalizer?":false}
{"level":"debug","ts":"2024-10-21T12:43:51Z","logger":"controller.upload-controller","msg":"not doing anything with PVC","PVC":{"name":"my-pvc-ns","namespace":"mk"},"isUpload":false,"isCloneTarget":false,"isBound":false,"podSucceededFromPVC":false,"deletionTimeStamp set?":false}
{"level":"debug","ts":"2024-10-21T12:43:51Z","logger":"controller.import-controller","msg":"PVC annotation not found, skipping pvc","PVC":{"name":"my-pvc-ns","namespace":"mk"},"annotation":"cdi.kubevirt.io/storage.import.source"}
{"level":"debug","ts":"2024-10-21T12:43:51Z","logger":"controller.import-controller","msg":"PVC annotation not found, skipping pvc","PVC":{"name":"my-pvc-ns","namespace":"mk"},"annotation":"cdi.kubevirt.io/storage.import.endpoint"}
{"level":"debug","ts":"2024-10-21T12:43:51Z","logger":"controller.import-controller","msg":"PVC annotation not found, skipping pvc","PVC":{"name":"my-pvc-ns","namespace":"mk"},"annotation":"cdi.kubevirt.io/storage.import.source"}
{"level":"debug","ts":"2024-10-21T12:43:51Z","logger":"controller.import-controller","msg":"PVC not bound, skipping pvc","PVC":{"name":"my-pvc-ns","namespace":"mk"},"Phase":"Pending"}
{"level":"debug","ts":"2024-10-21T12:43:51Z","logger":"controller.upload-populator","msg":"reconciling Upload Source PVCs","PVC":{"name":"my-pvc-ns","namespace":"mk"}}
{"level":"debug","ts":"2024-10-21T12:43:51Z","logger":"controller.import-controller","msg":"reconciling Import PVCs","PVC":{"name":"my-pvc-ns","namespace":"mk"}}
{"level":"debug","ts":"2024-10-21T12:43:51Z","logger":"controller.import-controller","msg":"PVC annotation not found, skipping pvc","PVC":{"name":"my-pvc-ns","namespace":"mk"},"annotation":"cdi.kubevirt.io/storage.import.endpoint"}
{"level":"debug","ts":"2024-10-21T12:43:51Z","logger":"controller.import-controller","msg":"PVC annotation not found, skipping pvc","PVC":{"name":"my-pvc-ns","namespace":"mk"},"annotation":"cdi.kubevirt.io/storage.import.source"}
{"level":"debug","ts":"2024-10-21T12:43:51Z","logger":"controller.import-controller","msg":"PVC annotation not found, skipping pvc","PVC":{"name":"my-pvc-ns","namespace":"mk"},"annotation":"cdi.kubevirt.io/storage.import.endpoint"}
{"level":"debug","ts":"2024-10-21T12:43:51Z","logger":"controller.import-controller","msg":"PVC annotation not found, skipping pvc","PVC":{"name":"my-pvc-ns","namespace":"mk"},"annotation":"cdi.kubevirt.io/storage.import.source"}
{"level":"debug","ts":"2024-10-21T12:43:51Z","logger":"controller.import-controller","msg":"PVC not bound, skipping pvc","PVC":{"name":"my-pvc-ns","namespace":"mk"},"Phase":"Pending"}
{"level":"debug","ts":"2024-10-21T12:43:51Z","logger":"controller.upload-controller","msg":"reconciling Upload PVCs","PVC":{"name":"my-pvc-ns","namespace":"mk"}}
{"level":"debug","ts":"2024-10-21T12:43:51Z","logger":"controller.upload-controller","msg":"PVC not bound, skipping pvc","PVC":{"name":"my-pvc-ns","namespace":"mk"},"Phase":"Pending"}
{"level":"debug","ts":"2024-10-21T12:43:51Z","logger":"controller.upload-controller","msg":"not doing anything with PVC","PVC":{"name":"my-pvc-ns","namespace":"mk"},"isUpload":false,"isCloneTarget":false,"isBound":false,"podSucceededFromPVC":false,"deletionTimeStamp set?":false}
{"level":"debug","ts":"2024-10-21T12:43:51Z","logger":"controller.upload-populator","msg":"reconciling Upload Source PVCs","PVC":{"name":"my-pvc-ns","namespace":"mk"}}
{"level":"debug","ts":"2024-10-21T12:43:51Z","logger":"controller.clone-controller","msg":"reconciling Clone PVCs","PVC":{"name":"my-pvc-ns","namespace":"mk"}}
{"level":"debug","ts":"2024-10-21T12:43:51Z","logger":"controller.clone-controller","msg":"PVC annotation not found, skipping pvc","PVC":{"name":"my-pvc-ns","namespace":"mk"},"annotation":"k8s.io/CloneRequest"}
{"level":"debug","ts":"2024-10-21T12:43:51Z","logger":"controller.clone-controller","msg":"PVC annotation not found, skipping pvc","PVC":{"name":"my-pvc-ns","namespace":"mk"},"annotation":"k8s.io/CloneRequest"}
{"level":"debug","ts":"2024-10-21T12:43:51Z","logger":"controller.clone-controller","msg":"PVC not bound, skipping pvc","PVC":{"name":"my-pvc-ns","namespace":"mk"},"Phase":"Pending"}
{"level":"debug","ts":"2024-10-21T12:43:51Z","logger":"controller.clone-controller","msg":"Should not reconcile this PVC","PVC":{"name":"my-pvc-ns","namespace":"mk"},"checkPVC(AnnCloneRequest)":false,"NOT has annotation(AnnCloneOf)":true,"isBound":false,"has finalizer?":false}
{"level":"debug","ts":"2024-10-21T12:43:58Z","logger":"controller.upload-populator","msg":"reconciling Upload Source PVCs","PVC":{"name":"my-pvc-ns","namespace":"mk"}}
{"level":"debug","ts":"2024-10-21T12:43:58Z","logger":"controller.upload-controller","msg":"reconciling Upload PVCs","PVC":{"name":"my-pvc-ns","namespace":"mk"}}
{"level":"debug","ts":"2024-10-21T12:43:58Z","logger":"controller.upload-controller","msg":"PVC not bound, skipping pvc","PVC":{"name":"my-pvc-ns","namespace":"mk"},"Phase":"Pending"}
{"level":"debug","ts":"2024-10-21T12:43:58Z","logger":"controller.upload-controller","msg":"not doing anything with PVC","PVC":{"name":"my-pvc-ns","namespace":"mk"},"isUpload":false,"isCloneTarget":false,"isBound":false,"podSucceededFromPVC":false,"deletionTimeStamp set?":false}
{"level":"debug","ts":"2024-10-21T12:43:58Z","logger":"controller.clone-controller","msg":"reconciling Clone PVCs","PVC":{"name":"my-pvc-ns","namespace":"mk"}}
{"level":"debug","ts":"2024-10-21T12:43:58Z","logger":"controller.clone-controller","msg":"PVC annotation not found, skipping pvc","PVC":{"name":"my-pvc-ns","namespace":"mk"},"annotation":"k8s.io/CloneRequest"}
{"level":"debug","ts":"2024-10-21T12:43:58Z","logger":"controller.clone-controller","msg":"PVC annotation not found, skipping pvc","PVC":{"name":"my-pvc-ns","namespace":"mk"},"annotation":"k8s.io/CloneRequest"}
{"level":"debug","ts":"2024-10-21T12:43:58Z","logger":"controller.clone-controller","msg":"PVC not bound, skipping pvc","PVC":{"name":"my-pvc-ns","namespace":"mk"},"Phase":"Pending"}
{"level":"debug","ts":"2024-10-21T12:43:58Z","logger":"controller.clone-controller","msg":"Should not reconcile this PVC","PVC":{"name":"my-pvc-ns","namespace":"mk"},"checkPVC(AnnCloneRequest)":false,"NOT has annotation(AnnCloneOf)":true,"isBound":false,"has finalizer?":false}
{"level":"debug","ts":"2024-10-21T12:43:58Z","logger":"controller.import-controller","msg":"reconciling Import PVCs","PVC":{"name":"my-pvc-ns","namespace":"mk"}}
{"level":"debug","ts":"2024-10-21T12:43:58Z","logger":"controller.import-controller","msg":"PVC annotation not found, skipping pvc","PVC":{"name":"my-pvc-ns","namespace":"mk"},"annotation":"cdi.kubevirt.io/storage.import.endpoint"}
{"level":"debug","ts":"2024-10-21T12:43:58Z","logger":"controller.import-controller","msg":"PVC annotation not found, skipping pvc","PVC":{"name":"my-pvc-ns","namespace":"mk"},"annotation":"cdi.kubevirt.io/storage.import.source"}
{"level":"debug","ts":"2024-10-21T12:43:58Z","logger":"controller.import-controller","msg":"PVC annotation not found, skipping pvc","PVC":{"name":"my-pvc-ns","namespace":"mk"},"annotation":"cdi.kubevirt.io/storage.import.endpoint"}
{"level":"debug","ts":"2024-10-21T12:43:58Z","logger":"controller.import-controller","msg":"PVC annotation not found, skipping pvc","PVC":{"name":"my-pvc-ns","namespace":"mk"},"annotation":"cdi.kubevirt.io/storage.import.source"}
{"level":"debug","ts":"2024-10-21T12:43:58Z","logger":"controller.import-controller","msg":"PVC not bound, skipping pvc","PVC":{"name":"my-pvc-ns","namespace":"mk"},"Phase":"Pending"}

The PVC yaml:

apiVersion: cdi.kubevirt.io/v1beta1
kind: VolumeUploadSource
metadata:
name: my-upload-source
spec:
contentType: kubevirt
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: my-pvc-ns
namespace: mk
spec:
dataSourceRef:
apiGroup: cdi.kubevirt.io
kind: VolumeUploadSource
name: my-upload-source
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
storageClassName: hostpath-csi

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

No branches or pull requests

2 participants