Bug 1446788
| Summary: | Volume failed to detach even after unmount is successful on the node | |||
|---|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Hemant Kumar <hekumar> | |
| Component: | Storage | Assignee: | Hemant Kumar <hekumar> | |
| Status: | CLOSED ERRATA | QA Contact: | Chao Yang <chaoyang> | |
| Severity: | medium | Docs Contact: | ||
| Priority: | unspecified | |||
| Version: | 3.5.0 | CC: | aos-bugs, eparis, jhou, sjenning, smunilla, vgoyal | |
| Target Milestone: | --- | |||
| Target Release: | --- | |||
| Hardware: | All | |||
| OS: | Unspecified | |||
| Whiteboard: | ||||
| Fixed In Version: | Doc Type: | Bug Fix | ||
| Doc Text: |
Cause:
Openshift does not attempt detach operation for pods that are completed or terminated but not deleted from API server.
Consequence:
Volumes can be left attached to old nodes, preventing reuse of volume in other pods.
Fix:
Implement support for detaching volumes for pods that are completed or terminated.
Result:
After this bug is fixed - volumes for terminated or completed pods are detached automatically. Users are free to reuse such volumes in other pods.
|
Story Points: | --- | |
| Clone Of: | ||||
| : | 1450215 (view as bug list) | Environment: | ||
| Last Closed: | 2017-08-10 05:21:25 UTC | Type: | Bug | |
| Regression: | --- | Mount Type: | --- | |
| Documentation: | --- | CRM: | ||
| Verified Versions: | Category: | --- | ||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
| Cloudforms Team: | --- | Target Upstream Version: | ||
| Embargoed: | ||||
| Bug Depends On: | ||||
| Bug Blocks: | 1450215 | |||
|
Description
Hemant Kumar
2017-04-28 22:17:23 UTC
I think "device is busy" error was confusing and wasn't really source of problems in this case. The root cause of the problem here is - a terminated pod doesn't detaches volumes in Kubernetes. I have opened a upstream bug to track this - https://github.com/kubernetes/kubernetes/issues/45191 I have opened a PR that fixes this - https://github.com/kubernetes/kubernetes/pull/45286 Test is passed on container env.
oc version
oc v3.6.121
kubernetes v1.6.1+5115d708d7
1.Create pvc
{
"kind": "PersistentVolumeClaim",
"apiVersion": "v1",
"metadata": {
"name": "ebsc",
"annotations": {
"volume.beta.kubernetes.io/storage-class": "gp2"
}
},
"spec": {
"accessModes": [
"ReadWriteOnce"
],
"resources": {
"requests": {
"storage": "1Gi"
}
}
}
}
2.Create pod
kind: Pod
apiVersion: v1
metadata:
name: test-pod
spec:
containers:
- name: test-pod
image: gcr.io/google_containers/busybox:1.24
command:
- "/bin/sh"
args:
- "-c"
- "touch /mnt/SUCCESS && exit 0 || exit 1"
volumeMounts:
- name: ebs-pvc
mountPath: "/mnt"
restartPolicy: "Never"
volumes:
- name: ebs-pvc
persistentVolumeClaim:
claimName: ebsc
After pod is Completed, the ebs volume is become available on aws web console
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2017:1716 |