fix failure on osd preparation 67/2467/1
authorgrakiss <grakiss.wanglei@huawei.com>
Tue, 13 Oct 2015 03:16:09 +0000 (11:16 +0800)
committergrakiss <grakiss.wanglei@huawei.com>
Tue, 13 Oct 2015 03:19:37 +0000 (11:19 +0800)
JIRA: COMPASS-90
  - force delete /ceph/images/ceph-volumes.img
  - prevent from kill create_osd.sh itself

Change-Id: I1e525bdf66809f93a4a1d5eff053d875145f99c4
Signed-off-by: grakiss <grakiss.wanglei@huawei.com>
deploy/adapters/ansible/roles/ceph-deploy/files/create_osd.sh

index b5c9da3..0715e81 100644 (file)
@@ -9,7 +9,7 @@ if [ ! -d "/ceph/images" ]; then
 mkdir -p /ceph/images
 fi
 
-rm /ceph/images/ceph-volumes.img
+rm -f /ceph/images/ceph-volumes.img
 
 if [ ! -f "/ceph/images/ceph-volumes.img" ]; then
 echo "create ceph-volumes.img"
@@ -18,7 +18,6 @@ sgdisk -g --clear /ceph/images/ceph-volumes.img
 fi
 
 #safe check
-ps -ef |grep create_osd.sh |awk '{print $2}' |xargs kill -9
 ps -ef |grep lvremove |awk '{print $2}' |xargs kill -9
 ps -ef |grep vgremove |awk '{print $2}' |xargs kill -9
 ps -ef |grep vgcreate |awk '{print $2}' |xargs kill -9