We were bailing out of mkcephfs with a config with no mds's defined
(because we set -e and grep returns an error here).
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Stop accepting old-style section names of the form $type$id. Instead,
we want section names of the form $type.$id. So [osd0] will no longer
be a valid section name; instead, use [osd.0].
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
Normalize key names in md_config_t::get_val and md_config_t::set_val
Remove unused fields from struct config_option.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
Rados Gateway: get rid of RGWOp::err. We already have req_state::err and
that represents the same thing.
Standardize nomenclature for errors. 'errno' is our internal
representation of the error. 'code' is what is returned by S3.
'message' is the message at the end. Improve rgw_err.
dump_errno shouldn't modify req_state, but just dump the error.
A new function set_req_state_err sets the error based on an 'errno'.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
Reading a config file into any md_config_t structure except g_conf used
to be impossible. This is because the config_option code used to
contain explicit references to g_conf. Those have been removed, so now
any md_config_t should be able to read a configuration file.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
Now log_per_instance (the symlink dance) works with both log_file and
log_dir. This will facilitate gradually removing log_dir.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>
ReadOp should read the recieve length to prevent buffer error.
Check error codes on WriteOp and ReadOp.
Signed-off-by: Samuel Just <rexludorum@gmail.com>
Triggered by mds_kill_import_at 5. We were clearing the export_locks
prior to calling export_unlock (der!).
Signed-off-by: Sage Weil <sage@newdream.net>
We do not need to start a new segment after replay. And in fact must not
journal an ESubtreeMap prior to doing resolve!
Signed-off-by: Sage Weil <sage@newdream.net>
This populates import_state[] with an bad value and leads to crashes like
mds/Migrator.h: In function 'static const char* Migrator::get_import_statename(int)', in thread '0x7f5ea8c97710'
mds/Migrator.h: 112: FAILED assert(0)
ceph version 0.25-670-g85bd67e (commit:85bd67e0ab58876ad807b44ab2154e84b90a4f30)
1: (ceph::__ceph_assert_fail(char const*, char const*, int, char const*)+0x53) [0xa53ad6]
2: (Migrator::get_import_statename(int)+0x68) [0x91ea0f]
3: (Migrator::show_importing()+0x174) [0x90f640]
Signed-off-by: Sage Weil <sage@newdream.net>
For recovering nodes, we eventually open_snap_parents and much later
requeue these waiters. A surviving node wasn't requeueing them at all.
Signed-off-by: Sage Weil <sage@newdream.net>
This was broken by a01fba175b when an ambiguous import was changed
from CDIR_AUTH_UNKNOWN to <whoami,whoami> and disambiguate_imports wasn't
updated accordingly. The result was inconsistent results for subtree
ownership on different nodes.
This updates disambiguate_imports to match that EImportStart::replay
change.
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
If we are, say, auth but frozen (mid-import) the dir content isn't valid
and check_rstats will likely fail.
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
The is_freezeable_dir() is true at freeze time but not forever after over
the lifetime of the freeze. We split later on and _freeze_dir on the new
fragments, so this assertion isn't necessarily true then.
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
This crops up on inodes during clientreplay when we reconnect the cap
on the newly created (and still xlocked) object.
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Since the object store is ultimately based on ext3, ext4, or btrfs, and
object names ultimately get translated into file names, we need to
impose a corresponding limit on the length of ceph object names.
Otherwise, the "writeback" thread in the FileStore gets ENAMETOOLONG,
and the transaction does not succeed, even though we journalled it.
Perhaps we will extend or eliminate MAX_CEPH_OBJECT_NAME_LEN at some
point by using prehashing or some other technique. Until then, we need
to be sure to check for this.
Signed-off-by: Colin McCabe <colin.mccabe@dreamhost.com>