-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[PVC] loadgen testing Pod can't mount Volume #13353
Comments
👋 @jenting do we have a workaround for the meantime? |
Nope. I tried to reproduce it five times, but I can't reproduce it. |
@jenting how did you try to reproduce? I assume you tried starting 100 workspaces. Did you try any other permutations? For example, 200 or 400 workspaces? |
I've looked at upstream issue for this, and it appears to intermittent error, that google folks cannot repro, and hence are not able to pin point where the problem might be. It appears one workaround for this is to delete the pod and re-create it. Which I believe we can do as part of startWorkspace call (we used to do something similar for another k8s bug with memory oom). |
@jenting do you by any chance remember what is the status of the pod when this happens? Was it still pending? Or was it already in the running phase? We can do an easy workaround implementation for it here, but I need a full yaml capture of the pod definition when this happens to properly implement it. Would you be able to try to repro it again?
if we can add it there, then we automatically will delete the pod and re-create it, hopefully getting around this issue. 🤔 |
On the other hand, if pod is already considered running, then we would need to implement that workaround in a different place... 🤔 which will make it a bit more cumbersome, but bottom line, I think we can have a workaround for this problem very soon and unblock PVC roll out (again). |
@sagor999
So, I plan to launch an ephemeral cluster to reproduce this issue today. |
Aha, good. Since it was pending, it will be much easier to have a workaround. |
If you will not be able to repro, let me know, and I will make a blind fix. 😅 🙈 👓 |
I tried to reproduce this issue the whole day (I ran 10 times with 100 regular workspaces with PVC), but I got no luck that I couldn't reproduce it. |
In other words, test with more than 100 workspaces that are both starting and stopping. This way you have PVC creation and snapshot happening at the same time, with a higher volume. Why do I recommend a higher volume than 100? Consider this, running a test that has volume and activity similar to EU may help uncover other hot spots. It'll be costly for the nodes, but, it is important to know we can reach that volume in non-prod before trying in prod. |
Reopen it because it does not work as expected. |
I'll have to give it a try, but what about hooking the process with a seccomp notify mount? Wouldn't that device be visible from the hostt?
|
@utam0k But we did a trial that runs the container with the command
|
Why does it need to be workspacekit that runs the fsprep? You could implement the operation in IWS and then call it from workspacekit. |
@Furisto using IWS may put us back into the original issue, where a process above/outside the workspace container is involved with attach/detach of the disk. See this comment for background. |
I think there is a workaround for permission issue. |
Init container idea did not work. Mount does not persist between init container and regular container. :( |
I am out of ideas, so for now removing myself as assignee. |
@jenting Do you know which system call permissions are missing? Could it be a system call that is prohibited by seccomp? |
The IWS server has a nsinsider that creates a temporary process and puts it into an arbitrary Linux mount namespace and others (e.g. workspace). Can this be used? gitpod/components/ws-daemon/pkg/iws/iws.go Lines 242 to 244 in ddf6f3e
nsinsider is basically just a temporary process and terminates as a process. gitpod/components/ws-daemon/pkg/nsinsider/nsinsider.go Lines 53 to 124 in ddf6f3e
|
Thank you @utam0k. It works as expected, reference branch. But we could rerun the loadgen first to see whether changing PVC with the block device fix this issue or not. cc @sagor999 |
@jenting I'm glad to hear that 😍 Is there any other help you need now? |
I make another approach, using the init container to mount the block device and format it. |
No. 😢 The workspace pod must execute Given the above information, the IWS requires nsinsider into the workspace pod to execute
No. 😢 I encountered the files and folders UID/GID incorrect.
I haven't run the loadgen because in the current code, the workspace can't restart. @sagor999 @WVerlaek Is it possible to run a hook when the metadata.deletionTimestamp is set? So we don't have to rely on IWS to execute the |
@jenting a bit of a hack, but would it be possible for the |
@sagor999 @jenting this comment is super interesting. Specifically:
For each approach we've tried, how do we know processes aren't using the disk/device at workspace stop, before we detach the PVC? |
We only detach PVC when container is stopped. |
👍 Hmm, I wonder if no longer is an issue now that init container is mounting and formatting block device. Any ideas on how to resolve UID/GID issue @sagor999? |
@kylos101 |
The probability of occurrence on gen75, log. |
Removed from workspace project for now as we are rethinking our PVC approach. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
1 similar comment
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Bug description
Running the loadgen test with PVC feature flag, some of the pods can't mount the volume
We ran the loadgen test twice
The pod event log
Steps to reproduce
https://gitpod.slack.com/archives/C02F19UUW6S/p1664263343721969?thread_ts=1664240249.861729&cid=C02F19UUW6S
Related upstream issue kubernetes-sigs/gcp-compute-persistent-disk-csi-driver#608
Workspace affected
No response
Expected behavior
When you start 300 workspaces with g1-standard workspace class, they should all start and stop, some landing on new nodes because of auto scaling. Then, when you start 300 while using the same nodes (not needing auto scaling because nodes exist), they should all start and stop gracefully, too.
Example repository
No response
Anything else?
#7901
The text was updated successfully, but these errors were encountered: