]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
11 years agotest: disable cross process sem tests on non-Linux 1043/head
Noah Watkins [Sun, 29 Sep 2013 19:19:00 +0000 (12:19 -0700)]
test: disable cross process sem tests on non-Linux

How to make this portable:

- MAP_ANONYMOUS -> MAP_ANON (OSX)

- sem_init (anonymous semaphore) needs to be replaced by named
semaphores using sem_open/sem_close. Use a memory address of the sem_t
variable to hack anonymous semaphore behavior.

- sem_getvalue isn't supported on OSX. it is used here to do
sem_wait/sem_post to bring a semaphore back to a specific value. to get
around this we may need to restructure the test so that the semaphore
can be destroyed and re-initialized rather than inspected as its
currently being done.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
11 years agopipe: handle missing MSG_MORE and MSG_NOSIGNAL
Noah Watkins [Mon, 22 Jul 2013 00:08:53 +0000 (17:08 -0700)]
pipe: handle missing MSG_MORE and MSG_NOSIGNAL

On OSX (and currently any platform missing the MSG_MORE
macro) the MSG_MORE optimization is disabled. The MSG_NOSIGNAL flag is
available on OSX but is called SO_NOSIGPIPE and must be set via
setsockopt.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
11 years agoipaddr: use IN6_ARE_ADDR_EQUAL for comparison
Noah Watkins [Fri, 3 Jan 2014 17:48:03 +0000 (09:48 -0800)]
ipaddr: use IN6_ARE_ADDR_EQUAL for comparison

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
11 years agokeyutils: handle non-linux platform
Noah Watkins [Sat, 21 Sep 2013 19:50:28 +0000 (12:50 -0700)]
keyutils: handle non-linux platform

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
11 years agoMerge pull request #1038 from ceph/wip-objectcacher-backoff
Josh Durgin [Sat, 4 Jan 2014 00:58:28 +0000 (16:58 -0800)]
Merge pull request #1038 from ceph/wip-objectcacher-backoff

osdc/ObjectCacher: back off less during flush

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agodoc: Fixed typo.
John Wilkins [Sat, 4 Jan 2014 00:30:12 +0000 (16:30 -0800)]
doc: Fixed typo.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
11 years agoMerge pull request #1041 from dachary/wip-mon-test
Sage Weil [Sat, 4 Jan 2014 00:05:39 +0000 (16:05 -0800)]
Merge pull request #1041 from dachary/wip-mon-test

mon: get rid of --keyring /dev/null hack

11 years agoMerge pull request #1042 from kdreyer-inktank/gitignore-autotools-test-logs
Sage Weil [Sat, 4 Jan 2014 00:05:24 +0000 (16:05 -0800)]
Merge pull request #1042 from kdreyer-inktank/gitignore-autotools-test-logs

add autotools-generated files to .gitignore

11 years agoadd autotools-generated files to .gitignore 1042/head
Ken Dreyer [Fri, 3 Jan 2014 23:38:25 +0000 (16:38 -0700)]
add autotools-generated files to .gitignore

When running "make check", Automake generates test-suite.log, along with
various *.log and *.trs files in the tree. Add these files to
.gitignore.

(It looks like this feature arrived in Automake 1.13.)

Signed-off-by: Ken Dreyer <ken.dreyer@inktank.com>
11 years agomon: get rid of --keyring /dev/null hack 1041/head
Loic Dachary [Fri, 3 Jan 2014 23:34:45 +0000 (00:34 +0100)]
mon: get rid of --keyring /dev/null hack

No longer necessary when --auth-supported=none

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoMerge pull request #1026 from dmsimard/ceph_rest_api_discovery
Dan Mick [Fri, 3 Jan 2014 23:00:49 +0000 (15:00 -0800)]
Merge pull request #1026 from dmsimard/ceph_rest_api_discovery

Be more explicit how to discover available API calls

Reviewed-by: Dan Mick <dan.mick@inktank.com>
11 years agodoc: Removed dash from --dmcrypt option.
John Wilkins [Fri, 3 Jan 2014 22:37:23 +0000 (14:37 -0800)]
doc: Removed dash from --dmcrypt option.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
11 years agoMerge pull request #1040 from dachary/wip-ceph-disk-activate-data-dir
Sage Weil [Fri, 3 Jan 2014 22:00:57 +0000 (14:00 -0800)]
Merge pull request #1040 from dachary/wip-ceph-disk-activate-data-dir

ceph-disk: fix false positive for gitbuilder

11 years agoceph-disk: fix false positive for gitbuilder 1040/head
Loic Dachary [Fri, 3 Jan 2014 21:52:55 +0000 (22:52 +0100)]
ceph-disk: fix false positive for gitbuilder

The output of test/ceph-disk.sh is very verbose which is good for
debugging errors. However it sometime contains strings that match
/error:/i which is picked by gitbuilder as a sign that the test fail,
even when the exit code is zero.

Remove from the output the three strings triggering false positive in
gitbuilder.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoosdc/ObjectCacher: back off less during flush 1038/head
Sage Weil [Fri, 3 Jan 2014 20:51:15 +0000 (12:51 -0800)]
osdc/ObjectCacher: back off less during flush

In cce990efc8f2a58c8d0fa11c234ddf2242b1b856 we added a limit to avoid
holding the lock for too long.  However, if we back off, we currently
wait for a full second, which is probably a bit much--we really just want
to give other threads a chance.

Backport: emperor
Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1032 from dachary/wip-ceph-disk-activate-data-dir
Sage Weil [Fri, 3 Jan 2014 19:41:29 +0000 (11:41 -0800)]
Merge pull request #1032 from dachary/wip-ceph-disk-activate-data-dir

ceph-disk : fixes and improvements for the --data-dir code path and associated tests

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoBe more explicit how to discover available API calls 1026/head
David Moreau Simard [Fri, 3 Jan 2014 18:23:35 +0000 (13:23 -0500)]
Be more explicit how to discover available API calls

Signed-off-by: David Moreau Simard <dmsimard@iweb.com>
11 years agoceph-disk: tests for the --data-dir code path 1032/head
Loic Dachary [Wed, 1 Jan 2014 21:22:34 +0000 (22:22 +0100)]
ceph-disk: tests for the --data-dir code path

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoceph-disk: implement --sysconfdir as /etc/ceph
Loic Dachary [Fri, 3 Jan 2014 15:06:55 +0000 (16:06 +0100)]
ceph-disk: implement --sysconfdir as /etc/ceph

Replace hardcoded /etc/ceph with the SYSCONFDIR global variable and
implement the --sysconfdir option to override the default value.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoceph-disk: implement --statedir as /var/lib/ceph
Loic Dachary [Fri, 3 Jan 2014 15:03:09 +0000 (16:03 +0100)]
ceph-disk: implement --statedir as /var/lib/ceph

Replace hardcoded /var/lib/ceph with the STATEDIR global variable and
implement the --statedir option to override the default value.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoceph-disk: add copyright notice
Loic Dachary [Wed, 1 Jan 2014 21:05:03 +0000 (22:05 +0100)]
ceph-disk: add copyright notice

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoceph-disk: create the data directory if it does not exist
Loic Dachary [Wed, 1 Jan 2014 21:11:30 +0000 (22:11 +0100)]
ceph-disk: create the data directory if it does not exist

Instead of failing if the OSD data directory does not exist, create
it. Only do so if the data directory is not enforced to be a device via
the use of the --data-dev flag. The directory is not recursively created.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoceph-disk: run ceph-osd when --mark-init=none
Loic Dachary [Mon, 30 Dec 2013 23:03:42 +0000 (00:03 +0100)]
ceph-disk: run ceph-osd when --mark-init=none

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoceph-disk: implement --mark-init=none
Loic Dachary [Mon, 30 Dec 2013 22:57:39 +0000 (23:57 +0100)]
ceph-disk: implement --mark-init=none

It is meant to be used when preparing and activating a directory that is
not to be used with init. No file is created to identify the init
system, no symbolic link is made to the directory in /var/lib/ceph
and the init scripts are not called.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoceph-disk: fsid is a known configuration option
Loic Dachary [Wed, 1 Jan 2014 21:07:57 +0000 (22:07 +0100)]
ceph-disk: fsid is a known configuration option

