littlechef-rackspace
littlechef-rackspace copied to clipboard
creating a node without using a ssh-config file triggers a fatal error
Repro: in config.cfg, make it so that ssh-config doesn't point to a valid ssh config file (either empty configuration entry, or point to empty file). Then create a new node with fix-rackspace create. It'll fail with the following error:
Traceback (most recent call last):
File "/usr/local/bin/fix-rackspace", line 8, in <module>
r.main(sys.argv[1:])
File "/usr/local/lib/python2.7/dist-packages/littlechef_rackspace/runner.py", line 191, in main
command.execute(**args)
File "/usr/local/lib/python2.7/dist-packages/littlechef_rackspace/commands.py", line 38, in execute
self.chef_deploy.deploy(host=host, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/littlechef_rackspace/deploy.py", line 18, in deploy
self._setup_ssh_config(host)
File "/usr/local/lib/python2.7/dist-packages/littlechef_rackspace/deploy.py", line 71, in _setup_ssh_config
self._create_bootstrap_ssh_config(bootstrap_config_file, contents)
File "/usr/local/lib/python2.7/dist-packages/littlechef_rackspace/deploy.py", line 94, in _create_bootstrap_ssh_config
lc.env.ssh_config.parse(open(bootstrap_config_file))
AttributeError: 'NoneType' object has no attribute 'parse'
This is due to lc.env.ssh_config being set to None in littlechef when no valid ssh-config file is used
Thanks for the report, I'll take a look this weekend.