John Spray [Wed, 7 Jan 2015 12:37:40 +0000 (12:37 +0000)]
mon/MDSMonitor: fix `mds fail` for standby MDSs
This command takes a gid, rank or name, but
in the name case it would previously only work if
the named daemon had a rank assigned (mds_info->rank >= 0),
otherwise it would fail silently.
John Spray [Wed, 7 Jan 2015 11:47:34 +0000 (11:47 +0000)]
mon/MDSMonitor: respect MDSMAP_DOWN when promoting standbys
Previously, a standby could become active even if 'cluster_down'
had been run. This was awkward, because it would get you a
"laggy or crashed" mds for the standby that was actually
up and running, just being ignored because of cluster_down.
Loic Dachary [Fri, 19 Dec 2014 14:54:33 +0000 (15:54 +0100)]
init-ceph: stop returns before daemons are dead
The existence of the pidfile must be checked outside of the loop to send
a signal to the daemon. Otherwise the daemon will remove the pidfile and
stop can return before the process is dead because it only checks
/proc/$pid if the pidfile exists.
Dong Yuan [Wed, 10 Dec 2014 10:02:51 +0000 (10:02 +0000)]
osd: build fields for Transaction::iterator when tbl is used
When tbl is used (for compatibility), the Transaction::begin method need
to build all fields used by iterator. That includes: coll_index,
object_index, data_bl, op_bl, etc.)
Dong Yuan [Tue, 2 Dec 2014 17:08:44 +0000 (17:08 +0000)]
osd: Transaction::append & Transaction::swap
Finish append and swap for new Transaction encode/decode layout.
Since append will modify the op_bl now, we changed the order of append
and swap in ReplicatedBackend::sub_op_modify and
ReplicatedBackend::submit_transaction to avoid append call on op_t, so
the op_t can be encode in message.
Dong Yuan [Mon, 1 Dec 2014 10:58:56 +0000 (10:58 +0000)]
osd: new Transaction::iterator interface
This patch add new Transaction::iterator interface according to new
encode/decode layout. The new iterator give the whole Op struct in a
single decode_op method.
All ObjectStore Impl (FileStore/MemStore/KeyValueStore) is also changed
to use the new interface.
Dong Yuan [Thu, 27 Nov 2014 14:52:36 +0000 (14:52 +0000)]
osd: add encode/deocde impl for new layout
When use_tbl is true, Transaction::encode will give the same result as
before, while when use_tbl is false, Transaction::encode will use new
field and logic to encode and all related methods such as
get_encoded_bytes, get_data_offset will do the same.
Dong Yuan [Wed, 26 Nov 2014 17:58:50 +0000 (17:58 +0000)]
osd: new format for Transaction encode/decode
This patch add a new fixed size struct Transaction::Op to represent
all actions.
All coll and ghobject used by the transaction are keeped in two maps:
coll: map<coll_t, __le32> coll_index;
object: map<ghobject_t, __le32> object_index;
And the Op struct use the map value(__le32) to refer coll and object,
so each coll and object is only need to encode once in the transaction.
Other variable-size fields(key/value/data) is encoded in bufferlist
data_bl.
Loic Dachary [Fri, 19 Dec 2014 11:26:37 +0000 (12:26 +0100)]
tests: resolve ceph-helpers races
Some tests were racing against the monitor. On a fast machine it worked
but slower machines (or sometime when running in parallel), the monitor
is lagging behind. Use wait_for_clean to make sure the monitor is in the
desired state for the test to succeed.
Ken Dreyer [Tue, 6 Jan 2015 15:16:20 +0000 (08:16 -0700)]
qa: drop tiobench suite
The tiobench software has been abandoned upstream for years. Fedora and
Debian are no longer shipping the tiobench package, so we've had to
carry the package ourselves in the Ceph project, and we're trying to
slim down our dependencies where it makes sense to do so.
Xiaoxi Chen [Fri, 21 Nov 2014 00:34:54 +0000 (08:34 +0800)]
Add MOSDRepOp and MOSDRepOpReply
Add the two new message type and change the corresponding code flow as well.
Basically the idea to have MOSDRepOp is to seperate subop(read/write)
out of other subop(pull/push,etc), so that we can cleanup some unused fields in
the message type, then save some encoding/decoding overhead.
The backward compatibility is also remian, if talking with old version OSD who
doesn't support osd_client_subop/subopreply, will fall back to osd_subop/subopreply.
Sage: rename MOSDClientSubOp -> MOSDRepOp
Signed-off-by: Xiaoxi Chen <xiaoxi.chen@intel.com> Signed-off-by: Sage Weil <sage@redhat.com>
Ken Dreyer [Mon, 5 Jan 2015 19:11:00 +0000 (12:11 -0700)]
configure: show pkg names when libkeyutils is missing
Prior to this commit, when ./configure can't find libkeyutils, it would
bail out with a terse error message.
Some of the other library checks helpfully print the DEB and RPM package
names in parentheses. Add the DEB and RPM package names to the
libkeyutils check.
Reported-by: Pankaj Garg <Pankaj.Garg@caviumnetworks.com> Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
Jianpeng Ma [Mon, 5 Jan 2015 12:51:21 +0000 (20:51 +0800)]
test/bufferlist: For root, don't do permission operation for read_file
case.
For root user, it meet those error:
test/bufferlist.cc:1880: Failure
Value of: bl.read_file("testfile", &error)
Actual: 0
Expected: -13
test/bufferlist.cc:1884: Failure
Value of: bl.length()
Actual: 8
Expected: (unsigned)4
Which is: 4
test/bufferlist.cc:1886: Failure
Value of: actual
Actual: "ABC
ABC
"
Expected: "ABC\n"
Which is: "ABC
Signed-off-by: Jianpeng Ma <jianpeng.ma@intel.com>
Mykola Golub [Tue, 30 Dec 2014 09:59:31 +0000 (11:59 +0200)]
qa: refactor 'ceph -w' magic in test_mon_misc by introducing helper
functions ceph_watch_start and ceph_watch_wait so they can be reused
in other tests.
Ken Dreyer [Fri, 2 Jan 2015 17:32:26 +0000 (10:32 -0700)]
doc: rm reference to old Ubuntu release
Remove the reference to "Ubuntu 12.10" since this is EOL.
Clarify that we only recommend Ubuntu LTS releases.
(Since this information has a tendancy to become stale, perhaps this
whole paragraph should be removed here and we should simply point at the
main OS Recommendations page.)
Loic Dachary [Thu, 1 Jan 2015 19:52:18 +0000 (20:52 +0100)]
debian: create a repository from sources
Create a debian repository suitable for inclusion in
/etc/apt/sources.list, for the current distribution and using the git
clone from the current working directory.
It is meant to quickly provide teuthology with the packages to run a
job.
Sage Weil [Mon, 29 Dec 2014 23:47:28 +0000 (15:47 -0800)]
client: fix quota signed/unsigned warning
client/Client.cc: In member function 'bool Client::is_quota_bytes_exceeded(Inode*, uint64_t)':
client/Client.cc:10393:66: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (quota->max_bytes && (rstat->rbytes + new_bytes) > quota->max_bytes)