If the redhat-rpm-config package is installed, the debuginfo rpms will
be built by default. The build will fail when the package installed
and the specfile also invokes the macro.
Signed-off-by: Gary Lowell <gary.lowell@inktank.com>
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>
Merge back what we have in the (open)SUSE ceph spec file for JUnit.
Add missing Requires and the package is named junit4 on some SUSE
versions.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
This patch adds two buildrequires to the ceph.spec file, that are needed
to build the rpms under Fedora. Danny Al-Gaaf commented that the
snappy-devel dependency should actually be added to the leveldb-devel
package. I will try to get that fixed too, in the mean time, this patch
does make sure Ceph builds on Fedora.
Signed-off-by: Erik Logtenberg <erik@logtenberg.eu>
The ceph-libs package existed only on Redhat based distro,
there was e.g. never such a package on SUSE. Therefore: make
sure the 'Obsoletes' is only set on these affected distros.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
* wip-wsgi:
ceph-rest-api: separate into module and front-end for WSGI deploy
ceph-rest-api: make main program be "shell" around WSGI guts
Reviewed-by: Sage Weil <sage@inktank.com>
To deploy ceph-rest-api within a WSGI server (apache/mod_wsgi,
nginx/uwsgi, etc.), there needs to be an importable (.py) module
that performs all init/config when imported. ceph-rest-api was
close, but it needs to be named properly, and there's no argument
passing, so it needs to get args from a fixed file or the env.
Separate most of ceph-rest-api into pybind/ceph_rest_api.py, and make
its arguments come from the environment, and init errors be
ImportError exceptions. Recase ceph-rest-api as a thin layer that
does the usual setup and arg parsing, and then sets args into the
environment and imports ceph_rest_api.py, catching exceptions and
reporting errors. This allows standalone execution as usual.
ceph-rest-api grabs a few module globals (addr/port and the flask.app)
to use after it imports.
Accept cluster name, and do the ceph.conf search using cluster name
in the appropriate places in the searched-for files.
Also ceph_rest_api.py gets a little cleanup (fewer global variables,
cleaner conf file search algorithm, better error reporting on conf
load)
Also: doc updates, packaging updates to include ceph_rest_api.py
Signed-off-by: Dan Mick <dan.mick@inktank.com>
ceph-rest-api is a Python WSGI module for accessing the Ceph cluster.
It supports most of the commands supported by the ceph CLI,
appropriately translated to HTTP GET/PUT requests. It is not a
truly RESTful interface.
Not supported at this moment: "tell", "pg <pgid>", and "daemon"
commands.
Configuration options are specified in ceph.conf, specified with
-c/--conf or obtained from $CEPH_CONF, /etc/ceph/ceph.conf,
~/.ceph/ceph.conf, or ./ceph.conf.
-n/--name specifies the client name, used for the cluster
authentication key and for the ceph.conf section name (default
is client.restapi).
restapi keyring = <keyring file>
restapi public addr = listenIP:port (default 0.0.0.0:5000)
restapi base url = <base path> (default /api/v0.1)
restapi log level = (error, warning, info, debug)
restapi log file = (default /var/log/ceph/<clientname>.log)
Primitive human-level command discovery is supported; GET from
BASEURL (say, http://localhost:5000/api/v0.1) will show an HTML
table of all commands and arguments, method supported, and help strings.
Signed-off-by: Dan Mick <dan.mick@inktank.com>
The %ghost %dir ... line will make this get cleaned up but won't install
it.
Reported-by: Derek Yarnell <derek@umiacs.umd.edu>
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Gary Lowell <gary.lowell@inktank.com>
This was commented out almost years ago in commit 9baf5ef4 but it is not
clear to me that it was correct to do so. In any case, we are not
installing the rc.d links for ceph, which means it does not start up after
a reboot.
Signed-off-by: Sage Weil <sage@inktank.com>
Remove ceph-legacy-cli
Include ceph in proper places to get it built/installed/packaged
Make ceph-common (deb) or ceph (rpm) pkg depend on python-ceph pkg
Signed-off-by: Dan Mick <dan.mick@inktank.com>
Add installed, but not packaged files to ceph-test (ceph-monstore-tool,
ceph-osdomap-tool) rpm file section.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Add installed, but not packaged files to ceph-test (ceph-monstore-tool,
ceph-osdomap-tool) rpm file section.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
This is needed when creating new OSDs (via ceph-disk). At least for most
people. Eventually we'll want to include btrfs here.
Signed-off-by: Sage Weil <sage@inktank.com>
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>
Add libboost-system-dev (bug #4725).
Add hdparm to rpm installation requirements. The hdparm
command is used to determin if write-caching is enabled on
the journal device.
Signed-off-by: Gary Lowell <gary.lowell@inktank.com>
Add libboost-system-dev (bug #4725).
Add hdparm to rpm installation requirements. The hdparm
command is used to determin if write-caching is enabled on
the journal device.
Signed-off-by: Gary Lowell <gary.lowell@inktank.com>
Commit ae71b576a7 change some paths
again to absolute path to /usr/sbin. Use the correct macro %{_sbindir}
again as done in 4b90a958d1.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Added init-radosgw.sys file for rpm based systems, added it to
the tarball list in the makefile, and updated the specfile to
install it. Also added the a dependency in ceph since it uses
utility routes from that package (On debian systems these are
packaged in ceph-common). Incorporated review comments from
Alex. (Bug #4571)
Signed-off-by: Gary Lowell <gary.lowell@inktank.com>
Reviewed-by: Alexandre Marangone <alexandre.marangone@inktank.com>
Move 50-rbd.rules into the ceph base package since the related
ceph-rbdnamer binary is part of this package. Use correct install
pattern.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Reorder file list of ceph package. Fix handling of placeholder
directories, make use of directories marcros like %{_localstatedir}
for /var.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
The ceph-create-keys, ceph-disk, ceph-disk-activate, and
ceph-disk-prepare scripts are built in sbin, but debian installs
them into usr/bin, and several utilities look for them there.
This commit changes the RPM to install them in /usr/bin. (Bug #3921)
Signed-off-by: Gary Lowell <gary.lowell@inktank.com>
We should clobber configuration and log data, but *not* user data. Leave
/var/lib/ceph alone.
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Gary Lowell <gary.lowell@inktank.com>
Initial Support for python bindings to libcephfs for testing
MDS backtraces with a the python script test-backtraces.py.
Signed-off-by: Sam Lang <sam.lang@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
When removing the last instance of ceph, also remove the files
created by ceph during operation. These consist of the files
under /var/lib/ceph, /etc/ceph, and /var/log/ceph. Bug #4415.
Signed-off-by: Gary Lowell <gary.lowell@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
Caused by 3bd48cbbad
feature 4207 implementation
Signed-off-by: David Zafman <david.zafman@inktank.com>
Reviewed-by: Gary Lowell <gary.lowell@inktank.com>
Use fdupes to avoid duplicated files as done in the SUSE
packages. Since it doesn't work as expected on Fedora/RHEL
do this only on SUSE based distros.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Fix package Requirements to get sgdisk. On RHEL/CentOS/Fedora the
package is gdisk. On SUSE/openSUSE < 12.2 it's scsirastools on
openSUSE >= 12.2 it's in gptfdisk.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
There is no need to add leveldb as 'Requires:'. The RPM build system
will find this dependency by itself.
Add leveldb-devel to BuildRequires: since this is what the package
really needs to build ceph correctly with libleveldb1.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Dynamically link to the leveldb installed on the system rather than
statically linking ceph copy. Remove the --with-system-leveldb config
option, and add a requirement for leveldb libraries for rpm and debian
packages. Bug 3945.
Signed-off-by: Gary Lowell <gary.lowell@inktank.com>
Remove librados2 requirement from librbd1. The RPM build system
will find the dependency by itself.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Cleanup the Requires: list of the fuse packages. Remove fuse-libs,
libstdc++, libuuid. Don't add libraries to the list, the RPM build
system will find the dependencies by itself.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Don't install rest-bench in ceph.spec.in section for ceph-test and
ceph-test.install twice. This file is already part of the rest-bench
package.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
The files from the ceph-test subpackage are installed to /usr/bin,
give them more useful names to make sure that the user know they
belong to ceph. add a 'ceph_' prefix and change some test* binaries
to ceph_test_*.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Fixes: #3813
Since radosgw package is separate from the ceph package,
it also needs to have a separate logrotate. The default
path for radosgw log is changed to /var/log/radosgw,
and it now has a different logrotate script.
Updating both deb and rpm packaging.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Change the filter in logrotate to use sed instead of perl, and remove the
package dependency on perl.
Signed-off-by: Gary Lowell <gary.lowell@inktank.com>
Extend fix for libedit-devel on special SUSE versions, use ncurses
also on src/ocf/Makefile and src/java/Makefile
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Don't move libcephfs_jni files around from %{_libdir} to /usr/lib/jni/
in the buildroot. They should be placed in %{_libdir} as all libs.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Move libcephfs_jni.so to the ceph-devel package since so-files they
shouldn't be part of the library package.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
There was already a dependency on python in the debian control file,
a similar dependency was added to the rpm spec file. perl is needed
for the logrotate script, so a dependecy was on perl wass added to
both. Bug 3768.
Signed-off-by: Gary Lowell <gary.lowell@inktank.com>
Rename libcephfs-jni to libcephfs_jni1 to reflect the SO name/version of
the library and to prevent RPMLINT to complain about the naming.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Rename the libcephfs-java package to cephfs-java since the package
contains no (classic) library and RPMLINT complains about the name.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Fix handling of JAVA (jar) files. Don't move the files around in the install
section since the related Makefile is fixed instead.
Use %{_javadir} instead of /usr/share/java/
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
This is a partial fix for bug 3471. Enable building of debuginfo package.
Some distributions enable this automatically by installing additional rpm
macros, on others it needs to be explicity added to the spec file.
This should help simplify Chef etc deployments. Now (when using the
Upstart jobs), when a ceph-mon is started, ceph-create-admin-key is
triggered. If /etc/ceph/$cluster.client.admin.keyring already exists,
it does nothing; otherwise, it waits for ceph-mon to reach quorum, and
then does a "ceph auth get-or-create" to create the key, and writes it
atomically to disk.
The equivalent code can be removed from the Chef cookbook once this is
in.
LGPLv2 in spec file is not correct, because some of the included
packages/binaries are GPLv2. For example:
src/mount/mtab.c -> package ceph, binary mount.ceph
src/common/fiemap.cc -> package ceph, binary rbd
Also use SPDX format (http://www.spdx.org/licenses) for the sub-package
licenses.
Signed-off-by: Holger Macht <hmacht@suse.de>
This hunk was inadvertantly included in a330c64.
Reported-by: Guido Winkelmann <guido-ceph@thisisnotatest.de>
Signed-off-by: Sage Weil <sage@inktank.com>
Add BuildRequires: libxml2-devel.
Move BuildRequires: libcurl-devel to a more proper place.
[libs3 and librgw.h bits of patch dropped -sw]
Signed-off-by: Alexandre Oliva <oliva@lsd.ic.unicamp.br>
Signed-off-by: Sage Weil <sage@newdream.net>
leveldb adds -I flags to CFLAGS and CXXFLAGS, but if these macros are
overridden in the make command line, the flags are dropped, and the
build fails. leveldb should probably use AM_CFLAGS instead, but the
spec file can specify the preferred CFLAGS in the configure command
line, and then everything will work as expected.
Signed-off-by: Alexandre Oliva <oliva@lsd.ic.unicamp.br>
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
This puts in place an init script and a command it runs to save a
kernel core dump to a remote server when a panic or other kernel
failure occurs. The content of a crash file generated by the
"kdump" init script (which uses the Ubuntu "apport" kernel_crashdump
command) is re-packaged and copied (via scp) to a remote server
specified by variables in /etc/default/ceph-kdump-copy. This
packaging (as well as the work done by the apport script) is done
on the next boot of the kernel following a crash.
Note: Although the init script, its config file, and shell script
are known to work, the packaging of these things should not be
expected to be. I (now) know, for example, that the init script
belongs in src/init-ceph-kdump-copy.in if it is to follow the
pattern used by the ceph init script. And there are likely other
problems with the build/install portions of this patch.
Signed-off-by: Alex Elder <elder@dreamhost.com>
OSDs (src/osd/ClassHandler.cc) specifically look for libcls_*.so in
/usr/$libdir/rados-classes, so libcls_rbd.so and libcls_rgw.so need to
be shipped along with the base package.
Signed-off-by: Holger Macht <hmacht@suse.de>
Signed-off-by: Sage Weil <sage@newdream.net>
Some post-install rpmbuild defaults byte-compile all packaged python
files, so don't bother removing the .pyc files, and package .py* to
get both .pyo and .pyc. It wastes a tiny little bit of space, but it
makes the spec file portable across a wider range of rpm and python
configurations.
Signed-off-by: Alexandre Oliva <oliva@lsd.ic.unicam.br>
Signed-off-by: Sage Weil <sage@newdream.net>
Put OCF resource agents in a separate subpackage,
to be enabled with a separate build conditional
(--with ocf).
Make the subpackage depend on the resource-agents
package, which provides the ocf-shellfuncs library
that the Ceph RAs use.
Signed-off-by: Florian Haas <florian@hastexo.com>
Clean up and fix the spec file. This includes cleaning up of build and
installed system dependencies, LSB compliance fixes, splitting up into
several sub-packages (lib*) and so on. It now builds fine for the
following distributions in the Open Build Service and should be
considered as a starting point for further fixes:
- CentOS 6
- Fedora 15
- RedHat Enterprise Linux 6
- openSUSE 11.4
- openSUSE 12.1
- openSUSE Factory
- SUSE Linux Enterprise 11 (SP1 and SP2)
Signed-off-by: Holger Macht <hmacht@suse.de>
The redhat-rpm-config isn't installed on build.opensuse.org, which means
the processor is set to i386 instead of something less ancient. This
breaks compilation on 32-bit x86.
Kludge around it here.
Signed-off-by: Sage Weil <sage@newdream.net>
Pass correct path to configure (fixes SuSE builds).
Use %doc command to install sample.ceph.conf and sample.fetch_conf.
Signed-off-by: Sage Weil <sage@newdream.net>
You can still say "rpmbuild -ba --with tcmalloc ceph.spec"
if you have it.
Add BuildRequires on google-perftools when building with tcmalloc.
Ensure it's the right architecture.
Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
This is now the admin's job. Removes a lot of code with limited testing
and coverage.
We rev the internal monitor protocol because the state machine ids changed.
This should not affect the on-disk format. Just stop and restart all the
monitors at once during the upgrade.
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
BuildRequires: cryptopp-devel has been replaced by nss-devel. Skip
google-perftools-devel because that package is not available for x86-64.
Add python.
Don't install libcls_rbd.so.1.0.0.debug.
Package crbdnamer and librados-config.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
When building the debian packages, use --sysconfdir=/etc.
Also, don't fudge sysconfdir in the init-ceph script.
Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
configure is building radosgw as soon as libfcgi is installed, even
if --without-radosgw is given. Here is a fix for configure.in and the
specfile.
Regards,
Christian
Signed-off-by: Sage Weil <sage@newdream.net>