Use get_conf_with_default instead of get_conf because fsid is a known
ceph configuration option. It allows overriding via CEPH_ARGS which is
convenient for testing. Only options that are not found in config_opts.h
are fetch via get_conf.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoceph-disk: use CalledProcessError.returncode
Loic Dachary [Wed, 1 Jan 2014 21:06:29 +0000 (22:06 +0100)]
ceph-disk: use CalledProcessError.returncode

CalledProcessError has no errno data member

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoceph-disk: display the command output on OSD creation failure
Loic Dachary [Wed, 1 Jan 2014 21:13:15 +0000 (22:13 +0100)]
ceph-disk: display the command output on OSD creation failure

The string form of a CalledProcessError instance does not include the
output datamember. Add it to the Error exception for debug purposes.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoceph-disk: which() uses PATH first
Loic Dachary [Mon, 30 Dec 2013 22:07:27 +0000 (23:07 +0100)]
ceph-disk: which() uses PATH first

Instead of relying on a hardcoded set of if paths. Although this has the
potential of changing the location of the binary being used by ceph-disk
on an existing installation, it is currently only used for sgdisk. It
could be disruptive for someone using a modified version of sgdisk but
the odds of this happening are very low.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoceph-disk: add --prepend-to-path to control execution
Loic Dachary [Mon, 30 Dec 2013 21:48:46 +0000 (22:48 +0100)]
ceph-disk: add --prepend-to-path to control execution

/usr/bin is hardcoded in front of some ceph programs which makes it
impossible to control where they are located via the PATH.

The hardcoded path cannot be removed altogether because it will most
likely lead to unexpected and difficult to diagnose problems for
existing installations where the PATH finds the program elsewhere.

The --prepend-to-path flag is added and defaults to /usr/bin : it prepends
to the PATH environment variable. The hardcoded path is removed
and the PATH will be used: since /usr/bin is searched first, the
legacy behavior will not change.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoceph-disk: make exception handling terse in main_activate_journal
Loic Dachary [Mon, 30 Dec 2013 16:15:29 +0000 (17:15 +0100)]
ceph-disk: make exception handling terse in main_activate_journal

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoceph-disk: do not hide main_activate() exceptions
Loic Dachary [Mon, 30 Dec 2013 16:13:47 +0000 (17:13 +0100)]
ceph-disk: do not hide main_activate() exceptions

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoceph-disk: fix activate() indent
Loic Dachary [Mon, 30 Dec 2013 16:11:30 +0000 (17:11 +0100)]
ceph-disk: fix activate() indent

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoceph-disk: remove noop try:
Loic Dachary [Mon, 30 Dec 2013 16:09:35 +0000 (17:09 +0100)]
ceph-disk: remove noop try:

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoceph-disk: fix Error() messages formatting
Loic Dachary [Mon, 30 Dec 2013 15:57:36 +0000 (16:57 +0100)]
ceph-disk: fix Error() messages formatting

Mainly using % instead of ,

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoinit-ceph: pass config file path when adjust crush position
Sage Weil [Mon, 21 Oct 2013 16:53:14 +0000 (09:53 -0700)]
init-ceph: pass config file path when adjust crush position

Fixes: #6591
Reported-by: Sean Noonan <sean.noonan@twosigma.com>
Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1012 from dachary/wip-mon-mkfs
Sage Weil [Thu, 2 Jan 2014 22:09:51 +0000 (14:09 -0800)]
Merge pull request #1012 from dachary/wip-mon-mkfs

unit tests for ceph-mon --mkfs

11 years agoMerge pull request #1029 from ceph/wip-6914
Sage Weil [Thu, 2 Jan 2014 22:07:55 +0000 (14:07 -0800)]
Merge pull request #1029 from ceph/wip-6914

Wip 6914

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1035 from ceph/port/bitsandints
Sage Weil [Thu, 2 Jan 2014 21:52:40 +0000 (13:52 -0800)]
Merge pull request #1035 from ceph/port/bitsandints

endianess and integer types

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1036 from dachary/wip-7085
Sage Weil [Thu, 2 Jan 2014 21:49:19 +0000 (13:49 -0800)]
Merge pull request #1036 from dachary/wip-7085

ceph-disk: cannot run unit tests

11 years agoceph-disk: cannot run unit tests 1036/head
Loic Dachary [Thu, 2 Jan 2014 21:42:17 +0000 (22:42 +0100)]
ceph-disk: cannot run unit tests

Because ceph-disk relies on hardcoded paths. The corresponding test will
be added back when ceph-disk can run from sources.

Fixes: #7085
Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agotest/cli-integration/rbd: silence stderr
Sage Weil [Thu, 2 Jan 2014 21:35:18 +0000 (13:35 -0800)]
test/cli-integration/rbd: silence stderr

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agointtypes: detect and define missing integer types 1035/head
Noah Watkins [Sun, 21 Jul 2013 01:41:40 +0000 (18:41 -0700)]
inttypes: detect and define missing integer types

Working around missing integer types is pretty easy. For example, the
__u32 family are Linux-specific types, and using these in Ceph
internally is fine because we can typedef them.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
11 years agoendian: check byte order on OSX
Noah Watkins [Thu, 2 Jan 2014 18:45:41 +0000 (10:45 -0800)]
endian: check byte order on OSX

Defines CEPH_[BIG|LITTLE]_ENDIAN to use, as BYTE_ORDER etc macros may be
different names on different platforms.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
11 years agodoc/release-notes: fix bobtail version
Sage Weil [Thu, 2 Jan 2014 16:36:35 +0000 (08:36 -0800)]
doc/release-notes: fix bobtail version

The tunables were mostly supported by later argonaut point releases,
but not officially.  Let's stick with bobtail though!

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agomon: tests for ceph-mon --mkfs 1012/head
Loic Dachary [Sun, 29 Dec 2013 12:21:02 +0000 (13:21 +0100)]
mon: tests for ceph-mon --mkfs

* auth none must not require a keyring
* --key can be used as an alternative to --keyring
* --mkfs is idempotent
* the --mon-data directory is created if it does not exist
* auth ceph requires --keyring

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoMerge pull request #1027 from jdurgin/wip-unprotect-error
Sage Weil [Thu, 2 Jan 2014 02:48:33 +0000 (18:48 -0800)]
Merge pull request #1027 from jdurgin/wip-unprotect-error

librbd: better error when unprotect fails on unprotected snap

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1010 from dachary/wip-mon-keyring
Sage Weil [Thu, 2 Jan 2014 02:47:57 +0000 (18:47 -0800)]
Merge pull request #1010 from dachary/wip-mon-keyring

implement --key as an alternative to --keyring when ceph-mon --mkfs

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1031 from dachary/wip-parse-args
Sage Weil [Thu, 2 Jan 2014 02:04:31 +0000 (18:04 -0800)]
Merge pull request #1031 from dachary/wip-parse-args

CEPH_ARGS should trim whitespaces

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1030 from dachary/wip-crush-location
Sage Weil [Thu, 2 Jan 2014 02:03:13 +0000 (18:03 -0800)]
Merge pull request #1030 from dachary/wip-crush-location

osdc: = is not a delimiter in --crush-location

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1020 from dachary/wip-ceph-disk-override
Sage Weil [Thu, 2 Jan 2014 02:00:43 +0000 (18:00 -0800)]
Merge pull request #1020 from dachary/wip-ceph-disk-override

ceph-disk: prepare --data-dir must not override files

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agodoc/release-notes: v0.74
Sage Weil [Thu, 2 Jan 2014 01:58:30 +0000 (17:58 -0800)]
doc/release-notes: v0.74

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #950 from ceph/wip-pg-stat
Loic Dachary [Thu, 2 Jan 2014 01:03:44 +0000 (17:03 -0800)]
Merge pull request #950 from ceph/wip-pg-stat

update pg stats when they are queried; share peer_info on query too

Reviewed-by: Loic Dachary <loic@dachary.org>
11 years agoceph-conf: display arguments when an option cannot be parsed 1031/head
Loic Dachary [Wed, 1 Jan 2014 20:23:55 +0000 (21:23 +0100)]
ceph-conf: display arguments when an option cannot be parsed

   unable to parse option: ''

Is difficult to figure out. It is much better if shown in the context in
which it was found:

   ceph-conf --help ''
   unable to parse option: ''
   args: '--help' ''

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agocommon: CEPH_ARGS should trim whitespaces
Loic Dachary [Wed, 1 Jan 2014 20:23:18 +0000 (21:23 +0100)]
common: CEPH_ARGS should trim whitespaces

CEPH_ARGS when parsed by env_to_vec did not trim trailing and leading
whitespaces: they would unexpectedly be parsed as empty arguments and
lead to confusing errors such as :

    CEPH_ARGS=' --id 3' ceph-conf --lookup mon-data
    unable to parse option: ''

The parsing code is replaced with str_vec(). It also resolves the
problem of the hard limit to 1000 characters imposed by the static
buffer that would silently truncate any CEPH_ARGS content.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoMerge pull request #1028 from ceph/wip-empty-rbd-ls
Sage Weil [Wed, 1 Jan 2014 19:41:05 +0000 (11:41 -0800)]
Merge pull request #1028 from ceph/wip-empty-rbd-ls

rbd: return 0 and an empty list when pool is entirely empty

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1025 from pyKun/fix_typos
Loic Dachary [Wed, 1 Jan 2014 15:18:40 +0000 (07:18 -0800)]
Merge pull request #1025 from pyKun/fix_typos

Fix typos in erasure code documents

Reviewed-by: Loic Dachary <loic@dachary.org>
11 years agoosdc: = is not a delimiter in --crush-location 1030/head
Loic Dachary [Wed, 1 Jan 2014 13:57:52 +0000 (14:57 +0100)]
osdc: = is not a delimiter in --crush-location

When parsing the crush location

     --crush-location 'root=default host=hostA'

it must create the vector

     [ 'root=default', 'host=hostA' ]

but the default list of separators of get_str_vec includes = which will
create

     [ 'root', 'default', 'host', 'hostA' ]

instead. Set the list of delimiters to exclude = instead.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoceph-disk: prepare --data-dir must not override files 1020/head
Loic Dachary [Mon, 30 Dec 2013 11:26:20 +0000 (12:26 +0100)]
ceph-disk: prepare --data-dir must not override files

ceph-disk does nothing when given a device that is already prepared. If
given a directory that already contains a successfully prepared OSD, it
will however override it.

Instead of overriding the files in the osd data directory, return
immediately if the magic file exists. Make it so the magic file is
created last to accurately reflect the success of the OSD preparation.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomon: implement --key for --mkfs 1010/head
Loic Dachary [Sun, 29 Dec 2013 11:57:45 +0000 (12:57 +0100)]
mon: implement --key for --mkfs

Allow --key to be used as an alternative to --keyring when ceph-mon
--mkfs runs. The key is wrapped inline into

     [mon.]
key = AQDUS79S0AF9FRAA2cgRLFscVce0gROn/s9WMg==
caps mon = "allow *"

and parsed with KeyRing::decode_plaintext which is made public.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomon: fix indentation
Loic Dachary [Sun, 29 Dec 2013 11:52:28 +0000 (12:52 +0100)]
mon: fix indentation

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomon: do not use the keyring if auth = none
Loic Dachary [Sun, 29 Dec 2013 11:40:05 +0000 (12:40 +0100)]
mon: do not use the keyring if auth = none

The Monitor::is_keyring_required() predicate is defined to be used in
the mkfs code path and not require the keyring to be set unless it is
actually going to be used.

If authentication is turned on later on existing monitors, the keyring
files will have to be set by an external tool in the mon data directory
and the mon restarted.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoMerge branch 'next'
Gary Lowell [Wed, 1 Jan 2014 07:53:37 +0000 (07:53 +0000)]
Merge branch 'next'

11 years agomds: don't allow changing layout for non-regular file 1029/head
Yan, Zheng [Wed, 1 Jan 2014 01:51:41 +0000 (09:51 +0800)]
mds: don't allow changing layout for non-regular file

