Change in vdsm[master]: tests: FakeLVM: Always create lv file

nsoffer at redhat.com nsoffer at redhat.com
Fri Apr 15 20:45:00 UTC 2016


Nir Soffer has posted comments on this change.

Change subject: tests: FakeLVM: Always create lv file
......................................................................


Patch Set 1: Code-Review-1

(1 comment)

https://gerrit.ovirt.org/#/c/56169/1/tests/storagefakelib.py
File tests/storagefakelib.py:

Line 133:         self.lvmd[(vgName, lvName)] = lv_md
Line 134:         self.vgmd[vgName]['lv_count'] = str(lv_count)
Line 135: 
Line 136:         # Create a regular file so we have a place to write data
Line 137:         make_file(self.lvPath(vgName, lvName), int(size))
We should created this file only if the lv is active, simulating the behavior of the real lv.

Since we must have a place to keep the lv data, I suggest to create the lv in FAKE_ROOT/dev/vgname/lvname.inactive

We can rename the file to lvname when activating the lv, and rename it back to lvname.inactive when deactivating the lv.

Or, another solution, create the real file at:

FAKE_ROOT/dev/dm-vgname-lvname

And add/delete a symlink to that file when activating or deactivating the lv.
Line 138: 
Line 139:     def activateLVs(self, vgName, lvNames):
Line 140:         for lv in lvNames:
Line 141:             try:


-- 
To view, visit https://gerrit.ovirt.org/56169
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ia364588a9fbe3a987b9117522db025e92c8ed296
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list