Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1414320

Summary: oVirt reporting low disk space on template copy when there's still a plenty
Product: [oVirt] ovirt-engine Reporter: nicolas
Component: Backend.CoreAssignee: Benny Zlotnik <bzlotnik>
Status: CLOSED CURRENTRELEASE QA Contact: Elad <ebenahar>
Severity: medium Docs Contact:
Priority: high    
Version: 4.0.4.4CC: bugs, gklein, ratamir, tnisan, ylavi
Target Milestone: ovirt-4.1.1Flags: rule-engine: ovirt-4.1+
ylavi: blocker-
Target Release: 4.1.1.3   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-04-21 09:41:13 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Storage RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
ovirt-engine log none

Description nicolas 2017-01-18 09:51:05 UTC
Created attachment 1242104 [details]
ovirt-engine log

Description of problem:

We're trying to copy a template to one of our Storage Domains, which space utilization is:
Total: 500GB
Used: 384GB
Free: 115GB

Problem is when we hit the Copy button on the template's disk and select this SD as the destination, it complains about not having enough space to copy it. The template's disk is 20GB long in size.

The step that seems to fail is the validation:

2017-01-18 09:37:29,948 WARN  [org.ovirt.engine.core.bll.storage.disk.MoveOrCopyDiskCommand] (default task-186) [523db857] Validation of action 'MoveOrCopyDisk' failed for user admin@internal. Reasons: VAR__ACTION__COPY,VAR__TYPE__DISK,ACTION_TYPE_FAILED_DISK_SPACE_LOW_ON_STORAGE_DOMAIN,$storageName XXX
2017-01-18 09:37:29,948 INFO  [org.ovirt.engine.core.bll.storage.disk.MoveOrCopyDiskCommand] (default task-186) [523db857] Lock freed to object 'EngineLock:{exclusiveLocks='[8c6bb2ea-3675-4f7c-ae44-32826d1ced5f=<DISK, ACTION_TYPE_FAILED_DISK_IS_BEING_MIGRATED$DiskName ubuntu-1404_Disk1>]', sharedLocks='[8d583382-bd30-47a3-9923-e73bb8180ed6=<TEMPLATE, ACTION_TYPE_FAILED_DISK_IS_BEING_MIGRATED$DiskName ubuntu-1404_Disk1>]'}'
2017-01-18 09:37:29,977 ERROR [org.ovirt.engine.api.restapi.resource.AbstractBackendResource] (default task-186) [] Operation Failed: [Cannot copy Virtual Disk. Low disk space on Storage Domain XXX.]

The SD domain is iSCSI-based.

I'm attaching the ovirt-engine log from the moment we try to copy the template to the moment it fails.

Version-Release number of selected component (if applicable):

4.0.4.4

How reproducible:

Always

Steps to Reproduce:
1. Go to the Template tab
2. Choose one of the templates
3. Click on the Disks sub-tab and choose the disk to copy
4. Click on "Copy"
5. Select XXX as destination Storage Backend

Actual results:

An "Operation Cancelled" popup is shown with this error message:

Error while executing action: Cannot copy Virtual Disk. Low disk space on Storage Domain XXX.

Comment 1 Martin Perina 2017-01-19 00:13:27 UTC
Tal, could you please take a look?

Comment 2 nicolas 2017-01-19 14:06:41 UTC
As a side note: I can move VM's disks to DS XXX, it's only a *template* disk I cannot.

Comment 3 Raz Tamir 2017-01-26 14:23:42 UTC
Few updates:
- The issue is that the calculated space that for the copy disk on the target domain is the template disk size X the number of already existing copies.
For example:
If we have a template disk 10 GB and I copied it to 7 storage domains and now I want to copy it to 8th storage domain with 50 GB free space, the calculated size for the copy disk will be 70 GB.

Comment 4 Elad 2017-03-19 16:56:24 UTC
Copied a 10G template disk from source domain that had 36G allocated size. The template disk was already copied on 9 storage domains. The destination domain free space was 44G.

Copy disk was initiated and completed successfully.

Tested using:
rhevm-4.1.1.3-0.1.el7.noarch