
Liron Aravot has submitted this change and it was merged. Change subject: core: RemoveVmTemplateFromImportExport - ctor exception ...................................................................... core: RemoveVmTemplateFromImportExport - ctor exception This patch fixes two issues: 1. When executing RemoveVmTemplate during the ctor run the template is queried and is used to set the storage pool id. When removing a template from an export domain this operation will cause to exception as the template info is queried from the export domain and the backend object used to run vds command isn't injected yet. As the pool info is available to us there's no need to query the template on that phase when removing a template from an export domain. 2. It's being inspected whether the template contains cinder disks and if it is the command uses a callback. When a template with cinder disks is exported to an export domain and exists on the engine as well, a callback will be returned mistakenly because the one persisted on the engine db will be checked for the existense of cinder disks. This patches exports the logic from the ctor to the init() method and overrides it in the RemoveVmTemplateFromImportExport command to solve those two issues. Change-Id: I3a7f8958fba2aa28b23682e3252ba4766523f6f4 Signed-off-by: Liron Aravot <laravot@redhat.com> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveVmTemplateCommand.java M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/export/RemoveVmTemplateFromImportExportCommand.java 2 files changed, 11 insertions(+), 3 deletions(-) Approvals: Jenkins CI: Passed CI tests Liron Aravot: Verified; Looks good to me, approved -- To view, visit https://gerrit.ovirt.org/51268 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I3a7f8958fba2aa28b23682e3252ba4766523f6f4 Gerrit-PatchSet: 4 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Liron Aravot <laravot@redhat.com> Gerrit-Reviewer: Daniel Erez <derez@redhat.com> Gerrit-Reviewer: Freddy Rolland <frolland@redhat.com> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Liron Aravot <laravot@redhat.com> Gerrit-Reviewer: Maor Lipchuk <mlipchuk@redhat.com> Gerrit-Reviewer: gerrit-hooks <automation@ovirt.org>