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

Cleanup logic improvements #19829

Merged

Conversation

lpalovsky
Copy link
Contributor

@lpalovsky lpalovsky commented Jul 29, 2024

This PR adds improvements for SDAF cleanup routine:

  • snapshot based deployer VM cleanup

  • cleanup behavior at different stages of test failures

  • removing redundant cleanup code in post fail hook and standard cleanup test module

  • Related ticket: https://jira.suse.com/browse/TEAM-9459

Verification runs

Successful run:
https://openqaworker15.qa.suse.cz/tests/294657#

Failure before SDAF deployment starts:

Failure before deployer VM is created:

@lpalovsky lpalovsky self-assigned this Jul 29, 2024
@lpalovsky lpalovsky force-pushed the sdaf_deployer_vm_cleanup branch 3 times, most recently from 83f2ef2 to f59c7c0 Compare August 5, 2024 12:23
@lpalovsky lpalovsky force-pushed the sdaf_deployer_vm_cleanup branch 11 times, most recently from 003c60d to c0e2d46 Compare August 13, 2024 11:22
@@ -9,48 +9,28 @@
# Post run hooks are generally disabled during normal module run so the infrastructure persists between test modules.
# Cleanup is triggered only with B<SDAF_DO_CLEANUP> set to true, which is done by scheduling this module at the end of test flow.

use parent 'sles4sap::sap_deployment_automation_framework::basetest';
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is probably not crucial, but it might remove some unnecessary inheritance.

@lpalovsky lpalovsky force-pushed the sdaf_deployer_vm_cleanup branch 5 times, most recently from b4873c5 to 89ac82d Compare August 15, 2024 10:34
@@ -142,7 +142,7 @@ sub az_login {
assert_script_run("source $temp_file");

my $login_cmd = 'while ! az login --service-principal -u ${ARM_CLIENT_ID} -p ${ARM_CLIENT_SECRET} -t ${ARM_TENANT_ID}; do sleep 10; done';
assert_script_run($login_cmd, timeout => 5 * 60);
assert_script_run($login_cmd, timeout => 30);
Copy link
Contributor Author

@lpalovsky lpalovsky Aug 15, 2024

Choose a reason for hiding this comment

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

5*60 for login is just too much.

@lpalovsky lpalovsky marked this pull request as ready for review August 15, 2024 11:46
Copy link
Contributor

@alvarocarvajald alvarocarvajald left a comment

Choose a reason for hiding this comment

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

LGTM

@badboywj
Copy link
Contributor

LGTM, thanks

@alvarocarvajald alvarocarvajald merged commit d36b292 into os-autoinst:master Aug 20, 2024
10 checks passed
@lpalovsky lpalovsky deleted the sdaf_deployer_vm_cleanup branch August 21, 2024 06:46
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.

3 participants