Code Monkey home page Code Monkey logo

Comments (7)

AYDEV-FR avatar AYDEV-FR commented on August 17, 2024

Hi,
I think there is another possible solution. An another point of view.
If I understand correctly, the idea is wait until the kubeapi is up and running ?

There is a more "ansible" approach with the module: ansible.builtin.wait_for
You can add :

- name: Wait for k8s apiserver
  wait_for:
    host: "{{ kubernetes_api_server_host }}"
    port: "6443"
    state: present
    timeout: 300

This is what kubespray seems to do that here:
https://github.com/kubernetes-sigs/kubespray/blob/33a60fe919b50a149ef6402f56e342989f6eea23/roles/kubernetes/client/tasks/main.yml#L44

And if you just want to verify if each node are up and running, I think kubectl command is a good approach, after checking that the kube api is up.
This approach, if you create an ansible role can also be useful for issue #15 : rolling upgrade playbook and node addition playbook.

What do you think ?

from rke2-ansible.

kphunter avatar kphunter commented on August 17, 2024

This seems related to #38.

I moved past this frustrating issue using @AYDEV-FR 's solution at the bottom of the rke2_server > first_server.yaml task, along with adding serial: 1 to the site.yml rke2_servers playbook. Thanks for that.

However, I think a watch script that isn't tied to a play might have more flexibility for re-use.

from rke2-ansible.

mddamato avatar mddamato commented on August 17, 2024

should be addressed in #54

from rke2-ansible.

ron1 avatar ron1 commented on August 17, 2024

@mddamato Yes, the introduction of the throttle directive here solved the problems we had with the 3rd server hanging on startup in a 3-server cluster deployment. Thanks.

from rke2-ansible.

ron1 avatar ron1 commented on August 17, 2024

You might wait until the necessary commit hits main before closing this issue.

from rke2-ansible.

siulcode avatar siulcode commented on August 17, 2024

I'm having the same issue right now. Why is this issue closed?

TASK [rke2_server : Start rke2-server] ***************************************** ok: [rkectlplane01] Wednesday 28 September 2022 00:46:09 +0000 (0:00:01.183) 0:00:36.379 *** TASK [rke2_server : Wait for k8s apiserver] ************************************ fatal: [rkectlplane01]: FAILED! => {"changed": false, "elapsed": 300, "msg": "Timeout when waiting for rkectlplane01:6443"} NO MORE HOSTS LEFT *************************************************************

from rke2-ansible.

mddamato avatar mddamato commented on August 17, 2024

@siulcode The error you posted shows that the server isn't starting properly but it's not enough information for me to go off of. Could you post the errors from the rke2 server logs or other applicable components?

from rke2-ansible.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.