Bug 1393458 - Error in slot allocation when adding a new disk volume
Summary: Error in slot allocation when adding a new disk volume
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: vdsm
Version: 4.0.3
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: ovirt-4.1.0-alpha
: ---
Assignee: Nir Soffer
QA Contact: Natalie Gavrielov
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-09 15:25 UTC by nijin ashok
Modified: 2017-04-25 01:07 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
oVirt Team: Storage
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2017:0998 0 normal SHIPPED_LIVE VDSM bug fix and enhancement update 4.1 GA 2017-04-18 20:11:39 UTC
oVirt gerrit 65649 0 None None None 2016-11-09 16:28:41 UTC

Description nijin ashok 2016-11-09 15:25:56 UTC
Description of problem:

As per the size of the leases lv, we should be having 2048 leases in each storage domain. While considering the reserved slots, we can have a maximum of 1948 slots that can be used by the disk images. However if there is only one slot vacant between two occupied slot, this will not be considered.

        for offset, size in occupiedSlots:
            if offset - freeSlot > slotSize:
                break

            freeSlot = offset + size

        self.log.debug("Found freeSlot %s in VG %s", freeSlot, self.sdUUID)
        return freeSlot


For example if I have 4,5,6,8,9 acquired , it will return 10 as freeslot and not 7. If it's 4,5,6,9, this will return 7. 

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

vdsm-4.18.13-1.el7ev.x86_64

How reproducible:

100%

Steps to Reproduce:

1. Check the metadata slot mapping using:

$ lvs -o tags vgname | grep MD_
MD_4
MD_5
MD_6

2. Delete the disk using slot 5 (MD_5):

Verify that the MD_5 is not used:

$ lvs -o tags vgname | grep MD_
MD_4
MD_6

3. Create new disk

Verify that slot 6 is used by the new disk

$ lvs -o tags vgname | grep MD_
MD_4
MD_5
MD_6



Actual results:

All slots are not considered while adding a new disk volume

Expected results:

All slots should be considered.

Additional info:

Comment 1 Allon Mureinik 2016-11-09 15:47:25 UTC
Nir, IIUC, https://gerrit.ovirt.org/#/c/65649/ should fix this. Can you confirm/refute?

Comment 2 Nir Soffer 2016-11-09 16:26:29 UTC
(In reply to Allon Mureinik from comment #1)
> Nir, IIUC, https://gerrit.ovirt.org/#/c/65649/ should fix this. Can you
> confirm/refute?

Yes, I asked nijin to open separate bug for this issue.

Comment 4 Natalie Gavrielov 2017-02-05 11:56:39 UTC
Performed scenario described in comment 0.

Verified, using builds:
vdsm-4.19.4-1.el7ev.x86_64
ovirt-engine-4.1.0.3-0.1.el7.noarch


Note You need to log in before you can comment on or make changes to this bug.