galexrt / k8s-vagrant-multi-node

A Kubernetes Vagrant Multi node environment using kubeadm.
https://k8s-vagrant-multi-node.galexrt.moe/
Apache License 2.0
166 stars 81 forks source link

vagrant reports the 2nd node as "preparing" #69

Closed Yuggupta27 closed 4 years ago

Yuggupta27 commented 4 years ago

Bug Report While running a multi-node cluster with 2 worker nodes, the second node doesn't seem to start and vagrant reports the 2nd node as preparing. https://termbin.com/kvvw

Rebooting the worker node works sometimes but is not a consistent solution.

Expected behavior: All three nodes should show "running" status.

Deviation from expected behavior: When make status is run, the second node doesn't seem to exist. https://termbin.com/wvh3

How to reproduce it (minimal and precise):

make up -j3 BOX_OS=centos VAGRANT_DEFAULT_PROVIDER=libvirt KUBERNETES_VERSION="$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt | sed 's/^v//')"  MASTER_CPUS=4 MASTER_MEMORY_SIZE_GB=5 NODE_COUNT=2 NODE_MEMORY_SIZE_GB=5 DISK_COUNT=2 DISK_SIZE_GB=25

Environment: server type: gusty.ci.centos.org see: https://wiki.centos.org/QaWiki/PubHardware

Madhu-1 commented 4 years ago

@Yuggupta27 please mention the hardware details, it might help

galexrt commented 4 years ago

@Yuggupta27 Please post the whole log of the make up command you posted here.

Yuggupta27 commented 4 years ago

@Yuggupta27 Please post the whole log of the make up command you posted here.

Here: https://pastebin.com/gHtmAe0p

galexrt commented 4 years ago

So, I have gone ahead and added that the version number can also begin with a v (no need to run sed on the curl there anymore :wink:) in master.

Also there is a simple reason why `make status" is not showing the second node. The "Vagrantfile" is put together "dynamically" and only knows about node 2 if all the env vars are given.

So to make that call to make status successful you must pass the NODE_COUNT variables "at least", like with the make up command:

make status NODE_COUNT=2

Please run your script / make up command again with the latest master and post the whole logs.

Yuggupta27 commented 4 years ago

So, I have gone ahead and added that the version number can also begin with a v (no need to run sed on the curl there anymore ) in master.

Also there is a simple reason why `make status" is not showing the second node. The "Vagrantfile" is put together "dynamically" and only knows about node 2 if all the env vars are given.

So to make that call to make status successful you must pass the NODE_COUNT variables "at least", like with the make up command:

make status NODE_COUNT=2

Please run your script / make up command again with the latest master and post the whole logs.

Thanks. I'll update here after the next run.

galexrt commented 4 years ago

@Yuggupta27 Any update? As written you must run make status with at least the NODE_COUNT variable set.

Yuggupta27 commented 4 years ago

It works fine now. Thanks!