one icon indicating copy to clipboard operation
one copied to clipboard

Image in use is deleted when deleting a service template

Open OpenNebulaSupport opened this issue 4 years ago • 2 comments

Description When deleting service template and associated images to it, if the image is used by another service template is also deleted and should not.

To Reproduce

  1. clone a service where the image is not cloned as well
  • The VMs templates of both services point to the same disk image.
  1. the image of the VM must not be persistent or installed. Delete the newly created service template with select Delete with Templates and Images.

-> The image that is still referred to another template will be deleted.

Expected behavior If an image is still in use from another template, an error message should appear and the image should not be deleted.

Details

  • Affected Component: OneFlow server
  • Version: 6.0.0

Progress Status

  • [ ] Branch created
  • [ ] Code committed to development branch
  • [ ] Testing - QA
  • [ ] Documentation
  • [ ] Release notes - resolved issues, compatibility, known issues
  • [ ] Code committed to upstream release/hotfix branches
  • [ ] Documentation committed to upstream release/hotfix branches

OpenNebulaSupport avatar Apr 14 '21 15:04 OpenNebulaSupport

Same for VM templates:

  1. clone a service where the template is not cloned as well
  • The VMs templates of both services point to the same VM template.
  1. Delete the newly created service template with select Delete with Templates and Images.

-> The VM template that is still referred to another template will be deleted.

Expected:

If a VM template is still in use from another template, an error message should appear and the image should not be deleted.

OpenNebulaSupport avatar Apr 15 '21 07:04 OpenNebulaSupport

Re planing this issue for future release, as it needs core support for all the templates, not just service templates.

al3xhh avatar Apr 15 '21 11:04 al3xhh