Closed medyagh closed 3 years ago
update: in the logs we see
WARNING IsDockerSystemdCheck]: detected "cgroupfs" as the Docker cgroup driver. The recommended driver is "systemd". Please follow the guide at https://kubernetes.io/docs/setup/cri/\n\t[WARNING Swap]: running with swap on is not supported.
that means
gcloud alpha code dev
is not setting minikube with --force-systemd flag which is required for cloudshell.
however when I run minikube manually inside cloud shell, it is detecting the global env set for force-systemd :
MINIKUBE_FORCE_SYSTEMD=true
and it works
medya@cloudshell:~/helloworld-nodejs (k8s-minikube)$ minikube start
* minikube v1.14.1 on Debian 10.6
- MINIKUBE_FORCE_SYSTEMD=true
- MINIKUBE_HOME=/google/minikube
- MINIKUBE_WANTUPDATENOTIFICATION=false
* Automatically selected the docker driver
* Starting control plane node minikube in cluster minikube
* Creating docker container (CPUs=2, Memory=4000MB) ...
* Preparing Kubernetes v1.19.2 on Docker 19.03.8 ...
* Verifying Kubernetes components...
* Enabled addons: storage-provisioner, default-storageclass
* Done! kubectl is now configured to use "minikube" by default
but when I run sample app https://codelabs.developers.google.com/codelabs/cloud-run-hello#2 and run
gcloud alpha code dev --verbosity=debug
it fails similar to the first comment and when I kill the command and exec into the docker container I verify that it is using "cgroupfs" instead of "systemd" which is required for cloud shell.
medya@cloudshell:~ (k8s-minikube)$ docker exec -it gcloud-local-dev /bin/bash
root@gcloud-local-dev:/# docker info | grep Cgrou
Cgroup Driver: cgroupfs
that could mean the gcloud alpha code
is not picking up the the same Global Env var that cloud shell uses for minikube. (maybe it is running as a separate user? )
given that info, I recommend making sure the gcloud code alpha is picking up the same environement variable that was meant for cloud shell
altenratively minikube can Prevent cloud shell from running if they dont set the correct flag and provide a beter errorr message
the root cause was found