Replies: 22 comments 22 replies
-
Followed the recommendation (in #206) and installed k3d beta, but facing more or the same issue on /var/run
|
Beta Was this translation helpful? Give feedback.
-
@fabricev Your issue is the But interesting that your k3d cluster create demo --volume /private/tmp/longhorn:/var/lib/longhorn:shared That's the error message I'm getting:
I'm using macOS Catalina and have no clue where the Edit:It seems to be related with that bug but I have the latest docker version where it should be fixed (according tho these release notes). |
Beta Was this translation helpful? Give feedback.
-
Same problem here on ubuntu 20.04 The following workarounds did not help:
|
Beta Was this translation helpful? Give feedback.
-
Hi @rdxmb , actually your workaround doesn't work because of a different issue. |
Beta Was this translation helpful? Give feedback.
-
@iwilltry42 Thanks. So it would be interesting, if mounting subpaths is enough for longhorn... |
Beta Was this translation helpful? Give feedback.
-
@mamiu I believe in your case the issue—which I'm also bumping up against right now and it's a real head-scratcher—is rooted in docker/for-mac#3431 (still open and not receiving enough attention IMO). A simple way to reproduce w/o docker run --rm -it -v /tmp:/mnt/tmp:shared alpine sh You should see output like:
EDIT: Per Docker Docs "Bind propagation defaults to rprivate for both bind mounts and volumes. It is only configurable for bind mounts, and only on Linux host machines." The way I read that |
Beta Was this translation helpful? Give feedback.
-
@balibebas You're right, that seems to be the issue for me! Thanks for investigating it and letting me know. @fabricev Did my previous comment help you to solve your error? If so you can close this issue. |
Beta Was this translation helpful? Give feedback.
-
I'm having a similar problem on K3s trying to get Longhorn going |
Beta Was this translation helpful? Give feedback.
-
@doug62 if by K3s you mean the docker wrapper k3d let me save you some time and suggest to observe the iSCSI requirements of the device used and make sure you have dynamic provisioning enabled. My issue with Longhorn was because I was trying to run on macOS and didn't have iSCSI enabled (doable but a rather large hack). If you're doing stuff with K3s outside of docker your issue is not this issue. |
Beta Was this translation helpful? Give feedback.
-
Quick update: The /var/run sharedmounts seem to work with the following versions:
Using Longhorn 1.1.0
However the issue seems to be rather on the iscsi requirements on the hosts (ie: rancher/k3s:v1.20.0-k3s2 image) kubectl logs -n longhorn-system longhorn-manager-rd9xl
time="2021-01-28T12:29:38Z" level=error msg="Failed environment check, please make sure you have iscsiadm/open-iscsi installed on the host"
time="2021-01-28T12:29:38Z" level=fatal msg="Error starting manager: Environment check failed: Invalid mount namespace /host/proc/1/ns/mnt, error Failed to execute: nsenter [--mount=/host/proc/1/ns/mnt mount], output , stderr, nsenter: failed to execute mount: No such file or directory\n, error exit status 1" |
Beta Was this translation helpful? Give feedback.
-
I'm using RANCHER 2.5.5. gives me other problem.. the cluster do not work properly |
Beta Was this translation helpful? Give feedback.
-
This is not the same issue AFAICT as it's unrelated to anything K3D specific. I don't see any need open another issue either as it seems @picoroma you're just getting a bit ahead of the development roadmap for Rancher + Longhorn. And FYI. |
Beta Was this translation helpful? Give feedback.
-
Hi, @iwilltry42 : any comments ? |
Beta Was this translation helpful? Give feedback.
-
As an aside, I wonder if it would be possible to emulate an iSCSI drive using MacFUSE and/or a case-sensitive APFS volume native to macOS. I've found case-sensitivity is important for parity with Linux file systems though that may not be a hard requirement. |
Beta Was this translation helpful? Give feedback.
-
Any luck with this ? k3d cluster create longhorn-test --servers 1 --agents 3 --volume $HOME/longhorn:/host/dev/ --volume $HOME/longhorn:/host/proc/ --volume $HOME/longhorn:/var/lib/longhorn-setting/ --volume $HOME/longhorn:/var/lib/longhorn:shared --verbose i tried it by adding missing mounts but getting : time="2021-03-18T04:32:16Z" level=error msg="Failed environment check, please make sure you have iscsiadm/open-iscsi installed on the host"
time="2021-03-18T04:32:16Z" level=fatal msg="Error starting manager: Environment check failed: Invalid mount namespace /host/proc/1/ns/mnt, error Failed to execute: nsenter [--mount=/host/proc/1/ns/mnt mount], output , stderr, nsenter: failed to execute mount: No such file or directory\n, error exit status 1"
|
Beta Was this translation helpful? Give feedback.
-
@SyedAsimAliSE - Noticed you are using the Docker K3s, I'm afraid you can't run longhorn in a container, longhorn requires 'apt-get open-iscsi' and the install features of the containers have been stripped out. I have since run K3d from virtual ubuntus and it is a much better expirence. |
Beta Was this translation helpful? Give feedback.
-
https://rancher.com/docs/k3s/latest/en/installation/install-options/ And then: Server: Agents: I use Ubuntu 20 on vms and hardware |
Beta Was this translation helpful? Give feedback.
-
I've compiled a static iscsiadm and placed into k3d using mounts:
and the executable works fine inside the docker instance of k3s, the problem looks different, longhorn-manager wants to access to host namespace, but it fails, there a way to make it works? called by |
Beta Was this translation helpful? Give feedback.
-
For those interested, I've built an image which contains the iscsiadm binary (here: https://github.com/fastlorenzo/k3s/pkgs/container/k3s) The Dockerfile used to build it is pretty straightforward: https://github.com/fastlorenzo/k3s/blob/iscsi/iscsi_utils/Dockerfile.template For now I've built and published the following versions:
If you need another version, just ping me and I'll publish it. |
Beta Was this translation helpful? Give feedback.
-
so longhorn currently is not an option for k3d RWX storage, correct? |
Beta Was this translation helpful? Give feedback.
-
Could you put the limitation for k3d elsewhere to the documentation, that Longhorn is currently just unsupported? |
Beta Was this translation helpful? Give feedback.
-
Hi, is there any suggested way to build a k3d image with open-iscsi daemon running behind the scene? I have tried:
|
Beta Was this translation helpful? Give feedback.
-
What did you do
N/A
What did you expect to happen
Longhorn managers pods from the daemonset created and running
Screenshots or terminal output
Which OS & Architecture
Ubuntu 20.04.1 on VMWare Workstation Player 15 / Windows 10
Which version of
k3d
k3d version v3.0.2-5-g60069f6
k3s version v1.18.9-k3s1 (default)
Which version of docker
docker version
docker info
Beta Was this translation helpful? Give feedback.
All reactions