Github shows up a `guidelines for contributing` while opening a new pull
request for any repository with a CONTRIBUTING file at the repo
root, which allows for a quick overview to contribute to the
repository.
Currently this file just links to the Submitting Patches and the
documentation start guide.
This workunit will be used by tests as a placeholder that always return
true. This is helpful in tests when a script from the qa/workunits
directory is mandatory but we do not care about testing anything. For
an example of how it can be used, check
https://github.com/ceph/ceph-qa-suite/pull/120
S3 API supports getting the location for a bucket, which gives out one
of those geographic zones (US-WEST-1, EU for eg). Also it returns an
empty string for the default region.
(http://docs.aws.amazon.com/AmazonS3/latest/API/RESTBucketGETlocation.html)
Since LocationConstraint corresponds to regions in our case, this API
returns the region, for the "default" region empty string is returned
Adding basic unit test to test the new formatter class'
dump_format_ns. Since the functionality only affects XML (and other
implementations mimic dump_format exactly), tests are added for these.
`fmt.close_section()` is avoided in the tests as this calls an
assert (and there is no section to close) and this triggers a test
failure.
Since the base formatter was extended with a dump_format_ns class,
implementing this here. For now, this is exactly same as dump_format, as
the concept of ns in json is not used.
`dump_format_ns` is a generic formatter to dump a simple format along
with a namespace. It is `dump_format` with an optional ns. This also
extends the XML formatter with this functionality. This allows creation
of xml tags with ns and a specified format. The JSON Format doesn't
define a ns, and here the functionality is exactly same as that of
`dump_format`
Refactor ErasureCodeLrc::create_ruleset
1.Use CrushWrapper instead of crush C-api.
2.Make ruleset_id == rule_id, consist as the behavior in
CrushWrapper::add_simple_ruleset().
mds: clear objects' dirty flags after log segment is expired
When standby-replay MDS detects a log segment is expired, it should check
the expired segment's dirty lists and clear corresponding objects' dirty
bits. Otherwise these objects will be pinned in the standby-replay MDS's
cache forever.
Danny Al-Gaaf [Thu, 4 Sep 2014 14:09:01 +0000 (16:09 +0200)]
OSDMonitor.cc: fix potential division by zero
Fix for:
CID 1232602 (#1 of 1): Division or modulo by zero (DIVIDE_BY_ZERO)
divide_by_zero: In expression num_pg_copies / num_osds, division
by expression num_osds which may be zero has undefined behavior.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
CID 1232603 (#1 of 1): Unintentional integer overflow (OVERFLOW_BEFORE_WIDEN)
overflow_before_widen: Potentially overflowing expression
objs_per_folder * folders_range(rng) with type int (32 bits,
signed) is evaluated using 32-bit arithmetic before being
used in a context which expects an expression of type
uint64_t (64 bits, unsigned). To avoid overflow, cast
either operand to uint64_t before performing the multiplication.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
CID 1232604 (#1 of 1): Unintentional integer overflow (OVERFLOW_BEFORE_WIDEN)
overflow_before_widen: Potentially overflowing expression
(unsigned int)abs(this->merge_threshold) * 16U * this->split_multiplier
with type unsigned int (32 bits, unsigned) is evaluated using 32-bit
arithmetic before being used in a context which expects an expression of
type uint64_t const (64 bits, unsigned). To avoid overflow, cast either
operand to uint64_t const before performing the multiplication.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
Danny Al-Gaaf [Thu, 4 Sep 2014 11:57:58 +0000 (13:57 +0200)]
mount.ceph.c: free memory before return
CID 1219610 (#1 of 1): Resource leak (RESOURCE_LEAK)
leaked_storage: Variable buf going out of scope leaks the
storage it points to.
leaked_storage: Variable mount_path going out of scope leaks
the storage it points to.
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
John Spray [Mon, 1 Sep 2014 17:43:11 +0000 (18:43 +0100)]
mon: add MDS metric metadata to health detail
This is a bit wonky because the mon health structure expects
a string, and we have a key-val structure, but it's better
to output this somehow than to have it rot as a purely internal
thing.
John Spray [Wed, 27 Aug 2014 12:31:27 +0000 (13:31 +0100)]
mds: use HeartbeatMap to control beacons
...so that if something hogs mds_lock without
pinging the heartbeat map, we will stop sending
beacons to the mon and it will have the chance
to recognise that we are laggy.
Loic Dachary [Sun, 31 Aug 2014 17:14:55 +0000 (19:14 +0200)]
mailmap: add .peoplemap
In .mailmap, an individual may be represented by multiple mails which
may reflect an organization affiliation change that needs to be
preserved to find out which organization sponsored which commit.
The .peoplemap file aggregates these mails to show a single line for
each person
Sage Weil [Sun, 31 Aug 2014 04:56:31 +0000 (21:56 -0700)]
common/LogEntry: fix warning on i386
common/LogEntry.cc: In member function 'void LogEntry::log_to_syslog(std::string, std::string)':
warning: common/LogEntry.cc:161:20: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'uint64_t {aka long long unsigned int}' [-Wformat=]
msg.c_str());
^
Sage Weil [Sat, 30 Aug 2014 02:27:34 +0000 (19:27 -0700)]
osd/ReplicatedPG: do not evict blocked objects
If the object is blocked, that means we are either still promoting it, or
we are in the process of doing a blocking flush. In both cases, do not
evict it just yet. For the promotion case in particular this can cause a
very long op delay because we'll have to restart the promotion, and this
can potentially loop indefinitely.
For the flush case, flushes are generally only blocking when the user
explicitly requests it. In that case, we are not particularly concerned
that we may delay the objects eventual eviction as the user is probably
controlling that anyway (and even if they aren't, the agent will still
try this object again later).
Fixes: #9285 Reported-by: Wang, Zhiqiang <zhiqiang.wang@intel.com> Signed-off-by: Sage Weil <sage@redhat.com>
prev_snapc will be 0, oi.snaps will be [a], p will end up at end(), get
assigned to dnewest, and we'll dereference. It's only sometime harmful
though because we may still take the right (else) branch...
Fixes: #9294 Signed-off-by: Sage Weil <sage@redhat.com>