summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac24
-rw-r--r--doc/start/quick-start-preflight.rst29
-rw-r--r--src/cls/Makefile.am4
-rw-r--r--src/java/Makefile.am3
-rw-r--r--src/java/test/com/ceph/fs/CephAllTests.java13
-rw-r--r--src/mon/OSDMonitor.cc2
-rw-r--r--src/os/FileStore.cc3
-rw-r--r--src/osdc/ObjectCacher.cc6
-rw-r--r--src/rgw/Makefile.am5
-rw-r--r--src/test/Makefile.am5
10 files changed, 45 insertions, 49 deletions
diff --git a/configure.ac b/configure.ac
index 1478adfce79..bdea8b18ceb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -333,14 +333,18 @@ if test "x$enable_cephfs_java" = "xyes"; then
# setup defaults for Debian default-jdk package (without --with-jdk-dir)
AS_IF([test -z "$with_jdk_dir"], [
- # This works with Debian's default-jdk package
- dir='/usr/lib/jvm/default-java/'
- javac_prog=`find $dir -name javac | head -n 1`
- AS_IF([test -x "$javac_prog"], [
- EXTRA_JDK_BIN_DIR=`dirname $javac_prog`])
- jnih=`find $dir -name jni.h | head -n 1`
- AS_IF([test -r "$jnih"], [
- EXTRA_JDK_INC_DIR=`dirname $jnih`])])
+ # This works with Debian's and CentOS' default-jdk package
+ for dir in '/usr/lib/jvm/default-java/' '/usr/lib/jvm/java/' ; do
+ # only test if a suitable path has not yet been found
+ AS_IF([test "$EXTRA_JDK_BIN_DIR" == ""], [
+ AS_IF([test -x "$javac_prog"], [
+ EXTRA_JDK_BIN_DIR=`dirname $javac_prog`])
+ jnih=`find $dir -name jni.h | head -n 1`
+ AS_IF([test -r "$jnih"], [
+ EXTRA_JDK_INC_DIR=`dirname $jnih`])
+ ])
+ done
+ ])
# cephfs_java_test only makes sense if java is already turned on
# setup CLASSPATH for Debian default junit4.jar package
@@ -368,10 +372,6 @@ if test "x$enable_cephfs_java" = "xyes"; then
CLASSPATH=$CLASSPATH:$EXTRA_CLASSPATH_JAR
export CLASSPATH
AC_MSG_NOTICE([classpath - $CLASSPATH])
- AS_IF([test "$have_junit4" = "1"], [
- AC_CHECK_CLASS([org.junit.rules.ExternalResource], [], [
- AC_MSG_NOTICE(Could not find org.junit.rules.ExternalResource)
- have_junit4=0])])
# Check for jni.h
CPPFLAGS_save=$CPPFLAGS
diff --git a/doc/start/quick-start-preflight.rst b/doc/start/quick-start-preflight.rst
index 58068f1df22..74dc403c211 100644
--- a/doc/start/quick-start-preflight.rst
+++ b/doc/start/quick-start-preflight.rst
@@ -10,17 +10,17 @@ demo cluster to explore some of the functionality. This **Preflight Checklist**
will help you prepare an admin node and a server node for use with
``ceph-deploy``.
-.. ditaa::
+.. ditaa::
/----------------\ /----------------\
| Admin Node |<------->| Server Node |
| cCCC | | cCCC |
\----------------/ \----------------/
-
+
Before you can deploy Ceph using ``ceph-deploy``, you need to ensure that you
have a few things set up first on your admin node and on nodes running Ceph
daemons.
-
+
Install an Operating System
===========================
@@ -42,7 +42,7 @@ SSH server. ::
Create a User
=============
-Create a user on nodes running Ceph daemons.
+Create a user on nodes running Ceph daemons.
.. tip:: We recommend a username that brute force attackers won't
guess easily (e.g., something other than ``root``, ``ceph``, etc).
@@ -55,12 +55,12 @@ Create a user on nodes running Ceph daemons.
``ceph-deploy`` installs packages onto your nodes. This means that
-the user you create requires passwordless ``sudo`` privileges.
+the user you create requires passwordless ``sudo`` privileges.
-.. note:: We **DO NOT** recommend enabling the ``root`` password
- for security reasons.
+.. note:: We **DO NOT** recommend enabling the ``root`` password
+ for security reasons.
-To provide full privileges to the user, add the following to
+To provide full privileges to the user, add the following to
``/etc/sudoers.d/ceph``. ::
echo "ceph ALL = (root) NOPASSWD:ALL" | sudo tee /etc/sudoers.d/ceph
@@ -81,22 +81,25 @@ running Ceph daemons (leave the passphrase empty). ::
Your identification has been saved in /ceph-client/.ssh/id_rsa.
Your public key has been saved in /ceph-client/.ssh/id_rsa.pub.
-Copy the key to each node running Ceph daemons::
+Copy the key to each node running Ceph daemons::
ssh-copy-id ceph@ceph-server
-Modify your ~/.ssh/config file of your admin node so that it defaults
+Modify your ~/.ssh/config file of your admin node so that it defaults
to logging in as the user you created when no username is specified. ::
Host ceph-server
Hostname ceph-server.fqdn-or-ip-address.com
User ceph
+.. note:: Do not call ceph-deploy with ``sudo`` or run as ``root`` if you are
+ login in as a different user (as in the ssh config above) because it
+ will not issue ``sudo`` commands needed on the remote host.
Install ceph-deploy
===================
-To install ``ceph-deploy``, execute the following::
+To install ``ceph-deploy``, execute the following::
wget -q -O- 'https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc' | sudo apt-key add -
echo deb http://ceph.com/debian-dumpling/ $(lsb_release -sc) main | sudo tee /etc/apt/sources.list.d/ceph.list
@@ -112,7 +115,7 @@ node (e.g., ensure ``iptables``, ``ufw`` or other tools that may prevent
connections, traffic forwarding, etc. to allow what you need).
.. tip:: The ``ceph-deploy`` tool is new and you may encounter some issues
- without effective error messages.
+ without effective error messages.
Once you have completed this pre-flight checklist, you are ready to begin using
``ceph-deploy``.
@@ -147,7 +150,7 @@ Once you have passwordless ``ssh`` connectivity, passwordless ``sudo``,
installed ``ceph-deploy``, and you have ensured appropriate connectivity,
proceed to the `Storage Cluster Quick Start`_.
-.. tip:: The ``ceph-deploy`` utility can install Ceph packages on remote
+.. tip:: The ``ceph-deploy`` utility can install Ceph packages on remote
machines from the admin node!
.. _Storage Cluster Quick Start: ../quick-ceph-deploy
diff --git a/src/cls/Makefile.am b/src/cls/Makefile.am
index 0c04c64faa7..2d3d43cb1e3 100644
--- a/src/cls/Makefile.am
+++ b/src/cls/Makefile.am
@@ -59,11 +59,13 @@ libcls_lock_client_la_SOURCES = \
cls/lock/cls_lock_types.cc \
cls/lock/cls_lock_ops.cc
noinst_LTLIBRARIES += libcls_lock_client.la
+DENCODER_DEPS += libcls_lock_client.la
libcls_refcount_client_la_SOURCES = \
cls/refcount/cls_refcount_client.cc \
cls/refcount/cls_refcount_ops.cc
noinst_LTLIBRARIES += libcls_refcount_client.la
+DENCODER_DEPS += libcls_refcount_client.la
libcls_version_client_a_SOURCES = \
cls/version/cls_version_client.cc \
@@ -81,12 +83,14 @@ libcls_replica_log_client_a_SOURCES = \
cls/replica_log/cls_replica_log_ops.cc \
cls/replica_log/cls_replica_log_client.cc
noinst_LIBRARIES += libcls_replica_log_client.a
+DENCODER_DEPS += libcls_replica_log_client.a
libcls_rgw_client_la_SOURCES = \
cls/rgw/cls_rgw_client.cc \
cls/rgw/cls_rgw_types.cc \
cls/rgw/cls_rgw_ops.cc
noinst_LTLIBRARIES += libcls_rgw_client.la
+DENCODER_DEPS += libcls_rgw_client.la
libcls_rbd_client_la_SOURCES = cls/rbd/cls_rbd_client.cc
noinst_LTLIBRARIES += libcls_rbd_client.la
diff --git a/src/java/Makefile.am b/src/java/Makefile.am
index ac7e86cf9fa..8b28f839e46 100644
--- a/src/java/Makefile.am
+++ b/src/java/Makefile.am
@@ -64,7 +64,6 @@ BUILT_SOURCES = $(JAVA_H)
if HAVE_JUNIT4
JAVA_TEST_CLASSES = $(JAVA_TEST_SRC:test/%.java=%.class)
-ESCAPED_JAVA_TEST_CLASSES = com/ceph/fs/CephAllTests\$$1.class
CEPH_TEST_PROXY=test/com/ceph/fs/CephMountTest.class
@@ -73,7 +72,7 @@ $(CEPH_TEST_PROXY): $(JAVA_TEST_SRC) $(CEPH_PROXY)
$(JAVAC) -source 1.5 -target 1.5 -Xlint:-options test/com/ceph/fs/*.java
libcephfs-test.jar: $(CEPH_TEST_PROXY)
- $(JAR) cf $@ $(JAVA_TEST_CLASSES:%=-C test %) $(ESCAPED_JAVA_TEST_CLASSES:%=-C test %)
+ $(JAR) cf $@ $(JAVA_TEST_CLASSES:%=-C test %)
java_DATA += libcephfs-test.jar
diff --git a/src/java/test/com/ceph/fs/CephAllTests.java b/src/java/test/com/ceph/fs/CephAllTests.java
index 71c2ddfee96..039ad6da3b7 100644
--- a/src/java/test/com/ceph/fs/CephAllTests.java
+++ b/src/java/test/com/ceph/fs/CephAllTests.java
@@ -23,7 +23,6 @@ import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.UUID;
import org.junit.*;
-import org.junit.rules.ExternalResource;
import org.junit.runners.Suite;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
@@ -42,16 +41,4 @@ import static org.junit.Assert.*;
*/
public class CephAllTests{
- @Rule
- public static ExternalResource testRule = new ExternalResource(){
- @Override
- protected void before() throws Throwable{
- // Add debugging messages or setup code here
- };
-
- @Override
- protected void after(){
- // Add debugging messages or cleanup code here
- };
- };
}
diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc
index 8d15dbd9424..366093e91a3 100644
--- a/src/mon/OSDMonitor.cc
+++ b/src/mon/OSDMonitor.cc
@@ -2154,7 +2154,7 @@ bool OSDMonitor::preprocess_command(MMonCommand *m)
osdmap.get_inst(i));
}
r = 0;
- ss << " instructed to " << whostr;
+ ss << " instructed to " << pvec.back();
} else {
long osd = parse_osd_id(whostr.c_str(), &ss);
if (osd < 0) {
diff --git a/src/os/FileStore.cc b/src/os/FileStore.cc
index 5d9e9d1482d..ac51f95006f 100644
--- a/src/os/FileStore.cc
+++ b/src/os/FileStore.cc
@@ -324,7 +324,8 @@ int FileStore::lfn_unlink(coll_t cid, const hobject_t& o,
assert(!m_filestore_fail_eio || r != -EIO);
return r;
}
- force_clear_omap = true;
+ if (st.st_nlink == 1)
+ force_clear_omap = true;
}
if (force_clear_omap) {
dout(20) << __func__ << ": clearing omap on " << o
diff --git a/src/osdc/ObjectCacher.cc b/src/osdc/ObjectCacher.cc
index 01eeccc03be..590b5d473a8 100644
--- a/src/osdc/ObjectCacher.cc
+++ b/src/osdc/ObjectCacher.cc
@@ -899,11 +899,10 @@ void ObjectCacher::bh_write_commit(int64_t poolid, sobject_t oid, loff_t start,
ob->last_commit_tid = tid;
// waiters?
+ list<Context*> ls;
if (ob->waitfor_commit.count(tid)) {
- list<Context*> ls;
ls.splice(ls.begin(), ob->waitfor_commit[tid]);
ob->waitfor_commit.erase(tid);
- finish_contexts(cct, ls, r);
}
// is the entire object set now clean and fully committed?
@@ -915,6 +914,9 @@ void ObjectCacher::bh_write_commit(int64_t poolid, sobject_t oid, loff_t start,
oset->dirty_or_tx == 0) { // nothing dirty/tx
flush_set_callback(flush_set_callback_arg, oset);
}
+
+ if (!ls.empty())
+ finish_contexts(cct, ls, r);
}
}
diff --git a/src/rgw/Makefile.am b/src/rgw/Makefile.am
index b812d908569..24060b52e25 100644
--- a/src/rgw/Makefile.am
+++ b/src/rgw/Makefile.am
@@ -93,11 +93,6 @@ DENCODER_SOURCES += \
rgw/rgw_common.cc \
rgw/rgw_env.cc \
rgw/rgw_json_enc.cc
-DENCODER_DEPS += \
- libcls_lock_client.la \
- libcls_rgw_client.la \
- libcls_replica_log_client.a \
- libcls_refcount_client.la
endif # WITH_RADOSGW
diff --git a/src/test/Makefile.am b/src/test/Makefile.am
index f4f4defd6f7..9ce4a246673 100644
--- a/src/test/Makefile.am
+++ b/src/test/Makefile.am
@@ -389,6 +389,11 @@ unittest_crc32c_LDADD = $(UNITTEST_LDADD) $(CEPH_GLOBAL)
unittest_crc32c_CXXFLAGS = $(UNITTEST_CXXFLAGS)
check_PROGRAMS += unittest_crc32c
+unittest_arch_SOURCES = test/test_arch.c
+unittest_arch_LDADD = $(UNITTEST_LDADD) $(CEPH_GLOBAL)
+unittest_arch_CXXFLAGS = $(UNITTEST_CXXFLAGS)
+check_PROGRAMS += unittest_arch
+
unittest_crypto_SOURCES = test/crypto.cc
unittest_crypto_LDADD = $(UNITTEST_LDADD) $(CEPH_GLOBAL)
unittest_crypto_CXXFLAGS = $(UNITTEST_CXXFLAGS)