You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Disallow or block Backup deletion if create Instance from Backup is in progress #11356
Create Instance from Backup feature added in #10140 .
Backup can be deleted after starting the Create Instance from Backup process which fails after some time saying backup doesn't exist.
versions
ACS 4.21.0
The steps to reproduce the bug
Start "Create Instance from Backup"
Delete the Backup used
Create Instance from Backup fails with error.
...
What to do about it?
Backup deletion should either be disallowed or queued until Create Instance from Backup is finished.
@DaanHoogland Once a command reaches the agent, it is queued. In case of restore the restoreCommand is sent very quickly to the agent without much preprocessing.
In case of create Instance from backup, a new instance is first created, then a command is sent to the agent. So until the command is sent, backup can be deleted.
The window is there for restore also but very small. The user has to give the delete command within seconds of the restore command. In case of a race, if backup deletion reaches the agent before restore, restore will eventually fail saying backup deleted.
I don't think we can control the command execution at this granularity (can we?). Similar issue can be with any command which is updating a resource and another command which is deleting the same resource are executed out of order. Then update will throw some error.
As long as the restore can fail gracefully (or the delete) I guess it is fine. Can the delete happen while the restore is busy? As long as the only destructive action is the user initiated delete, there is nothing to do further. (i.e. the delete must not influence any ongoing restore or install from backup)
@DaanHoogland@abh1sar Reproduced the issue. Started "Create Instance from Backup" and deleted it right after. The create job failed with "Backup 1 does not exist". From the MS logs:
Complete async job-202, jobStatus: FAILED, resultCode: 530, result: "Backup 1 does not exist"
@abh1sar@DaanHoogland Looks like, CloudStack already blocks destructive operations during a runing job (e.g. VM destroy/migration/reinstall, all are blocked during volume snapshots: UserVmManagerImpl.java:3540, 7327, 8796, 9882).
Will follow the same approach for backups too for consistency reasons.
Activity
DaanHoogland commentedon Aug 6, 2025
@abh1sar , is this already in place for during a restore?
abh1sar commentedon Aug 6, 2025
@DaanHoogland Once a command reaches the agent, it is queued. In case of restore the restoreCommand is sent very quickly to the agent without much preprocessing.
In case of create Instance from backup, a new instance is first created, then a command is sent to the agent. So until the command is sent, backup can be deleted.
DaanHoogland commentedon Aug 6, 2025
sorry to be nitpicking, but “very quickly” is not “instantly” ? just want to prevent possible issues.
abh1sar commentedon Aug 7, 2025
The window is there for restore also but very small. The user has to give the delete command within seconds of the restore command. In case of a race, if backup deletion reaches the agent before restore, restore will eventually fail saying backup deleted.
I don't think we can control the command execution at this granularity (can we?). Similar issue can be with any command which is updating a resource and another command which is deleting the same resource are executed out of order. Then update will throw some error.
DaanHoogland commentedon Aug 7, 2025
As long as the restore can fail gracefully (or the delete) I guess it is fine. Can the delete happen while the restore is busy? As long as the only destructive action is the user initiated delete, there is nothing to do further. (i.e. the delete must not influence any ongoing restore or install from backup)
Damans227 commentedon Mar 10, 2026
@DaanHoogland @abh1sar Reproduced the issue. Started "Create Instance from Backup" and deleted it right after. The create job failed with "Backup 1 does not exist". From the MS logs:
Complete async job-202, jobStatus: FAILED, resultCode: 530, result: "Backup 1 does not exist"Will work on a fix.
Damans227 commentedon Mar 10, 2026
@abh1sar @DaanHoogland Looks like, CloudStack already blocks destructive operations during a runing job (e.g. VM destroy/migration/reinstall, all are blocked during volume snapshots: UserVmManagerImpl.java:3540, 7327, 8796, 9882).
Will follow the same approach for backups too for consistency reasons.
sureshanaparti commentedon Apr 9, 2026
Fixed in #12792