mds: update backtrace when old format inode is touched

We updated inode format version to 7 when introducing inode backtrace.
If we found a inode's format version < 7 when fetching the inode, set
the inode's backtrace_version to 0, to indicate the inode's backtrace
is out of data. When touching a inode with backtrace_version == 0, we
also update its backtrace.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
rgw: turn swift COPY into PUT

Fixes: #6606
The swift COPY operation is unique in a sense that it's a write
operation that has its destination not set by the URI target, but by a
different HTTP header. This is problematic as there are some hidden
assumptions in the code that the specified bucket/object in the URI is
the operation target. E.g., certain initialization functions, quota,
etc. Instead of creating a specialized code everywhere for this case
just turn it into a regular copy operation, that is, a PUT with
a specified copy source.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: get rid of req_state.bucket_name

No need for this field, as we already have req_state.bucket_name_str.
This saves us some memory allocation / freeing through every request
processing.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: init src_bucket_name, src_object in the S3 handler

Be consistent and initialize these fields also in the S3 case.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
rgw: don't bother to call c_str() on strings passed to dump_string()

dump_string() also accepts const string reference.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Merge branch 'wip-6606' into next

Reviewed-by: Sage Weil <sage@inktank.com>
ceph.in: add emacs modeline

Signed-off-by: Sage Weil <sage@inktank.com>
ceph: fixup do_help() function connection check

We might have cluster_handle defined, but not have
successfully connected. Instead, check if it's in
the connected state.

Signed-off-by: Greg Farnum <greg@inktank.com>
ceph: print basic options before connecting

This will let you control-c if the mon is unresponsive.

Signed-off-by: Sage Weil <sage@inktank.com>
ceph: add --connect-timeout option

Signed-off-by: Sage Weil <sage@inktank.com>
ceph: default 5 second timeout for -h

Signed-off-by: Sage Weil <sage@inktank.com>
ceph: show basic help before initializing cluster connection

That way we still get help if there is an error.

Signed-off-by: Sage Weil <sage@inktank.com>
ceph: catch exceptions thrown during the rados handle init

In my case, making ceph.conf unreadable triggers an exception here:

Traceback (most recent call last):
  File "./ceph", line 802, in <module>
    sys.exit(main())
  File "./ceph", line 575, in main
    conf_defaults=conf_defaults, conffile=conffile)
  File "/home/sage/src/ceph/src/pybind/rados.py", line 221, in __init__
    self.conf_read_file(conffile)
  File "/home/sage/src/ceph/src/pybind/rados.py", line 272, in conf_read_file
    raise make_ex(ret, "error calling conf_read_file")
rados.Error: error calling conf_read_file: errno EACCES

Signed-off-by: Sage Weil <sage@inktank.com>
ceph: move timeout

Signed-off-by: Sage Weil <sage@inktank.com>
pybind/rados: create InterruptedOrTimeoutError exception

Signed-off-by: Sage Weil <sage@inktank.com>
Merge remote-tracking branch 'gh/wip-6242-b' into next

Reviewed-by: Greg Farnum <greg@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
mon: Monitor: do not flush formatter at end of _mon_status()

Delegate that to the caller so that we can combine the result of
_mon_status() with the result of other functions.

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
mon: Monitor: reply to ping messages, letting them know we're alive

Fixes: #5984

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
mon: MonClient: adjust whitespaces

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
mon: MonClient: allow pinging a monitor without authenticating first

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>