Commit Graph

13933 Commits

Author SHA1 Message Date
Sage Weil
d31b76a662 mds: find_ino_dir
Search for a dir ino by checking the ondisk directory object path xattr.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-03-31 18:07:04 -07:00
Colin Patrick McCabe
ce2fabc383 common: fix cmdline of indashes_to_underscores
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-03-31 17:12:34 -07:00
Colin Patrick McCabe
0a63567ea2 rgw: Properly support truncating on S3 PUT
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-03-31 17:02:47 -07:00
Sage Weil
3f1e9b0f7b mds: use helper to generate dir inode object names
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-03-31 16:51:43 -07:00
Sage Weil
26392894cf mds: allow explicit finisher context for path_traverse
Previously we could only path_traverse and retry a request or message.
This just allows an explicit context to be used as well.  It's the caller's
job to clean it up if we return <= 0.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-03-31 16:42:43 -07:00
Sage Weil
34b0813d64 mds: fix possible null dereference
Fix null deref on forward and req (!mdr) caller.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-03-31 16:38:59 -07:00
Sage Weil
705161b11d mds: add mds failure/recovery support for find_ino_peers
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-03-31 16:07:10 -07:00
Sage Weil
3970340567 mds: try find_ino_peers for lookuphash requests
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-03-31 16:07:10 -07:00
Sage Weil
c2c333d8cb mds: find_ino_peer
Search for an ino on peer MDSs.  Still need to handle mds failure/recovery
handling.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-03-31 16:07:10 -07:00
Sage Weil
3afea8f120 client: lookuphash
Implement low-level lookuphash on client, for MDS testing.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-03-31 16:07:10 -07:00
Colin Patrick McCabe
cb2f966c8e vstart.sh: don't put quotes in generated ceph.conf
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-03-31 14:54:11 -07:00
Colin Patrick McCabe
07ffd55c43 ceph_argparse: convert dashes to underscores
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-03-31 14:31:50 -07:00
Tommi Virtanen
e6544a37d1 client: Use NULL instead of 0, for clarity.
Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
2011-03-31 13:36:01 -07:00
Tommi Virtanen
9567ba1ae0 man: Make </VirtualHost> be on its own line.
Apparently, now there's a vertical paragraph space before it,
but that's better than being tacked at the end of the previous
line.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
2011-03-31 13:36:01 -07:00
Colin Patrick McCabe
0258166489 rgw: fix buffer overflow
Remove unecessary code that was causing a buffer overflow.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-03-31 13:22:31 -07:00
Wido den Hollander
4cc7dcc487 mkcephfs: Actually do a mkfs.btrfs
Signed-off-by: Wido den Hollander <wido@widodh.nl>
Signed-off-by: Sage Weil <sage@newdream.net>
2011-03-31 11:44:00 -07:00
Sage Weil
96067588b4 rgw: recover from partial bucket creates
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-03-31 11:39:35 -07:00
Sage Weil
f895e20f5e rgw: use tmap key (excl) create when creating a bucket
This way we fail with EEXIST if the bucket already exists in the user
object.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-03-31 11:33:48 -07:00
Colin Patrick McCabe
7a2b65317a config: remove kill_after
It's unused.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-03-31 09:47:31 -07:00
Josh Durgin
d5f10bcb05 testlibrbd: fix warnings
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-03-30 17:55:04 -07:00
Josh Durgin
e44a547059 testlibrbd: fix warnings
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-03-30 17:54:26 -07:00
Josh Durgin
3fe957a597 Merge branch 'next' 2011-03-30 17:35:08 -07:00
Josh Durgin
5141e90bdf testlibrbd: clean up and add tests for snapshots
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-03-30 17:26:59 -07:00
Josh Durgin
e424171cbc librbd: fix snapshot handling
To ensure consistency, always set the snap context when the header is
updated. If snapid is set, we update librados' snapid when refreshing
the header as well. Also use CEPH_NOSNAP instead of 0 as the default
snapid to prevent confusion. These changes fix snapshot creation
and removal, and prevent writing to a snapshot.

Rollback is fixed by using selfmanaged_snapshot_rollback.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-03-30 17:26:59 -07:00
Josh Durgin
7b28d5af67 librados, librbd: add some debugging messages
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-03-30 17:26:59 -07:00
Josh Durgin
ab6c036543 librados: add selfmanaged_snap_rollback
This was removed in 2cb86f713d, but is
required for selfmanaged snaps because their snapids aren't in the
pool's snap list, which is how regular rollback finds them.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-03-30 17:26:59 -07:00
Josh Durgin
3946779b06 librados: return -EROFS when trying to write to a snapshot
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-03-30 17:26:59 -07:00
Sage Weil
2b7cc15399 Merge branch 'next'
Conflicts:
	src/cmon.cc
	src/osdc/Journaler.cc
2011-03-30 16:55:38 -07:00
Samuel Just
69f174c082 mkcephfs: minor fix
line 400: && $type == "osd" is not always valid.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
2011-03-30 16:49:37 -07:00
Samuel Just
cf3bb44d47 mkcephfs: copy to daemon nodes for each daemon
The tmp directory is removed after each daemon.  Previously, this would
break if two daemons were on the same node.  Now, the files will be
copied for each daemon.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
2011-03-30 16:49:21 -07:00
Sage Weil
5a1ccdcea8 journaler: don't block when we adjust back write_pos
is_readable() may need to adjust the write_pos backward, but will return
false.  If we are at the end we still need to wake up any waiters so they
know about it.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-03-30 16:46:04 -07:00
Colin Patrick McCabe
887a01f62c config: parse_argv fix
md_config_t::parse_argv: fold md_config_t::parse_argv_part2 into
parse_argv. Fix brokenness introduced by the std::string switchover.

