diff options
author | Josh Durgin <josh.durgin@inktank.com> | 2012-11-26 10:38:57 -0800 |
---|---|---|
committer | Josh Durgin <josh.durgin@inktank.com> | 2012-11-26 10:38:57 -0800 |
commit | caef5acdcf32077f2af445d6cc5a2ed847d4d5c4 (patch) | |
tree | add541f671fcb6aba2ed03be4759d5ff2d0e0483 | |
parent | 39d2d08a233c81dc6e376f7016ff92f1fb33fa70 (diff) | |
parent | 365ba0600bdaf28b9b71e7c6d5113cd531f95891 (diff) | |
download | ceph-caef5acdcf32077f2af445d6cc5a2ed847d4d5c4.tar.gz |
Merge branch 'next'
-rwxr-xr-x | qa/workunits/osdc/stress_objectcacher.sh | 26 | ||||
-rw-r--r-- | src/Makefile.am | 3 | ||||
-rw-r--r-- | src/common/sync_filesystem.h | 5 | ||||
-rw-r--r-- | src/init-ceph.in | 2 | ||||
-rw-r--r-- | src/mon/MonMap.cc | 4 | ||||
-rw-r--r-- | src/os/FileStore.cc | 12 | ||||
-rw-r--r-- | src/upstart/ceph-mds-all-starter.conf | 2 | ||||
-rw-r--r-- | src/upstart/ceph-mds-all.conf | 4 | ||||
-rw-r--r-- | src/upstart/ceph-mds.conf | 2 | ||||
-rw-r--r-- | src/upstart/ceph-mon-all-starter.conf | 2 | ||||
-rw-r--r-- | src/upstart/ceph-mon-all.conf | 4 | ||||
-rw-r--r-- | src/upstart/ceph-mon.conf | 2 | ||||
-rw-r--r-- | src/upstart/ceph-osd-all-starter.conf | 20 | ||||
-rw-r--r-- | src/upstart/ceph-osd-all.conf | 4 | ||||
-rw-r--r-- | src/upstart/ceph-osd.conf | 4 | ||||
-rw-r--r-- | src/upstart/ceph.conf | 4 | ||||
-rw-r--r-- | src/upstart/radosgw-all-starter.conf | 2 | ||||
-rw-r--r-- | src/upstart/radosgw-all.conf | 4 |
18 files changed, 87 insertions, 19 deletions
diff --git a/qa/workunits/osdc/stress_objectcacher.sh b/qa/workunits/osdc/stress_objectcacher.sh new file mode 100755 index 00000000000..03a5c952e01 --- /dev/null +++ b/qa/workunits/osdc/stress_objectcacher.sh @@ -0,0 +1,26 @@ +#!/bin/sh -ex + +for i in $(seq 1 10) +do + for DELAY in 0 1000 + do + for OPS in 1000 10000 + do + for OBJECTS in 10 50 100 + do + for READS in 0.90 0.50 0.10 + do + for OP_SIZE in 4096 131072 1048576 + do + for MAX_DIRTY in 0 25165824 + do + test_objectcacher_stress --ops $OPS --percent-read $READS --delay-ns $DELAY --objects $OBJECTS --max-op-size $OP_SIZE --client-oc-max-dirty $MAX_DIRTY > /dev/null 2>&1 + done + done + done + done + done + done +done + +echo OK diff --git a/src/Makefile.am b/src/Makefile.am index eebb6c7cc5c..cbbedd9342f 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1073,11 +1073,14 @@ EXTRA_DIST += \ $(ceph_tool_gui_DATA) \ $(srcdir)/test/encoding/readable.sh \ $(srcdir)/test/encoding/check-generated.sh \ + $(srcdir)/upstart/ceph.conf \ $(srcdir)/upstart/ceph-mon.conf \ $(srcdir)/upstart/ceph-mon-all.conf \ $(srcdir)/upstart/ceph-mon-all-starter.conf \ $(srcdir)/upstart/ceph-create-keys.conf \ $(srcdir)/upstart/ceph-osd.conf \ + $(srcdir)/upstart/ceph-osd-all.conf \ + $(srcdir)/upstart/ceph-osd-all-starter.conf \ $(srcdir)/upstart/ceph-hotplug.conf \ $(srcdir)/upstart/ceph-mds.conf \ $(srcdir)/upstart/ceph-mds-all.conf \ diff --git a/src/common/sync_filesystem.h b/src/common/sync_filesystem.h index dc90b890c93..5b23576ff4c 100644 --- a/src/common/sync_filesystem.h +++ b/src/common/sync_filesystem.h @@ -41,6 +41,11 @@ inline int sync_filesystem(int fd) return 0; #endif +#ifdef __NR_syncfs + if (syscall(__NR_syncfs, fd) == 0) + return 0; +#endif + #ifdef BTRFS_IOC_SYNC if (::ioctl(fd, BTRFS_IOC_SYNC) == 0) return 0; diff --git a/src/init-ceph.in b/src/init-ceph.in index 2bafa995f75..1c9e0270d5d 100644 --- a/src/init-ceph.in +++ b/src/init-ceph.in @@ -229,8 +229,6 @@ for name in $what; do get_conf tmp_btrfs_devs "" "btrfs devs" if [ -n "$tmp_btrfs_devs" ]; then fs_devs="$tmp_btrfs_devs" - else - echo No osd devs defined! fi fi first_dev=`echo $fs_devs | cut '-d ' -f 1` diff --git a/src/mon/MonMap.cc b/src/mon/MonMap.cc index 8d26d41f7b1..5a9d6ce96bd 100644 --- a/src/mon/MonMap.cc +++ b/src/mon/MonMap.cc @@ -188,7 +188,9 @@ int MonMap::build_from_host_list(std::string hostlist, std::string prefix) addrs[i].set_port(CEPH_MON_PORT); string name = prefix; name += n; - add(name, addrs[i]); + if (!contains(addrs[i]) && + !contains(name)) + add(name, addrs[i]); } return 0; } diff --git a/src/os/FileStore.cc b/src/os/FileStore.cc index 1d6797c2b32..70eef5ae13f 100644 --- a/src/os/FileStore.cc +++ b/src/os/FileStore.cc @@ -1227,7 +1227,7 @@ int FileStore::_detect_fs() } else { dout(0) << "mount syncfs(2) syscall supported by glibc BUT NOT the kernel" << dendl; } -#else +#endif #ifdef SYS_syncfs if (syscall(SYS_syncfs, fd) == 0) { dout(0) << "mount syscall(SYS_syncfs, fd) fully supported" << dendl; @@ -1235,11 +1235,17 @@ int FileStore::_detect_fs() } else { dout(0) << "mount syscall(SYS_syncfs, fd) supported by libc BUT NOT the kernel" << dendl; } -#else - dout(0) << "mount syncfs(2) syscall not support by glibc" << dendl; #endif +#ifdef __NR_syncfs + if (syscall(__NR_syncfs, fd) == 0) { + dout(0) << "mount syscall(__NR_syncfs, fd) fully supported" << dendl; + have_syncfs = true; + } else { + dout(0) << "mount syscall(__NR_syncfs, fd) supported by libc BUT NOT the kernel" << dendl; + } #endif if (!have_syncfs) { + dout(0) << "mount syncfs(2) syscall not supported" << dendl; if (btrfs) { dout(0) << "mount no syncfs(2), but the btrfs SYNC ioctl will suffice" << dendl; } else if (m_filestore_fsync_flushes_journal_data) { diff --git a/src/upstart/ceph-mds-all-starter.conf b/src/upstart/ceph-mds-all-starter.conf index 2748f35c93a..fe7e2bd32ad 100644 --- a/src/upstart/ceph-mds-all-starter.conf +++ b/src/upstart/ceph-mds-all-starter.conf @@ -1,7 +1,7 @@ description "Ceph MDS (task to start all instances)" start on starting ceph-mds-all -stop on runlevel [!2345] +stop on runlevel [!2345] or stopping ceph-mds-all task diff --git a/src/upstart/ceph-mds-all.conf b/src/upstart/ceph-mds-all.conf index 0b58f5f8a60..c9da72ec023 100644 --- a/src/upstart/ceph-mds-all.conf +++ b/src/upstart/ceph-mds-all.conf @@ -1,4 +1,4 @@ description "Ceph MDS (all instances)" -start on (local-filesystems and net-device-up IFACE!=lo) -stop on runlevel [!2345] +start on starting ceph +stop on stopping ceph diff --git a/src/upstart/ceph-mds.conf b/src/upstart/ceph-mds.conf index 8120fd490f2..77841cdccd7 100644 --- a/src/upstart/ceph-mds.conf +++ b/src/upstart/ceph-mds.conf @@ -6,7 +6,7 @@ stop on runlevel [!2345] or stopping ceph-mds-all respawn respawn limit 5 30 -limit nofile 8192 +limit nofile 16384 16384 pre-start script set -e diff --git a/src/upstart/ceph-mon-all-starter.conf b/src/upstart/ceph-mon-all-starter.conf index f7188cb7405..7101a8acca9 100644 --- a/src/upstart/ceph-mon-all-starter.conf +++ b/src/upstart/ceph-mon-all-starter.conf @@ -1,7 +1,7 @@ description "Ceph MON (start all instances)" start on starting ceph-mon-all -stop on runlevel [!2345] +stop on runlevel [!2345] or stopping ceph-mon-all task diff --git a/src/upstart/ceph-mon-all.conf b/src/upstart/ceph-mon-all.conf index 006f2f20745..10c17eab689 100644 --- a/src/upstart/ceph-mon-all.conf +++ b/src/upstart/ceph-mon-all.conf @@ -1,4 +1,4 @@ description "Ceph monitor (all instances)" -start on (local-filesystems and net-device-up IFACE!=lo) -stop on runlevel [!2345] +start on starting ceph +stop on runlevel [!2345] or stopping ceph diff --git a/src/upstart/ceph-mon.conf b/src/upstart/ceph-mon.conf index 90cb67b190b..17fd11b6a24 100644 --- a/src/upstart/ceph-mon.conf +++ b/src/upstart/ceph-mon.conf @@ -6,7 +6,7 @@ stop on runlevel [!2345] or stopping ceph-mon-all respawn respawn limit 5 30 -limit nofile 16384 +limit nofile 16384 16384 pre-start script set -e diff --git a/src/upstart/ceph-osd-all-starter.conf b/src/upstart/ceph-osd-all-starter.conf new file mode 100644 index 00000000000..c4d74e58442 --- /dev/null +++ b/src/upstart/ceph-osd-all-starter.conf @@ -0,0 +1,20 @@ +description "Ceph OSD (start all instances)" + +start on starting ceph-osd-all +stop on runlevel [!2345] or stopping ceph-osd-all + +task + +script + set -e + # TODO what's the valid charset for cluster names and osd ids? + find /var/lib/ceph/osd/ -mindepth 1 -maxdepth 1 -regextype posix-egrep -regex '.*/[a-z0-9]+-[a-z0-9._-]+' -printf '%P\n' \ + | while read f; do + if [ -e "/var/lib/ceph/osd/$f/ready" ]; then + cluster="${f%%-*}" + id="${f#*-}" + + initctl emit ceph-osd cluster="$cluster" id="$id" + fi + done +end script diff --git a/src/upstart/ceph-osd-all.conf b/src/upstart/ceph-osd-all.conf new file mode 100644 index 00000000000..eb379c3d094 --- /dev/null +++ b/src/upstart/ceph-osd-all.conf @@ -0,0 +1,4 @@ +description "Ceph OSD (all instances)" + +start on starting ceph +stop on runlevel [!2345] or stopping ceph diff --git a/src/upstart/ceph-osd.conf b/src/upstart/ceph-osd.conf index 9bbb91cb6a5..23ca2eb2a23 100644 --- a/src/upstart/ceph-osd.conf +++ b/src/upstart/ceph-osd.conf @@ -1,12 +1,12 @@ description "Ceph OSD" start on ceph-osd -stop on runlevel [!2345] +stop on runlevel [!2345] or stopping ceph-osd-all respawn respawn limit 5 30 -limit nofile 8192 +limit nofile 16384 16384 pre-start script set -e diff --git a/src/upstart/ceph.conf b/src/upstart/ceph.conf new file mode 100644 index 00000000000..d129defad7a --- /dev/null +++ b/src/upstart/ceph.conf @@ -0,0 +1,4 @@ +description "Ceph" + +start on (local-filesystems and net-device-up IFACE!=lo) +stop on runlevel [!2345] diff --git a/src/upstart/radosgw-all-starter.conf b/src/upstart/radosgw-all-starter.conf index d3cabcf4ee3..b9357a38fdf 100644 --- a/src/upstart/radosgw-all-starter.conf +++ b/src/upstart/radosgw-all-starter.conf @@ -1,7 +1,7 @@ description "Ceph radosgw (task to start all instances)" start on starting radosgw-all -stop on runlevel [!2345] +stop on runlevel [!2345] or stopping radosgw-all task diff --git a/src/upstart/radosgw-all.conf b/src/upstart/radosgw-all.conf index 2f2e27f9d51..af2b84d24f8 100644 --- a/src/upstart/radosgw-all.conf +++ b/src/upstart/radosgw-all.conf @@ -1,4 +1,4 @@ description "Ceph radosgw (all instances)" -start on (local-filesystems and net-device-up IFACE!=lo) -stop on runlevel [!2345] +start on starting ceph +stop on runlevel [!2345] or stopping ceph |