Revision 6a5b8b4b
b/lib/config.py | ||
---|---|---|
813 | 813 |
if self._offline: |
814 | 814 |
return True |
815 | 815 |
bad = False |
816 |
nodelist = self._UnlockedGetNodeList() |
|
817 |
myhostname = self._my_hostname |
|
818 | 816 |
|
819 |
try: |
|
820 |
nodelist.remove(myhostname) |
|
821 |
except ValueError: |
|
822 |
pass |
|
817 |
node_list = [] |
|
818 |
addr_list = [] |
|
819 |
myhostname = self._my_hostname |
|
823 | 820 |
# we can skip checking whether _UnlockedGetNodeInfo returns None |
824 | 821 |
# since the node list comes from _UnlocketGetNodeList, and we are |
825 | 822 |
# called with the lock held, so no modifications should take place |
826 | 823 |
# in between |
827 |
address_list = [self._UnlockedGetNodeInfo(name).primary_ip |
|
828 |
for name in nodelist] |
|
824 |
for node_name in self._UnlockedGetNodeList(): |
|
825 |
if node_name == myhostname: |
|
826 |
continue |
|
827 |
node_info = self._UnlockedGetNodeInfo(node_name) |
|
828 |
if not node_info.master_candidate: |
|
829 |
continue |
|
830 |
node_list.append(node_info.name) |
|
831 |
addr_list.append(node_info.primary_ip) |
|
829 | 832 |
|
830 |
result = rpc.RpcRunner.call_upload_file(nodelist, self._cfg_file, |
|
831 |
address_list=address_list)
|
|
832 |
for node in nodelist: |
|
833 |
result = rpc.RpcRunner.call_upload_file(node_list, self._cfg_file,
|
|
834 |
address_list=addr_list) |
|
835 |
for node in node_list:
|
|
833 | 836 |
if not result[node]: |
834 | 837 |
logging.error("copy of file %s to node %s failed", |
835 | 838 |
self._cfg_file, node) |
Also available in: Unified diff