Skip to content

Commit

Permalink
Revert "ccmlib: stop passing auto_bootstrap"
Browse files Browse the repository at this point in the history
  • Loading branch information
tchaikov authored and fruch committed Jan 13, 2024
1 parent 72f960f commit 1176d54
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
10 changes: 5 additions & 5 deletions ccmlib/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,7 @@ def __init__(self, name, cluster, auto_bootstrap, thrift_interface, storage_inte
self.name = name
self.cluster = cluster
self.status = Status.UNINITIALIZED
# auto_bootstrap is deprecated
_ = auto_bootstrap
self.auto_bootstrap = auto_bootstrap
self.network_interfaces = {'thrift': common.normalize_interface(thrift_interface),
'storage': common.normalize_interface(storage_interface),
'binary': common.normalize_interface(binary_interface)}
Expand Down Expand Up @@ -151,9 +150,7 @@ def load(path, name, cluster):
binary_interface = None
if 'binary' in itf and itf['binary'] is not None:
binary_interface = tuple(itf['binary'])
# auto_bootstrap is deprecated
auto_bootstrap = True
node = cluster.create_node(data['name'], auto_bootstrap, tuple(itf['thrift']), tuple(itf['storage']), data[
node = cluster.create_node(data['name'], data['auto_bootstrap'], tuple(itf['thrift']), tuple(itf['storage']), data[
'jmx_port'], remote_debug_port, initial_token, save=False, binary_interface=binary_interface)
node.status = data['status']
if 'pid' in data:
Expand Down Expand Up @@ -304,6 +301,7 @@ def show(self, only_status=False, show_cluster=True):
if not only_status:
if show_cluster:
print(f"{indent}{'cluster'}={self.cluster.name}")
print(f"{indent}{'auto_bootstrap'}={self.auto_bootstrap}")
print(f"{indent}{'thrift'}={self.network_interfaces['thrift']}")
if self.network_interfaces['binary'] is not None:
print(f"{indent}{'binary'}={self.network_interfaces['binary']}")
Expand Down Expand Up @@ -1621,6 +1619,7 @@ def _update_config(self):
values = {
'name': self.name,
'status': self.status,
'auto_bootstrap': self.auto_bootstrap,
'interfaces': self.network_interfaces,
'jmx_port': self.jmx_port,
'config_options': self.__config_options,
Expand Down Expand Up @@ -1649,6 +1648,7 @@ def __update_yaml(self):
yaml_text = f.read()

data['cluster_name'] = self.cluster.name
data['auto_bootstrap'] = self.auto_bootstrap
data['initial_token'] = self.initial_token
if not self.cluster.use_vnodes and self.get_base_cassandra_version() >= 1.2:
data['num_tokens'] = 1
Expand Down
2 changes: 2 additions & 0 deletions ccmlib/scylla_docker_cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ def show(self, only_status=False, show_cluster=True):
if not only_status:
if show_cluster:
print(f"{indent}{'cluster'}={self.cluster.name}")
print(f"{indent}{'auto_bootstrap'}={self.auto_bootstrap}")
print(f"{indent}{'thrift'}={self.network_interfaces['thrift']}")
if self.network_interfaces['binary'] is not None:
print(f"{indent}{'binary'}={self.network_interfaces['binary']}")
Expand All @@ -268,6 +269,7 @@ def _update_config(self):
values = {
'name': self.name,
'status': self.status,
'auto_bootstrap': self.auto_bootstrap,
'interfaces': self.network_interfaces,
'jmx_port': self.jmx_port,
'docker_id': docker_id,
Expand Down
1 change: 1 addition & 0 deletions ccmlib/scylla_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -1106,6 +1106,7 @@ def update_yaml(self):
data = yaml.safe_load(f)

data['cluster_name'] = self.cluster.name
data['auto_bootstrap'] = self.auto_bootstrap
data['initial_token'] = self.initial_token
if (not self.cluster.use_vnodes and
self.get_base_cassandra_version() >= 1.2):
Expand Down

0 comments on commit 1176d54

Please sign in to comment.