25657521 OpenStack Cinder NFS driver can not detect capacity info s11u3-sru 0.175.3.19.0.2.0 S11.3SRU19.2
authorsaurabh.vyas@oracle.com
Tue, 21 Mar 2017 20:35:40 -0700
branchs11u3-sru
changeset 7789 d23f3837744d
parent 7788 61e5a13d7162
child 7792 ee802f9b5132
25657521 OpenStack Cinder NFS driver can not detect capacity info
components/openstack/cinder/patches/18-nfs-du-option.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/openstack/cinder/patches/18-nfs-du-option.patch	Tue Mar 21 20:35:40 2017 -0700
@@ -0,0 +1,15 @@
+--- cinder-8.0.0/cinder/volume/drivers/nfs.py.orig	2017-03-15 04:36:02.909935308 +0000
++++ cinder-8.0.0/cinder/volume/drivers/nfs.py	2017-03-15 04:38:41.033711742 +0000
[email protected]@ -294,9 +294,10 @@
+         total_available = block_size * blocks_avail
+         total_size = block_size * blocks_total
+ 
+-        du, _ = self._execute('du', '-sb', '--apparent-size', '--exclude',
+-                              '*snapshot*', mount_point,
++        du, _ = self._execute('/usr/bin/gdu', '-sb', '--apparent-size',
++                              '--exclude', '*snapshot*', mount_point,
+                               run_as_root=run_as_root)
++
+         total_allocated = float(du.split()[0])
+         return total_size, total_available, total_allocated
+