Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding signal handler module #227

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

nishith-vihar
Copy link
Contributor

Signal handler function is added for graceful exiting of
the test framework.

Fixes: #208
Signed-off-by: Nishith Vihar Sakinala nsakinal@redhat.com

@schaffung
Copy link
Member

@nishith-vihar why are we defining signal handlers in every module ?

Redant runs as a single process and signal handlers are to be defined on the process level.

@nishith-vihar
Copy link
Contributor Author

@srijan-sivakumar Ack. I think you are right . I checked it out again. I believe the signal handling has to be done in the main function of the redant alone. I will make the required changes.

core/redant_main.py Outdated Show resolved Hide resolved
core/redant_main.py Outdated Show resolved Hide resolved
core/signal_handler.py Outdated Show resolved Hide resolved
schaffung
schaffung previously approved these changes May 6, 2021
Copy link
Member

@schaffung schaffung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A crude way. But a start nonetheless. The next stage is to add cleanups in individual test cases whenever they see this exception being raised. @nishith-vihar can you verify if this exception being raised is seen by the test runs too ? If it is the case, then we can do a cleanup directly in the except block in the parent_tests, else we have to come with a signalling mechanism within the main and the child processes ( which are running the TC ).

@schaffung
Copy link
Member

@aujjwal-redhat please review the code, I've removed the merge conflicts.

aujjwal-redhat
aujjwal-redhat previously approved these changes May 6, 2021
Copy link
Collaborator

@aujjwal-redhat aujjwal-redhat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@schaffung
Copy link
Member

@nishith-vihar ...lint check..

Signal handler is added for the graceful exit of the
test framework.

Fixes: gluster#208
Signed-off-by: Nishith Vihar Sakinala <nsakinal@redhat.com>
Updates: gluster#58
Signed-off-by: Nishith Vihar Sakinala <nsakinal@redhat.com>
@nishith-vihar nishith-vihar marked this pull request as draft May 11, 2021 05:47
@schaffung schaffung self-assigned this Jul 12, 2021
@schaffung schaffung added the enhancement New feature or request label Jul 12, 2021
@schaffung schaffung dismissed stale reviews from aujjwal-redhat and themself via 04a9ee5 July 27, 2021 03:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Signal handling to exit the framework.
3 participants