clusterinthecloud / ansible

Ansible config for Cluster in the Cloud
https://cluster-in-the-cloud.readthedocs.io
MIT License
10 stars 27 forks source link

finish script crashes hard on malformed YAML in limits.yaml #102

Open boegel opened 3 years ago

boegel commented 3 years ago
[citc@mgmt ~]$ cat limits.yaml
c5d.2xlarge:10
[citc@mgmt ~]$ finish
Traceback (most recent call last):
  File "/usr/local/bin/update_config", line 89, in <module>
    node_config = "\n".join(get_node_configs(get_limits(), get_shapes(), get_mgmt_info(), get_nodespace()))
  File "/usr/local/bin/update_config", line 67, in get_node_configs
    for shape, shape_counts in limits.items():
AttributeError: 'str' object has no attribute 'items'

That's a pretty complicated way of saying "please add a space after the ':'" :)

milliams commented 3 years ago

We've had issues like this before and started a fix at #39 but it never got tested and merged. I think it's useful to improve the error reporting here as you say :)