Skip to content

Azure : Added unmanaged VHD cleanup while deleting resource group #480

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

Merged
merged 1 commit into from
Aug 13, 2019

Conversation

iamshital
Copy link
Contributor

@iamshital iamshital commented Jul 25, 2019

This PR addresses the issues of - "Unmanaged VHDs are left behind, after Resource group deletion"

Now, LISAv2 will immediately remove all unmanaged VHDs (OSDisks and DataDisks) immediately without needing to rely on external cleanup job.

@LiliDeng
Copy link
Collaborator

@iamshital Thanks for implementing this, I have a tested, seems it only delete the VM in the RG.

@juhlee-microsoft
Copy link
Contributor

@iamshital @LiliDeng @lizzha please review and sign off

@iamshital
Copy link
Contributor Author

@juhlee-microsoft , I'm blocked actually for this PR.
Azure/azure-powershell#9448
Trying to resolve the background azure authentication issue.

@iamshital
Copy link
Contributor Author

A new approach has been implemented. I've done the basic testing. It is working.
Will update here once PR is verified completely.

@iamshital iamshital force-pushed the vhd_cleanup branch 3 times, most recently from 05e7d01 to 5e6591f Compare July 31, 2019 13:31
@iamshital
Copy link
Contributor Author

Removed the DO NOT MERGE. PR is ready to review.
@juhlee-microsoft @LiliDeng @lizzha Please take a look at the implementation.
Let me know, if you have any questions, while I continue testing corner cases as well.

@juhlee-microsoft
Copy link
Contributor

PR is still under test. Will PR review with the result.


