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

Does anyone able to umount automcatically successfully in k8s? #54

Open
grapemix opened this issue Mar 1, 2024 · 2 comments
Open

Does anyone able to umount automcatically successfully in k8s? #54

grapemix opened this issue Mar 1, 2024 · 2 comments
Labels
help wanted Extra attention is needed

Comments

@grapemix
Copy link

grapemix commented Mar 1, 2024

I also experienced the "transport endpoint is not connected" problem for my k8s cluster and I am unable to umount my mount point from the host. However, I would like to make the recovery process automatically. Here is my trial:

      initContainers:
        - name: umount
          image: efrecon/s3fs:1.93
          command: ["sh", "-euxc", "! mountpoint -q \"${MY_MOUNT_PATH}\" | umount ${MY_MOUNT_PATH}"]
          securityContext:
            privileged: true

The idea is to umount the fs if it is being mounted before the pod get started. Unfortunately, it doesn't work. Please let us know if anyone has better idea. Thx.

ps:
I also try thinks like the code below or its variation. All trials fail.

mountpoint -q \"${MY_MOUNT_PATH}\" && fusermount -u ${MY_MOUNT_PATH} || exit 0

@efrecon efrecon added the help wanted Extra attention is needed label Mar 12, 2024
@efrecon
Copy link
Owner

efrecon commented Mar 12, 2024

I don't have easy access to a k8s cluster -- I know I can create a local one, but that requires some setup. I've marked this with a request for help if someone wants to pick it up. But: could it be because you are using a different user?

RUN_AS=${RUN_AS:-""}

@grapemix
Copy link
Author

Thanks for your help. My initContainers and containers both set privileged as true. I confirm the settings by ssh to the pod, run whoami and get root. So I think both of my initContainers and containers both as the same user. BTW, I also confirm I can the above cmd from my physical host.

ps: I did set UID and GID as another user in env var, but I don't think these env vars are related.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants