Closed mplsgrant closed 3 weeks ago
just start
and just startd
are intended for local warnet development and thats why they apply the -dev
statefulset. The -dev
image copies the local warnet rpc code into the container so developers can test code changes in kubernetes. The non-dev image (latest
) is built from the top commit on main
branch and does not require the local filesystem at all, its meant for production.
So instead of changing the existing commands, lets just add new ones for your use case? Or try to figure out the deeper meaning behind this:
Warning Unhealthy 5m41s (x2 over 5m46s) kubelet Liveness probe failed: /bin/bash: line 1: /root/warnet/src/templates/rpc/livenessProbe.sh: No such file or directory
After a bit of mucking around, I discovered that when I run minikube from a debian os, it does not have the 9p filesystem enabled. However, when I run from ubuntu, it does. The current github action tests use ubuntu, which explains why the automated github tests work.
This is similar to a common issue during the attackathon as well. Here's an example from someone using Arch Linux ("or it might have been a nix shell")
Warning FailedMount 35s (x10 over 4m45s) kubelet
MountVolume.SetUp failed for volume "source-code" : hostPath type check failed: /mnt/src is not a directory
Interesting. Would like to see their yaml file so I could rule out them going in a messing around with the config. I got a similar issue when I did that.
It's the statefulset-dev.yaml in templates which pulls the dev rpc image which in turn copies in files from the host
I believe the debian cloud image does not (and will not) include 9p:
Virtio-fs appears to be the future for this type of use-case, and we do enable this for bullseye cloud kernels. I'd much rather encourage its use instead of the crufty old abuse of a network filesystem that is 9p.
Here's the view from ubuntu and from debian which shows the different kernels in use.
grant@local:~/warnet$ cat /etc/os-release
PRETTY_NAME="Ubuntu 23.10"
<snip>
grant@local:~/warnet$ minikube ssh
docker@minikube:~$ lsmod | grep 9p
9pnet_fd 20480 1
9p 77824 1
9pnet 106496 2 9p,9pnet_fd
fscache 389120 1 9p
netfs 61440 2 9p,fscache
docker@minikube:~$ uname -a
Linux minikube 6.5.0-1016-gcp #16-Ubuntu SMP Fri Mar 8 20:37:20 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
grant@local:~/warnet$ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
<snip>
grant@local:~/warnet$ minikube ssh
docker@minikube:~$ lsmod | grep 9p
docker@minikube:~$
docker@minikube:~$ uname -a
Linux minikube 6.1.0-20-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.85-1 (2024-04-11) x86_64 x86_64 x86_64 GNU/Linux
I am beginning to think we need to use something like rsync
instead of minikube mount
to get files from the host to the vm for the dev environment.
I'm going to close this request because my solution is no longer relevant due to what we now know about 9p.
I opened an issue at the minikube repo, and it appears that there is nothing that minikube can do about the 9p issue.
Issue
When I run
just start
on my vm, it fails.$ kubectl describe pod rpc-0
``` Name: rpc-0 Namespace: warnet Priority: 0 Service Account: default Node: minikube/192.168.49.2 Start Time: Fri, 19 Apr 2024 18:58:23 +0000 Labels: apps.kubernetes.io/pod-index=0 controller-revision-hash=rpc-7bd75bbd77 io.kompose.service=rpc statefulset.kubernetes.io/pod-name=rpc-0 Annotations:Cause
Currently,
just start
(and alsojust startd
) runs the warnet-rpc:dev container and the accompanying liveness probe and volume configurations.Solution
Point
just start
towarnet-rpc-statefulset.yaml
which pulls inwarnet-rpc:latest
Results
I tested running warnet with my tweak, and it works great.