| Summary: | [vdsm][storage]vdsm is writing duplicated pvs (different mapoffset) in the metadata | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Moran Goldboim <mgoldboi> | ||||
| Component: | vdsm | Assignee: | Eduardo Warszawski <ewarszaw> | ||||
| Status: | CLOSED ERRATA | QA Contact: | Moran Goldboim <mgoldboi> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | medium | ||||||
| Version: | 6.2 | CC: | abaron, bazulay, danken, ewarszaw, iheim, smizrahi, ykaul | ||||
| Target Milestone: | rc | ||||||
| Target Release: | --- | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | vdsm-4.9-79 | Doc Type: | Bug Fix | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2011-12-06 07:21:05 UTC | Type: | --- | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Attachments: |
|
||||||
Reducing severity, as this behavior is not that horrible, and affects only old-style metadata. [smizrahi@smizrahi storage (next)]$ git diff
diff --git a/vdsm/storage/blockSD.py b/vdsm/storage/blockSD.py
index 956f7f9..6f68d49 100644
--- a/vdsm/storage/blockSD.py
+++ b/vdsm/storage/blockSD.py
@@ -407,10 +407,15 @@ class BlockStorageDomain(sd.StorageDomain):
mapping = {}
devNum = len(oldMapping)
for dev in pvlist:
+ knownDev = False
for pvID, oldInfo in oldMapping.iteritems():
if os.path.basename(dev) == oldInfo["guid"]:
mapping[pvID] = oldInfo
- continue
+ knownDev = True
+ break
+
+ if knownDev:
+ continue
pv = lvm.getPV(dev)
pvInfo = {}
@@ -426,9 +431,9 @@ class BlockStorageDomain(sd.StorageDomain):
else:
prevDevNum = devNum - 1
try:
- prevInfo = mapping["PV%d" % (prevDevNum)]
+ prevInfo = mapping["PV%d" % (prevDevNum,)]
except KeyError:
- prevInfo = oldMapping["PV%d" % (prevDevNum)]
+ prevInfo = oldMapping["PV%d" % (prevDevNum,)]
mapOffset = int(prevInfo["mapoffset"]) + int(prevInfo["pecount"])
I understand why the patch of comment 3 removes duplicate pv mapping, but I do not get how we had such duplication in the metadata anyway. http://gerrit.usersys.redhat.com/609 Apparently, this bug should reproduce after extending a VG with additional PVs. verified on vdsm-4.9-79.el6.x86_64 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. http://rhn.redhat.com/errata/RHEA-2011-1782.html |
Created attachment 504674 [details] vdsm log Description of problem: trying to extend an existing vg using rhevm - vdsm errored with-Storage domain is made from too many PVs. though storage domain only 4 pvs and limitation is 10. looking on metadata for this domain i have seen that same pvs exist as different pvs - the one differential is the mapoffset: PV0=pv:36006016066102900be8c283b0344e011,uuid:PeSvc3-gl85-qdo7-Gjeu-MkAV-58mG-zD7ZH2,pestart:0,pecount:1198,mapoffset:0 PV1=pv:36006016066102900be8c283b0344e011,uuid:PeSvc3-gl85-qdo7-Gjeu-MkAV-58mG-zD7ZH2,pestart:0,pecount:1198,mapoffset:1198 PV2=pv:36006016066102900361493a64a79e011,uuid:8Yqmeu-UqBz-VcoQ-6T71-xgeG-eBcH-yk3EyC,pestart:0,pecount:2399,mapoffset:2396 PV3=pv:36006016066102900351493a64a79e011,uuid:1q1i3t-8P96-0MRF-qeR2-qgub-v0yM-nz5vt6,pestart:0,pecount:2399,mapoffset:4795 PV4=pv:36006016066102900341493a64a79e011,uuid:x6plSX-cntB-ca3o-EDJM-AWEg-kWqs-pXxg5s,pestart:0,pecount:2399,mapoffset:7194 PV5=pv:36006016066102900be8c283b0344e011,uuid:PeSvc3-gl85-qdo7-Gjeu-MkAV-58mG-zD7ZH2,pestart:0,pecount:1198,mapoffset:9593 PV6=pv:36006016066102900361493a64a79e011,uuid:8Yqmeu-UqBz-VcoQ-6T71-xgeG-eBcH-yk3EyC,pestart:0,pecount:2399,mapoffset:10791 PV7=pv:36006016066102900351493a64a79e011,uuid:1q1i3t-8P96-0MRF-qeR2-qgub-v0yM-nz5vt6,pestart:0,pecount:2399,mapoffset:13190 PV8=pv:36006016066102900341493a64a79e011,uuid:x6plSX-cntB-ca3o-EDJM-AWEg-kWqs-pXxg5s,pestart:0,pecount:2399,mapoffset:15589 PV9=pv:360060160661029009a697f653b86e011,uuid:dJHdML-fpkS-22Uj-Sehf-JEJ5-1DA9-kZnlsf,pestart:0,pecount:5599,mapoffset:17988 Version-Release number of selected component (if applicable): vdsm-4.9-73.el6.x86_64 How reproducible: happened once Steps to Reproduce: 1.no clear repo yet - this vg was extended once before and with ALUA configuration. 2. 3. Actual results: Expected results: Additional info: Thread-40650::ERROR::2011-06-14 16:16:46,367::dispatcher::103::Storage.Dispatcher.Protect::(run) {'status': {'message': 'Storage domain is made from too many PVs: ()', 'code': 388}, 'args': [()]}