Nathan Cutler [Fri, 26 Feb 2016 21:23:01 +0000 (22:23 +0100)]
packaging: move python-flask runtime dependency to ceph-mon, radosgw
Flask is used by MON (in the Ceph REST API) and by RGW (powerdns).
Therefore, it only needs to be in the ceph-mon and ceph-radosgw packages.
Also, this commit encloses the specification of the python-flask runtime
dependency in distro-conditional blocks to account for a minor difference
in the package name between RHEL and SUSE.
Ken Dreyer [Fri, 26 Feb 2016 15:47:31 +0000 (08:47 -0700)]
debian: remove ceph-base's dependency on -mon and -osd
The ceph-base package contains files shared between the -mon, -osd, and
-mds. In other words, the MON, OSD, and MDS servers depend on ceph-base,
but ceph-base should not depend on the leaf packages.
Reported-by: Kefu Chai <kchai@redhat.com> Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
Ken Dreyer [Thu, 25 Feb 2016 16:25:10 +0000 (09:25 -0700)]
debian: put libexec files in /usr/lib
SUSE does not allow the use of /usr/libexec, so commit 69291f872e7dd20e88c052cfc220e02d59826c0f changed the RPM
packaging to put the libexec files into /usr/lib instead. Do the same
thing on Debian.
Ali Maredia [Thu, 11 Feb 2016 17:59:15 +0000 (12:59 -0500)]
debian/rpm: split mon/osd/mds server packages
Split up the "ceph" package into four new packages:
1. ceph-mon
2. ceph-osd
3. ceph-mds (already done on Debian)
4. ceph-base (files shared among multiple servers)
and then:
5. Make "ceph" into a metapackage that depends on both -mon and -osd
(and -mds, for RPMs).
To describe the outcome of this change another way:
For RPMs:
- "ceph-{mon,osd,mds}" Require: ceph-base.
- "ceph" will become a metapackage that Requires: ceph-{mon,osd,mds}.
For DEBs:
- "ceph-{mon,osd,mds}" will Depends: ceph-base.
- "ceph" will become a metapackage that Depends: ceph-{mon,osd}.
- "ceph" will continue to Recommends: ceph-mds
New users should "yum install ceph-mon" or "yum install ceph-osd" (or
"apt-get install ceph-mon", etc) in order to install the exact daemons
that they need.
Kefu Chai [Fri, 12 Feb 2016 15:52:56 +0000 (23:52 +0800)]
Makefile: workaround an automake bug for "make check"
override the automake variable of am__is_gnu_make. it is a workaround
for http://debbugs.gnu.org/cgi/bugreport.cgi?bug=18744. this bug was
fixed in automake 1.15, but automake 1.13 is supported. so we can not
just require 1.15 using `AM_INIT_AUTOMAKE`. this only happens when we
have lots of source files *and* we are using automake v1.14 or lower.
Kefu Chai [Fri, 12 Feb 2016 15:52:56 +0000 (23:52 +0800)]
Makefile: workaround an automake bug for "make check"
override the automake variable of am__is_gnu_make. it is a workaround
for http://debbugs.gnu.org/cgi/bugreport.cgi?bug=18744. this bug was
fixed in automake 1.15, but automake 1.13 is supported. so we can not
just require 1.15 using `AM_INIT_AUTOMAKE`. this only happens when we
have lots of source files *and* we are using automake v1.14 or lower.
Kefu Chai [Fri, 12 Feb 2016 15:52:56 +0000 (23:52 +0800)]
Makefile: workaround an automake bug for "make check"
override the automake variable of am__is_gnu_make. it is a workaround
for http://debbugs.gnu.org/cgi/bugreport.cgi?bug=18744. this bug was
fixed in automake 1.15, but automake 1.13 is supported. so we can not
just require 1.15 using `AM_INIT_AUTOMAKE`. this only happens when we
have lots of source files *and* we are using automake v1.14 or lower.
Nathan Cutler [Thu, 18 Feb 2016 23:22:28 +0000 (00:22 +0100)]
src/yasm-wrapper: ignore parameters starting with ggc-min
When the "with lowmem_builder" bcond is active, the string "--param
ggc-min-expand=20 --param ggc-min-heapsize=32768" is added to
RPM_OPT_FLAGS. In the course of the build, these parameters get passed on
to yasm-wrapper, making it unhappy.
Nathan Cutler [Mon, 15 Feb 2016 19:10:59 +0000 (20:10 +0100)]
packaging: move ceph_common.sh and ceph-osd-prestart.sh to /usr/lib/ceph
First, it makes sense for both ceph_common.sh and ceph-osd-prestart.sh to
reside in the same directory: make it so.
Second, /usr/lib exists on both RHEL/Fedora and SLE/openSUSE, whereas
the later lacks /usr/libexec. To make this less painful, package
ceph_common.sh and ceph-osd-prestart.sh in /usr/lib/ceph.
Third, allow e.g. FreeBSD to do its own thing by using the $(libexecdir)
Autoconf variable (but set it to /usr/lib in the spec file).
actually we are verifying if the variable is an instance of
specified class. for example, the `prepare.data` should be
a `PrepareFilestoreData` if `--bluestore` is not specified.
Haomai Wang [Sat, 6 Feb 2016 06:52:43 +0000 (14:52 +0800)]
AsyncConnection: avoid debug log in cleanup_handler
local connection will be stop and call cleanup_handler after messenger
is down
introduced in
commit(https://github.com/ceph/ceph/commit/9da2fffd31562ed5d0b795d7862b3ebec66aba40)
Adam C. Emerson [Mon, 14 Sep 2015 17:35:10 +0000 (13:35 -0400)]
osdc: Update to use C++11 concurrency
The only externally visible change is that Objecter::get_osdmap_read
and Objedcter::put_osdmap_read have been removed in favor of
Objecter::with_osdmap.
It can be used like:
objecter->with_osdmap([&](const OSDMap& o) { o.do_stuff(); };
int x = objecter->with_osdmap([&](const OSDMap& o) {
return get_thing(id); });
objecter->with_osdmap(std::mem_fn(&OSDMap::do_stuff));
int x = objecter->with_osdmap(std::mem_fn(&OSDMap::get_thing),
id);
The choice between the style of the first two examples or the second two
is arbitrary and depends on what you prefer.
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
Matt Benjamin [Fri, 5 Feb 2016 21:43:43 +0000 (16:43 -0500)]
cmake: add libboost_system to EXTRALIBS
This concisely fixes several unittest builds, and reflects the
fact that this library dependency has moved into several areas
of the codebase (libcephfs, librbd, librgw).
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
Jason Dillaman [Wed, 3 Feb 2016 22:33:24 +0000 (17:33 -0500)]
cls_journal: new tag management methods and handling
In the case of librbd, a new tag will be allocated when the
exclusive lock is acquired. All tags for the same dataset
(e.g. librbd image) will belong to the same class. Tags are
automatically pruned on tag create / client unregister
if no other clients' commit position would require the tags.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Adam C. Emerson [Mon, 1 Feb 2016 15:40:54 +0000 (10:40 -0500)]
time: Have skewing-now call non-skewing now
For the real-time clocks, Ceph's testing infrastructure likes to be able to
inject a skew. To avoid pulling CephContext into ceph_time.h these are moved to
ceph_time.cc. The original way this was done called clock_gettime in both
places.
This is an unnecessary duplication and apparently error-prone. So only call
clock_gettime from one place.
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
Sage Weil [Fri, 5 Feb 2016 14:20:40 +0000 (09:20 -0500)]
os/bluestore: fix block device file creation
Just make a separate flag to indicate whether we create a block
file. This lets us drop the weird touch in vstart.sh, and default
to creating a token 'block' file on --mkfs.
Loic Dachary [Mon, 1 Feb 2016 12:32:13 +0000 (19:32 +0700)]
global: do not start two daemons with a single pid-file (part 2)
Fixes the following bugs:
* the fd is open(O_WRONLY) and cannot be read from, safe_read
always fails and never removes the pid file.
* pidfile_open(g_conf) is close(STDOUT_FILENO) and there is a risk that
pidfile_open gets STDOUT_FILENO only to have it closed and redirected
to /dev/null.
* Before writing the file, ftruncate it so that overriding a file
containing the pid 1234 with the pid 89 does not end up being
a file with 8934.
* Before reading the file, lseek back to offset 0 otherwise it
will read nothing.
* tests_pidfile was missing an argument when failing
TEST_without_pidfile and killed all process with ceph in their name,
leading to chaos and no useful error message.
* lstat(fd) cannot possibly return a result different from the one
obtained right after the file was open, stat(path) must be used
instead.
In addition to fixing the bugs above, refactor the pidfile.cc
implementation to:
* be systematic about error reporting (using cerr for when removing
the pidfile because derr is not available at this point and derr
when creating the pidfile).
* replace pidfile_open / pidfile_write with just pidfile_write since
there never is a case when they are not used together.
More test cases are added to test_pidfile to verify the bugs above are
fixed.