Provisioning sanitized data with SQL Clone and Data Masker. Watch now.

Deleting clones on disconnected agents

DLyesDLyes Dunedin, New ZealandPosts: 16 Bronze 1
Hello,

What should we do if we want to delete an image but a clone exists on an location whose agent is disconnected?
E.g. if a coworker is out of the office, or their laptop has died; how can we drop the clone so we can remove the parent image?

If we try and delete a clone which is on a location which is currently offline, the dashboard perpetually has a loading wheel with the text "Deleting..." with no other options.
If we bring the location back online, I can remove it using the PowerShell cmdlets, but not the dashboard as it is still showing a "Deleting..." operation. Is this expected?

But my main question is: If we are unable to bring the clone agent back online, due to the location being permanently unavailable, do we have any way to be able to remove the image?
Tagged:

Comments

  • Unofortunately SQL Clone doesn't handle this situation well currently - it's definitely something we want to improve!

    As a workaround, for clones on machines that no longer exist, you can manually set the DeletedOn column on the Clones table in SQL Clone's database. Don't actually delete any rows from the database - this will likely cause problems in the future by breaking referential integrity.

    If you'd be willing to talk to us to help us understand how we can best solve this going forwards, that would really be helpful for us - I'll DM you an email address you can contact us on if you're interested!
    Software developer
    Redgate Software
  • DLyesDLyes Dunedin, New ZealandPosts: 16 Bronze 1
    Hi Mark R,

    I sent an email this morning with some thoughts.

    I tried the workaround today and it partially works.
    It does take the clone off the dashboard, allowing an image to be deleted.
    But sometimes the vhd file is locked by the agent, which means the image deletion sometimes doesn't work, and the other times the image does disappear from the dashboard but the vhd file still exists.

    The local system administrator can manually remove the lock and then we can clean this up, but this doesn't seem like something we can easily automate.

    Now that I know about the locks, I don't know if my suggestions in my email will actually be feasible, but I'm more than happy to discuss it further.
Sign In or Register to comment.