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

Unable to delete a Guacamole User Resource if it is in the 'stopped' state #4135

Open
dram1964 opened this issue Nov 13, 2024 · 3 comments
Open
Labels
bug Something isn't working

Comments

@dram1964
Copy link

Deleting a VM from the Guacamole service fails if the VM is in a stopped state

Attempting to delete a 'Stopped' VM, results in a 'deleting_failed' status and displays the following error:

compute.VirtualMachinesClient#
PowerOff: Failure sending request: StatusCode=0 -- 
Original Error: autorest/azure: Service returned an error. 
Status=<nil> 
Code="OperationNotAllowed" 
Message="Operation 'powerOff' is not allowed on VM 'linuxvm4fae' since the VM is either deallocated or marked to be deallocated.

Seems that the deletion request fails because it is trying to stop the VM, when it is already stopped. If I 'Enable' the resource, 'Start' it, then 'Disable' it, the resource can be deleted successfully.

Steps to reproduce

  1. Login to the TRE UI (as TRE Administrator)
  2. Connect to a Workspace
  3. Connect to the Virtual Desktops (Guacamole) service
  4. Select 'Actions > Stop' from either a linux or windows VM
  5. Select 'Disable' for the same resource
  6. Select 'Delete' for the same resource

Although I'm currently seeing this error from a Custom Workspace and a Custom Guacamole User-Resource, I did also encounter this problem when using the tre-base-workspace (1.5.7) and the tre-service-guacamole-linuxvm (1.0.3)

Azure TRE release version (e.g. v0.19.1):

Deployed Azure TRE components: tre-service-guacamole (0.10.9), tre-service-guacamole-linuxvm (1.0.3)

@dram1964 dram1964 added the bug Something isn't working label Nov 13, 2024
@tim-allen-ck
Copy link
Collaborator

Hi @dram1964 sounds like there's a logic error in the code for this, its been added to the backlog to look into a fix

@marrobi
Copy link
Member

marrobi commented Nov 15, 2024

Think it's worth validating this via the API first, then the UI.

It could be the UI has an issue, as I don't think "Delete" which triggers uninstall attempts a stop. I might be incorrect.

@marrobi
Copy link
Member

marrobi commented Dec 5, 2024

The manual workaround would be to delete the resource from cosmos and from Azure, but hope we can find a better solution and fix the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Development

No branches or pull requests

3 participants