Skip to content

Commit

Permalink
Fix confluentinc#339 - make available() a no-op (confluentinc#340) (c…
Browse files Browse the repository at this point in the history
…onfluentinc#343)

* dont use copy

* dont use continue

* also log scheduling errors

* small fixes

* make available() a noop in remoteaccount.py

* bump version to 0.10.1 + changelog

* style
  • Loading branch information
stan-is-hate authored and gousteris committed Aug 30, 2023
1 parent a2e66f8 commit 612ff9a
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 16 deletions.
9 changes: 9 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@
Changelog
====

0.10.1
======
- Disable health checks for nodes, effectively disabling `#325 <https://github.com/confluentinc/ducktape/pull/325>`_. See github issue for details - `#339 <https://github.com/confluentinc/ducktape/issues/339>`_

0.10.0
======
- **DO NOT USE**, this release has a nasty bug - `#339 <https://github.com/confluentinc/ducktape/issues/339>`_
- Do not schedule tests on unresponsive nodes - `#325 <https://github.com/confluentinc/ducktape/pull/325>`_

0.9.2
=====
- Service release, no ducktape changes, simply fixed readthedocs configs.
Expand Down
2 changes: 1 addition & 1 deletion ducktape/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.9.2'
__version__ = '0.10.1'
2 changes: 1 addition & 1 deletion ducktape/cluster/json.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def do_alloc(self, cluster_spec):
try:
good_nodes, bad_nodes = self._available_accounts.remove_spec(cluster_spec)
except InsufficientHealthyNodesError as e:
self._bad_accounts.add_nodes(e)
self._bad_accounts.add_nodes(e.bad_nodes)
raise e

# even in case of no exceptions, we can still run into bad nodes, so let's track them
Expand Down
18 changes: 10 additions & 8 deletions ducktape/cluster/remoteaccount.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,14 +279,16 @@ def _can_ping_url(self, url, headers):
return False

def available(self):
try:
self.ssh_client
except Exception:
return False
else:
return True
finally:
self.close()
# TODO: https://github.com/confluentinc/ducktape/issues/339
# try:
# self.ssh_client
# except Exception:
# return False
# else:
# return True
# finally:
# self.close()
return True

@check_ssh
def ssh(self, cmd, allow_fail=False):
Expand Down
14 changes: 9 additions & 5 deletions ducktape/tests/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,12 +217,16 @@ def run_all_tests(self):
# free up healthy nodes.
# However, if some nodes failed, cluster size changed too, so we need to check if
# there are any tests that can no longer be scheduled.
self._log(
logging.INFO,
f"Couldn't schedule test context {next_test_context} but we'll keep trying",
exc_info=True
)
self._check_unschedulable()
continue

# only remove the test from the scheduler when we have successfully allocated a subcluster for it
self.scheduler.remove(next_test_context)
self._run_single_test(next_test_context)
else:
# only remove the test from the scheduler once we've successfully allocated a subcluster for it
self.scheduler.remove(next_test_context)
self._run_single_test(next_test_context)

if self._expect_client_requests:
try:
Expand Down
7 changes: 6 additions & 1 deletion systests/cluster/test_debug.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"""
import time

from ducktape.mark import matrix, parametrize
from ducktape.mark import matrix, parametrize, ignore
from ducktape.mark.resource import cluster
from ducktape.tests.test import Test
from systests.cluster.test_remote_account import GenericService
Expand Down Expand Up @@ -71,6 +71,11 @@ def another_two_node_test(self):
self.service = GenericService(self.test_context, 2)
assert True

@ignore
@cluster(num_nodes=2)
def a_two_node_ignored_test(self):
assert False

@cluster(num_nodes=2)
def yet_another_two_node_test(self):
self.service = GenericService(self.test_context, 2)
Expand Down

0 comments on commit 612ff9a

Please sign in to comment.