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

Clone from raw block pvc failed #233

Closed
cumirror opened this issue Dec 15, 2020 · 7 comments
Closed

Clone from raw block pvc failed #233

cumirror opened this issue Dec 15, 2020 · 7 comments
Labels
lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.

Comments

@cumirror
Copy link

  1. Create a pvc
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: p1
spec:
  volumeMode: Block
  accessModes:
  - ReadWriteOnce
  resources:
    requests:
      storage: 1Gi
  storageClassName: csi-hostpath-sc
  1. clone from pvc
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: p1-clone
spec:
  storageClassName: csi-hostpath-sc
  dataSource:
    name: p1
    kind: PersistentVolumeClaim
    apiGroup: ""
  accessModes:
    - ReadWriteOnce
  volumeMode: Block
  resources:
    requests:
      storage: 1Gi

The cloned PVC remains in the Pending state:

# kubectl get pvc -o wide
NAME       STATUS    VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS          AGE    VOLUMEMODE
p1         Bound     pvc-97b8c8dc-596b-4c32-b94d-84fe859ffa42   1Gi        RWO            csi-hostpath-sc       4m4s   Block
p1-clone   Pending                                                                        csi-hostpath-sc       3m8s   Block
# kubectl describe pvc p1-clone
Name:          p1-clone
Namespace:     default
StorageClass:  csi-hostpath-sc
Status:        Pending
Volume:
Labels:        <none>
Annotations:   volume.beta.kubernetes.io/storage-provisioner: hostpath.csi.k8s.io
Finalizers:    [kubernetes.io/pvc-protection]
Capacity:
Access Modes:
VolumeMode:    Block
DataSource:
  APIGroup:
  Kind:      PersistentVolumeClaim
  Name:      p1
Mounted By:  <none>
Events:
  Type     Reason                Age                  From                                                                                 Message
  ----     ------                ----                 ----                                                                                 -------
  Warning  ProvisioningFailed    4m16s                hostpath.csi.k8s.io_csi-hostpath-provisioner-0_b54909de-7793-4038-a581-f7206c6ff104  failed to provision volume with StorageClass "csi-hostpath-sc": rpc error: code = DeadlineExceeded desc = context deadline exceeded
  Normal   ExternalProvisioning  4s (x19 over 4m26s)  persistentvolume-controller                                                          waiting for a volume to be created, either by external provisioner "hostpath.csi.k8s.io" or manually created by system administrator
  Normal   Provisioning          3s (x9 over 4m26s)   hostpath.csi.k8s.io_csi-hostpath-provisioner-0_b54909de-7793-4038-a581-f7206c6ff104  External provisioner is provisioning volume for claim "default/p1-clone"
  Warning  ProvisioningFailed    3s (x8 over 4m16s)   hostpath.csi.k8s.io_csi-hostpath-provisioner-0_b54909de-7793-4038-a581-f7206c6ff104  failed to provision volume with StorageClass "csi-hostpath-sc": rpc error: code = AlreadyExists desc = existing volume source volume id not matching
@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Mar 15, 2021
@cumirror
Copy link
Author

csi-hostpath-provisioner log:

CreateVolume failed, supports topology = true, node selected false => may reschedule = false => state = Background: rpc error: code = DeadlineExceeded desc = context deadline exceeded

Timeout for waiting for creation or deletion of a volume (default 10s), after increased timeout, pvc clone success.

@pohly
Copy link
Contributor

pohly commented Mar 27, 2021

/reopen

So you found the reason, good. But we shouldn't we fix this in the repo?

Also, did CreateVolume always fail? The driver should continue with preparing the volume and eventually the CreateVolume call should succeed. In other words, a higher timeout helps to avoid intermittent errors, but it shouldn't be necessary.

@k8s-ci-robot
Copy link
Contributor

@pohly: Reopened this issue.

In response to this:

/reopen

So you found the reason, good. But we shouldn't we fix this in the repo?

Also, did CreateVolume always fail? The driver should continue with preparing the volume and eventually the CreateVolume call should succeed. In other words, a higher timeout helps to avoid intermittent errors, but it shouldn't be necessary.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot reopened this Mar 27, 2021
@pohly
Copy link
Contributor

pohly commented Mar 29, 2021

Which version of the csi-driver-host-path were you using?

Bug fixes around concurrent calls went into 1.5 (#220) and 1.6 (#270).

In particular, #220 seems to address this issue.

/close

@k8s-ci-robot
Copy link
Contributor

@pohly: Closing this issue.

In response to this:

Which version of the csi-driver-host-path were you using?

Bug fixes around concurrent calls went into 1.5 (#220) and 1.6 (#270).

In particular, #220 seems to address this issue.

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

xing-yang added a commit to xing-yang/csi-driver-host-path that referenced this issue Nov 27, 2023
f8c8cc4 Merge pull request kubernetes-csi#237 from msau42/prow
b36b5bf Merge pull request kubernetes-csi#240 from dannawang0221/upgrade-go-version
adfddcc Merge pull request kubernetes-csi#243 from pohly/git-subtree-pull-fix
c465088 pull-test.sh: avoid "git subtree pull" error
7b175a1 Update csi-test version to v5.2.0
987c90c Update go version to 1.21 to match k/k
2c625d4 Add script to generate patch release notes
f9d5b9c Merge pull request kubernetes-csi#236 from mowangdk/feature/bump_csi-driver-host-path_version
b01fd53 Bump csi-driver-host-path version up to v1.12.0
984feec Merge pull request kubernetes-csi#234 from siddhikhapare/csi-tools
1f7e605 fixed broken links of testgrid dashboard
de2fba8 Merge pull request kubernetes-csi#233 from andyzhangx/andyzhangx-patch-1
cee895e remove windows 20H2 build since it's EOL long time ago
670bb0e Merge pull request kubernetes-csi#229 from marosset/fix-codespell-errors
35d5e78 Merge pull request kubernetes-csi#219 from yashsingh74/update-registry
63473cc Merge pull request kubernetes-csi#231 from coulof/bump-go-version-1.20.5
29a5c76 Merge pull request kubernetes-csi#228 from mowangdk/chore/adopt_kubernetes_recommand_labels
8dd2821 Update cloudbuild image with go 1.20.5
1df23db Merge pull request kubernetes-csi#230 from msau42/prow
1f92b7e Add ginkgo timeout to e2e tests to help catch any stuck tests
2b8b80e fixing some codespell errors
c10b678 Merge pull request kubernetes-csi#227 from coulof/check-sidecar-supported-versions
72984ec chore: adopt kubernetes recommand label
b055535 Header
bd0a10b typo
c39d73c Add comments
f6491af Script to verify EOL sidecar version
901bcb5 Update registry k8s.gcr.io -> registry.k8s.io

git-subtree-dir: release-tools
git-subtree-split: f8c8cc4
TerryHowe pushed a commit to TerryHowe/csi-driver-host-path that referenced this issue Oct 17, 2024
remove windows 20H2 build since it's EOL long time ago
@905049079
Copy link

csi-hostpath-provisioner 日志:

CreateVolume failed, supports topology = true, node selected false => may reschedule = false => state = Background: rpc error: code = DeadlineExceeded desc = context deadline exceeded

等待创建或者删除卷的超时时间(默认10秒),增加超时时间后,pvc克隆成功。

May I ask how to modify the timeout period?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.
Projects
None yet
Development

No branches or pull requests

5 participants