-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Rescheduled pod in a statefulset is not allowed to attach a PVC #4371
Comments
If the rescheduled pod needs to start, the attachment CR needs to be cleaned up. How was the pod deleted manually? Can you delete the VolumeAttachment CR manually as well? This would free up the volume to be attached. If the volume doesn't have a chance to detach properly, the flex driver will be at risk of causing corruption if the volume is mounted again before it knows the volume was detached from the previous node. This was the corruption we finally fixed in #4180. Since the pod has the same name and was rescheduled to the new node, seems like we could relax the check for node. The pod spec should indicate that it is now assigned to the new node. The new pod with the same name can't start on the requested node unless it has already been removed from the previous node. |
@travisn The pod in terminating state was deleted by "kubectl delete". How to find VolumeAttachment CR? |
The instances of the CRD
|
@travisn Thanks and the workaround did work. Appreciate if the fix can be available soon. |
In below condition, if the pod on the node specified in the attachment doesn't exist, the attachment should be allowed as well. Is it valid?
|
@yanchicago If the pod doesn't exist, it is checked a few lines earlier and allow the attachment.
Is that the check that you were looking for? |
@travisn Unfortunately, the below search would include the new pod that's current in request of attachment. If the search includes the node/host name of the pod location that's specified in the volumeattachment record, it would work.
Also, could you shed a light on the flow of how a "detach" request route to agent? When a pod died, k8s will send the event directly to the agent or routed in other places? |
For #4180 The check was added for whether the pod was on the same node because there was corruption without the check. The only way the driver can know that it won't be causing corruption is by blacklisting the other client from connecting. This is work being done in the csi driver in ceph/ceph-csi#578, but not the flex driver currently. |
Yes, agree #4180 fixed the original corruption issue. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in a week if no further activity occurs. Thank you for your contributions. |
It's still an issue on flex volume based rook cluster. Until the flex volume cluster is not supported, is there any plan to work on it? This is related to "multi-attach" issue, similar situation exists in csi based rook cluster. |
Closed it by mistake. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in a week if no further activity occurs. Thank you for your contributions. |
This issue has been automatically closed due to inactivity. Please re-open if this still requires investigation. |
https://github.com/rook/rook/issues/4371 |
Is this a bug report or feature request?
Deviation from expected behavior:
When a host failed, the pod running on that host was rescheduled. But the rescheduled pod failed to attach the PVC.
Expected behavior:
The rescheduled pod should be able to attach the pvc.
How to reproduce it (minimal and precise):
Should a rescheduled pod ( same named pod in the same namespace running on a different node) be allowed to attach? Removing "attachment.Node == node" part?
Below "original" pod is not validated based on name/namespace.
// Attachment is not orphaned. Original pod still exists. Don't attach.
a). attachment is orphaned
b). Same named pod on the same node
File(s) to submit:
cluster.yaml
, if necessaryTo get logs, use
kubectl -n <namespace> logs <pod name>
When pasting logs, always surround them with backticks or use the
insert code
button from the Github UI.Read Github documentation if you need help.
Environment:
uname -a
): 3.10.0-957.10.1.el7.x86_64rook version
inside of a Rook Pod): v1.1.7ceph -v
): v14.2.4kubectl version
): v1.14.3ceph health
in the Rook Ceph toolbox):The text was updated successfully, but these errors were encountered: