[Pkg-ceph-commits] [ceph] 01/01: new patch to fix weight calculation on OSD start.

Dmitry Smirnov onlyjob at moszumanska.debian.org
Tue Mar 25 10:01:04 UTC 2014


This is an automated email from the git hooks/post-receive script.

onlyjob pushed a commit to branch experimental
in repository ceph.

commit b558d03 (experimental)
Author: Dmitry Smirnov <onlyjob at member.fsf.org>
Date:   Tue Mar 25 07:48:07 2014

    new patch to fix weight calculation on OSD start.
---
 debian/changelog                       |  1 +
 debian/patches/fix-defaultweight.patch | 22 ++++++++++++++++++++++
 debian/patches/series                  |  1 +
 3 files changed, 24 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index fff9ae1..97da941 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,7 @@ ceph (0.78-2) experimental; urgency=low
   * Patchworks:
     + refreshed/renamed/reordered "virtualenv-never-download.patch".
     + new "init.patch" for init.d scripts lintianisation.
+    + new "fix-defaultweight.patch" to fix weight calculation on OSD start.
   * Use symlinks to simplify installation of init.d and logrotate scripts.
   * Added retrospective changelog entry to mention new B-D "libblkid-dev".
   * Added "README.Debian" file with some hopefully useful notes.
diff --git a/debian/patches/fix-defaultweight.patch b/debian/patches/fix-defaultweight.patch
new file mode 100644
index 0000000..f028bb5
--- /dev/null
+++ b/debian/patches/fix-defaultweight.patch
@@ -0,0 +1,22 @@
+Last-Update: 2014-03-25
+Forwarded: no
+Author: Dmitry Smirnov <onlyjob at member.fsf.org>
+Description: fix bug in 'defaultweight' calculation on OSD start.
+ awk: cmd. line:1: { d=$2/1073741824 ; r = sprintf(\"%.2f\", d); print r }
+ awk: cmd. line:1:                                 ^ backslash not last character on line
+ awk: cmd. line:1: { d=$2/1073741824 ; r = sprintf(\"%.2f\", d); print r }
+ awk: cmd. line:1:                                 ^ syntax error
+
+--- a/src/init-ceph.in
++++ b/src/init-ceph.in
+@@ -322,9 +322,9 @@
+ 		    # 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`
+ 		    get_conf osd_weight "" "osd crush initial weight"
+-		    defaultweight="$(df -P -k $osd_data/. | tail -1 | awk '{ d=$2/1073741824 ; r = sprintf(\"%.2f\", d); print r }')"
++		    defaultweight="$(df -P -k $osd_data/. | tail -1 | awk '{ print sprintf("%.2f",$2/1073741824) }')"
+ 		    get_conf osd_keyring "$osd_data/keyring" "keyring"
+ 		    do_cmd "timeout 10 $BINDIR/ceph -c $conf --name=osd.$id --keyring=$osd_keyring osd crush create-or-move -- $id ${osd_weight:-${defaultweight:-1}} $osd_location"
+ 		fi
+ 	    fi
diff --git a/debian/patches/series b/debian/patches/series
index 8c54465..1c30ba0 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
+fix-defaultweight.patch
 init.patch
 modules.patch
 virtualenv-never-download.patch

-- 
Alioth's hooks/post-receive on /srv/git.debian.org/git/pkg-ceph/ceph.git



More information about the Pkg-ceph-commits mailing list