Commit Graph

66 Commits

Author SHA1 Message Date
Anirudha Bose
a54a195dc4 Replace gmock/gtest with googletest
Google Mock has been absorbed into the Google Test project, and
is now available under the googletest repository.

Signed-off-by: Anirudha Bose <ani07nov@gmail.com>
2016-07-12 17:18:09 -07:00
Loic Dachary
35004a628b udev: always populate /dev/disk/by-parttypeuuid
ceph-disk activate-all walks /dev/disk/by-parttypeuuid at boot time. It
is not necessary when udev fires ADD event for each partition and
95-ceph-osd.rules gets a chance to activate a ceph disk or journal.

There are various reasons why udev ADD events may not be fired at
boot (for instance Debian Jessi 8.5 never does it and CentOS 7.2 seems
to be racy in that regard when a LVM root is being used).

Populating /dev/disk/by-parttypeuuid fixes ceph-disk activate-all that
would not work without it. And it guarantees disks are activated at boot
time regardless of wether udev fires ADD events at the right time (or at
all).

The new udev file is a partial resurection of the
60-ceph-partuuid-workaround-rules that was removed by
9f77244b8e. It is given a name that
reflects its new purpose.

Fixes http://tracker.ceph.com/issues/16351

Signed-off-by: Loic Dachary <loic@dachary.org>
2016-06-23 09:37:05 +02:00
Nathan Cutler
c86e0021d6 rpm: drop udev/95-ceph-osd-alt.rules
This udev rules file was needed on older RHEL platforms, which are
unsupported as of jewel.

Signed-off-by: Nathan Cutler <ncutler@suse.com>
2016-05-06 13:44:15 +02:00
Kefu Chai
788bbb55ed automake: use :: rule for adding target
Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-05-03 10:35:28 +08:00
Sage Weil
9f77244b8e udev: remove 60-ceph-partuuid-workaround-rules
These were added to get /dev/disk/by-partuuid/ symlinks to work on
wheezy.  They are no longer needed for the supported distros (el7+,
jessie+, trusty+), and they apparently break dm by opening devices they
should not.

Fixes: http://tracker.ceph.com/issues/15516
Signed-off-by: Sage Weil <sage@redhat.com>
2016-04-18 09:16:02 -04:00
Mykola Golub
1ae5600307 freebsd: use sysctl instead of nproc
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
2016-03-09 07:50:43 +00:00
Loic Dachary
d0e9c40177 tests: restore run-cli-tests
e4ca468 moved src/test/run-cli-tests from check-local to check_SCRIPTS
but did not add it to the TESTS variable.

Signed-off-by: Loic Dachary <loic@dachary.org>
2015-11-13 17:44:15 +01:00
Sage Weil
8678a8acec kill /etc/security/limits.d/ceph
This only affects login shells; not useful.

Signed-off-by: Sage Weil <sage@redhat.com>
2015-09-14 12:04:50 -04:00
Sage Weil
cd4bd80a34 Makefile.am: include etc in tarball
Signed-off-by: Sage Weil <sage@redhat.com>
2015-09-11 11:38:26 -04:00
Sage Weil
3662a225b8 udev: use ceph-disk trigger ... with single set of udev rules
Signed-off-by: Sage Weil <sage@redhat.com>
2015-09-01 11:22:25 -04:00
Sage Weil
c7ee798a0f set nofile ulimit in /etc/security/limits.d/ceph only
Specify the nofile ulimit in one standard place, where everyone expects it
to be.  Drop it from the ceph-osd unit file.

Leave upstart and sysvinit untouched for the time being to avoid compat
issues.

Signed-off-by: Sage Weil <sage@redhat.com>
2015-08-26 20:34:15 -04:00
Boris Ranto
c52eb995e0 Add initial SELinux support
This patch modifies the build system and spec file to provide a support
for SELinux enforcing in an opt-in matter via ceph-selinux package.

Signed-off-by: Boris Ranto <branto@redhat.com>
2015-08-05 15:21:41 +02:00
Sage Weil
ec8433df38 Makefile: include systemd udev rules in tarball
Signed-off-by: Sage Weil <sage@redhat.com>
2015-08-03 10:57:14 -04:00
Owen Synge
1ba4694d7e Autotools to install systemd unit files.
To simplify the spec file we should install as much using autotools
and as little as possible in the spec file.

Signed-off-by: Owen Synge <osynge@suse.com>
2015-08-01 09:58:33 -04:00
Sage Weil
106a1c3081 Makefile: install ceph-post-file keys with mode 600
Otherwise ssh (may) prompt for a password.

Signed-off-by: Sage Weil <sage@redhat.com>
2015-06-01 15:38:07 -07:00
Loic Dachary
e4ca4685e0 tests: reduce make check verbosity
Move check-local scripts

   src/test/run-cli-tests
   encode-decode-non-regression.sh
   test/encoding/readable.sh

to check_SCRIPTS. Their output is captured in .log file when running
with a recent automake. This reduces the output of make check by an
order of magnitude.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-05-18 00:41:16 +02:00
Loic Dachary
78c73c512a install-deps.sh: only pip install after make clean
Do not re-install all python dependencies if there already exists a
wheelhouse directory. It makes it so running install-deps.sh twice will
only access the network the first time. The directories where the python
dependencies are installed are removed by make clean. Refreshing the
python dependencies cache can be done via make clean ; install-deps.sh

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-05-13 08:35:53 +02:00
Loic Dachary
f36bd0e967 tests: need 1024 files per process not 100024
Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-05-08 01:14:47 +02:00
Loic Dachary
0e9598635d tests: fail make check if nproc is too low
When running tests in parallel with make -jX, the ulimit -u (number of
processor / thread per user) needs to be at least X * 1024. If not it
will fail in mysterious ways. Since there is no convenient way to figure
out the value of X ( see
http://blog.jgc.org/2015/03/gnu-make-insanity-finding-value-of-j.html
for a non trivial an entertaining solution) add a very conservative
check that assumes the user will run make -jX where X is nproc / 2.

It will be annoying for users who want to run make check, not use -j,
and have a low ulimit -u. But the error suggest a way to override this
with

   make CHECK_ULIMIT=false check

This is a minor irritation compared to the puzzling behavior of make
check when ulimit is exceeded.

http://tracker.ceph.com/issues/11532 Fixes: #11532

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-05-08 00:55:55 +02:00
Loic Dachary
0c715f6971 Merge pull request #4532 from dachary/wip-init-system-detection
ceph-detect-init helper and associated tests

Reviewed-by: Ken Dreyer <kdreyer@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
2015-05-07 22:21:26 +02:00
Loic Dachary
2b5f0fc6ae automake: allow multiple {install,all,...}-local targets
Replace install-data-local: with install-data-local:: (two :) so that
other Makefile.am can have the same target and all get concatenated
instead of being overridden.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-05-05 19:16:56 +02:00
Sage Weil
7f209b4bc8 Merge remote-tracking branch 'gh/next' 2015-05-05 09:53:51 -07:00
Kefu Chai
156e55b7f9 man: do not dist man pages if sphinx is not available
Signed-off-by: Kefu Chai <kchai@redhat.com>
2015-05-05 02:00:02 +08:00
Ken Dreyer
639e0c15f5 packaging: ship systemd/ceph.tmpfiles.d in tarballs
Prior to this commit, the tarballs did not contain
any files under the top-level "systemd" directory. This caused problems
with RPM builds on Fedora and RHEL 7, because as of commit
aa88364f30, those RPMs depend on the
systemd/ceph.tmpfiles.d file.

(Longer-term we might want to improve the tarball generation code to be
less complex/manual.)

http://tracker.ceph.com/issues/11383 Refe: #11383

Reported-by: Greg Farnum <gfarnum@redhat.com>
Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
2015-04-13 11:33:47 -06:00
Jason Dillaman
bf05ec186a tests: replace existing gtest 1.5.0 with gmock/gtest 1.7.0
Google Testing Framework is included by default within the Google
C++ Mocking Framework.  Update makefiles to use new gmock/gtest
libraries and remove old gtest source code.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2015-01-25 23:09:03 -05:00
Loic Dachary
06593813af documentation: replace deps.{deb,rpm}.txt with scripts
install-deps.sh installs the dependencies based on the content of
debian/control (if apt-get is found) or ceph.spec.in (if yum is
found). The manually maintained list of dependencies for deb based
operating systems (deps.deb.txt) and rpm based operating
systems (deps.rpm.txt) are deprecated.

http://tracker.ceph.com/issues/10175 Fixes: #10175

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2014-12-01 16:15:21 +01:00
Danny Al-Gaaf
f06ffba021 Makefile.am: make sure everything was build before make check
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2014-10-08 20:19:07 +02:00
Sahid Orentino Ferdjaoui
5bb078f991 Populate ChangeLog when distribute
Generates ChangeLog from git history for a
distributed package.

Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@cloudwatt.com>
2014-06-05 17:33:53 +02:00
Sahid Orentino Ferdjaoui
b22cc850a8 Populate AUTHORS when distribute
Adds a complete list of contributors in a
distributed package.

Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@cloudwatt.com>
2014-06-05 17:33:42 +02:00
Sage Weil
93a61dfca0 Makefile: make install-deps rule
This only works if autoconf is happy, but it's better than nothing.

Fixes: #8259
Signed-off-by: Sage Weil <sage@inktank.com>
2014-05-28 14:55:54 -07:00
Sage Weil
2f6a62b457 ceph-post-file: fix installation of ssh key files
Fixes: #7992
Signed-off-by: Sage Weil <sage@inktank.com>
2014-04-04 14:39:56 -07:00
Sage Weil
d08e05e463 ceph-post-file: single command to upload a file to cephdrop
Use sftp to upload to a directory that only this user and ceph devs can
access.

Distribute an ssh key to connect to the account.  This will let us revoke
the key in the future if we feel the need.  Also distribute a known_hosts
file so that users have some confidence that they are connecting to the
real ceph drop account and not some third party.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
2013-08-16 17:59:11 -07:00
Sage Weil
d8d7113c35 udev: install disk/by-partuuid rules
Wheezy's udev (175-7.2) has broken rules for the /dev/disk/by-partuuid/
symlinks that ceph-disk relies on.  Install parallel rules that work.  On
new udev, this is harmless; old older udev, this will make life better.

Fixes: #4865
Backport: cuttlefish
Signed-off-by: Sage Weil <sage@inktank.com>
2013-05-16 18:40:29 -07:00
Gary Lowell
7ad63d23d7 ceph-disk: OSD hotplug fixes for Centos
Two fixes for Centos 6.3 and other systems with udev versions
prior to 172.  The disk peristant name using the GPT UUID does
not exist, so use the by_path persistent name instead for the
journal symlink.

The gpt label fields are not available for use in udev rules. Add
ceph-disk-udev wrapper script that extracts the partition
type guid from the label and calls ceph-disk-activate if it is
a ceph guid type. (Bug #4632)

Signed-off-by: Gary Lowell  <gary.lowell@inktank.com>
2013-04-22 22:30:39 -07:00
Sage Weil
5bd85ee5aa udev: trigger ceph-disk-activate directly from udev
There is no need to depend on upstart for this.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-02-13 22:18:59 -08:00
Gary Lowell
3658157b60 Makefile: Updates to eliminates warnings, add test for boost system lib. 2012-10-15 14:14:34 -07:00
Sage Weil
66553d25f0 Makefile: link gtest statically
The problem:

 - the unittests link against gtest, and gtest is not installed.  that's
   normally fine, but...
 - rbd and rados api unit tests link against gtest, and are installed
   by 'make install'.  they are needed for teuthology runs, etc.
 - if we build gtest as an .la library, we can only control whether *all*
   or *no* .la libraries are linked statically.
 - we want librados to be linked dynamically.

The solution:

 - build gtest as .a instead of a libtool library
 - link it statically, always.

Unit test binaries are bigger now.  Oh well...

Fixes: #2331
Signed-off-by: Sage Weil <sage@inktank.com>
2012-06-13 11:05:53 -07:00
Tommi Virtanen
e35d9de04d Makefile: include run-cli-tests-maybe-unset-ccache in dist tarball.
Apparently "make distcheck" has been broken for 3 months;
I find that hard to believe, but that's what it looks like.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
2011-09-23 15:55:01 -07:00
Tommi Virtanen
c16241fd41 rpm: Include ceph.spec in release tarball.
This lets users say "rpmbuild -ta ceph-XXX.tgz".

Closes: #1521
Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
2011-09-08 12:59:05 -07:00
Sage Weil
6decfa742f Makefile: allow gtest to be linked in statically
Use UNITTEST_STATIC_LDADD instead of UNITTEST_LDADD.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-08-21 17:53:19 -07:00
Colin Patrick McCabe
e442a2c377 Makefile.am: build gtest in debug builds
Formerly, we only built gtest when doing 'make check'. However, the
librados-api tests, which are built in debug mode for the 'all' target,
also use gtest. So build it when needed.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-09 16:02:52 -07:00
Sage Weil
954e09661f qa: do not use automake for workunit makefiles
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-06-14 12:53:33 -07:00
Samuel Just
863ef7c331 debian: add udev rules
Add /lib/udev/rules.d/50-rbd.rules to debian package.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
2011-03-10 16:08:39 -08:00
Colin Patrick McCabe
f1d7af97f3 workunits: add direct_io_test
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-01-20 10:46:55 -08:00
Tommi Virtanen
95d7d6e2b6 Clean up test virtualenv on "make clean".
Found by "make distcheck".
2011-01-14 16:27:24 -08:00
Tommi Virtanen
a549955ec9 Include the cli tests in a dist tarball.
Found by "make distcheck".
2011-01-14 16:27:24 -08:00
Tommi Virtanen
58f6d09eac Also distribute pre-downloaded tarballs.
Found by "make distcheck".
2011-01-14 16:27:24 -08:00
Tommi Virtanen
5045695cd8 Teach run-cli-tests about build dirs.
An optional argument points can tell it where to put
generated files (in this case, virtualenv). Provide
the argument in Makefile.am.

Options are still passed to cram, so you can say
"./src/test/run-cli-tests -i".
2011-01-14 16:27:16 -08:00
Tommi Virtanen
f599b0b629 run-cli-tests is in srcdir not in build dir.
Found by "make distcheck".
2011-01-14 15:24:47 -08:00
Tommi Virtanen
d8073c8bf7 Include run-cli-tests in release tarball.
Found by "make distcheck".
2011-01-14 15:24:47 -08:00