diff options
| author | Kotresh HR <khiremat@redhat.com> | 2015-03-18 10:37:00 +0530 | 
|---|---|---|
| committer | Venky Shankar <vshankar@redhat.com> | 2015-03-20 10:27:05 -0700 | 
| commit | 8aa13c8e285ad496ed7c8511ae0b735eed73ebd4 (patch) | |
| tree | 6c6045359d01f98e301fe9988a691333bf568a5f /geo-replication | |
| parent | 24e01e407a04db4983e45fc5338e4a732df7da28 (diff) | |
geo-rep/gverify: Ignore .trashcan while checking slave is empty.
With trash translator, '.trashcan' is created in gluster volume
during init. So geo-rep create used to fail, with slave not
being empty. The gverify script should ignore '.trashcan' while
checking whether slave is empty.
Change-Id: Ib7ee265c6aa99b63c7ccf103747d47a6f756ad35
BUG: 1203086
Signed-off-by: Kotresh HR <khiremat@redhat.com>
Reviewed-on: http://review.gluster.org/9921
Reviewed-by: Aravinda VK <avishwan@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
Tested-by: Venky Shankar <vshankar@redhat.com>
Diffstat (limited to 'geo-replication')
| -rwxr-xr-x | geo-replication/src/gverify.sh | 4 | 
1 files changed, 2 insertions, 2 deletions
diff --git a/geo-replication/src/gverify.sh b/geo-replication/src/gverify.sh index c5593a39f11..e661267ce50 100755 --- a/geo-replication/src/gverify.sh +++ b/geo-replication/src/gverify.sh @@ -90,7 +90,7 @@ function slave_stats()      cd $d;      disk_size=$(df -P -B1 $d | tail -1 | awk "{print \$2}");      used_size=$(df -P -B1 $d | tail -1 | awk "{print \$3}"); -    no_of_files=$(find  $d -maxdepth 0 -empty); +    no_of_files=$(find $d -maxdepth 1 -path "$d/.trashcan" -prune -o -path "$d" -o -print0 -quit);      umount -l $d;      rmdir $d; @@ -179,7 +179,7 @@ function main()          ERRORS=$(($ERRORS + 1));      fi -    if [ -z $slave_no_of_files ]; then +    if [ ! -z $slave_no_of_files ]; then          echo "$3::$4 is not empty. Please delete existing files in $3::$4 and retry, or use force to continue without deleting the existing files." >> $log_file;          ERRORS=$(($ERRORS + 1));      fi;  | 
