Skip to content

Commit

Permalink
Get machine type when create json cluster
Browse files Browse the repository at this point in the history
  • Loading branch information
whynick1 committed Aug 31, 2019
1 parent 5231b40 commit bac997c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
8 changes: 2 additions & 6 deletions ducktape/cluster/json.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,8 @@ def __init__(self, cluster_json=None, *args, **kwargs):
"Cluster json has a node without a ssh_config field: %s\n Cluster json: %s" % (ninfo, cluster_json)

ssh_config = RemoteAccountSSHConfig(**ninfo.get("ssh_config", {}))
remote_account = JsonCluster.make_remote_account(ssh_config, ninfo.get("externally_routable_ip"))
if remote_account.externally_routable_ip is None:
remote_account.externally_routable_ip = self._externally_routable_ip(remote_account)
externally_routable_ip = ninfo.get("externally_routable_ip", "NOT_FOUND")
remote_account = JsonCluster.make_remote_account(ssh_config, externally_routable_ip)
self._available_accounts.add_node(remote_account)
except BaseException as e:
msg = "JSON cluster definition invalid: %s: %s" % (e, traceback.format_exc(limit=16))
Expand Down Expand Up @@ -124,9 +123,6 @@ def free_single(self, node):
self._available_accounts.add_node(node.account)
node.account.close()

def _externally_routable_ip(self, account):
return None

def available(self):
return ClusterSpec.from_nodes(self._available_accounts)

Expand Down
4 changes: 2 additions & 2 deletions ducktape/services/background_thread.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@

class BackgroundThreadService(Service):

def __init__(self, context, num_nodes):
super(BackgroundThreadService, self).__init__(context, num_nodes)
def __init__(self, context, num_nodes=None, cluster_spec=None):
super(BackgroundThreadService, self).__init__(context, num_nodes, cluster_spec)
self.worker_threads = {}
self.worker_errors = {}
self.errors = ''
Expand Down

0 comments on commit bac997c

Please sign in to comment.