Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kuberspray run failed #21

Closed
reactima opened this issue Jun 11, 2022 · 3 comments
Closed

kuberspray run failed #21

reactima opened this issue Jun 11, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@reactima
Copy link

reactima commented Jun 11, 2022

vm-master and vm-workers machines were created ubuntu 20.04.
kubitect.yaml was copy&pasted from https://kubitect.io/user-guide/getting-started/#step-44-kubernetes-properties

however kuberspray run failed as the following:

TASK [cluster-config/import : Include cluster config as variable] **************
ok: [127.0.0.1]

TASK [kubespray-clone : Clone Kubespray git project] ***************************
fatal: [127.0.0.1]: FAILED! =>
msg: |-
The task includes an option with an undefined variable. The error was: 'dict object' has no attribute 'url'

The error appears to be in '/root/.kubitect/clusters/my-first-cluster/ansible/kubitect/roles/kubespray-clone/tasks/main.yaml': line 3, column 3, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:

---
- name: Clone Kubespray git project
  ^ here

NO MORE HOSTS LEFT *************************************************************

PLAY RECAP *********************************************************************
127.0.0.1 : ok=1 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0

Error while running ansible-playbook: Error during command execution: ansible-playbook error: one or more host failed

Command executed: /root/.kubitect/clusters/my-first-cluster/bin/venvs/main/bin/ansible-playbook --extra-vars {"kubitect_cluster_path":"/root/.kubitect/clusters/my-first-cluster"} --inventory 127.0.0.1, --connection local /root/.kubitect/clusters/my-first-cluster/ansible/kubitect/kubespray-setup.yaml

@reactima
Copy link
Author

content of /root/.kubitect/clusters/my-first-cluster/ansible/kubitect/roles/kubespray-clone/tasks/main.yaml


  • name: Clone Kubespray git project
    git:
    repo: "{{ config.kubernetes.kubespray.url }}"
    version: "{{ config.kubernetes.kubespray.version }}"
    dest: "{{ kubitect_cluster_path }}/ansible/kubespray"
    single_branch: yes
    depth: 1
    force: yes#

@MusicDin
Copy link
Owner

Hi,

thanks for reporting this issue. It seems that default Kubespray URL is not set.
I will fix this as soon as possible. In the meantime, explicitly specifying the Kubespray URL should fix the problem:

...
kubernetes:
  version: "v1.22.6"
  networkPlugin: "calico"
  dnsMode: "coredns"
  kubespray:
    url: "https://github.com/kubernetes-sigs/kubespray.git" # <-
    version: "v2.18.1"

@MusicDin MusicDin added the bug Something isn't working label Jun 11, 2022
@MusicDin
Copy link
Owner

This is now fixed in release v2.0.7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants