Nir Soffer has posted comments on this change. Change subject: FakeLVM: LV size is rounded to VG extent size ......................................................................
Patch Set 1: (2 comments) Change look mostly good and the new test is nice, but some other tests are broken now - probably the tests are wrong: 21:53:06 ====================================================================== 21:53:06 FAIL: test_getvsize_active_lv (domain_manifest_test.BlockManifestTests) 21:53:06 ---------------------------------------------------------------------- 21:53:06 Traceback (most recent call last): 21:53:06 File "/home/jenkins/workspace/vdsm_master_check-patch-fc23-x86_64/vdsm/tests/domain_manifest_test.py", line 101, in test_getvsize_active_lv 21:53:06 env.sd_manifest.getVSize('<imgUUID>', lv_name)) 21:53:06 AssertionError: 1048576 != 134217728 21:53:06 -------------------- >> begin captured logging << -------------------- 21:53:06 Storage.PersistentDict: DEBUG: Created a persistent dict with VGTagMetadataRW backend 21:53:06 Storage.PersistentDict: DEBUG: read lines (VGTagMetadataRW)=[] 21:53:06 Storage.PersistentDict: DEBUG: Empty metadata 21:53:06 Storage.PersistentDict: DEBUG: Starting transaction 21:53:06 Storage.PersistentDict: DEBUG: Flushing changes 21:53:06 Storage.PersistentDict: DEBUG: about to write lines (VGTagMetadataRW)=['CLASS=Data', 'POOL_UUID=3c53458c-5152-4b22-8a40-eb2379872318', 'SDUUID=37d0195a-8ba0-4611-9209-cd2f7ceeb43b', 'VERSION=3', '_SHA_CKSUM=00b21f72596e1ea8dddb088ba8249b31cf291eb8'] 21:53:06 Storage.Metadata.VGTagMetadataRW: DEBUG: Updating metadata adding=MDT_VERSION=3, MDT__SHA_CKSUM=00b21f72596e1ea8dddb088ba8249b31cf291eb8, MDT_CLASS=Data, MDT_POOL_UUID=3c53458c-5152-4b22-8a40-eb2379872318, MDT_SDUUID=37d0195a-8ba0-4611-9209-cd2f7ceeb43b removing= 21:53:06 Storage.PersistentDict: DEBUG: Finished transaction 21:53:06 --------------------- >> end captured logging << --------------------- 21:53:06 21:53:06 ====================================================================== 21:53:06 FAIL: test_getvsize_inactive_lv (domain_manifest_test.BlockManifestTests) 21:53:06 ---------------------------------------------------------------------- 21:53:06 Traceback (most recent call last): 21:53:06 File "/home/jenkins/workspace/vdsm_master_check-patch-fc23-x86_64/vdsm/tests/domain_manifest_test.py", line 109, in test_getvsize_inactive_lv 21:53:06 env.sd_manifest.getVSize('<imgUUID>', lv_name)) 21:53:06 AssertionError: 1048576 != 134217728 21:53:06 -------------------- >> begin captured logging << -------------------- 21:53:06 Storage.PersistentDict: DEBUG: Created a persistent dict with VGTagMetadataRW backend 21:53:06 Storage.PersistentDict: DEBUG: read lines (VGTagMetadataRW)=[] 21:53:06 Storage.PersistentDict: DEBUG: Empty metadata 21:53:06 Storage.PersistentDict: DEBUG: Starting transaction 21:53:06 Storage.PersistentDict: DEBUG: Flushing changes 21:53:06 Storage.PersistentDict: DEBUG: about to write lines (VGTagMetadataRW)=['CLASS=Data', 'POOL_UUID=b8b9030a-92a7-430a-ab25-0e13bd5e0d56', 'SDUUID=3ec53b2e-03f2-4906-9fa7-93180a223d49', 'VERSION=3', '_SHA_CKSUM=478265c9d92b05255ba3d5a5e3b4cf1da19cd921'] 21:53:06 Storage.Metadata.VGTagMetadataRW: DEBUG: Updating metadata adding=MDT__SHA_CKSUM=478265c9d92b05255ba3d5a5e3b4cf1da19cd921, MDT_SDUUID=3ec53b2e-03f2-4906-9fa7-93180a223d49, MDT_POOL_UUID=b8b9030a-92a7-430a-ab25-0e13bd5e0d56, MDT_CLASS=Data, MDT_VERSION=3 removing= 21:53:06 Storage.PersistentDict: DEBUG: Finished transaction 21:53:07 --------------------- >> end captured logging << --------------------- https://gerrit.ovirt.org/#/c/56714/1/tests/storagefakelib.py File tests/storagefakelib.py: Line 25: Line 26: from testlib import make_file, recorded Line 27: Line 28: from vdsm.storage import exception as se Line 29: from vdsm.utils import round Please import only modules. In this case you are shadowing python built in round, so the poor reader may think we are using builtin round. Line 30: Line 31: from storage import lvm as real_lvm Line 32: Line 33: Line 100: try: Line 101: size = int(size) << 20 Line 102: except ValueError: Line 103: raise se.CannotCreateLogicalVolume(vgName, lvName) Line 104: size = round(size, int(vg_md['extent_size'])) Why extent size is not an int? is this the same behavior of the lvm module? Line 105: Line 106: # devices is hard to emulate properly (must have a PE allocator that Line 107: # works the same as for LVM). Since we don't need this value, use None Line 108: devices = None -- To view, visit https://gerrit.ovirt.org/56714 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ifda962ff020b4b56f306f90f36c6daa9d3e5f4ad Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam Litke <ali...@redhat.com> Gerrit-Reviewer: Adam Litke <ali...@redhat.com> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer <nsof...@redhat.com> Gerrit-Reviewer: gerrit-hooks <automat...@ovirt.org> Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches