[PATCH]init-ceph: Adding do_cmd_okfail when calling ceph-crush-location

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>From 797dbf4f027200bb22ba89d2f616e254321ec023 Mon Sep 17 00:00:00 2001
From: Chendi Xue <chendi.xue@xxxxxxxxx>
Date: Tue, 29 Jul 2014 16:45:45 +0800
Subject: [PATCH 8/8] Adding do_cmd_okfail when calling ceph-crush-location

Original init-ceph doesn't use do_cmd_okfail when getting osd_location, which
results in osds wrong mapping( verified by using "ceph osd tree" )

Signed-off-by: Chendi Xue <chendi.xue@xxxxxxxxx>
---
src/init-ceph.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/init-ceph.in b/src/init-ceph.in
index 86eb87f..09c7cbc 100644
--- a/src/init-ceph.in
+++ b/src/init-ceph.in
@@ -327,7 +327,7 @@ for name in $what; do
                               if [ "${update_crush:-1}" = "1" -o "${update_crush:-1}" = "true" ]; then
                                   # update location in crush
                                   get_conf osd_location_hook "$BINDIR/ceph-crush-location" "osd crush location hook"
-                                  osd_location=`$osd_location_hook --cluster ceph --id $id --type osd`
+                                 osd_location=$(do_cmd_okfail "$osd_location_hook --cluster ceph --id $id --type osd")
                                   get_conf osd_weight "" "osd crush initial weight"
                                   defaultweight="$(df -P -k $osd_data/. | tail -1 | awk '{ print sprintf("%.2f",$2/1073741824) }')"
                                   get_conf osd_keyring "$osd_data/keyring" "keyring"
-- 
1.9.1


Best Regards,
-Chendi

--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux