Skip to content

cleanup: Removes redundant retry decorators from exec_ssh_cmd callers#434

Open
claudiubelu wants to merge 1 commit into
cloudbase:masterfrom
claudiubelu:retry-logic
Open

cleanup: Removes redundant retry decorators from exec_ssh_cmd callers#434
claudiubelu wants to merge 1 commit into
cloudbase:masterfrom
claudiubelu:retry-logic

Conversation

@claudiubelu
Copy link
Copy Markdown
Member

exec_ssh_cmd already retries up to 5 times. Functions that also have the @retry_on_error() decorator and only call exec_ssh_cmd (or other already-retried helpers) are compounding retries to 25x or even more.

Remove the decorator from:

  • utils.py: create_service, restart_service, start_service, stop_service (all inner calls go through test_ssh_path / exec_ssh_cmd, both retried)
  • replicator.py: _copy_replicator_cmd, _exec_replicator, _setup_replicator (_setup_replicator is also wrapped externally by init_replicator, making its own decorator triply redundant)

Updates tests that used get_wrapped_function to bypass the (now removed) decorator. They now call the methods directly.

exec_ssh_cmd already retries up to 5 times. Functions that also have
the @retry_on_error() decorator and only call exec_ssh_cmd (or other
already-retried helpers) are compounding retries to 25x or even more.

Remove the decorator from:
- utils: create_service, restart_service, start_service, stop_service
  (all inner calls go through test_ssh_path / exec_ssh_cmd, both retried)
- replicator: _copy_replicator_cmd, _exec_replicator, _setup_replicator
  (_setup_replicator is also wrapped externally by init_replicator, making
  its own decorator triply redundant)

Updates tests that used get_wrapped_function to bypass the (now removed)
decorator. They now call the methods directly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant