[Pkg-ceph-commits] [ceph] 01/03: Imported Upstream version 0.72.2

James Downing Page jamespage at moszumanska.debian.org
Tue Dec 31 14:38:33 UTC 2013


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

jamespage pushed a commit to branch master
in repository ceph.

commit 9cdacf5639e62af00a2cc86db2581b174c9f1060
Author: James Page <james.page at ubuntu.com>
Date:   Tue Dec 31 14:37:29 2013 +0000

    Imported Upstream version 0.72.2
---
 ceph.spec                             |  2 +-
 configure                             | 22 +++++++-------
 configure.ac                          |  2 +-
 src/.git_version                      |  4 +--
 src/ceph_common.sh                    |  4 +++
 src/common/hobject.h                  |  5 ++++
 src/mon/MonCommands.h                 |  2 +-
 src/mon/OSDMonitor.cc                 | 27 +++++++++---------
 src/osd/OSD.cc                        |  2 +-
 src/osd/ReplicatedPG.cc               |  7 +++--
 src/rgw/rgw_acl_s3.cc                 |  6 ++--
 src/rgw/rgw_rados.cc                  | 54 +++++++++++++++++++++++++++++------
 src/rgw/rgw_rados.h                   |  2 ++
 src/upstart/ceph-mds-all-starter.conf |  2 +-
 src/upstart/ceph-mon-all-starter.conf |  2 +-
 src/upstart/ceph-osd-all-starter.conf |  2 +-
 16 files changed, 98 insertions(+), 47 deletions(-)

diff --git a/ceph.spec b/ceph.spec
index a416b52..1835de7 100644
--- a/ceph.spec
+++ b/ceph.spec
@@ -9,7 +9,7 @@
 # common
 #################################################################################
 Name:		ceph
-Version:	0.72.1
+Version:	0.72.2
 Release:	0%{?dist}
 Summary:	User space components of the Ceph file system
 License:	GPL-2.0
diff --git a/configure b/configure
index 267e400..f6b1ab2 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for ceph 0.72.1.
+# Generated by GNU Autoconf 2.68 for ceph 0.72.2.
 #
 # Report bugs to <ceph-devel at vger.kernel.org>.
 #
@@ -570,8 +570,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='ceph'
 PACKAGE_TARNAME='ceph'
-PACKAGE_VERSION='0.72.1'
-PACKAGE_STRING='ceph 0.72.1'
+PACKAGE_VERSION='0.72.2'
+PACKAGE_STRING='ceph 0.72.2'
 PACKAGE_BUGREPORT='ceph-devel at vger.kernel.org'
 PACKAGE_URL=''
 
