-
Notifications
You must be signed in to change notification settings - Fork 95
VHD Migrations Fixes - VHD Acceptance Tests, and Disk Revoke Access on Failures #534
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
Conversation
…led on failures, clarify VHD requirements in v2.5.0
| } | ||
|
|
||
| func (*StepCaptureImage) Cleanup(multistep.StateBag) { | ||
| func (s *StepCaptureImage) Cleanup(state multistep.StateBag) { |
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.
Without this change, when control + cing mid copy (a common thing users may do as the copy action takes a long time, and is prone to fail from time to time)
Cancelling build after receiving interrupt
==> azure-arm: failed to capture OS Disk with err : failed to copy to storage with err : error copying: waiting for file to copy: context canceled
==> azure-arm: Provisioning step had errors: Running the cleanup provisioner, if present...
==> azure-arm:
==> azure-arm: Deleting Virtual Machine deployment and its attached resources...
==> azure-arm: Deleted -> Microsoft.Compute/virtualMachines : 'pkrvmblsda6b8r9'
==> azure-arm: Deleted -> Microsoft.Network/networkInterfaces : 'pkrniblsda6b8r9'
==> azure-arm: Deleted -> Microsoft.Network/virtualNetworks : 'pkrvnblsda6b8r9'
==> azure-arm: Deleted -> Microsoft.Network/publicIPAddresses : 'pkripblsda6b8r9'
==> azure-arm: Deleted -> Microsoft.Network/networkSecurityGroups : 'pkrsgblsda6b8r9'
==> azure-arm: Error deleting resource. Please delete manually.
==> azure-arm:
==> azure-arm: Name: /subscriptions/4712c895-8c02-49ab-b48c-9a3396eb6a78/resourceGroups/pkr-Resource-Group-blsda6b8r9/providers/Microsoft.Compute/disks/pkrosblsda6b8r9
==> azure-arm: Error: performing Delete: unexpected status 409 (409 Conflict) with error: OperationNotAllowed: There is an active shared access signature outstanding for disk pkrosblsda6b8r9. Call EndGetAccess before attaching or deleting the disk. Learn more here: aka.ms/revokeaccessapi.
==> azure-arm: performing Delete: unexpected status 409 (409 Conflict) with error: OperationNotAllowed: There is an active shared access signature outstanding for disk pkrosblsda6b8r9. Call EndGetAccess before attaching or deleting the disk. Learn more here: aka.ms/revokeaccessapi.
==> azure-arm: Removing the created Deployment object: 'pkrdpblsda6b8r9'
==> azure-arm:
==> azure-arm: Deleting KeyVault created during build
==> azure-arm: Deleted -> Microsoft.KeyVault/vaults : 'pkrkvblsda6b8r9'
==> azure-arm: Removing the created Deployment object: 'kvpkrdpblsda6b8r9'
==> azure-arm:
==> azure-arm: Cleanup requested, deleting resource group ...
And then the resource group does not delete.
vs after:
Cancelling build after receiving interrupt
==> azure-arm: failed to capture OS Disk with err : failed to copy to storage with err : error copying: waiting for file to copy: context canceled
==> azure-arm: Revoking access ...
==> azure-arm: Provisioning step had errors: Running the cleanup provisioner, if present...
==> azure-arm:
==> azure-arm: Deleting Virtual Machine deployment and its attached resources...
==> azure-arm: Deleted -> Microsoft.Compute/virtualMachines : 'pkrvmuyw5ff2drx'
==> azure-arm: Deleted -> Microsoft.Network/networkInterfaces : 'pkrniuyw5ff2drx'
==> azure-arm: Deleted -> Microsoft.Network/virtualNetworks : 'pkrvnuyw5ff2drx'
==> azure-arm: Deleted -> Microsoft.Network/publicIPAddresses : 'pkripuyw5ff2drx'
==> azure-arm: Deleted -> Microsoft.Network/networkSecurityGroups : 'pkrsguyw5ff2drx'
==> azure-arm: Deleted -> Microsoft.Compute/disks : '/subscriptions/4712c895-8c02-49ab-b48c-9a3396eb6a78/resourceGroups/pkr-Resource-Group-uyw5ff2drx/providers/Microsoft.Compute/disks/pkrosuyw5ff2drx'
==> azure-arm: Removing the created Deployment object: 'pkrdpuyw5ff2drx'
==> azure-arm:
==> azure-arm: Deleting KeyVault created during build
==> azure-arm: Deleted -> Microsoft.KeyVault/vaults : 'pkrkvuyw5ff2drx'
==> azure-arm: Removing the created Deployment object: 'kvpkrdpuyw5ff2drx'
==> azure-arm:
==> azure-arm: Cleanup requested, deleting resource group ...
==> azure-arm: Resource group has been deleted.
Build 'azure-arm' errored after 3 minutes 55 seconds: failed to capture OS Disk with err : failed to copy to storage with err : error copying: waiting for file to copy: context canceled
tanmay-hc
left a comment
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.
Hi Jenna,
Thanks for fixing this. The changes looks good to me.
Also tried the acceptance tests and they are working now.
This PR contains 2 main changes