Spaceman1984 commented on issue #4292:
URL: https://github.com/apache/cloudstack/issues/4292#issuecomment-703515148
I found the code where the problem is in VmwareResource.java.
```
public Answer execute(DestroyCommand cmd) { ...
if (vmMo != null && vmMo.isTemplate()) {
if (s_logger.isInfoEnabled()) {
s_logger.info("Destroy template volume " + vol.getPath());
}
vmMo.destroy();
} else {
if (s_logger.isInfoEnabled()) {
s_logger.info("Template volume " + vol.getPath() + " is not
found, no need to delete.");
}
}
```
Volumes will never be deleted by looking at this. (`if (vmMo != null &&
vmMo.isTemplate()) {`)
The specific line of code was added with this issue
https://issues.apache.org/jira/browse/CLOUDSTACK-8405
I will have to run through this issue to fix it correctly I think the logic
for deciding whether to delete a volume or template should be in a different
place and not here.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]