Skip to content

Commit

Permalink
Resolve FQDN of the ip addresses provided in the host list file
Browse files Browse the repository at this point in the history
  • Loading branch information
adejanovski committed May 26, 2020
1 parent d7a0ace commit 12e0532
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion medusa/restore_cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import datetime
import traceback
import paramiko
import socket

from medusa.monitoring import Monitoring
from medusa.cassandra_utils import CqlSessionProvider
Expand Down Expand Up @@ -279,7 +280,7 @@ def _populate_hostmap(self):
for line in f.readlines():
seed, target, source = line.replace('\n', '').split(self.config.storage.host_file_separator)
# in python, bool('False') evaluates to True. Need to test the membership as below
self.host_map[target.strip()] = {'source': [source.strip()], 'seed': seed in ['True']}
self.host_map[socket.getfqdn(target.strip())] = {'source': [socket.getfqdn(source.strip())], 'seed': seed in ['True']}

def _restore_data(self):
# create workdir on each target host
Expand Down

0 comments on commit 12e0532

Please sign in to comment.