layout is meaningless for non-regular file. using non-default layout
may make backtrace less efficiency.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
11 years agomds: always store backtrace xattr in the default pool
Yan, Zheng [Wed, 1 Jan 2014 00:58:42 +0000 (08:58 +0800)]
mds: always store backtrace xattr in the default pool

when creating file in non-default pool, we need to store a backtrace
in the default pool in addition to the specified pool. Otherwise the
'lookup-by-ino' function will consider backtrace for file is missing.

Fixes: #6914
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
11 years agoosd/ReplicatedPG: improve debug output from check_local
Sage Weil [Wed, 1 Jan 2014 01:21:49 +0000 (17:21 -0800)]
osd/ReplicatedPG: improve debug output from check_local

This will help with #6685

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1011 from dachary/wip-mon-daemonize
Loic Dachary [Wed, 1 Jan 2014 01:12:39 +0000 (17:12 -0800)]
Merge pull request #1011 from dachary/wip-mon-daemonize

do not daemonize ceph-mon when not necessary

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agorbd: return 0 and an empty list when pool is entirely empty 1028/head
Josh Durgin [Wed, 1 Jan 2014 01:00:06 +0000 (17:00 -0800)]
rbd: return 0 and an empty list when pool is entirely empty

rbd_list will return -ENOENT when no rbd_directory object
exists. Handle this in the cli tool and interpret it as success with
an empty list.

Add this to the release notes since it changes command line behavior.

Fixes: #6693
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
11 years agolibrbd: better error when unprotect fails on unprotected snap 1027/head
Josh Durgin [Wed, 1 Jan 2014 00:26:04 +0000 (16:26 -0800)]
librbd: better error when unprotect fails on unprotected snap

This will show up on the command line and logs, making it more
clear than EINVAL.

Fixes #6851 and #4045
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
11 years agoBe more explicit how to discover available API calls
David Moreau Simard [Tue, 31 Dec 2013 21:48:55 +0000 (16:48 -0500)]
Be more explicit how to discover available API calls

I believe it cannot hurt to be slightly more explicit about how
to retrieve API calls and provide examples.

Signed-off-by: David Moreau Simard <dmsimard@iweb.com>
11 years agoMerge pull request #1022 from ceph/wip-listomapvals
Josh Durgin [Tue, 31 Dec 2013 20:21:51 +0000 (12:21 -0800)]
Merge pull request #1022 from ceph/wip-listomapvals

fix rados listomapvals for >512 keys

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1009 from dachary/wip-mon-idempotent
Sage Weil [Tue, 31 Dec 2013 19:32:32 +0000 (11:32 -0800)]
Merge pull request #1009 from dachary/wip-mon-idempotent

make ceph-mon --mkfs idempotent

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agomon: remove fixture directory between runs 1009/head
Loic Dachary [Sun, 29 Dec 2013 12:41:45 +0000 (13:41 +0100)]
mon: remove fixture directory between runs

Instead of just removing the store.db directory, remove everything so
that --mkfs can re-create it instead of infering that it already exists.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomon: make ceph-mon --mkfs idempotent
Loic Dachary [Sun, 29 Dec 2013 12:14:14 +0000 (13:14 +0100)]
mon: make ceph-mon --mkfs idempotent

A mon is considered to exist if the mon-data directory exists and is not
empty. If ceph-mon --mkfs is run twice, it will display succeed the
second time around and display an informative message.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomon: create mon-data directory on --mkfs
Loic Dachary [Sun, 29 Dec 2013 12:10:12 +0000 (13:10 +0100)]
mon: create mon-data directory on --mkfs

If the mon-data directory does not exist when ceph-mon --mkfs runs, it
is created.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoMerge pull request #1016 from bydsky/bugfix
Sage Weil [Tue, 31 Dec 2013 16:18:15 +0000 (08:18 -0800)]
Merge pull request #1016 from bydsky/bugfix

Fix Issue #6992: stop the accepter and mark all pipes down before rebind

Backport: emperor, dumpling
Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1024 from jdurgin/wip-7067
Sage Weil [Tue, 31 Dec 2013 16:17:14 +0000 (08:17 -0800)]
Merge pull request #1024 from jdurgin/wip-7067

