mirror of
https://github.com/ceph/ceph
synced 2025-02-19 17:08:05 +00:00
Merge branch 'next'
This commit is contained in:
commit
caef5acdcf
26
qa/workunits/osdc/stress_objectcacher.sh
Executable file
26
qa/workunits/osdc/stress_objectcacher.sh
Executable file
@ -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
|
@ -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 \
|
||||
|
@ -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;
|
||||
|
@ -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`
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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) {
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
20
src/upstart/ceph-osd-all-starter.conf
Normal file
20
src/upstart/ceph-osd-all-starter.conf
Normal file
@ -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
|
4
src/upstart/ceph-osd-all.conf
Normal file
4
src/upstart/ceph-osd-all.conf
Normal file
@ -0,0 +1,4 @@
|
||||
description "Ceph OSD (all instances)"
|
||||
|
||||
start on starting ceph
|
||||
stop on runlevel [!2345] or stopping ceph
|
@ -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
|
||||
|
4
src/upstart/ceph.conf
Normal file
4
src/upstart/ceph.conf
Normal file
@ -0,0 +1,4 @@
|
||||
description "Ceph"
|
||||
|
||||
start on (local-filesystems and net-device-up IFACE!=lo)
|
||||
stop on runlevel [!2345]
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user