[void] RunTestCleanup() {
# Wait till all the cleanup background jobs successfully started cleanup of resource groups.
$DeleteResourceGroupJobs = Get-Job | Where-Object { $_.Name -imatch "DeleteResourceGroup" }
Copy link
Contributor

Choose a reason for hiding this comment

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

I remember we had a discussion that we don't want to wait for the jobs to complete, to save the execution time.
Can we just leave the jobs running, and don't wait for them to complete?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@lizzha , Yes I've considered this.
In case of managed disks, there will not be any jobs waiting.
In case of unmanaged disks, We wait till the VMs + Disks are deleted. After that, resource group cleanup starts, and LISAv2 continues...

If we don't wait, then job may get terminated, and VHD's will not be removed.
And, This block of code executes at the end of LISAv2 only.

Till now, I've observed that it may wait upto 2 minutes.


# Give at least 30 seconds to start all the VM cleanup operations.
# Timeout is adjusted based on number of VMs.
$MaxAttempts = 10 + $VMs.Count
Copy link
Contributor

Choose a reason for hiding this comment

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

how long does it usually take to start all the cleanup operations? We don't want it to increase the execution time too much

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It usually takes less than 15 seconds.

@LiliDeng
Copy link
Collaborator

LiliDeng commented Aug 1, 2019

Works well, segment of log from pipeline

08/01/2019 03:39:54 : [INFO ] Try to delete resource group LISAv2-OneVM-lilidel2-OF12-20190801033511...
08/01/2019 03:39:54 : [INFO ] Checking if LISAv2-OneVM-lilidel2-OF12-20190801033511 exists...
08/01/2019 03:39:55 : [INFO ] Triggering delete operation for Resource Group LISAv2-OneVM-lilidel2-OF12-20190801033511
08/01/2019 03:39:55 : [INFO ] Detected 1 unmanaged VHDs in LISAv2-OneVM-lilidel2-OF12-20190801033511
08/01/2019 03:39:56 : [INFO ] Current VM Status: Succeeded(Running). Checking again if VM cleanup is started... (Remaining attempts: 10)
08/01/2019 03:39:59 : [INFO ] Current VM Status: Succeeded(Running). Checking again if VM cleanup is started... (Remaining attempts: 9)
08/01/2019 03:40:03 : [INFO ] Current VM Status: Succeeded(Running). Checking again if VM cleanup is started... (Remaining attempts: 8)
08/01/2019 03:40:06 : [INFO ] Current VM Status: Deleting.
08/01/2019 03:40:06 : [INFO ] Successfully triggered delete operation for Resource Group LISAv2-OneVM-lilidel2-OF12-20190801033511
08/01/2019 03:40:06 : [INFO ] Successfully started clean up for RG LISAv2-OneVM-lilidel2-OF12-20190801033511..

segment of log from local

08/01/2019 04:44:45 : [INFO ] KDUMP-CRASH-SINGLE-CORE ended running with status: PASS.
08/01/2019 04:44:45 : [INFO ] Try to delete resource group LISAv2-OneVM-lili-QJ85-20190731213526...
08/01/2019 04:44:45 : [INFO ] Checking if LISAv2-OneVM-lili-QJ85-20190731213526 exists...
08/01/2019 04:44:46 : [INFO ] Triggering delete operation for Resource Group LISAv2-OneVM-lili-QJ85-20190731213526
08/01/2019 04:44:48 : [INFO ] Detected 1 unmanaged VHDs in LISAv2-OneVM-lili-QJ85-20190731213526
08/01/2019 04:44:50 : [INFO ] Current VM Status: Succeeded(Running). Checking again if VM cleanup is started... (Remaining attempts: 10)
08/01/2019 04:44:54 : [INFO ] Current VM Status: Succeeded(Running). Checking again if VM cleanup is started... (Remaining attempts: 9)
08/01/2019 04:45:03 : [INFO ] Current VM Status: Succeeded(Running). Checking again if VM cleanup is started... (Remaining attempts: 8)
08/01/2019 04:45:07 : [INFO ] Current VM Status: Deleting.
08/01/2019 04:45:09 : [INFO ] Retrying 'Remove-AzResourceGroup -ResourceGroupName LISAv2-OneVM-lili-QJ85-20190731213526'. Remaining attempts : 9
08/01/2019 04:45:14 : [INFO ] Retrying 'Remove-AzResourceGroup -ResourceGroupName LISAv2-OneVM-lili-QJ85-20190731213526'. Remaining attempts : 8
08/01/2019 04:45:19 : [INFO ] Successfully triggered delete operation for Resource Group LISAv2-OneVM-lili-QJ85-20190731213526
08/01/2019 04:45:19 : [INFO ] Successfully started clean up for RG LISAv2-OneVM-lili-QJ85-20190731213526..
08/01/2019 04:45:19 : [INFO ] DeleteResourceGroup-LISAv2-OneVM-lili-QJ85-20190731213526 background job is running. Waiting to finish...
08/01/2019 04:45:24 : [INFO ] DeleteResourceGroup-LISAv2-OneVM-lili-QJ85-20190731213526 background job is running. Waiting to finish...
08/01/2019 04:45:29 : [INFO ] DeleteResourceGroup-LISAv2-OneVM-lili-QJ85-20190731213526 background job is running. Waiting to finish...
08/01/2019 04:45:34 : [INFO ] DeleteResourceGroup-LISAv2-OneVM-lili-QJ85-20190731213526 background job is running. Waiting to finish...
08/01/2019 04:45:39 : [INFO ] DeleteResourceGroup-LISAv2-OneVM-lili-QJ85-20190731213526 background job is running. Waiting to finish...
08/01/2019 04:45:44 : [INFO ] DeleteResourceGroup-LISAv2-OneVM-lili-QJ85-20190731213526 background job is running. Waiting to finish...
08/01/2019 04:45:49 : [INFO ] DeleteResourceGroup-LISAv2-OneVM-lili-QJ85-20190731213526 background job is running. Waiting to finish...
08/01/2019 04:45:54 : [INFO ] DeleteResourceGroup-LISAv2-OneVM-lili-QJ85-20190731213526 background job is running. Waiting to finish...
08/01/2019 04:45:59 : [INFO ] Test QJ85 finished

@iamshital iamshital force-pushed the vhd_cleanup branch 2 times, most recently from 87f005c to 850d94a Compare August 5, 2019 14:28
@iamshital
Copy link
Contributor Author

Scenario 1 - Delete 2 VMs with unmanaged VHDs

08/05/2019 13:42:21 : [INFO ] VERIFY-DEPLOYMENT-PROVISION ended running with status: PASS.
08/05/2019 13:42:21 : [INFO ] Try to delete resource group LISAv2-OneVM-ERRATA-QV78-20190805063859...
08/05/2019 13:42:21 : [INFO ] Checking if LISAv2-OneVM-ERRATA-QV78-20190805063859 exists...
08/05/2019 13:42:21 : [INFO ] Triggering delete operation for Resource Group LISAv2-OneVM-ERRATA-QV78-20190805063859
08/05/2019 13:42:21 : [INFO ] Checking for any unmanaged disks in LISAv2-OneVM-ERRATA-QV78-20190805063859 ...
08/05/2019 13:42:22 : [INFO ] Detected unmanaged disks. OS Disks: 2, DataDisks: 6
08/05/2019 13:42:23 : [INFO ] Current VM Status: Succeeded(Running). Checking again if VM cleanup is started... (Remaining attempts: 13)
08/05/2019 13:42:27 : [INFO ] Current VM Status: Succeeded(Running). Checking again if VM cleanup is started... (Remaining attempts: 12)
08/05/2019 13:42:30 : [INFO ] Current VM Status: Succeeded(Running). Checking again if VM cleanup is started... (Remaining attempts: 11)
08/05/2019 13:42:35 : [INFO ] Current VM Status: Succeeded(Running). Checking again if VM cleanup is started... (Remaining attempts: 10)
08/05/2019 13:42:38 : [INFO ] Current VM Status: Deleting.
08/05/2019 13:42:39 : [INFO ] Retrying 'Remove-AzResourceGroup -ResourceGroupName LISAv2-OneVM-ERRATA-QV78-20190805063859'. Remaining attempts : 9
08/05/2019 13:42:43 : [INFO ] Successfully triggered delete operation for Resource Group LISAv2-OneVM-ERRATA-QV78-20190805063859
08/05/2019 13:42:43 : [INFO ] Successfully started clean up for RG LISAv2-OneVM-ERRATA-QV78-20190805063859..
08/05/2019 13:42:43 : [INFO ] DeleteResourceGroup-LISAv2-OneVM-ERRATA-QV78-20190805063859 background job is running. Waiting to finish...
08/05/2019 13:42:48 : [INFO ] DeleteResourceGroup-LISAv2-OneVM-ERRATA-QV78-20190805063859 background job is running. Waiting to finish...
08/05/2019 13:42:53 : [INFO ] DeleteResourceGroup-LISAv2-OneVM-ERRATA-QV78-20190805063859 background job is running. Waiting to finish...
08/05/2019 13:42:58 : [INFO ] DeleteResourceGroup-LISAv2-OneVM-ERRATA-QV78-20190805063859 background job is running. Waiting to finish...
08/05/2019 13:43:03 : [INFO ] DeleteResourceGroup-LISAv2-OneVM-ERRATA-QV78-20190805063859 background job is running. Waiting to finish...
08/05/2019 13:43:08 : [INFO ] DeleteResourceGroup-LISAv2-OneVM-ERRATA-QV78-20190805063859 background job is running. Waiting to finish...
08/05/2019 13:43:14 : [INFO ] DeleteResourceGroup-LISAv2-OneVM-ERRATA-QV78-20190805063859 background job is running. Waiting to finish...
08/05/2019 13:43:19 : [INFO ] DeleteResourceGroup-LISAv2-OneVM-ERRATA-QV78-20190805063859 background job is running. Waiting to finish...
08/05/2019 13:43:24 : [INFO ] DeleteResourceGroup-LISAv2-OneVM-ERRATA-QV78-20190805063859 background job is running. Waiting to finish...
08/05/2019 13:43:29 : [INFO ] DeleteResourceGroup-LISAv2-OneVM-ERRATA-QV78-20190805063859 background job is running. Waiting to finish...
08/05/2019 13:43:34 : [INFO ] DeleteResourceGroup-LISAv2-OneVM-ERRATA-QV78-20190805063859 background job is running. Waiting to finish...
08/05/2019 13:43:39 : [INFO ] DeleteResourceGroup-LISAv2-OneVM-ERRATA-QV78-20190805063859 background job is running. Waiting to finish...
08/05/2019 13:43:44 : [INFO ] DeleteResourceGroup-LISAv2-OneVM-ERRATA-QV78-20190805063859 background job is running. Waiting to finish...
08/05/2019 13:43:49 : [INFO ] Test QV78 finished
08/05/2019 13:43:49 : [INFO ]
[LISAv2 Test Results Summary]
Test Run On           : 08/05/2019 13:38:38
ARM Image Under Test  : RedHat : RHEL : 7-RAW : 7.6.2018103108
Initial Kernel Version: 3.10.0-957.el7.x86_64
Final Kernel Version  : 3.10.0-957.el7.x86_64
Total Test Cases      : 1 (1 Passed, 0 Failed, 0 Aborted, 0 Skipped)
Total Time (dd:hh:mm) : 0:0:5

Total VM Clenaup time : 15 seconds. (VHD cleanup continues in background after this)
Total background job time : 70 seconds.

Scenario 2 - Delete 32 VMs with unmanaged VHDs

08/05/2019 14:21:59 : [INFO ] CURRENT - PASS    - 1
08/05/2019 14:21:59 : [INFO ] CURRENT - SKIPPED - 0
08/05/2019 14:21:59 : [INFO ] CURRENT - FAIL    - 0
08/05/2019 14:21:59 : [INFO ] CURRENT - ABORTED - 0
08/05/2019 14:21:59 : [INFO ] VERIFY-DEPLOYMENT-PROVISION ended running with status: PASS.
08/05/2019 14:21:59 : [INFO ] Try to delete resource group LISAv2-OneVM-ERRATA-PC35-20190805070208...
08/05/2019 14:21:59 : [INFO ] Checking if LISAv2-OneVM-ERRATA-PC35-20190805070208 exists...
08/05/2019 14:22:00 : [INFO ] Triggering delete operation for Resource Group LISAv2-OneVM-ERRATA-PC35-20190805070208
08/05/2019 14:22:00 : [INFO ] Checking for any unmanaged disks in LISAv2-OneVM-ERRATA-PC35-20190805070208 ...
08/05/2019 14:22:01 : [INFO ] Detected unmanaged disks. OS Disks: 32, DataDisks: 96
08/05/2019 14:22:02 : [INFO ] Current VM Status: Succeeded(Running). Checking again if VM cleanup is started... (Remaining attempts: 73)
08/05/2019 14:22:06 : [INFO ] Current VM Status: Succeeded(Running). Checking again if VM cleanup is started... (Remaining attempts: 72)
08/05/2019 14:22:10 : [INFO ] Current VM Status: Succeeded(Running). Checking again if VM cleanup is started... (Remaining attempts: 71)
08/05/2019 14:22:13 : [INFO ] Current VM Status: Deleting Succeeded(Running). Checking again if VM cleanup is started... (Remaining attempts: 70)
08/05/2019 14:22:17 : [INFO ] Current VM Status: Deleting Succeeded(Running). Checking again if VM cleanup is started... (Remaining attempts: 69)
08/05/2019 14:22:21 : [INFO ] Current VM Status: Deleting Succeeded(Running). Checking again if VM cleanup is started... (Remaining attempts: 68)
08/05/2019 14:22:25 : [INFO ] Current VM Status: Deleting Succeeded(Running). Checking again if VM cleanup is started... (Remaining attempts: 67)
08/05/2019 14:22:29 : [INFO ] Current VM Status: Deleting Succeeded(Running). Checking again if VM cleanup is started... (Remaining attempts: 66)
08/05/2019 14:22:33 : [INFO ] Current VM Status: Deleting.
08/05/2019 14:22:34 : [INFO ] Retrying 'Remove-AzResourceGroup -ResourceGroupName LISAv2-OneVM-ERRATA-PC35-20190805070208'. Remaining attempts : 9
08/05/2019 14:22:38 : [INFO ] Successfully triggered delete operation for Resource Group LISAv2-OneVM-ERRATA-PC35-20190805070208
08/05/2019 14:22:38 : [INFO ] Successfully started clean up for RG LISAv2-OneVM-ERRATA-PC35-20190805070208..
08/05/2019 14:22:38 : [INFO ] DeleteResourceGroup-LISAv2-OneVM-ERRATA-PC35-20190805070208 background job is running. Waiting to finish...
08/05/2019 14:22:43 : [INFO ] DeleteResourceGroup-LISAv2-OneVM-ERRATA-PC35-20190805070208 background job is running. Waiting to finish...
08/05/2019 14:22:48 : [INFO ] DeleteResourceGroup-LISAv2-OneVM-ERRATA-PC35-20190805070208 background job is running. Waiting to finish...
08/05/2019 14:22:53 : [INFO ] DeleteResourceGroup-LISAv2-OneVM-ERRATA-PC35-20190805070208 background job is running. Waiting to finish...
08/05/2019 14:22:58 : [INFO ] DeleteResourceGroup-LISAv2-OneVM-ERRATA-PC35-20190805070208 background job is running. Waiting to finish...
08/05/2019 14:23:03 : [INFO ] DeleteResourceGroup-LISAv2-OneVM-ERRATA-PC35-20190805070208 background job is running. Waiting to finish...
08/05/2019 14:23:08 : [INFO ] DeleteResourceGroup-LISAv2-OneVM-ERRATA-PC35-20190805070208 background job is running. Waiting to finish...
08/05/2019 14:23:13 : [INFO ] DeleteResourceGroup-LISAv2-OneVM-ERRATA-PC35-20190805070208 background job is running. Waiting to finish...
08/05/2019 14:23:18 : [INFO ] DeleteResourceGroup-LISAv2-OneVM-ERRATA-PC35-20190805070208 background job is running. Waiting to finish...
08/05/2019 14:23:23 : [INFO ] DeleteResourceGroup-LISAv2-OneVM-ERRATA-PC35-20190805070208 background job is running. Waiting to finish...
08/05/2019 14:23:28 : [INFO ] DeleteResourceGroup-LISAv2-OneVM-ERRATA-PC35-20190805070208 background job is running. Waiting to finish...
08/05/2019 14:23:33 : [INFO ] DeleteResourceGroup-LISAv2-OneVM-ERRATA-PC35-20190805070208 background job is running. Waiting to finish...
08/05/2019 14:23:38 : [INFO ] DeleteResourceGroup-LISAv2-OneVM-ERRATA-PC35-20190805070208 background job is running. Waiting to finish...
08/05/2019 14:23:43 : [INFO ] DeleteResourceGroup-LISAv2-OneVM-ERRATA-PC35-20190805070208 background job is running. Waiting to finish...
08/05/2019 14:23:48 : [INFO ] DeleteResourceGroup-LISAv2-OneVM-ERRATA-PC35-20190805070208 background job is running. Waiting to finish...
08/05/2019 14:23:53 : [INFO ] DeleteResourceGroup-LISAv2-OneVM-ERRATA-PC35-20190805070208 background job is running. Waiting to finish...
08/05/2019 14:23:58 : [INFO ] DeleteResourceGroup-LISAv2-OneVM-ERRATA-PC35-20190805070208 background job is running. Waiting to finish...
08/05/2019 14:24:03 : [INFO ] DeleteResourceGroup-LISAv2-OneVM-ERRATA-PC35-20190805070208 background job is running. Waiting to finish...
08/05/2019 14:24:08 : [INFO ] DeleteResourceGroup-LISAv2-OneVM-ERRATA-PC35-20190805070208 background job is running. Waiting to finish...
08/05/2019 14:24:13 : [INFO ] DeleteResourceGroup-LISAv2-OneVM-ERRATA-PC35-20190805070208 background job is running. Waiting to finish...
08/05/2019 14:24:18 : [INFO ] DeleteResourceGroup-LISAv2-OneVM-ERRATA-PC35-20190805070208 background job is running. Waiting to finish...
08/05/2019 14:24:23 : [INFO ] DeleteResourceGroup-LISAv2-OneVM-ERRATA-PC35-20190805070208 background job is running. Waiting to finish...
08/05/2019 14:24:28 : [INFO ] DeleteResourceGroup-LISAv2-OneVM-ERRATA-PC35-20190805070208 background job is running. Waiting to finish...
08/05/2019 14:24:33 : [INFO ] DeleteResourceGroup-LISAv2-OneVM-ERRATA-PC35-20190805070208 background job is running. Waiting to finish...
08/05/2019 14:24:38 : [INFO ] DeleteResourceGroup-LISAv2-OneVM-ERRATA-PC35-20190805070208 background job is running. Waiting to finish...
08/05/2019 14:24:43 : [INFO ] DeleteResourceGroup-LISAv2-OneVM-ERRATA-PC35-20190805070208 background job is running. Waiting to finish...
08/05/2019 14:24:48 : [INFO ] DeleteResourceGroup-LISAv2-OneVM-ERRATA-PC35-20190805070208 background job is running. Waiting to finish...
08/05/2019 14:24:53 : [INFO ] DeleteResourceGroup-LISAv2-OneVM-ERRATA-PC35-20190805070208 background job is running. Waiting to finish...
08/05/2019 14:24:58 : [INFO ] DeleteResourceGroup-LISAv2-OneVM-ERRATA-PC35-20190805070208 background job is running. Waiting to finish...
08/05/2019 14:25:03 : [INFO ] DeleteResourceGroup-LISAv2-OneVM-ERRATA-PC35-20190805070208 background job is running. Waiting to finish...
08/05/2019 14:25:08 : [INFO ] DeleteResourceGroup-LISAv2-OneVM-ERRATA-PC35-20190805070208 background job is running. Waiting to finish...
08/05/2019 14:25:13 : [INFO ] Test PC35 finished
08/05/2019 14:25:13 : [INFO ]
[LISAv2 Test Results Summary]
Test Run On           : 08/05/2019 14:01:39
ARM Image Under Test  : RedHat : RHEL : 7-RAW : 7.6.2018103108
Initial Kernel Version: 3.10.0-957.el7.x86_64
Final Kernel Version  : 3.10.0-957.el7.x86_64
Total Test Cases      : 1 (1 Passed, 0 Failed, 0 Aborted, 0 Skipped)

Total VM Clenaup time : 23 seconds. (VHD cleanup continues in background after this)
Total background job time : ~150 seconds.

Scenario 3 : Delete VMs with managed disks (No change in execution time)

08/05/2019 14:22:54 : [INFO ] CURRENT - PASS    - 1
08/05/2019 14:22:54 : [INFO ] CURRENT - SKIPPED - 0
08/05/2019 14:22:54 : [INFO ] CURRENT - FAIL    - 0
08/05/2019 14:22:54 : [INFO ] CURRENT - ABORTED - 0
08/05/2019 14:22:54 : [INFO ] VERIFY-DEPLOYMENT-PROVISION ended running with status: PASS.
08/05/2019 14:22:54 : [INFO ] Try to delete resource group LISAv2-OneVM-ERRATA-QL52-20190805070729...
08/05/2019 14:22:54 : [INFO ] Checking if LISAv2-OneVM-ERRATA-QL52-20190805070729 exists...
08/05/2019 14:22:54 : [INFO ] Triggering delete operation for Resource Group LISAv2-OneVM-ERRATA-QL52-20190805070729
08/05/2019 14:22:54 : [INFO ] Checking for any unmanaged disks in LISAv2-OneVM-ERRATA-QL52-20190805070729 ...
08/05/2019 14:22:55 : [INFO ] No any unmanaged VHDs found. Proceeding resource grup cleanup.
08/05/2019 14:22:56 : [INFO ] Retrying 'Remove-AzResourceGroup -ResourceGroupName LISAv2-OneVM-ERRATA-QL52-20190805070729'. Remaining attempts : 9
08/05/2019 14:23:00 : [INFO ] Successfully triggered delete operation for Resource Group LISAv2-OneVM-ERRATA-QL52-20190805070729
08/05/2019 14:23:00 : [INFO ] Successfully started clean up for RG LISAv2-OneVM-ERRATA-QL52-20190805070729..
08/05/2019 14:23:00 : [INFO ] Test QL52 finished
08/05/2019 14:23:01 : [INFO ]
[LISAv2 Test Results Summary]
Test Run On           : 08/05/2019 14:06:12
ARM Image Under Test  : RedHat : RHEL : 7-RAW : 7.6.2018103108
Initial Kernel Version: 3.10.0-957.el7.x86_64
Final Kernel Version  : 3.10.0-957.el7.x86_64
Total Test Cases      : 1 (1 Passed, 0 Failed, 0 Aborted, 0 Skipped)

@iamshital
Copy link
Contributor Author

In recent change -

  1. Background cleanup job logs will be shown at the end of LISAv2. This is done to log all the background activities into the log files.
  2. Skipped foreground cleanup if background cleanup is started (Minor fix).

@iamshital
Copy link
Contributor Author

Logs from latest changes -

08/07/2019 12:51:04 : [INFO ] VERIFY-DEPLOYMENT-PROVISION ended running with status: PASS.
08/07/2019 12:51:04 : [INFO ] Try to delete resource group LISAv2-OneVM-ERRATA-HP41-20190807054804...
08/07/2019 12:51:04 : [INFO ] Checking if LISAv2-OneVM-ERRATA-HP41-20190807054804 exists...
08/07/2019 12:51:05 : [INFO ] Triggering delete operation for Resource Group LISAv2-OneVM-ERRATA-HP41-20190807054804
08/07/2019 12:51:05 : [INFO ] Checking for any unmanaged disks in LISAv2-OneVM-ERRATA-HP41-20190807054804 ...                                                                                   08/07/2019 12:51:05 : [INFO ] Detected unmanaged disks. OS Disks: 2, DataDisks: 6                                                                                                               08/07/2019 12:51:06 : [INFO ] Current VM Status: Succeeded(Running). Checking again if VM cleanup is started... (Remaining attempts: 13)                                                        08/07/2019 12:51:10 : [INFO ] Current VM Status: Succeeded(Running). Checking again if VM cleanup is started... (Remaining attempts: 12)                                                        08/07/2019 12:51:13 : [INFO ] Current VM Status: Succeeded(Running). Checking again if VM cleanup is started... (Remaining attempts: 11)                                                        08/07/2019 12:51:17 : [INFO ] Current VM Status: Succeeded(Running). Checking again if VM cleanup is started... (Remaining attempts: 10)                                                        08/07/2019 12:51:21 : [INFO ] Current VM Status: Deleting.                                                                                                                                      08/07/2019 12:51:21 : [INFO ] Successfully triggered delete operation for Resource Group LISAv2-OneVM-ERRATA-HP41-20190807054804                                                                08/07/2019 12:51:21 : [INFO ] Successfully started clean up for RG LISAv2-OneVM-ERRATA-HP41-20190807054804..                                                                                    08/07/2019 12:51:21 : [INFO ] DeleteResourceGroup-LISAv2-OneVM-ERRATA-HP41-20190807054804 background job is running. Waiting to finish...                                                       08/07/2019 12:51:26 : [INFO ] DeleteResourceGroup-LISAv2-OneVM-ERRATA-HP41-20190807054804 background job is running. Waiting to finish...                                                       08/07/2019 12:51:31 : [INFO ] DeleteResourceGroup-LISAv2-OneVM-ERRATA-HP41-20190807054804 background job is running. Waiting to finish...                                                       08/07/2019 12:51:36 : [INFO ] DeleteResourceGroup-LISAv2-OneVM-ERRATA-HP41-20190807054804 background job is running. Waiting to finish...                                                       08/07/2019 12:51:41 : [INFO ] DeleteResourceGroup-LISAv2-OneVM-ERRATA-HP41-20190807054804 background job is running. Waiting to finish...                                                       08/07/2019 12:51:46 : [INFO ] DeleteResourceGroup-LISAv2-OneVM-ERRATA-HP41-20190807054804 background job is running. Waiting to finish...                                                       08/07/2019 12:51:51 : [INFO ] DeleteResourceGroup-LISAv2-OneVM-ERRATA-HP41-20190807054804 background job is running. Waiting to finish...                                                       08/07/2019 12:51:56 : [INFO ] DeleteResourceGroup-LISAv2-OneVM-ERRATA-HP41-20190807054804 background job is running. Waiting to finish...                                                       08/07/2019 12:52:01 : [INFO ] DeleteResourceGroup-LISAv2-OneVM-ERRATA-HP41-20190807054804 background job is running. Waiting to finish...                                                       08/07/2019 12:52:06 : [INFO ] DeleteResourceGroup-LISAv2-OneVM-ERRATA-HP41-20190807054804 background job is running. Waiting to finish...                                                       08/07/2019 12:52:11 : [INFO ] DeleteResourceGroup-LISAv2-OneVM-ERRATA-HP41-20190807054804 background job is running. Waiting to finish...                                                       08/07/2019 12:52:16 : [INFO ] DeleteResourceGroup-LISAv2-OneVM-ERRATA-HP41-20190807054804 background job is running. Waiting to finish...                                                       08/07/2019 12:52:21 : [INFO ] DeleteResourceGroup-LISAv2-OneVM-ERRATA-HP41-20190807054804 background job is running. Waiting to finish...                                                       08/07/2019 12:52:26 : [INFO ] DeleteResourceGroup-LISAv2-OneVM-ERRATA-HP41-20190807054804 background job is running. Waiting to finish...                                                       08/07/2019 12:52:31 : [INFO ] DeleteResourceGroup-LISAv2-OneVM-ERRATA-HP41-20190807054804 background job is running. Waiting to finish...                                                       08/07/2019 12:52:36 : [INFO ] DeleteResourceGroup-LISAv2-OneVM-ERRATA-HP41-20190807054804 background job is running. Waiting to finish...                                                       08/07/2019 12:52:41 : [INFO ] DeleteResourceGroup-LISAv2-OneVM-ERRATA-HP41-20190807054804 background job is running. Waiting to finish...
08/07/2019 12:52:46 : [INFO ] DeleteResourceGroup-LISAv2-OneVM-ERRATA-HP41-20190807054804 background job is running. Waiting to finish...
08/07/2019 12:52:51 : [INFO ] DeleteResourceGroup-LISAv2-OneVM-ERRATA-HP41-20190807054804 background job is running. Waiting to finish...
08/07/2019 12:52:56 : [INFO ] DeleteResourceGroup-LISAv2-OneVM-ERRATA-HP41-20190807054804 background job is running. Waiting to finish...
08/07/2019 12:53:01 : [INFO ] *****************Background clenaup job logs*****************
08/07/2019 12:51:06 : [INFO ] Using provided secrets file: D:\GitHub\LISAv2-2\AzureSecret-637007538665116447.xml
08/07/2019 12:51:07 : [INFO ] D:\GitHub\LISAv2-2\AzureSecret-637007538665116447.xml found.
08/07/2019 12:51:07 : [INFO ] ------------------------------------------------------------------
08/07/2019 12:51:07 : [INFO ] Authenticating Azure PS session using Service Principal...
08/07/2019 12:51:11 : [INFO ] Current Subscription : 0cc2a67a-xxxx-xxxx-xxxx-bfa46a28e896.
08/07/2019 12:51:11 : [INFO ] ------------------------------------------------------------------
08/07/2019 12:51:15 : [INFO ] [Background Job] : Removing LISAv2-OneVM-ERRATA-HP41-20190807054804-role-0
08/07/2019 12:51:15 : [INFO ] [Background Job] : Removing LISAv2-OneVM-ERRATA-HP41-20190807054804-role-1
08/07/2019 12:51:17 : [INFO ] [Background Job] : Pending cleanup of 2 VMs in LISAv2-OneVM-ERRATA-HP41-20190807054804
08/07/2019 12:51:28 : [INFO ] [Background Job] : Pending cleanup of 2 VMs in LISAv2-OneVM-ERRATA-HP41-20190807054804
08/07/2019 12:51:38 : [INFO ] [Background Job] : Pending cleanup of 2 VMs in LISAv2-OneVM-ERRATA-HP41-20190807054804
08/07/2019 12:51:49 : [INFO ] [Background Job] : Pending cleanup of 2 VMs in LISAv2-OneVM-ERRATA-HP41-20190807054804
08/07/2019 12:52:00 : [INFO ] [Background Job] : Pending cleanup of 1 VMs in LISAv2-OneVM-ERRATA-HP41-20190807054804
08/07/2019 12:52:10 : [INFO ] [Background Job] : Pending cleanup of 1 VMs in LISAv2-OneVM-ERRATA-HP41-20190807054804
08/07/2019 12:52:21 : [INFO ] [Background Job] : Pending cleanup of 1 VMs in LISAv2-OneVM-ERRATA-HP41-20190807054804
08/07/2019 12:52:32 : [INFO ] [Background Job] : Pending cleanup of 1 VMs in LISAv2-OneVM-ERRATA-HP41-20190807054804
08/07/2019 12:52:42 : [INFO ] [Background Job] : Pending cleanup of 0 VMs in LISAv2-OneVM-ERRATA-HP41-20190807054804
08/07/2019 12:52:52 : [INFO ] [Background Job] : Cleaned 2 VMs in LISAv2-OneVM-ERRATA-HP41-20190807054804
08/07/2019 12:52:53 : [INFO ] [Background Job] : DeleteResourceGroup: Removing OS Disk : LISAv2-OneVM-ERRATA-HP41-20190807054804-role-0-edcrrrgiaf-osdisk.vhd
VERBOSE: Performing the operation "Remove blob and snapshots" on target "LISAv2-OneVM-ERRATA-HP41-20190807054804-role-0-edcrrrgiaf-osdisk.vhd".
VERBOSE: Removed blob 'LISAv2-OneVM-ERRATA-HP41-20190807054804-role-0-edcrrrgiaf-osdisk.vhd' in container 'vhds' successfully.
08/07/2019 12:52:53 : [INFO ] [Background Job] : DeleteResourceGroup: Removing Data Disk  : LISAv2-OneVM-ERRATA-HP41-20190807054804-role-0-edcrrrgiaf-disk-lun-0.vhd
VERBOSE: Performing the operation "Remove blob and snapshots" on target "LISAv2-OneVM-ERRATA-HP41-20190807054804-role-0-edcrrrgiaf-disk-lun-0.vhd".
VERBOSE: Removed blob 'LISAv2-OneVM-ERRATA-HP41-20190807054804-role-0-edcrrrgiaf-disk-lun-0.vhd' in container 'vhds' successfully.
08/07/2019 12:52:53 : [INFO ] [Background Job] : DeleteResourceGroup: Removing Data Disk  : LISAv2-OneVM-ERRATA-HP41-20190807054804-role-0-edcrrrgiaf-disk-lun-1.vhd
VERBOSE: Performing the operation "Remove blob and snapshots" on target "LISAv2-OneVM-ERRATA-HP41-20190807054804-role-0-edcrrrgiaf-disk-lun-1.vhd".
VERBOSE: Removed blob 'LISAv2-OneVM-ERRATA-HP41-20190807054804-role-0-edcrrrgiaf-disk-lun-1.vhd' in container 'vhds' successfully.
08/07/2019 12:52:53 : [INFO ] [Background Job] : DeleteResourceGroup: Removing Data Disk  : LISAv2-OneVM-ERRATA-HP41-20190807054804-role-0-edcrrrgiaf-disk-lun-2.vhd
VERBOSE: Performing the operation "Remove blob and snapshots" on target "LISAv2-OneVM-ERRATA-HP41-20190807054804-role-0-edcrrrgiaf-disk-lun-2.vhd".
VERBOSE: Removed blob 'LISAv2-OneVM-ERRATA-HP41-20190807054804-role-0-edcrrrgiaf-disk-lun-2.vhd' in container 'vhds' successfully.
08/07/2019 12:52:53 : [INFO ] [Background Job] : DeleteResourceGroup: Removing OS Disk : LISAv2-OneVM-ERRATA-HP41-20190807054804-role-1-edcrrrgiaf-osdisk.vhd
VERBOSE: Performing the operation "Remove blob and snapshots" on target "LISAv2-OneVM-ERRATA-HP41-20190807054804-role-1-edcrrrgiaf-osdisk.vhd".
VERBOSE: Removed blob 'LISAv2-OneVM-ERRATA-HP41-20190807054804-role-1-edcrrrgiaf-osdisk.vhd' in container 'vhds' successfully.
08/07/2019 12:52:53 : [INFO ] [Background Job] : DeleteResourceGroup: Removing Data Disk  : LISAv2-OneVM-ERRATA-HP41-20190807054804-role-1-edcrrrgiaf-disk-lun-0.vhd
VERBOSE: Performing the operation "Remove blob and snapshots" on target "LISAv2-OneVM-ERRATA-HP41-20190807054804-role-1-edcrrrgiaf-disk-lun-0.vhd".
VERBOSE: Removed blob 'LISAv2-OneVM-ERRATA-HP41-20190807054804-role-1-edcrrrgiaf-disk-lun-0.vhd' in container 'vhds' successfully.
08/07/2019 12:52:53 : [INFO ] [Background Job] : DeleteResourceGroup: Removing Data Disk  : LISAv2-OneVM-ERRATA-HP41-20190807054804-role-1-edcrrrgiaf-disk-lun-1.vhd
VERBOSE: Performing the operation "Remove blob and snapshots" on target "LISAv2-OneVM-ERRATA-HP41-20190807054804-role-1-edcrrrgiaf-disk-lun-1.vhd".
VERBOSE: Removed blob 'LISAv2-OneVM-ERRATA-HP41-20190807054804-role-1-edcrrrgiaf-disk-lun-1.vhd' in container 'vhds' successfully.
08/07/2019 12:52:54 : [INFO ] [Background Job] : DeleteResourceGroup: Removing Data Disk  : LISAv2-OneVM-ERRATA-HP41-20190807054804-role-1-edcrrrgiaf-disk-lun-2.vhd
VERBOSE: Performing the operation "Remove blob and snapshots" on target "LISAv2-OneVM-ERRATA-HP41-20190807054804-role-1-edcrrrgiaf-disk-lun-2.vhd".
VERBOSE: Removed blob 'LISAv2-OneVM-ERRATA-HP41-20190807054804-role-1-edcrrrgiaf-disk-lun-2.vhd' in container 'vhds' successfully.
08/07/2019 12:52:54 : [INFO ] [Background Job] : Removing Resource Group : LISAv2-OneVM-ERRATA-HP41-20190807054804
08/07/2019 12:52:55 : [INFO ] [Background Job] : Removing Resource Group : LISAv2-OneVM-ERRATA-HP41-20190807054804 : Deleting. Remaining attempts - 9
08/07/2019 12:53:00 : [INFO ] [Background Job] : Removing Resource Group : LISAv2-OneVM-ERRATA-HP41-20190807054804 : Deleting
08/07/2019 12:53:01 : [INFO ] *************************************************************
08/07/2019 12:53:02 : [INFO ] Test HP41 finished
08/07/2019 12:53:02 : [INFO ]
[LISAv2 Test Results Summary]
Test Run On           : 08/07/2019 12:47:39
ARM Image Under Test  : RedHat : RHEL : 7-RAW : 7.6.2018103108
Initial Kernel Version: 3.10.0-957.el7.x86_64
Final Kernel Version  : 3.10.0-957.el7.x86_64
Total Test Cases      : 1 (1 Passed, 0 Failed, 0 Aborted, 0 Skipped)

@iamshital
Copy link
Contributor Author

@juhlee-microsoft @LiliDeng Can you review and approve?

@juhlee-microsoft juhlee-microsoft merged commit 9e6ee0c into microsoft:master Aug 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants