@@ -553,7 +553,7 @@ def remote_host_detection():
553
553
host_fqdn_list = []
554
554
host_ip_list = []
555
555
ssh_client = SSHClient ()
556
- ssh_client .set_missing_host_key_policy (AutoAddPolicy )
556
+ ssh_client .set_missing_host_key_policy (AutoAddPolicy () )
557
557
ssh_client .connect (hostname = cm_server , username = 'opc' , key_filename = ssh_keyfile )
558
558
# Cloudera Manager FQDN lookup
559
559
print ('->Lookup Cloudera Manager FQDN' )
@@ -653,7 +653,7 @@ def remote_worker_shape_detection():
653
653
:return:
654
654
"""
655
655
ssh_client = SSHClient ()
656
- ssh_client .set_missing_host_key_policy (AutoAddPolicy )
656
+ ssh_client .set_missing_host_key_policy (AutoAddPolicy () )
657
657
ssh_client .connect (hostname = cm_server , username = 'opc' , key_filename = ssh_keyfile )
658
658
ssh_command = "ssh -oStrictHostKeyChecking=no -i /home/opc/.ssh/id_rsa opc@" + worker_hosts_contain + "-1" + \
659
659
" '/usr/bin/curl -s http://169.254.169.254/opc/v1/instance/'"
@@ -1002,7 +1002,7 @@ def get_mgmt_db_passwords():
1002
1002
global amon_password , rman_password , navigator_password , navigator_meta_password , oozie_password , hive_meta_password
1003
1003
parse_ssh_key ()
1004
1004
ssh_client = SSHClient ()
1005
- ssh_client .set_missing_host_key_policy (AutoAddPolicy )
1005
+ ssh_client .set_missing_host_key_policy (AutoAddPolicy () )
1006
1006
ssh_client .connect (hostname = cm_server , username = 'root' , key_filename = ssh_keyfile )
1007
1007
sftp_client = ssh_client .open_sftp ()
1008
1008
print ('->Connecting to %s to gather Cloudera Manager DB passwords.' % cm_server )
0 commit comments