-
Notifications
You must be signed in to change notification settings - Fork 243
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
env_process: Refactor {pre,post}process_vm_off_hook execution #4031
env_process: Refactor {pre,post}process_vm_off_hook execution #4031
Conversation
That would have been better if the checks passed. Sorry for the noise @pevogam, @YongxueHong. I will try fix this and get back to you again when it's done. |
Sure thing! I will take a look and come back to you. |
0c6bf53
to
469b913
Compare
Write a Setuper in charge of running the pre and post process hooks for when vms go off. Register it in env_process's _setup_manager instead of calling the hooks in-situ. Signed-off-by: Beñat Gartzia Arruabarrena <[email protected]>
469b913
to
86786d9
Compare
Okay, @pevogam @YongxueHong, sorry again for the noise. It looks that CI errors were raised due to a weird behavior in the Now the patch really looks like it's ready to be reviewed and tested. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Hi @bgartzi I tested this and it is a very harmless change. However, it raised some questions for those of us that are not fully aware of the current trends and what you are working on:
|
Hi @pevogam! Thanks for testing the patch. Glad to know it didn't cause any problem.
|
I see, I am glad this is kept in mind by you and a potential source of further migration or perhaps a bit of inspiration on the design of the current setup since post-vm-boot or pre-vm-shutdown stages are important stages of customization too.
Great, I think a lot of this would also make sense to add in a commit message at the very end of your work (if not already in the beginning) or overarching branch topic so that the rest can also understand what we gain with this. Other than that the changes look good to me. |
Sounds fair @pevogam, I will probably add a little summary in each commit I'm submitting on this regard. Thank you and @YongxueHong for the review! |
This is part of the
env_process
{pre,post}process
function refactoring. Now it was turn of the{pre,post}process_vm_off_hook
execution steps.I couldn't find any direct use-case in
avocado-vt
ortp-qemu
so I could test the patch. However, as I found in #2106 and #2134 these hooks seem to be a part of the I2N plugin.I tried to
testmock the way thei2n.cmd_parser
modifies the hooks throughi2n.plugins.auto
andi2n.plugins.manu
. I did so by adding a few lines inavocado_vt.test
that modified the values of the hooks. However, this would feel safer if you @pevogam could have a look and maybe check that it doesn't bring any unintended regression. Would you mind it?Also, I'd appreciate it if you could have a look too, @YongxueHong.
Thanks in advance!