Skip to content
This repository was archived by the owner on Apr 18, 2024. It is now read-only.

Commit b5fd414

Browse files
committed
Paramiko AutoAdd Policy fix - this was erroring with:
TypeError: unbound method missing_host_key() must be called with AutoAddPolicy instance as first argument (got SSHClient instance instead)
1 parent 21ecf98 commit b5fd414

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scripts/deploy_on_oci.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ def remote_host_detection():
553553
host_fqdn_list = []
554554
host_ip_list = []
555555
ssh_client = SSHClient()
556-
ssh_client.set_missing_host_key_policy(AutoAddPolicy)
556+
ssh_client.set_missing_host_key_policy(AutoAddPolicy())
557557
ssh_client.connect(hostname=cm_server, username='opc', key_filename=ssh_keyfile)
558558
# Cloudera Manager FQDN lookup
559559
print('->Lookup Cloudera Manager FQDN')
@@ -653,7 +653,7 @@ def remote_worker_shape_detection():
653653
:return:
654654
"""
655655
ssh_client = SSHClient()
656-
ssh_client.set_missing_host_key_policy(AutoAddPolicy)
656+
ssh_client.set_missing_host_key_policy(AutoAddPolicy())
657657
ssh_client.connect(hostname=cm_server, username='opc', key_filename=ssh_keyfile)
658658
ssh_command = "ssh -oStrictHostKeyChecking=no -i /home/opc/.ssh/id_rsa opc@" + worker_hosts_contain + "-1" + \
659659
" '/usr/bin/curl -s http://169.254.169.254/opc/v1/instance/'"
@@ -1002,7 +1002,7 @@ def get_mgmt_db_passwords():
10021002
global amon_password, rman_password, navigator_password, navigator_meta_password, oozie_password, hive_meta_password
10031003
parse_ssh_key()
10041004
ssh_client = SSHClient()
1005-
ssh_client.set_missing_host_key_policy(AutoAddPolicy)
1005+
ssh_client.set_missing_host_key_policy(AutoAddPolicy())
10061006
ssh_client.connect(hostname=cm_server, username='root', key_filename=ssh_keyfile)
10071007
sftp_client = ssh_client.open_sftp()
10081008
print('->Connecting to %s to gather Cloudera Manager DB passwords.' % cm_server)

0 commit comments

Comments
 (0)