Bug 867265 - [storage.py]Using function "cross_check_host_app" to check AppVG overlaps with HostVG failed .
[storage.py]Using function "cross_check_host_app" to check AppVG overlaps wit...
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: ovirt-node (Show other bugs)
Unspecified Unspecified
medium Severity medium
: rc
: ---
Assigned To: Fabian Deutsch
Virtualization Bugs
Depends On:
  Show dependency treegraph
Reported: 2012-10-17 03:32 EDT by haiyang,dong
Modified: 2013-02-28 11:40 EST (History)
12 users (show)

See Also:
Fixed In Version: ovirt-node-2.5.0-11.el6
Doc Type: Bug Fix
Doc Text:
Previously, the hypervisor created LVM partitions for HostVG and AppVG using the same hard disk. The cross_check_host_app function, which checks whether there was an overlap between AppVG and HostVG, was called when the partition was initialized, so it did not work. Now, the overlap between AppVG and HostVG or RootVG is checked when the actual partitioning is performed, so cross_check_host_app works as expected.
Story Points: ---
Clone Of:
Last Closed: 2013-02-28 11:40:41 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description haiyang,dong 2012-10-17 03:32:46 EDT
Description of problem: 
Using function "cross_check_host_app" to check whether AppVG overlaps with HostVG or not failed

fixed this issue with follow python code:
    def cross_check_host_app(self):
        for hdrv in self.HOSTVGDRIVE:
            if hdrv in self.APPVGDRIVE:
                # Skip disk partitioning, AppVG overlaps with HostVG
                return False
                return True

[root@localhost Desktop]# diff storage.py.Old-Version storage.py.New-Version 
<             if hdrv in self.APPDRIVE:
>             if hdrv in self.APPVGDRIVE:

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

How reproducible: 

Steps to Reproduce: 
1.boot to the kernel command line, use the following command to enable appvg, encrypt swap,
storage_init=/dev/mapper/3600*72b0;/dev/mapper/3600*72b0 storage_vol=:500::50:2048:500:600:700 swap_encrypt=Swap;Swap2 firstboot

Actual results: 
rhev-h will creating LVM partition(s) for HostVG and AppVG using the same hard disk

Expected results: 
Using function "cross_check_host_app" to check whether AppVG overlaps with HostVG or not should success.

Additional info: 
Comment 2 Fabian Deutsch 2012-10-18 09:01:57 EDT
Hey Hadong,

thanks for your patch, it's now upstream:
Comment 7 Fabian Deutsch 2012-12-05 15:37:23 EST
I've reworked the patch to address some of it's shortcomings.


Patch Set 3

The detection of overlapping is now based on sets, this should work fine.
The overlapping itself is check when the partitioning is initiated an dnot in the constructor.

Please let me know if I missed something.

Tested as follows:
1. Boot with BOOTIF=link storage_init=/dev/sda,/dev/sdb;/dev/sda storage_vol=::::::100:200
2. Fails with correct message

1. Boot with BOOTIF=link storage_init=/dev/sda;/dev/sdb storage_vol=::::::100:200
2. Succeeds
Comment 16 haiyang,dong 2012-12-19 02:52:16 EST
Test version:

Tested as follows:
1.BOOTIF=link storage_vol=::::::200:200 storage_init=/dev/sda,/dev/sdb;/dev/sda
Fails with overlap error about /dev/sda

2.BOOTIF=link storage_vol=::::::200:200 storage_init=/dev/sda;/dev/sda
Fails with overlap error about /dev/sda

3.BOOTIF=link storage_vol=::::::200:200 storage_init=/dev/sda;/dev/sdb

So crossing check between Host and AppVG successfully.
so this bug has been fixed, change the status into "VERIFIED"
Comment 18 errata-xmlrpc 2013-02-28 11:40:41 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


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