Faidon has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/66187


Change subject: Ceph: update ceph-add-disk for newer Ceph
......................................................................

Ceph: update ceph-add-disk for newer Ceph

Bobtail now has the new ceph-disk backported, so make sure to adjust our
scripts for it.

Change-Id: Ife89b90c1f41537ee8c16973e3853f7127854a1a
---
M modules/ceph/files/ceph-add-disk
1 file changed, 7 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/87/66187/1

diff --git a/modules/ceph/files/ceph-add-disk b/modules/ceph/files/ceph-add-disk
index 694aaff..e638633 100644
--- a/modules/ceph/files/ceph-add-disk
+++ b/modules/ceph/files/ceph-add-disk
@@ -88,11 +88,16 @@
 fi
 
 echo "I: Partioning and formatting the disk"
+journal=$(ceph-conf --cluster=ceph --name=osd.${osdid} --lookup 'osd journal')
+
+# cleanup possibly old journal
+rm -f ${journal}
+
 # disable ceph-disk-activate, or it is spawned prematurely by prepare
 # http://tracker.ceph.com/issues/3255
 mv /usr/sbin/ceph-disk-activate /usr/sbin/ceph-disk-activate.off
-ceph-disk-prepare ${disk}
-sleep 2
+ceph-disk-prepare ${disk} ${journal}
+udevadm settle
 mv /usr/sbin/ceph-disk-activate.off /usr/sbin/ceph-disk-activate
 
 # explicitly set whoami
@@ -104,14 +109,6 @@
 echo ${osdid} > ${mountpoint}/whoami
 umount ${mountpoint}
 rmdir ${mountpoint}
-
-# cleanup possibly old journal
-rm /var/lib/ceph/journal/ceph-${osdid}
-
-# http://tracker.ceph.com/issues/4031
-mount ${disk}1 /var/lib/ceph/osd/ceph-${osdid}
-ceph-osd --cluster=ceph -i ${osdid} --mkjournal -f
-umount /var/lib/ceph/osd/ceph-${osdid}
 
 echo "I: activating the new OSD"
 ceph-disk-activate --mount ${disk}1

-- 
To view, visit https://gerrit.wikimedia.org/r/66187
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ife89b90c1f41537ee8c16973e3853f7127854a1a
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to