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 926207 Details for
Bug 1128855
Take advantage of libvirt blockInfo support on root_squash NFS
[?]
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]
proposed patch to fix the issue
patch (text/plain), 2.20 KB, created by
Adam Litke
on 2014-08-12 20:32:09 UTC
(
hide
)
Description:
proposed patch to fix the issue
Filename:
MIME Type:
Creator:
Adam Litke
Created:
2014-08-12 20:32:09 UTC
Size:
2.20 KB
patch
obsolete
>commit 383d35aa5bb66f416ee601ffca6368eccbbdeea9 >Author: Adam Litke <alitke@redhat.com> >Date: Tue Aug 12 15:39:50 2014 -0400 > > virt: Use libvirt to get drive size > > Change-Id: I19b9f452bae0a1c03f2efe543a4bfa0d671e932d > Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1128855 > Signed-off-by: Adam Litke <alitke@redhat.com> > >diff --git a/vdsm/virt/vm.py b/vdsm/virt/vm.py >index dba83a7..6c812e5 100644 >--- a/vdsm/virt/vm.py >+++ b/vdsm/virt/vm.py >@@ -4287,13 +4287,18 @@ class Vm(object): > return {'status': doneCode} > > def _diskSizeExtendCow(self, drive, newSizeBytes): >- # Apparently this is what libvirt would do anyway, except that >- # it would fail on NFS when root_squash is enabled, see BZ#963881 >- # Patches have been submitted to avoid this behavior, the virtual >- # and apparent sizes will be returned by the qemu process and >- # through the libvirt blockInfo call. >- currentSize = qemuimg.info(drive.path, "qcow2")['virtualsize'] >+ def _getSize(): >+ # Due to an old bug in libvirt (BZ#963881) this call used to be >+ # broken for NFS domains when squash_root was enabled. This has >+ # been fixed since libvirt-0.10.2-29 >+ try: >+ return self._dom.blockInfo(drive.name)[0] >+ except libvirt.libvirtError: >+ self.log.exception("An error occurred while getting the " >+ "current disk size") >+ return errCode['resizeErr'] > >+ currentSize = _getSize() > if currentSize > newSizeBytes: > self.log.error( > "Requested extension size %s for disk %s is smaller " >@@ -4315,8 +4320,7 @@ class Vm(object): > return errCode['updateDevice'] > finally: > # In all cases we want to try and fix the size in the metadata. >- # Same as above, this is what libvirt would do, see BZ#963881 >- sizeRoundedBytes = qemuimg.info(drive.path, "qcow2")['virtualsize'] >+ sizeRoundedBytes = _getSize() > self.cif.irs.setVolumeSize( > drive.domainID, drive.poolID, drive.imageID, drive.volumeID, > sizeRoundedBytes)
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 1128855
: 926207