Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 693064 Details for
Bug 890983
vdsm: dumpStorageTable.py exits on KeyError for buildVolumesChain
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Allow dumpStorageTable.py to work with volumes with multiple leaf volumes, eg snapshot previews
0001-BZ890983-allow-dumpStorageTable-to-handle-images-wit.patch (text/plain), 3.95 KB, created by
Mark Huth
on 2013-02-05 00:08:41 UTC
(
hide
)
Description:
Allow dumpStorageTable.py to work with volumes with multiple leaf volumes, eg snapshot previews
Filename:
MIME Type:
Creator:
Mark Huth
Created:
2013-02-05 00:08:41 UTC
Size:
3.95 KB
patch
obsolete
>From a11dc026408700bf0f971e3ebd45b5dfc1e106a8 Mon Sep 17 00:00:00 2001 >From: Mark Huth <mhuth@redhat.com> >Date: Tue, 5 Feb 2013 09:24:26 +1000 >Subject: [PATCH] BZ890983 - allow dumpStorageTable to handle images with multiple leaf volumes > >--- > vdsm/dumpStorageTable.py.in | 58 ++++++++++++++++++++++++------------------ > 1 files changed, 33 insertions(+), 25 deletions(-) > >diff --git a/vdsm/dumpStorageTable.py.in b/vdsm/dumpStorageTable.py.in >index 8b30497..243e909 100644 >--- a/vdsm/dumpStorageTable.py.in >+++ b/vdsm/dumpStorageTable.py.in >@@ -104,7 +104,8 @@ class StorageTable: > > volParents = {} > >- leafvol = '' >+ # Its possible for an image to have multiple leaf volumes, eg when previewing a snapshot >+ leafvols = [] > > for vol in volumes['uuidlist']: > res = self.serverConncetion.getVolumeInfo(sd, pool, image, vol) >@@ -113,35 +114,38 @@ class StorageTable: > self.volumesList[imageDomVol] = [] > > if res['info']['voltype'] == 'LEAF': >- leafvol = vol >+ leafvols.append(vol) > > if res['info']['voltype'] == 'SHARED': >- leafvol = vol >+ leafvols.append(vol) > self.volumesList[imageDomVol].append('Template') > >- self.imagesList[imageDom] = self._buildVolumesChain(leafvol,vollen,volParents, sd, image) >+ self.imagesList[imageDom] = self._buildVolumesChain(leafvols,vollen,volParents, sd, image) > >- def _buildVolumesChain(self, leafvol, vollen, volParents, sd, image): >+ def _buildVolumesChain(self, leafvols, vollen, volParents, sd, image): > >- volChain = vollen*[None] >+ volChain = [] >+ for leafvol in leafvols: >+ # insert an empty 'chain' to separate multiple chains (to differentiate them in the final table) >+ if volChain: volChain.insert(0,'') > >- volChain[(vollen-1)]=leafvol >- next = leafvol >- for k in range(1,(vollen+1)): >- prev = next >- next = volParents[prev] >- if next in volParents.keys(): >- volChain[(vollen-1-k)]=next >- else: >- if next == BLANK_UUID: >- app = 'Template independent' >+ volChain.insert(0,leafvol) >+ next = leafvol >+ while next in volParents.keys(): >+ prev = next >+ next = volParents[prev] >+ if next in volParents.keys(): >+ volChain.insert(0, next) > else: >- app = '%s' % (next) >+ if next == BLANK_UUID: >+ app = 'Template independent' >+ else: >+ app = '%s' % (next) > >- imageDomVol = '%s:%s:%s' % (sd, image,prev) >- templList = self.volumesList[imageDomVol] >- if len(templList) == 0: >- templList.append(app) >+ imageDomVol = '%s:%s:%s' % (sd, image,prev) >+ templList = self.volumesList[imageDomVol] >+ if len(templList) == 0: >+ templList.append(app) > > return volChain > >@@ -220,10 +224,14 @@ class StorageTable: > self.tbl['Images'].append([image]) > volsToAdd = self.imagesList[imageDom] > self.tbl['Volumes'].append(volsToAdd) >- vol = volsToAdd[0] >- domImageVol = '%s:%s:%s' % (sdUUID, image, vol) >- >- templToAdd = self.volumesList.get( domImageVol, [] ) >+ templToAdd = [] >+ for vol in volsToAdd: >+ domImageVol = '%s:%s:%s' % (sdUUID, image, vol) >+ templ = self.volumesList.get(domImageVol,[]) >+ if templ: >+ templToAdd.append(templ[0]) >+ else: >+ templToAdd.append('') > self.tbl['Template'].append(templToAdd) > row += 1 > >-- >1.7.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 890983
: 693064