From 2de5e4bce64d243687b21b8afe1732f3112450aa Mon Sep 17 00:00:00 2001 From: Emil Flink Date: Thu, 28 Apr 2022 10:48:34 +0200 Subject: [PATCH] Remove netcat dependency by using curl instead --- README.md | 2 +- modules/node/files/cloud-init.yml.tpl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 582ad6a..66fadc7 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ Unlike [RKE version](https://github.com/remche/terraform-openstack-rke) this mod - [Terraform](https://www.terraform.io/) 0.13+ - [OpenStack](https://docs.openstack.org/zh_CN/user-guide/common/cli-set-environment-variables-using-openstack-rc.html) environment properly sourced -- A Openstack image fullfiling [RKE2 requirements](https://docs.rke2.io/install/requirements/) and featuring curl and nc +- A Openstack image fullfiling [RKE2 requirements](https://docs.rke2.io/install/requirements/) and featuring curl - At least one Openstack floating IP ## Features diff --git a/modules/node/files/cloud-init.yml.tpl b/modules/node/files/cloud-init.yml.tpl index 77361f5..5bdb952 100644 --- a/modules/node/files/cloud-init.yml.tpl +++ b/modules/node/files/cloud-init.yml.tpl @@ -78,7 +78,7 @@ runcmd: - /usr/local/bin/install-or-upgrade-rke2.sh %{~ if is_server ~} %{~ if bootstrap_server != "" ~} - - [ sh, -c, 'until (nc -z ${bootstrap_server} 6443); do echo Wait for master node && sleep 10; done;'] + - [ sh, -c, 'until (curl -ksS -m 5 -o /dev/null https://${bootstrap_server}:6443); do echo Wait for master node && sleep 10; done;'] %{~ endif ~} - systemctl enable rke2-server.service - systemctl start rke2-server.service