redhat-developer / mapt

Multi Architecture Provisioning Tool
Apache License 2.0
9 stars 7 forks source link

Check resource vm extension for windows on azure #208

Closed adrianriobo closed 4 months ago

adrianriobo commented 5 months ago

We are spinning instances as spot, what is happening is from time to time those instances are dellocated as so they appear as stopped and when the destroy action take place it ends up failing due to:

{"level":"error","msg":"failed to destroy stack: exit status 255\ncode: 255\nstdout: Destroying (stackCreateWindowsDesktop-windows-desktop-10-22h2-ent-e2e-openshift):\n\n -  command:remote:Command awd-cmd deleting (0s) \n@ destroying....\n -  command:remote:Command awd-cmd deleted (1s) \n@ destroying....\n -  azure-native:compute:VirtualMachineExtension awd-ext deleting (0s) \n@ destroying......\n -  azure-native:compute:VirtualMachineExtension awd-ext deleting (3s) error: autorest/azure: Service returned an error. Status=\u003cnil\u003e Code=\"OperationNotAllowed\" Message=\"Cannot modify extensions in the VM when the VM is not running.\"\n -  azure-native:compute:VirtualMachineExtension awd-ext **deleting failed** error: autorest/azure: Service returned an error. Status=\u003cnil\u003e Code=\"OperationNotAllowed\" Message=\"Cannot modify extensions in the VM when the VM is not running.\

We need to do not destroy the extension on destoy (as it does not have a resource on azure). Check if this is true