@@ -1427,7 +1427,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures ceph 0.72.1 to adapt to many kinds of systems.
+\`configure' configures ceph 0.72.2 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1498,7 +1498,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of ceph 0.72.1:";;
+     short | recursive ) echo "Configuration of ceph 0.72.2:";;
    esac
   cat <<\_ACEOF
 
@@ -1642,7 +1642,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-ceph configure 0.72.1
+ceph configure 0.72.2
 generated by GNU Autoconf 2.68
 
 Copyright (C) 2010 Free Software Foundation, Inc.
@@ -2280,7 +2280,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by ceph $as_me 0.72.1, which was
+It was created by ceph $as_me 0.72.2, which was
 generated by GNU Autoconf 2.68.  Invocation command line was
 
   $ $0 $@
@@ -3264,7 +3264,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='ceph'
- VERSION='0.72.1'
+ VERSION='0.72.2'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -12096,7 +12096,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='ceph'
- VERSION='0.72.1'
+ VERSION='0.72.2'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -20654,7 +20654,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by ceph $as_me 0.72.1, which was
+This file was extended by ceph $as_me 0.72.2, which was
 generated by GNU Autoconf 2.68.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -20720,7 +20720,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-ceph config.status 0.72.1
+ceph config.status 0.72.2
 configured by $0, generated by GNU Autoconf 2.68,
   with options \\"\$ac_cs_config\\"
 
diff --git a/configure.ac b/configure.ac
index 6b3ffe5..30ea52d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -8,7 +8,7 @@ AC_PREREQ(2.59)
 # VERSION define is not used by the code.  It gets a version string
 # from 'git describe'; see src/ceph_ver.[ch]
 
-AC_INIT([ceph], [0.72.1], [ceph-devel at vger.kernel.org])
+AC_INIT([ceph], [0.72.2], [ceph-devel at vger.kernel.org])
 
 # Create release string.  Used with VERSION for RPMs.
 RPM_RELEASE=0
diff --git a/src/.git_version b/src/.git_version
index 50d4b7c..c8c9163 100644
--- a/src/.git_version
+++ b/src/.git_version
@@ -1,2 +1,2 @@
-4d923861868f6a15dcb33fef7f50f674997322de
-v0.72.1
+a913ded2ff138aefb8cb84d347d72164099cfd60
+v0.72.2
diff --git a/src/ceph_common.sh b/src/ceph_common.sh
index cedda4f..01781b7 100644
--- a/src/ceph_common.sh
+++ b/src/ceph_common.sh
@@ -50,6 +50,10 @@ check_host() {
 
     #echo host for $name is $host, i am $hostname
 
+    if [ -e "/var/lib/ceph/$type/ceph-$id/upstart" ]; then
+	return 1
+    fi
+
     # sysvinit managed instance in standard location?
     if [ -e "/var/lib/ceph/$type/ceph-$id/sysvinit" ]; then
 	host="$hostname"
diff --git a/src/common/hobject.h b/src/common/hobject.h
index 87a2b1e..2f88ca4 100644
--- a/src/common/hobject.h
+++ b/src/common/hobject.h
@@ -98,6 +98,11 @@ public:
     return ret;
   }
 
+  /// @return true if object is head
+  bool is_head() const {
+    return snap == CEPH_NOSNAP;
+  }
+
   /// @return true if object is neither head nor snapdir
   bool is_snap() const {
     return (snap != CEPH_NOSNAP) && (snap != CEPH_SNAPDIR);
diff --git a/src/mon/MonCommands.h b/src/mon/MonCommands.h
index 5a6ca6a..881c5a2 100644
--- a/src/mon/MonCommands.h
+++ b/src/mon/MonCommands.h
@@ -508,7 +508,7 @@ COMMAND("osd pool get " \
 COMMAND("osd pool set " \
 	"name=pool,type=CephPoolname " \
 	"name=var,type=CephChoices,strings=size|min_size|crash_replay_interval|pg_num|pgp_num|crush_ruleset|hashpspool " \
-	"name=val,type=CephString", \
+	"name=val,type=CephInt", \
 	"set pool parameter <var> to <val>", "osd", "rw", "cli,rest")
 // 'val' is a CephString because it can include a unit.  Perhaps
 // there should be a Python type for validation/conversion of strings
diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc
index 07775fc..8d13387 100644
--- a/src/mon/OSDMonitor.cc
+++ b/src/mon/OSDMonitor.cc
@@ -2734,22 +2734,19 @@ int OSDMonitor::prepare_command_pool_set(map<string,cmd_vartype> &cmdmap,
   if (pending_inc.new_pools.count(pool))
     p = pending_inc.new_pools[pool];
 
-  // accept val as a json string or int, and parse out int or float
+  // accept val as a json string or int, and parse out int
   // values from the string as needed
+  string raw_val = cmd_vartype_stringify(cmdmap["val"]);
   string val;
   cmd_getval(g_ceph_context, cmdmap, "val", val);
   string interr;
   int64_t n = 0;
   if (!cmd_getval(g_ceph_context, cmdmap, "val", n))
     n = strict_strtoll(val.c_str(), 10, &interr);
-  string floaterr;
-  float f;
-  if (!cmd_getval(g_ceph_context, cmdmap, "val", f))
-    f = strict_strtod(val.c_str(), &floaterr);
 
   if (var == "size") {
     if (interr.length()) {
-      ss << "error parsing integer value '" << val << "': " << interr;
+      ss << "error parsing integer value '" << raw_val << "': " << interr;
       return -EINVAL;
     }
     if (n == 0 || n > 10) {
@@ -2762,21 +2759,21 @@ int OSDMonitor::prepare_command_pool_set(map<string,cmd_vartype> &cmdmap,
     ss << "set pool " << pool << " size to " << n;
   } else if (var == "min_size") {
     if (interr.length()) {
-      ss << "error parsing integer value '" << val << "': " << interr;
+      ss << "error parsing integer value '" << raw_val << "': " << interr;
       return -EINVAL;
     }
     p.min_size = n;
     ss << "set pool " << pool << " min_size to " << n;
   } else if (var == "crash_replay_interval") {
     if (interr.length()) {
-      ss << "error parsing integer value '" << val << "': " << interr;
+      ss << "error parsing integer value '" << raw_val << "': " << interr;
       return -EINVAL;
     }
     p.crash_replay_interval = n;
     ss << "set pool " << pool << " to crash_replay_interval to " << n;
   } else if (var == "pg_num") {
     if (interr.length()) {
-      ss << "error parsing integer value '" << val << "': " << interr;
+      ss << "error parsing integer value '" << raw_val << "': " << interr;
       return -EINVAL;
     }
     if (n <= (int)p.get_pg_num()) {
@@ -2795,7 +2792,7 @@ int OSDMonitor::prepare_command_pool_set(map<string,cmd_vartype> &cmdmap,
     }
   } else if (var == "pgp_num") {
     if (interr.length()) {
-      ss << "error parsing integer value '" << val << "': " << interr;
+      ss << "error parsing integer value '" << raw_val << "': " << interr;
       return -EINVAL;
     }
     if (n <= 0) {
@@ -2816,7 +2813,7 @@ int OSDMonitor::prepare_command_pool_set(map<string,cmd_vartype> &cmdmap,
     }
   } else if (var == "crush_ruleset") {
     if (interr.length()) {
-      ss << "error parsing integer value '" << val << "': " << interr;
+      ss << "error parsing integer value '" << raw_val << "': " << interr;
       return -EINVAL;
     }
     if (osdmap.crush->rule_exists(n)) {
@@ -2827,14 +2824,16 @@ int OSDMonitor::prepare_command_pool_set(map<string,cmd_vartype> &cmdmap,
       return -ENOENT;
     }
   } else if (var == "hashpspool") {
-    if (val == "true") {
+    // make sure we only compare against 'n' if we didn't receive a string
+    int flag_val = (!val.empty() ? -1 : n);
+    if (val == "true" || flag_val == 1) {
       p.flags |= pg_pool_t::FLAG_HASHPSPOOL;
       ss << "set";
-    } else if (val == "false") {
+    } else if (val == "false" || flag_val == 0) {
       p.flags ^= pg_pool_t::FLAG_HASHPSPOOL;
       ss << "unset";
     } else {
-      ss << "expecting value true or false";
+      ss << "expecting value 0 or 1";
       return -EINVAL;
     }
     ss << " pool " << pool << " flag hashpspool";
diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc
index 1a60de6..3f767fe 100644
--- a/src/osd/OSD.cc
+++ b/src/osd/OSD.cc
@@ -4069,7 +4069,7 @@ void OSD::do_command(Connection *con, tid_t tid, vector<string>& cmd, bufferlist
     int64_t bsize;
     // default count 1G, size 4MB
     cmd_getval(cct, cmdmap, "count", count, (int64_t)1 << 30);
-    cmd_getval(cct, cmdmap, "bsize", bsize, (int64_t)4 << 20);
+    cmd_getval(cct, cmdmap, "size", bsize, (int64_t)4 << 20);
 
     bufferlist bl;
     bufferptr bp(bsize);
diff --git a/src/osd/ReplicatedPG.cc b/src/osd/ReplicatedPG.cc
index 19592a6..0a28d15 100644
--- a/src/osd/ReplicatedPG.cc
+++ b/src/osd/ReplicatedPG.cc
@@ -1046,9 +1046,12 @@ void ReplicatedPG::do_op(OpRequestRef op)
       if (!src_obc.count(src_oid)) {
 	ObjectContextRef sobc;
 	snapid_t ssnapid;
+	int r;
 
-	int r = find_object_context(src_oid, &sobc, false, &ssnapid);
-	if (r == -EAGAIN) {
+	if (src_oid.is_head() && is_missing_object(src_oid)) {
+	  wait_for_missing_object(src_oid, op);
+	} else if ((r = find_object_context(
+		      src_oid, &sobc, false, &ssnapid)) == -EAGAIN) {
 	  // missing the specific snap we need; requeue and wait.
 	  hobject_t wait_oid(osd_op.soid.oid, src_oloc.key, ssnapid, m->get_pg().ps(),
 			     info.pgid.pool(), m->get_object_locator().nspace);
diff --git a/src/rgw/rgw_acl_s3.cc b/src/rgw/rgw_acl_s3.cc
index 6007d41..71c8682 100644
--- a/src/rgw/rgw_acl_s3.cc
+++ b/src/rgw/rgw_acl_s3.cc
@@ -454,8 +454,10 @@ int RGWAccessControlPolicy_S3::rebuild(RGWRados *store, ACLOwner *owner, RGWAcce
     return -EINVAL;
 
   ACLOwner *requested_owner = static_cast<ACLOwner_S3 *>(find_first("Owner"));
-  if (requested_owner && requested_owner->get_id().compare(owner->get_id()) != 0) {
-    return -EPERM;
+  if (requested_owner) {
+    const string& requested_id = requested_owner->get_id();
+    if (!requested_id.empty() && requested_id.compare(owner->get_id()) != 0)
+      return -EPERM;
   }
 
   RGWUserInfo owner_info;
diff --git a/src/rgw/rgw_rados.cc b/src/rgw/rgw_rados.cc
index 55d4b92..ac9503a 100644
--- a/src/rgw/rgw_rados.cc
+++ b/src/rgw/rgw_rados.cc
@@ -3509,7 +3509,7 @@ int RGWRados::prepare_atomic_for_write_impl(RGWRadosCtx *rctx, rgw_obj& obj,
   bufferlist bl;
   bl.append(state->write_tag.c_str(), state->write_tag.size() + 1);
 
-  ldout(cct, 0) << "setting object write_tag=" << state->write_tag << dendl;
+  ldout(cct, 10) << "setting object write_tag=" << state->write_tag << dendl;
 
   op.setxattr(RGW_ATTR_ID_TAG, bl);
 
@@ -4151,6 +4151,7 @@ struct get_obj_data : public RefCountedObject {
   atomic_t cancelled;
   atomic_t err_code;
   Throttle throttle;
+  list<bufferlist> read_list;
 
   get_obj_data(CephContext *_cct)
     : cct(_cct),
@@ -4186,7 +4187,6 @@ struct get_obj_data : public RefCountedObject {
 
     c->wait_for_complete_and_cb();
     int r = c->get_return_value();
-    c->release();
 
     lock.Lock();
     completion_map.erase(cur_ofs);
@@ -4195,6 +4195,8 @@ struct get_obj_data : public RefCountedObject {
       *done = true;
     }
     lock.Unlock();
+
+    c->release();
     
     return r;
   }
@@ -4338,20 +4340,44 @@ void RGWRados::get_obj_aio_completion_cb(completion_t c, void *arg)
     goto done_unlock;
   }
 
-  for (iter = bl_list.begin(); iter != bl_list.end(); ++iter) {
+  d->read_list.splice(d->read_list.end(), bl_list);
+
+done_unlock:
+  d->data_lock.Unlock();
+done:
+  d->put();
+  return;
+}
+
+int RGWRados::flush_read_list(struct get_obj_data *d)
+{
+  d->data_lock.Lock();
+  list<bufferlist> l;
+  l.swap(d->read_list);
+  d->get();
+  d->read_list.clear();
+
+  d->data_lock.Unlock();
+
+  int r = 0;
+
+  list<bufferlist>::iterator iter;
+  for (iter = l.begin(); iter != l.end(); ++iter) {
     bufferlist& bl = *iter;
-    int r = d->client_cb->handle_data(bl, 0, bl.length());
+    r = d->client_cb->handle_data(bl, 0, bl.length());
     if (r < 0) {
-      d->set_cancelled(r);
+      dout(0) << "ERROR: flush_read_list(): d->client_c->handle_data() returned " << r << dendl;
       break;
     }
   }
 
-done_unlock:
-  d->data_lock.Unlock();
-done:
+  d->data_lock.Lock();
   d->put();
-  return;
+  if (r < 0) {
+    d->set_cancelled(r);
+  }
+  d->data_lock.Unlock();
+  return r;
 }
 
 int RGWRados::get_obj_iterate_cb(void *ctx, RGWObjState *astate,
@@ -4398,6 +4424,10 @@ int RGWRados::get_obj_iterate_cb(void *ctx, RGWObjState *astate,
     }
   }
 
+  r = flush_read_list(d);
+  if (r < 0)
+    return r;
+
   get_obj_bucket_and_oid_key(obj, bucket, oid, key);
 
   d->throttle.get(len);
@@ -4458,6 +4488,12 @@ int RGWRados::get_obj_iterate(void *ctx, void **handle, rgw_obj& obj,
       data->cancel_all_io();
       break;
     }
+    r = flush_read_list(data);
+    if (r < 0) {
+      dout(10) << "get_obj_iterate() r=" << r << ", canceling all io" << dendl;
+      data->cancel_all_io();
+      break;
+    }
   }
 
 done:
diff --git a/src/rgw/rgw_rados.h b/src/rgw/rgw_rados.h
index 476572c..b0b39ec 100644
--- a/src/rgw/rgw_rados.h
+++ b/src/rgw/rgw_rados.h
@@ -1263,6 +1263,8 @@ public:
                       off_t ofs, off_t end,
 	              RGWGetDataCB *cb);
 
+  int flush_read_list(struct get_obj_data *d);
+
   int get_obj_iterate_cb(void *ctx, RGWObjState *astate,
                          rgw_obj& obj,
                          off_t obj_ofs, off_t read_ofs, off_t len,
diff --git a/src/upstart/ceph-mds-all-starter.conf b/src/upstart/ceph-mds-all-starter.conf
index fa18b25..5c1e02e 100644
--- a/src/upstart/ceph-mds-all-starter.conf
+++ b/src/upstart/ceph-mds-all-starter.conf
@@ -9,7 +9,7 @@ script
   # TODO what's the valid charset for cluster names and mds ids?
   find -L /var/lib/ceph/mds/ -mindepth 1 -maxdepth 1 -regextype posix-egrep -regex '.*/[A-Za-z0-9]+-[A-Za-z0-9._-]+' -printf '%P\n' \
   | while read f; do
-    if [ -e "/var/lib/ceph/mds/$f/done" ] && [ -e "/var/lib/ceph/mds/$f/upstart" ]; then
+    if [ -e "/var/lib/ceph/mds/$f/done" ] && [ -e "/var/lib/ceph/mds/$f/upstart" ] && [ ! -e "/var/lib/ceph/mds/$f/sysvinit" ]; then
         cluster="${f%%-*}"
         id="${f#*-}"
         initctl emit ceph-mds cluster="$cluster" id="$id"
diff --git a/src/upstart/ceph-mon-all-starter.conf b/src/upstart/ceph-mon-all-starter.conf
index b9664b6..9b9c819 100644
--- a/src/upstart/ceph-mon-all-starter.conf
+++ b/src/upstart/ceph-mon-all-starter.conf
@@ -9,7 +9,7 @@ script
   # TODO what's the valid charset for cluster names and mon ids?
   find -L /var/lib/ceph/mon/ -mindepth 1 -maxdepth 1 -regextype posix-egrep -regex '.*/[A-Za-z0-9]+-[A-Za-z0-9._-]+' -printf '%P\n' \
   | while read f; do
-    if [ -e "/var/lib/ceph/mon/$f/done" ] && [ -e "/var/lib/ceph/mon/$f/upstart" ]; then
+    if [ -e "/var/lib/ceph/mon/$f/done" ] && [ -e "/var/lib/ceph/mon/$f/upstart" ] && [ ! -e "/var/lib/ceph/mon/$f/sysvinit" ]; then
         cluster="${f%%-*}"
         id="${f#*-}"
 
diff --git a/src/upstart/ceph-osd-all-starter.conf b/src/upstart/ceph-osd-all-starter.conf
index 2e36dcc..94b99ed 100644
--- a/src/upstart/ceph-osd-all-starter.conf
+++ b/src/upstart/ceph-osd-all-starter.conf
@@ -13,7 +13,7 @@ script
   # TODO what's the valid charset for cluster names and osd ids?
   find -L /var/lib/ceph/osd/ -mindepth 1 -maxdepth 1 -regextype posix-egrep -regex '.*/[A-Za-z0-9]+-[A-Za-z0-9._-]+' -printf '%P\n' \
   | while read f; do
-    if [ -e "/var/lib/ceph/osd/$f/ready" ] && [ -e "/var/lib/ceph/osd/$f/upstart" ]; then
+    if [ -e "/var/lib/ceph/osd/$f/ready" ] && [ -e "/var/lib/ceph/osd/$f/upstart" ] && [ ! -e "/var/lib/ceph/osd/$f/sysvinit" ]; then
         cluster="${f%%-*}"
         id="${f#*-}"
 	initctl emit ceph-osd cluster="$cluster" id="$id"

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



More information about the Pkg-ceph-commits mailing list