osd_types: add missing osd op flags

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agomon: add flags argument to common_init_finish 1011/head
Loic Dachary [Sun, 29 Dec 2013 11:26:14 +0000 (12:26 +0100)]
mon: add flags argument to common_init_finish

It is the same flag that is given to common_preinit. The service thread
is not initialized if CINIT_FLAG_NO_DAEMON_ACTIONS is set.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomon: fix indentation
Loic Dachary [Sun, 29 Dec 2013 11:24:48 +0000 (12:24 +0100)]
mon: fix indentation

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomon: do not daemonize if CINIT_FLAG_NO_DAEMON_ACTIONS
Loic Dachary [Sun, 29 Dec 2013 11:22:16 +0000 (12:22 +0100)]
mon: do not daemonize if CINIT_FLAG_NO_DAEMON_ACTIONS

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomon: set CINIT_FLAG_NO_DAEMON_ACTIONS when appropriate
Loic Dachary [Sun, 29 Dec 2013 11:18:02 +0000 (12:18 +0100)]
mon: set CINIT_FLAG_NO_DAEMON_ACTIONS when appropriate

--mkfs, --inject_monmap and --extract-monmap are no daemon actions.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoFix typos in erasure code documents 1025/head
Kun Huang [Tue, 31 Dec 2013 06:54:13 +0000 (01:54 -0500)]
Fix typos in erasure code documents

Signed-off-by: Kun Huang <academicgareth@gmail.com>
11 years agoMerge pull request #1023 from ceph/port/misc
Sage Weil [Tue, 31 Dec 2013 05:04:45 +0000 (21:04 -0800)]
Merge pull request #1023 from ceph/port/misc

misc portability patches

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoosd_types: add missing osd op flags 1024/head
Josh Durgin [Tue, 31 Dec 2013 04:34:18 +0000 (20:34 -0800)]
osd_types: add missing osd op flags

These were accidentally removed in:
85282319ee3e0d535d1ffc0a6ae8f763a41628b7

Fixes: #7067
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
11 years agomsgr: fix rebind() race 1016/head
Xihui He [Mon, 30 Dec 2013 04:04:10 +0000 (12:04 +0800)]
msgr: fix rebind() race
stop the accepter and mark all pipes down before rebind to avoid race

Fixes: #6992
Signed-off-by: Xihui He xihuihe@gmail.com
11 years agoMerge pull request #1006 from yuyuyu101/wip-7066
Josh Durgin [Mon, 30 Dec 2013 22:52:40 +0000 (14:52 -0800)]
Merge pull request #1006 from yuyuyu101/wip-7066

Fix rbd bench-write improper behavior

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agoqa: test rados listomapvals with >512 keys 1022/head
Josh Durgin [Mon, 30 Dec 2013 21:31:18 +0000 (13:31 -0800)]
qa: test rados listomapvals with >512 keys

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
11 years agorados: allow listomapvals to list all k/v pairs
Bjørnar Ness [Sat, 28 Dec 2013 13:59:00 +0000 (05:59 -0800)]
rados: allow listomapvals to list all k/v pairs

Current code only lists first 512 k/v pairs.

Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
11 years agov0.74 v0.74
Gary Lowell [Mon, 30 Dec 2013 21:03:17 +0000 (21:03 +0000)]
v0.74

11 years agomake: conditionally build filestore backends 1023/head
Noah Watkins [Mon, 30 Dec 2013 20:56:32 +0000 (12:56 -0800)]
make: conditionally build filestore backends

Each of btrfs and zfs backends are wrapped in if __linux__ and if
WITH_ZFS, respectively, resulting in empty object files and the
associated warnings. This builds them under the same conditions.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
11 years agotest_cls_rbd: avoid warning -Wno-unnamed-template-args
Noah Watkins [Mon, 30 Dec 2013 20:43:57 +0000 (12:43 -0800)]
test_cls_rbd: avoid warning -Wno-unnamed-template-args

According to this https://code.google.com/p/googletest/source/detail?r=446
the use of unnamed types (in this case the protection flag enums from
librbd/parent_types.h) as template parameters (in this case the gtest
macros) is not valid C++ pre C++0x.

As suggested, converting the enum into an int with integral promotion
via unary plus operator solves the problem.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
11 years agotest_cls_rbd: avoid shift overflow
Noah Watkins [Mon, 30 Dec 2013 20:43:21 +0000 (12:43 -0800)]
test_cls_rbd: avoid shift overflow

warning: signed shift result (0x500000000) requires 36 bits to represent

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
11 years agoerasure: add dummy symbol to avoid warnings
Noah Watkins [Mon, 30 Dec 2013 20:16:44 +0000 (12:16 -0800)]
erasure: add dummy symbol to avoid warnings

Empty object files generate warning.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
11 years agomake: avoid symbol exporting for C++ libs on non-Linux
Noah Watkins [Mon, 30 Dec 2013 20:14:02 +0000 (12:14 -0800)]
make: avoid symbol exporting for C++ libs on non-Linux

This removes export-symbol-regex for installed libraries with C++
interfaces on non-Linux where the hidden symbols are not resolved. This
is a temporary fix.

See ceph-devel topic "Shared library symbol visibility" for discussion
about a perm solution.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
11 years agojson_spirit: don't build json_spirit_value.cpp
Noah Watkins [Mon, 30 Dec 2013 20:12:57 +0000 (12:12 -0800)]
json_spirit: don't build json_spirit_value.cpp

This file just includes the header that is full of templates and
typedefs, so the resulting object file has no symbols in it and
generates warnings.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
11 years agomake: add top-level libcommon dependency
Noah Watkins [Mon, 30 Dec 2013 20:10:53 +0000 (12:10 -0800)]
make: add top-level libcommon dependency

On OSX there is consistently a problem with resolving pipe_cloexec and other
symbols through indirect libtool dependencies (below libglobal has a dependency
on libcommon). This makes the dependency top-level for most executables.

  CXXLD    ceph_test_timers
Undefined symbols for architecture x86_64:
  "_pipe_cloexec", referenced from:
      AdminSocket::create_shutdown_pipe(int*, int*) in libglobal.a(admin_socket.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
11 years agomake: restrict use of --as-needed to Linux
Noah Watkins [Mon, 30 Dec 2013 20:03:54 +0000 (12:03 -0800)]
make: restrict use of --as-needed to Linux

This should really be checked in configure.ac in the future.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
11 years agolibrados: read into user's bufferlist for aio_read
Rutger ter Borg [Wed, 27 Nov 2013 08:49:00 +0000 (00:49 -0800)]
librados: read into user's bufferlist for aio_read

* The 'buf' argument to read() used to be passed into
  AioCompletionImpl, and the results would be copied back after
  reading. This is replaced with the creation of a static buffer of
  that buf.

* The pbl argument in AioCompletionImpl is removed.

The patch is tested against an application using librados. I've
assumed that 'pbl' in

aio_read( ...., pbl, )

is allocated by the user. It may even speed things up: a buffer copy
is prevented.

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agoMerge pull request #1018 from dachary/wip-vstart-fsid
Sage Weil [Mon, 30 Dec 2013 16:13:30 +0000 (08:13 -0800)]
Merge pull request #1018 from dachary/wip-vstart-fsid

vstart: set fsid in [global]

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1019 from dachary/wip-show-config-value
Sage Weil [Mon, 30 Dec 2013 16:12:18 +0000 (08:12 -0800)]
Merge pull request #1019 from dachary/wip-show-config-value

common: evaluate --show-config* after CEPH_ARGS

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agocommon: evaluate --show-config* after CEPH_ARGS 1019/head
Loic Dachary [Mon, 30 Dec 2013 09:30:51 +0000 (10:30 +0100)]
common: evaluate --show-config* after CEPH_ARGS

The content of CEPH_ARGS is appended to the list of arguments. When
--show-config or --show-config-value is also set, it should be evaluated
after all arguments are parsed to accurately reflect the value that
would be visible to the program.

It failed to do so because the action for --show-config* was carried out
immediately. It is postponed until all options are parsed instead.

Signed-off-by: Loic Dachary <loic@dachary.org>