Open ghost opened 6 months ago
Seems like the install-prerequisites.sh
(https://raw.githubusercontent.com/innobead/kubefire/master/scripts/install-prerequisites.sh) is the issue.
on function check_virtualization
, it checks lsmod | grep kvm
the ensure a kvm is available on the host. But the kvm
is statically enabled on WSL2 Kernel Config
Seems like it can easily fix, If kubefire install
provides a optional flags to specify location of the script.
Seems like the
install-prerequisites.sh
(https://raw.githubusercontent.com/innobead/kubefire/master/scripts/install-prerequisites.sh) is the issue.on function
check_virtualization
, it checkslsmod | grep kvm
the ensure a kvm is available on the host. But thekvm
is statically enabled on WSL2 Kernel ConfigSeems like it can easily fix, If
kubefire install
provides a optional flags to specify location of the script.
➜ ~ lsmod | grep kvm
➜ ~ echo $?
1
Seems like the
install-prerequisites.sh
(https://raw.githubusercontent.com/innobead/kubefire/master/scripts/install-prerequisites.sh) is the issue. on functioncheck_virtualization
, it checkslsmod | grep kvm
the ensure a kvm is available on the host. But thekvm
is statically enabled on WSL2 Kernel Config Seems like it can easily fix, Ifkubefire install
provides a optional flags to specify location of the script.➜ ~ lsmod | grep kvm ➜ ~ echo $? 1
I've slightly modified https://raw.githubusercontent.com/innobead/kubefire/master/scripts/install-prerequisites.sh script to skip if the host is WSL2 via check Microsoft is exists on /proc/version
, install completed.
function check_virtualization() {
if [ ${ARCH_SUFFIX} = arm64 ]; then
return
fi
# If Microsoft is included on "/proc/version"
# do nothing
if [[ $(grep -i Microsoft /proc/version) ]]; then
return
fi
lscpu | grep "Virtuali[s|z]ation"
lsmod | grep kvm
}
and I've encountered another issues on create a new cluster via kubefire cluster create demo
kubefire cluster create demo --log-level debug
DEBU[2024-05-19T17:10:13+09:00] initializing dependency injection system
DEBU[2024-05-19T17:10:13+09:00] completed dependency injection system
DEBU[2024-05-19T17:10:13+09:00] forcibly reinitializing dependency injection system
DEBU[2024-05-19T17:10:13+09:00] completed dependency injection system
DEBU[2024-05-19T17:10:13+09:00] getting the latest released version info bootstrapper=kubeadm
DEBU[2024-05-19T17:10:13+09:00] getting bootstrapper version configurations bootstrapper=kubeadm
DEBU[2024-05-19T17:10:13+09:00] getting the latest released version info bootstrapper=kubeadm
INFO[2024-05-19T17:10:14+09:00] initializing cluster configuration cluster=demo
DEBU[2024-05-19T17:10:14+09:00] &{Name:demo Bootstrapper:kubeadm Pubkey: Prikey: Version:v1.30.1 Image:ghcr.io/innobead/kubefire-opensuse-leap:15.2 KernelImage:ghcr.io/innobead/kubefire-ignite-kernel:4.19.125-amd64 KernelArgs:console=ttyS0 reboot=k panic=1 pci=off ip=dhcp security=apparmor apparmor=1 ExtraOptions:map[] Deployed:false Master:{Count:1 Memory:2GB Cpus:2 DiskSize:10GB Cluster:0xc000180a00} Worker:{Count:0 Memory:2GB Cpus:2 DiskSize:10GB Cluster:0xc000180a00}}
DEBU[2024-05-19T17:10:14+09:00] getting cluster configurations cluster=demo
INFO[2024-05-19T17:10:14+09:00] saving cluster configurations cluster=demo
INFO[2024-05-19T17:10:14+09:00] creating cluster cluster=demo
DEBU[2024-05-19T17:10:14+09:00] getting cluster configurations cluster=demo
INFO[2024-05-19T17:10:14+09:00] creating master nodes of cluster cluster=demo started=true
INFO[2024-05-19T17:10:14+09:00] creating node node=demo-master-1
INFO[2024-05-19T17:10:14+09:00] time="2024-05-19T17:10:14+09:00" level=info msg="Removed VM with name \"demo-master-1\" and ID \"e331a2160f2c48d5\""
time="2024-05-19T17:10:14+09:00" level=fatal msg="command [\"dmsetup\" \"create\" \"--verifyudev\" \"ignite-e331a2160f2c48d5-base\"] exited with \"device-mapper: reload ioctl on ignite-e331a2160f2c48d5-base (252:0) failed: Invalid argument\\nCommand failed.\\n\": exit status 1"
ERRO[2024-05-19T17:10:14+09:00] failed to create node error="exit status 1" node=demo-master-1
DEBU[2024-05-19T17:10:14+09:00] getting cluster cluster=demo
DEBU[2024-05-19T17:10:14+09:00] getting cluster configurations cluster=demo
DEBU[2024-05-19T17:10:14+09:00] listing nodes of cluster cluster=demo
DEBU[2024-05-19T17:10:14+09:00] [sudo ignite ps --all -f {{.ObjectMeta.Name}}=~demo- -t {{.ObjectMeta.Name}}]
INFO[2024-05-19T17:10:14+09:00] waiting nodes of cluster running cluster=demo
DEBU[2024-05-19T17:10:14+09:00] listing nodes of cluster cluster=demo
DEBU[2024-05-19T17:10:14+09:00] [sudo ignite ps --all -f {{.ObjectMeta.Name}}=~demo- -t {{.ObjectMeta.Name}}]
INFO[2024-05-19T17:10:14+09:00] initializing cluster cluster=demo
DEBU[2024-05-19T17:10:14+09:00] getting the latest released version info bootstrapper=kubeadm
DEBU[2024-05-19T17:10:14+09:00] getting bootstrapper version configurations bootstrapper=kubeadm
INFO[2024-05-19T17:10:14+09:00] waiting all nodes initialization finished
DEBU[2024-05-19T17:10:14+09:00] getting node node=demo-master-1
DEBU[2024-05-19T17:10:14+09:00] VM ID IMAGE KERNEL SIZE CPUS MEMORY CREATED STATUS IPS PORTS NAME
DEBU[2024-05-19T17:10:14+09:00] [sudo ignite ps --all -f {{.ObjectMeta.Name}}=demo-master-1 -t {{.ObjectMeta.Labels.cluster}}]
Usage:
kubefire cluster create [name] [flags]
Flags:
-b, --bootstrapper string Bootstrapper type, options: [kubeadm, k3s, rke2, k0s] (default "kubeadm")
-c, --config string Cluster configuration file (ex: use 'config-template' command to generate the default cluster config)
-o, --extra-options string Extra options (ex: key=value,...) for bootstrapper
-f, --force Force to recreate if the cluster exists
-h, --help help for create
-i, --image string Rootfs container image (default "ghcr.io/innobead/kubefire-opensuse-leap:15.2")
--kernel-args string Kernel arguments (default "console=ttyS0 reboot=k panic=1 pci=off ip=dhcp security=apparmor apparmor=1")
--kernel-image string Kernel container image (default "ghcr.io/innobead/kubefire-ignite-kernel:4.19.125-amd64")
--master-count int Count of master node (default 1)
--master-cpu int CPUs of master node (default 2)
--master-memory string Memory of master node (default "2GB")
--master-size string Disk size of master node (default "10GB")
--no-cache Forget caches
--no-start Don't start nodes
-k, --pubkey string Public key
-v, --version string Version of Kubernetes supported by bootstrapper (ex: v1.18, v1.18.8, empty)
--worker-count int Count of worker node
--worker-cpu int CPUs of worker node (default 2)
--worker-memory string Memory of worker node (default "2GB")
--worker-size string Disk size of worker node (default "10GB")
Global Flags:
-t, --github-token string GIthub Personal Access Token used to query repo release info
-l, --log-level string log level, options: [panic, fatal, error, warning, info, debug, trace] (default "info")
FATA[2024-05-19T17:10:15+09:00] failed to run kubefire error="failed to deploy cluster (demo): demo-master-1 node unavailable"
seems like the error is occurred from executing dmsetup
.
Describe the bug
WSL2 can run Firecracker without any modification of underlying WSL2 Kernel. When I run
$ kubefire install
it produces anFATAL
error and could not install (or prepare) kubefire.To Reproduce
$ kubefire version
kubefire install
to install kubefire. (adding--log-level trace
to print out any evidence of this bug.)Expected behavior Kubefire should've install without any issue.
Environment
cat /etc/os-release
kubefire version
kubefire info
Additional context
None.