You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when i run this command sudo kubespray prepare --nodes node1[ansible_ssh_host=192.168.33.111] node2[ansible_ssh_host=192.168.33.112] node3[ansible_ssh_host=192.168.33.113] [--etcds N+] [--masters N+]
Traceback (most recent call last):
File "/bin/kubespray", line 422, in
args.func(config)
File "/bin/kubespray", line 42, in prepare
options['etcds_list']
File "/usr/lib/python2.7/site-packages/kubespray/inventory.py", line 221, in write_inventory
inventory = self.format_inventory(masters, nodes, etcds)
File "/usr/lib/python2.7/site-packages/kubespray/inventory.py", line 194, in format_inventory
inventory_hostname = r.group(1)
AttributeError: 'NoneType' object has no attribute 'group'
I imagine you based that command on the instructions https://github.com/kubespray/kubespray-cli/blob/master/README.md#generate-inventory-for-a-baremetal-cluster? That line is misleading: the brackets in the --etcds and --masters options indicate that they are optional; unlike the brackets in the node specification which are part of the syntax. So with the command you used, the code is expecting a node[ansible_ssh_host=something], tries to parse out the bit before the bracket, which is empty, and falls over.
The question then becomes, what should those options be? The help text says:
--masters N [N ...] Number of masters, these instances will not run
workloads, master components only
which is unclear too: does it want a number (integer)? Multiple ones?
I believe what is needed is node names e.g.:
though I'm not entirely sure, as this is the first time I'm running this, but that at least got me further, and seems to generate plausible-looking yaml
when i run this command
sudo kubespray prepare --nodes node1[ansible_ssh_host=192.168.33.111] node2[ansible_ssh_host=192.168.33.112] node3[ansible_ssh_host=192.168.33.113] [--etcds N+] [--masters N+]
Traceback (most recent call last):
File "/bin/kubespray", line 422, in
args.func(config)
File "/bin/kubespray", line 42, in prepare
options['etcds_list']
File "/usr/lib/python2.7/site-packages/kubespray/inventory.py", line 221, in write_inventory
inventory = self.format_inventory(masters, nodes, etcds)
File "/usr/lib/python2.7/site-packages/kubespray/inventory.py", line 194, in format_inventory
inventory_hostname = r.group(1)
AttributeError: 'NoneType' object has no attribute 'group'
my env:
python --version
Python 2.7.5
ansible --version
ansible 2.4.1.0
config file = None
configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
ansible python module location = /usr/lib/python2.7/site-packages/ansible
executable location = /usr/bin/ansible
python version = 2.7.5 (default, Nov 20 2015, 02:00:19) [GCC 4.8.5 20150623 (Red Hat 4.8.5-4)]
The text was updated successfully, but these errors were encountered: