ceph: define and use a shell_scripts Makefile variable

Define a variable "shell_scripts" in the Makefile.in, and use it
along with some pattern rules to avoid some duplication and simplify
the addition of shell scripts to the ceph user space build.

Signed-off-by: Alex Elder <elder@dreamhost.com>
ceph-kdump-copy: add tools for saving kdumps

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>
config: include /etc/ceph/$cluster.keyring in keyring search path

mkcephfs and the docs etc still write to /etc/ceph/keyring.

Signed-off-by: Sage Weil <sage@newdream.net>
config: {osd,mon}_data default to /var/lib/ceph/$type/$cluster-$id

Signed-off-by: Sage Weil <sage@newdream.net>
config: move /var/run and /var/log defaults to config_opts.h

This flips the sense of the common_init defaults.  Before, the alternate
defaults were filled in if it was a daemon.  Now, they're cleared out if
we are not a daemon.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
init-ceph: manage pid_file from init script

With upstart the daemon shouldn't manage the pid file itself.  Move this
out of the default config and into the legacy sysvinit script.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
FileStore: dumping transactions to a file

Dump each queued transaction to a predefined file, specified with
--filestore-dump-file, in JSON format.


Signed-off-by: Joao Eduardo Luis <jecluis@gmail.com>
filestore: fix collection_move guard

We had a sequence like:

 1- write A block 1
 2- write A block 2
 3- write A block 3
 4- write A block 4
 5- move A -> B
     - link B
     - unlink A
     - set guard on B   <crash>
  - replay 3, 4, 5

with the result being B with only half of its content.  The problem is that
we destroyed the old link _and_ didn't guard the new content.  Instead,
set the guard before the link, and replay the unlink step here
unconditionally.

Fixes: #2178
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
filestore: fix collection_add guard

If we crash between the link() and setting the guard, we will get
EEXIST.  Tolerate that.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
filestore: fix collection_rename guard

If we crash between the rename and setting the guard, we can get EEXIST
or ENOTEMPTY on rename.  Tolerate that.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
filestore: fix fd leak on collection_rename

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
filestore: cleanup: flip sense of replay guard check

The other are all if (_check_replay_guard(..)) do_it;.  Make this one
match.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
init-ceph: start at all runlevels

This fixes lintian error:

W: ceph: init.d-script-missing-start etc/init.d/ceph 4

Signed-off-by: Sage Weil <sage@newdream.net>
ceph-rbdnamer: include in dist tarball and debs/rpms

Signed-off-by: Sage Weil <sage@newdream.net>
obsync: include man page in tarball, packages

Signed-off-by: Sage Weil <sage@newdream.net>
init-radosgw: start in runlevel 4

Fixes lintian error

W: radosgw: init.d-script-missing-start etc/init.d/radosgw 4

Signed-off-by: Sage Weil <sage@newdream.net>
debian: drop unnecessary conflicts on librgw

Cut and paste baggage from libcephfs, it looks like.

Signed-off-by: Sage Weil <sage@newdream.net>
README: update

- refer to COPYING, SubmittingPatches
- a word about dependencies
- building packages
- drop the list of built binaries... it's incomplete and not very
  interesting.

Signed-off-by: Sage Weil <sage@newdream.net>
COPYING: doc/ CC BY-SA

Signed-off-by: Sage Weil <sage@newdream.net>
debian: python-support -> dh_python2

I followed the instructions on

	http://wiki.debian.org/Python/TransitionToDHPython2

Signed-off-by: Sage Weil <sage@newdream.net>