Commit Graph

15633 Commits

Author SHA1 Message Date
Sage Weil
a9da6db631 Merge branch 'wip-heartbeats'
Conflicts:
	src/osd/OSD.cc
2011-08-08 12:12:24 -07:00
Colin Patrick McCabe
3cda58dd53 Merge branch 'wip-config' 2011-08-08 09:55:49 -07:00
Sage Weil
68cbbf42c4 osd: missing ! in ifs on bad map after osd boot
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-08-07 21:27:07 -07:00
Sage Weil
857f2adc38 mds: fix Migrator::audit() for IMPORT_ABORTING
Make audit match reality.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
2011-08-07 21:27:07 -07:00
Yehuda Sadeh
45ca94054b objecter: halt compound operation only if result < 0 2011-08-05 16:33:32 -07:00
Colin Patrick McCabe
ad31db9e2f Remove unused dyn_sprintf
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-05 15:49:30 -07:00
Colin Patrick McCabe
6ad7f46bda config.cc: clean up includes
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-05 15:44:32 -07:00
Sage Weil
822d28b558 mds: chain rename subtree projections
We can have two renames for the same file in flight to the journal.  Stack
them up in a list.  The old project_subtree_rename() should have asserted
that the item wasn't already in the map before inserting it to catch this
at the front end.  Now it doesn't matter; it's a list.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-08-05 14:28:48 -07:00
Sage Weil
7a3e750210 client: whitespace cleanup
Signed-off-by: Sage Weil <sage@newdream.net>
2011-08-05 14:28:48 -07:00
Sage Weil
3d258798fa client: send renames to the correct node
AFAICS we got this wrong in b794aeb39, which is annoying given I remember
thinking reasonably carefully about it.

The current reasoning: the request operates on the dentry target
directory from the MDS's perspective; that's where the request needs to go.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-08-05 14:28:48 -07:00
Colin Patrick McCabe
9f608c726c config: more thread-safety stuff
* Don't allow parse_argv, parse_env, or parse_config_files to be used
after threads have been started.

* Don't allow set_val to be used to change unsafe variables after
threads have been started.

* Test

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-05 12:49:37 -07:00
Colin Patrick McCabe
d99333d043 injectargs: forbid unsafe string modifications
Don't allow string-valued configuration items to be changed using
injectargs unless they have observers. Otherwise, we could have
crashes, since one thread could be reading the std::string's internal
buffer after another thread frees that buffer during assignment.

Write a unit test to validate this behavior.

Also test that we can turn on and off the log_file using injectargs.
This is something that injectargs often gets used for in practice.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-05 12:18:00 -07:00
Colin Patrick McCabe
c409e7017a test/daemon_config: add injectargs test
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-05 11:25:11 -07:00
Colin Patrick McCabe
2d4f5493ad Add daemon_config, libceph_config, etc.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-05 11:20:24 -07:00
Colin Patrick McCabe
6dcf379ed7 add config unit test
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-05 11:04:08 -07:00
Colin Patrick McCabe
a33b837875 librados.h: fix out-of-date comment
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-05 10:47:25 -07:00
Colin Patrick McCabe
92e976a503 config: more cleanup
* any place where we know a set_val can't fail should be set_val_or_die

* in private md_config_t functions that need the mutex, assert that the
mutex is locked

* make md_config_t::expand_meta private, since nobody uses it outside of
the class.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-05 10:32:42 -07:00
Colin Patrick McCabe
66c3d8ff60 libceph.h: fix C compilation
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-04 17:16:10 -07:00
Colin Patrick McCabe
2c9949e0ca config: add proper locking, fix comments
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-04 16:49:55 -07:00
Colin Patrick McCabe
7ec6909b13 Merge branch 'rgw-formatter' 2011-08-04 15:33:27 -07:00
Colin Patrick McCabe
76880e3e3c In RGW, use the common/Formatter
Implement a new subclass of Formatter, RGWFormatter_Plain, using code
from the old RGWFormatter and RGWFormatter_Plain classes.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-04 14:48:23 -07:00
Sage Weil
0bc7e28fcd filestore: remove unused var
Signed-off-by: Sage Weil <sage@newdream.net>
2011-08-04 14:35:26 -07:00
Colin Patrick McCabe
0413e2acd6 Formatter: add open_object_section_in_ns, etc.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-04 14:27:14 -07:00
Colin Patrick McCabe
041a22cc90 test/formatter: test stream clearing
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-04 14:11:42 -07:00
Colin Patrick McCabe
434be6c0f6 Formatter: must use str("") to clear ostreams
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-04 14:07:53 -07:00
Colin Patrick McCabe
e2cbfb6299 More changes towards using common/Formatter in rgw
* rename RgwFormatter::init to RgwForamtter::reset.
Roll old reset() into base_reset().

