kubespray / kubespray-cli

Easy to use command line tool for kubernetes deployment with kubespray
GNU General Public License v3.0
252 stars 62 forks source link

AttributeError: 'NoneType' object has no attribute 'group' when preparin baremetal config #81

Closed Sispheor closed 7 years ago

Sispheor commented 7 years ago

Hi, This is my config (default)

# Common options
# ---------------
# Path where the kargo ansible playbooks will be installed
# Defaults to current user's home directory if not set
# kargo_path: "/tmp"
# Default inventory path
kargo_git_repo: "https://github.com/kubespray/kargo.git"
# Logging options
loglevel: "info"

I try to prepare 3 baremetal server (actualy VMs)

kargo prepare --nodes node1[ansible_ssh_host=node1] node2[ansible_ssh_host=node2] node3[ansible_ssh_host=node3] [--etcds N+] [--masters N+]

CLONING KARGO GIT REPO *********************************************************
Cloning into '/root/.kargo'...
kargo repo cloned
Traceback (most recent call last):
  File "/bin/kargo", line 381, in <module>
    args.func(config)
  File "/bin/kargo", line 42, in prepare
    options['etcds_list']
  File "/usr/lib/python2.7/site-packages/kargo/inventory.py", line 221, in write_inventory
    inventory = self.format_inventory(masters, nodes, etcds)
  File "/usr/lib/python2.7/site-packages/kargo/inventory.py", line 194, in format_inventory
    inventory_hostname = r.group(1)
AttributeError: 'NoneType' object has no attribute 'group'

Maybe I miss something.

Sispheor commented 7 years ago

My bad. Wrong syntax.

grebois commented 7 years ago

@Sispheor hey, I'm hitting the same error, but not finding my "wrong syntax", what was yours?

ghost commented 7 years ago

I got the same error, after running the following

$ kubespray prepare --nodes node1[ansible_ssh_host=10.11.109.81] node2[ansible_ssh_host=10.11.109.82] node3[ansible_ssh_host=10.11.109.83] node4[ansible_ssh_host=10.11.109.84] node5[ansible_ssh_host=10.11.109.85] [--etcds 3] [--masters 2]

Any ideas?

ghost commented 7 years ago

Had the same issue because of just copy/pasting.

It's not [--etcds 3] [--masters 2] but --etcds 3 --masters 2

;)