Skip to content

teuthology/misc: Add timeout parameter to stop_daemons_of_type for better flexibility - #2014

Merged
zmc merged 1 commit into
mainfrom
wip-nitzan-add-timout-param-stop-type
Jan 27, 2025
Merged

zmc merged 1 commit into
mainfrom
wip-nitzan-add-timout-param-stop-type

Conversation

@NitzanMordhai

Copy link
Copy Markdown
Contributor

Updated stop_daemons_of_type to accept a timeout parameter, allowing dynamic control over the timeout value passed to the stop function of each daemon.

…tter flexibility

Updated stop_daemons_of_type to accept a timeout parameter,
allowing dynamic control over the timeout value passed to the
stop function of each daemon.

Signed-off-by: Nitzan Mordechai <[email protected]>
@kshtsk

kshtsk commented Jan 7, 2025

Copy link
Copy Markdown
Contributor

Is this tested already?

@NitzanMordhai

Copy link
Copy Markdown
Contributor Author

Is this tested already?

i ran few test using my PR issue. didn't riched to timeout, but the param was passed

@VallariAg

Copy link
Copy Markdown
Member

@NitzanMordhai the timeout didn't work even though the param was passed?
I'm not sure if timeouts are actually used in all kinds of daemon's stop() method:
It's used here:

def stop(self, timeout=300):

But I don't see it being used in these overrides of systemd and cephadm daemons:
def stop(self, timeout=300):

def stop(self, timeout=300):

@NitzanMordhai

Copy link
Copy Markdown
Contributor Author

@NitzanMordhai the timeout didn't work even though the param was passed?
I'm not sure if timeouts are actually used in all kinds of daemon's stop() method:
It's used here:

that's the purpose of that PR, to add the timeout so we can use it and not use the default

@VallariAg

Copy link
Copy Markdown
Member

@NitzanMordhai This PR relies on passing timeout to daemon.stop(timeout). But I'm not sure if this stop method actually uses the timeout param (depending on daemon type).

@NitzanMordhai

Copy link
Copy Markdown
Contributor Author

it will be pass to teuthology/orchestra/daemon/state.py
that will wait until the daemon stops (or timeout)

@VallariAg

Copy link
Copy Markdown
Member

Great, it should work well then!

@rzarzynski

Copy link
Copy Markdown
Contributor

@VallariAg, @NitzanMordhai: is this ready to merge? If it is, let's not hesitate and unblock the PR in ceph.

@zmc

zmc commented Jan 14, 2025

Copy link
Copy Markdown
Member

Is it the case that we don't want or don't care about timeouts in CephadmUnit or SystemDState? Those classes' stop methods do in fact ignore the timeout kwarg, even though they accept it.

@NitzanMordhai

Copy link
Copy Markdown
Contributor Author

@VallariAg, @NitzanMordhai: is this ready to merge? If it is, let's not hesitate and unblock the PR in ceph.

yes, it is ready

@NitzanMordhai

Copy link
Copy Markdown
Contributor Author

Is it the case that we don't want or don't care about timeouts in CephadmUnit or SystemDState? Those classes' stop methods do in fact ignore the timeout kwarg, even though they accept it.

@zmc It's more for a daemon/state, where we don't pass any timeout and we do care about it. this is just a parameter reveal, that was coded. but never pass along the tests

@VallariAg

Copy link
Copy Markdown
Member

This PR should solve for daemon/state.py type daemons created in tasks/ceph.py so seems good to merge this PR to unblock the linked ceph PR.

@NitzanMordhai

Copy link
Copy Markdown
Contributor Author

@zmc any other thoughts? can we merge it so ceph/ceph#61021 test can start?

@zmc
zmc merged commit 38911de into main Jan 27, 2025
@zmc
zmc deleted the wip-nitzan-add-timout-param-stop-type branch January 27, 2025 18:52
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.

5 participants