ReplicatedPG: check for full if delta_stats.num_bytes > 0

Signed-off-by: Samuel Just <sam.just@inktank.com>
config_opts: fix rgw_port comments to be plaintext

Signed-off-by: Greg Farnum <greg@inktank.com>
ceph-disk list: say 'unknown cluster $UUID' when cluster is unknown

This makes it clearer that an old osd is in fact old.

Signed-off-by: Sage Weil <sage@inktank.com>
doc: Cleanup.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
doc: Moved to separate section for parallelism.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
doc: Rewrote monitor configuration section.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
doc: Moved PG info to separate page. Moved heartbeat to mon-osd doc.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
doc: Added heartbeat configuration settings.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
doc: Added entries for Pool, PG, & CRUSH. Moved heartbeat link.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
mon: OSDMonitor: add 'osd pool set-quota' command

Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
Merge branch 'wip-4490'
fix null character in object name triggering segfault

Parsing \n in  lfn_parse_object_name is implemented with

  out->append('\0');

which segfaults when using libstdc++ and g++ version 4.6.3 on Debian
GNU/Linux. It is replaced with

  (*out) += '\0';

to avoid the bugous implicit conversion. There is no append(charT)
method in C++98 or C++11, which means it relies on an implicit
conversion that is bugous. It would be better to rely on the
basic_string& operator+=(charT c); method as defined in ISO 14882-1998
(page 385) thru ISO 14882-2012 (page 640)

A set of tests is added to generate and parse object names. They need
access to the private function lfn_parse_object_name because there is
no convenient protected method to exercise it. The tests contain a
LFNIndex derived class, TestWrapLFNIndex which is made a friend of
LFNIndex to gain access to the private methods.

http://tracker.ceph.com/issues/4594 refs #4594

Signed-off-by: Loic Dachary <loic@dachary.org>
Merge pull request #175 from dachary/wip-4594

fix null character in object name triggering segfault

Reviewed-by: Sage Weil <sage@inktank.com>
mds: preserve subtree bounds until slave commit

When replaying an operation that rename a directory inode to non-auth subtree,
if the inode has subtree bounds, we should prevent them from being trimmed
until slave commit.

This patch also fixes a bug in ESlaveUpdate::replay(). EMetaBlob::replay()
should be called before MDCache::finish_uncommitted_slave_update().

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
mds: process finished contexts in batch

If there are several unstable locks in an inode, current Locker::eval(CInode*,)
processes each lock's finished contexts seperately. This may cause very deep
call stack if finished contexts also call Locker::eval() on the same inode.
An extreme example is:

Locker::eval() wakes an open request(). Server::handle_client_open() starts
a log entry, then call Locker::issue_new_caps(). Locker::issue_new_caps()
calls Locker::eval() and wakes another request. The later request also tries
starting a log entry.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
mds: fix MDCache::adjust_bounded_subtree_auth()

There are cases that need both create new bound and swallow intervening
subtree. For example: A MDS exports subtree A with bound B and imports
subtree B with bound C at the same time. The MDS crashes, exporting
subtree A fails, but importing subtree B succeed. During recovery, the
MDS may create new bound C and swallow subtree B.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
mds: mark connection down when MDS fails

So if the MDS restarts and uses the same address, it does not get
old messages.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
client: fix use-after-free on session close and cond signals

Move the signal into the closed method, before we deallocate the
MetaSession, so that other callers catch it too.

Signed-off-by: Sage Weil <sage@inktank.com>
client: do sync read when 'client oc = false'

Signed-off-by: Sage Weil <sage@inktank.com>
rgw: with CORS support

With CORS test cases

1. Added license headers to the cors files
2. SIWFT POST metadata for cors will replace the old cors configuration
3. Fixed a buf in rgw_cors_swift.h

With Yehuda's review comments along with some fixes;
1. If the origin is allowed only for https, we should not approve the same host for http requests
2. Accounted for hostname situtation like www.www.org, or www.wowwww.com or www.*
3. Replaced atoi with strtol
4. Have a centralized place for parsing host names, hence avoiding duplicates

Checked certain senarios with amazon S3 and made changes accordingly

With some fixes in rgw_cors.cc and str_list.cc

Removing the whitespace auto-append to the delimiters in get_str_list(), added white spaces delimiters in is_string_in_set()