OPTION macro: move single-character options out of the OPTION macro and
into config.cc

Fix ceph_argparse_witharg / ceph_argparse_flag uses to include a
trailing (char*)NULL, to ensure that we terminate with a pointer rather
than a 32-bit int.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-03-30 16:36:20 -07:00
Sage Weil
c6f1cced64 rados: print error message on exit
Signed-off-by: Sage Weil <sage@newdream.net>
2011-03-30 16:32:26 -07:00
Sage Weil
ab8871aef0 rados: add 'tmap {set,create} obj key value'
Signed-off-by: Sage Weil <sage@newdream.net>
2011-03-30 16:32:15 -07:00
Sage Weil
58fc0cf475 osd: add tmap key (exclusive) create
Return EEXIST if a key already exists.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-03-30 16:31:59 -07:00
Colin Patrick McCabe
5837a255ad config: fix use of uint64_t* as uint32_t*
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-03-30 15:44:46 -07:00
Colin Patrick McCabe
59923a8e51 config: tighten up uint32_t use
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-03-30 15:39:17 -07:00
Samuel Just
6f27492e92 mkcephfs: copy to daemon nodes for each daemon
The tmp directory is removed after each daemon.  Previously, this would
break if two daemons were on the same node.  Now, the files will be
copied for each daemon.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
2011-03-30 15:41:25 -07:00
Sage Weil
c3746dad52 common_init: fix keyring loading
Can't pass a NULL char* to std::string constructor.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-03-30 15:04:14 -07:00
Colin Patrick McCabe
a68ef601c9 common: Add strict_strtof, strict_strtod, unittest
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-03-30 14:57:45 -07:00
Greg Farnum
493e2d952a OSD: ReplicatedPG: commits should be high priority, like acks.
This was consistently breaking stuff for some people, as the acks were
high priority but the commits weren't. They should match.

Signed-off-by: Greg Farnum <gregory.farnum@dreamhost.com>
2011-03-30 13:30:43 -07:00
Colin Patrick McCabe
9cde1f44a5 config: use std::string in md_config_t
Use std::string to represent md_config_t strings. This makes memory
management a lot easier and should fix some leaks. "No value" is now
represented by an empty string, whereas before some places were using
empty strings and some were using NULL.

config.cc: Fix a minor decode bug.

In pid_file.cc, copy the pid_file using snprintf, since strncpy
does not always NULL-terminate.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-03-30 12:07:58 -07:00
sam
3c94cc20b6 test/bufferlist.cc: Added append tests
Tests appending many randomly sized chunks many of which are size zero.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
2011-03-30 10:08:54 -07:00
Colin Patrick McCabe
172835ff59 ConfUtils: move parsing into config.cc
Move parsing into config.cc, since there was already parsing code there.
Move metavariable escaping out of ConfUtils; having this in ConfUtils
makes it impossible to de-globalize g_conf.

Create a nicer API for pulling stuff out of the configuration file.
Since the value we pull is determined by the config structure in effect
at the time, it should be an instance method of md_config_t.

Remove some deadcode. Add some comments.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-03-30 01:20:38 -07:00
Colin Patrick McCabe
1fb543cb91 ConfUtils: fix up read API a bit
Remove def_val. Return error codes for not found, parse error, etc.
Fix API users.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-03-29 17:04:23 -07:00
Colin Patrick McCabe
a854feb09e ConfUtils: decode to std::string
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-03-29 17:04:22 -07:00
Tommi Virtanen
44100001f2 mount.ceph: Use LDADD not LDFLAGS to bring in -lkeyutils.
Without this, flab (gcc 4.2.4) failed with:

libtool: link: gcc -Wall -D__CEPH__ -D_FILE_OFFSET_BITS=64 -D_REENTRANT -D_THREAD_SAFE -rdynamic -g -O2 -o mount.ceph mount.ceph.o armor.o  -lkeyutils /usr/lib/libcrypto++.so
/usr/lib/libcrypto++.so: undefined reference to `pthread_key_create'
/usr/lib/libcrypto++.so: undefined reference to `pthread_getspecific'
/usr/lib/libcrypto++.so: undefined reference to `pthread_key_delete'
/usr/lib/libcrypto++.so: undefined reference to `pthread_setspecific'
collect2: ld returned 1 exit status

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
2011-03-29 16:31:29 -07:00
Sage Weil
a2ec936a7c cosd: fix bind to specific address
Do not default to public_addr for cluster, heartbeat messengers.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-03-29 16:23:55 -07:00
Samuel Just
3a1a31854d mkcephfs: minor fix
line 400: && $type == "osd" is not always valid.

Signed-off-by: Samuel Just <samuel.just@dreamhost.com>
2011-03-29 16:16:11 -07:00
Tommi Virtanen
92e0751ffb Add an RPM BuildRequires on keyutils-libs-devel.
See 9aab8c6b05.

Signed-off-by: Tommi Virtanen <tommi.virtanen@dreamhost.com>
2011-03-29 15:37:10 -07:00