* add write_raw_data to Formatter, to support DTDs.
Remove other DTD support code.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-04 14:05:59 -07:00
Sage Weil
72b0851fcb osd: expect heartbeats from anyone peering depends on
We were getting heartbeats from just acting replicas.  That's really not
enough if we want to be sure to detect failures of OSDs we depend on,
which includes any stray or up OSDs as well.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-08-04 13:48:55 -07:00
Sage Weil
cd01d14abf osd: restructure heartbeats
Primary sends explicit message to replicas asking for heartbeats to start,
or to stop.  Replicas never send heartbeats unless explicitly requested
to.

Do not try to mark down old heartbeat relationships; that gets messy, and
the overhead of open sockets is too small to worry about right now.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-08-04 13:35:57 -07:00
Sage Weil
7078c34cb2 mds: add hooks to test multimds link/unlink failures
Signed-off-by: Sage Weil <sage@newdream.net>
2011-08-03 18:04:33 -07:00
Sage Weil
1c1d92ec83 qa: move fsx.sh 2011-08-03 18:04:33 -07:00
Sage Weil
ab537f1e04 Revert "qa: Remove fsx workunit."
This reverts commit a66da4af25.  Still useful
to have this around.
2011-08-03 18:04:33 -07:00
Colin Patrick McCabe
6a920bb93a os/FileStore: print out BTRFS_IOC_SNAP_CREATE errs
Print out the errno for BTRFS_IOC_SNAP_CREATE errors if they happen.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-03 17:56:19 -07:00
Colin Patrick McCabe
8981a23200 rgw_rest: don't leak formatters
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-03 11:39:40 -07:00
Colin Patrick McCabe
cec04ca9de XmlFormatter: add DTD option
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-02 17:05:53 -07:00
Colin Patrick McCabe
ede86e7df1 Formatter.cc: add get_len method
Add get_len method because rgw needs it.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-02 16:11:11 -07:00
Colin Patrick McCabe
24a7b5f7ad RGWFormatter: get rid of one flush variant
This flush variant won't exist in common/Formatter.cc.

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-02 16:04:14 -07:00
Colin Patrick McCabe
dbbce9377c rgw_formats: introduce dump_unsigned, dump_int,etc
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-02 15:42:17 -07:00
Colin Patrick McCabe
7b239448ae rgw: rename dump_value_str to dump_format
rename dump_value_str to dump_format for compatibility with Formatter.cc

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-02 15:29:32 -07:00
Colin Patrick McCabe
9dbeeaaf0e rados tool: fix cmdline parsing for --block-size
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-02 15:26:46 -07:00
Colin Patrick McCabe
77fed7b26c Formatter: add XMLFormatter::reset
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-02 15:26:41 -07:00
Colin Patrick McCabe
8b5cda57b8 Formatter.cc: whitespace fix
whitespace fix to conform to the coding standard

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-02 14:42:31 -07:00
Colin Patrick McCabe
8c4f729aa6 rgw:rename open_obj_section to open_object_section
For compatibility with common/Formatter.cc

Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-02 14:41:02 -07:00
Colin Patrick McCabe
70f585c843 Add XMLFormatter and unit test
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-02 14:30:31 -07:00
Colin Patrick McCabe
8003b77259 Formatter: remove protected data, methods
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
2011-08-02 14:30:31 -07:00
Sage Weil
97b682215d osd, objecter, librados: add SRC_CMPXATTR operation
and test.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-08-02 14:20:36 -07:00
Sage Weil
acc8600c00 osd: change src_oid encoding -- FLAG DAY
The old encoding was mutually exclusive with putting any data payload on
the operation.  That was stupid.. we can't, for example, do xattr ops then
on a src_oid.

Fix this by just including the oid in the data payload inline whenever the
bit is set in the op code.  This changes the client protocol in an
incompatible way, which means users of the CLONERANGE operation need to be
upgrade/downgraded in unison.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-08-02 14:20:36 -07:00
Sage Weil
23a46f2830 testradospp: test cmpxattr (eq, str)
No coverage for the other tests yet.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-08-02 14:20:36 -07:00
Sage Weil
4fbdb9961d osd: fix cmpxattr string construction
The bufferlist may not contain a terminating '\0'.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-08-02 14:20:36 -07:00
Sage Weil
7401feaf6c objecter, osd: fix up cmpxattr
Objecter stubs, useful debug output.

Signed-off-by: Sage Weil <sage@newdream.net>
2011-08-02 14:20:36 -07:00
Josh Durgin
83ad583c35 systest: add watch/notify tests with pool and object deletion
Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
2011-08-02 14:17:15 -07:00