]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Fix NFS volume creation
authorEric Harney <eharney@redhat.com>
Mon, 21 Jan 2013 22:57:04 +0000 (17:57 -0500)
committerEric Harney <eharney@redhat.com>
Mon, 21 Jan 2013 22:57:22 +0000 (17:57 -0500)
NfsDriver uses an undefined method _sizestr.  This patch removes it.

Change-Id: I7cd4d04f404a00c22021f3971eb9f9593c657896

cinder/volume/drivers/nfs.py

index e47c5714f776dae5ae7740b98d96d482370d96f7..e1da7963b9ae2644a6163143698bf0c557b889de 100644 (file)
@@ -148,7 +148,7 @@ class NfsDriver(driver.VolumeDriver):
 
     def _create_sparsed_file(self, path, size):
         """Creates file with 0 disk usage"""
-        self._execute('truncate', '-s', self._sizestr(size),
+        self._execute('truncate', '-s', '%sG' % size,
                       path, run_as_root=True)
 
     def _create_regular_file(self, path, size):