Commit a302fa9c authored by Jérome Perrin's avatar Jérome Perrin

recipe/pbs: drop ignore-known-hosts-file option

From now on, hosts keys will always be checked and there is no way
to disable the check
parent ad195075
...@@ -226,15 +226,9 @@ class Recipe(GenericSlapRecipe, Notify, Callback): ...@@ -226,15 +226,9 @@ class Recipe(GenericSlapRecipe, Notify, Callback):
(self.options['sshclient-binary'], (self.options['sshclient-binary'],
parsed_url.username, parsed_url.hostname, parsed_url.port))) parsed_url.username, parsed_url.hostname, parsed_url.port)))
# Create known_hosts file by default. # Create known_hosts file
# In some case, we don't want to create it (case where we share IP mong partitions) known_hostname = "[%s]:%s" % (parsed_url.hostname, parsed_url.port)
if not self.isTrueValue(self.options.get('ignore-known-hosts-file')): known_hosts_file[known_hostname] = entry['server-key'].strip()
# Migration code: if known_hosts file contains entry with just IP, then it
# is updated to use [IP]:port. It allows to share same IP among partitions
if parsed_url.hostname in known_hosts_file:
del known_hosts_file[parsed_url.hostname]
known_hostname = "[%s]:%s" % (parsed_url.hostname, parsed_url.port)
known_hosts_file[known_hostname] = entry['server-key'].strip()
notifier_wrapper_path = os.path.join(self.options['wrappers-directory'], slave_id) notifier_wrapper_path = os.path.join(self.options['wrappers-directory'], slave_id)
rdiff_wrapper_path = notifier_wrapper_path + '_raw' rdiff_wrapper_path = notifier_wrapper_path + '_raw'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment