fernandohackbart / ansible-k8s-centos

An Ansible playbook to configure Kubernetes on Centos 7 servers
0 stars 1 forks source link

Heketi topology load fails #3

Open fernandohackbart opened 6 years ago

fernandohackbart commented 6 years ago

This is failing as Heketi is not immediatelly available

- name: Loading topology to Heketi from {{ k8s_gluster_adm_dir }}/topology.json with http://{{ heketi_cluster_ip }}:{{ k8s_heketi_cluster_port }}
  shell: "heketi-cli --secret {{ k8s_heketi_secret }} topology load -j {{ k8s_gluster_adm_dir }}/topology.json"
  args:
    chdir: "{{ k8s_gluster_adm_dir }}"
  environment:
    HEKETI_CLI_SERVER: "http://{{ heketi_cluster_ip }}:{{ k8s_heketi_cluster_port }}"
    HEKETI_CLI_USER: "admin"

The error is:

fatal: [192.168.40.48]: FAILED! => {"changed": true, "cmd": "kubectl label node 192.168.40.48 node-role.kubernetes.io/node=worker", "delta": "0:00:00.626456", "end": "2018-01-07 10:45:49.994694", "msg": "non-zero return code", "rc": 1, "start": "2018-01-07 10:45:49.368238", "stderr": "Error from server (NotFound): nodes \"192.168.40.48\" not found", "stderr_lines": ["Error from server (NotFound): nodes \"192.168.40.48\" not found"], "stdout": "", "stdout_lines": []}                                                                                                          
fatal: [192.168.40.43]: FAILED! => {"changed": true, "cmd": "kubectl label node 192.168.40.43 node-role.kubernetes.io/node=worker", "delta": "0:00:00.642968", "end": "2018-01-07 10:45:50.031128", "msg": "non-zero return code", "rc": 1, "start": "2018-01-07 10:45:49.388160", "stderr": "Error from server (NotFound): nodes \"192.168.40.43\" not found", "stderr_lines": ["Error from server (NotFound): nodes \"192.168.40.43\" not found"], "stdout": "", "stdout_lines": []}    
fernandohackbart commented 6 years ago

Have to wait until GlusterFS servers are available

fernandohackbart commented 5 years ago

kubectl wait -n kube-system --for=condition=Ready ds/glusterfs kubectl wait -n kube-system --for=condition=Ready deployment/deploy-heketi