This patch is about:
- Adding the missing headers from src/messages
- Adding the missing types from the existing headers
- Adding blank lines to keep includes and types in a visual block.
That is much easier to read and keep the same visual as the rest of the file.
Erwan Velu [Mon, 11 Jun 2018 14:22:05 +0000 (16:22 +0200)]
test/encoding/types.h: Adjusting src/cls entries
This patch is about:
- Adding the missing headers from src/cls
- Adding the missing types from the existing headers
- Ordering types to get them in the file's order (that's easier to update)
Erwan Velu [Mon, 11 Jun 2018 14:20:01 +0000 (16:20 +0200)]
test/encoding/types.h: Adjusting src/rgw entries
This patch is about:
- Adding the missing headers from src/rgw
- Adding the missing types from the existing headers
- Ordering types to get them in the file's order (that's easier to update)
Erwan Velu [Mon, 11 Jun 2018 14:09:53 +0000 (16:09 +0200)]
test/encoding/types.h: Adjusting src/mds entries
This patch is about:
- Adding the missing headers from src/mds
- Adding the missing types from the existing headers
- Adding blank lines to keep includes and types in a visual block.
That is much easier to read and keep the same visual as the rest of the file.
Erwan Velu [Mon, 11 Jun 2018 14:04:08 +0000 (16:04 +0200)]
test/encoding/types.h: Adjusting src/os entries
This patch is about:
- Adding the missing headers from src/os
- Adding the missing types from the existing headers
- Ordering types to get them in the file's order (that's easier to update)
Erwan Velu [Mon, 11 Jun 2018 14:01:12 +0000 (16:01 +0200)]
test/encoding/types.h: Adjusting src/osd entries
This patch is about:
- Adding the missing headers from src/osd
- Adding the missing types from the existing headers
- Ordering types to get them in the file's order (that's easier to update)
- Moving crush entries avoid let all the osd entries in a collocated place
Sage Weil [Mon, 11 Jun 2018 02:41:54 +0000 (21:41 -0500)]
messages/MOSDPGLog: encode epoch for query_epoch for pre-nautilus OSDs
This fix is analogous to d5a3ae6008e4399b336f3a72d8dee328f97a0002. As of 84a1984b7cb70c74eaf517ffc424228fa954ed37 we set query_epoch to a lower
value reliably, but we need to encode the latest epoch for pre-nautilus
OSDs because they do not set last_peering_epoch reliably and havin a lower
query_epoch will cause them to discard this message.
common: use include/types.h early on, otherwise Clang will error.
This is due that FreeBSD does not have loff_t as type.
And with the wrong order of includes the standard linux typedef
is included and used.
In file included from /home/wjw/wip/src/common/buffer.cc:21:
/home/wjw/wip/src/include/buffer_raw.h:92:41: error: unknown type name 'loff_t'; did you mean 'off_t'?
virtual int zero_copy_to_fd(int fd, loff_t *offset) {
^~~~~~
off_t
/usr/include/sys/uio.h:49:17: note: 'off_t' declared here
typedef __off_t off_t;
^
1 error generated.
Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
Kefu Chai [Sat, 9 Jun 2018 07:15:01 +0000 (15:15 +0800)]
osd: always set query_epoch explicitly for MOSDPGLog
it's a follow-up change of 339ae18b. also remove the MOSDPGLog
contructor where query_epoch is optional. it's less error-prone if we
make this parameter mandatory.
Sage Weil [Sat, 9 Jun 2018 01:45:08 +0000 (20:45 -0500)]
messages/MOSDPGScan: encode map_epcoh for query_epoch for pre-nautilus peers
Pre-nautilus OSDs do not create last_peering_reset reliably (due to not
having the previous commit's fix in place). Avoid breaking them during
an upgrade by encoding the map_epcoh in place of the query_epoch.
Sage Weil [Fri, 8 Jun 2018 12:29:31 +0000 (07:29 -0500)]
osd/PG: create new PGs from activate in last_peering_reset epoch
If we create a new PG (e.g., a backfill target) in the current epoch, it
might be > last_peering_reset. That can lead to last_peering_reset on
the replica having a higher last_peering_reset than the primary's, which
can then lead to future messages, like pg_scan during backfill, being
ignored.
Fixes: http://tracker.ceph.com/issues/24452 Signed-off-by: Sage Weil <sage@redhat.com>
Kefu Chai [Fri, 25 May 2018 04:34:33 +0000 (12:34 +0800)]
denc: specialize for denc(const T&, size_t&, uint64_t)
otherwise GCC complains that 'unsigned long int' is not a class or
namespace when trying to materialize is_const_iterator_v<>. not sure why
SFINAE does not work here, though.
Kefu Chai [Fri, 23 Feb 2018 06:45:10 +0000 (14:45 +0800)]
cmake: update for accomodate seastar
* add unit_test_framework for appease seastar's find_package() call,
even we don't build seastar's tests
* some seastar functions declare their return value like:
const size_t str_len(...). and GCC does not like the "const" in it.
so silence it
Stephan Müller [Fri, 1 Jun 2018 15:11:35 +0000 (17:11 +0200)]
mgr/dashboard: Resolve TestBed performance issue
With this helper function you can easily resolve the TestBed resetting
performance issue. If more tests exists in a test suite, it makes sense
to configure TestBed only once if you are not doing a lot of TestBed
specific stuff (haven't hit the limitation). It will reduce the test
run time by around $tests * 50 %. In my case it was a test suite with
47 tests with a run time of over 30s after using the static test bed
method it ran in 1.2s. The run time was reduced to 0.04 %! This is
equivalent to a speed increase of 2500% (100/0.04)!
For our own security the normal way will be taken if you not
set the _DEV_ configuration variable to true. It will be false when
"run-frontend-unittests.sh" is run.
Sage Weil [Thu, 7 Jun 2018 13:33:46 +0000 (08:33 -0500)]
osd/PG: normalize query processing in Stray and ReplicaActive
A stray PG may end up in ReplicaActive if it is participating in backfill.
However, whether it is or isn't, we should treat queries the same.
Otherwise we end up with weird behaviors like:
- osd's stray pg moves to ReplicaActive (gets info+log from primary)
- osd goes down and back up
- primary restarts peering, request FULLLOG to find missing objects
- osd ignores FULLLOG because it is ReplicaActive and not Stray
Fixes: http://tracker.ceph.com/issues/24373 Reported-by: Kouya Shimura <kouya@jp.fujitsu.com> Signed-off-by: Sage Weil <sage@redhat.com>
Sage Weil [Thu, 7 Jun 2018 12:07:19 +0000 (07:07 -0500)]
osd/PG: reset PG peering if osd transitions from down -> up
Consider a PG that is stray and ends up in ReplicaActive (because it is
participating as a recovery source). If it is marked down wrongly and
then comes back up, then the PG will not reset, because there was not
an interval change (the PG is not part of the up or acting sets).
This can leave the PG in an odd state, leading to questionable behavior.
(For example, a stray might be in ReplicaActive and then ignore some
types of query messages.)
ceph-volume goes to great lengths to ensure that the symlinks in the
osd dir are accurate. Having these values here is an opportunity to
get them out of sync. And that can happen very easily if the initial
mkfs was performed using a /dev/sdX device name (which is unstable
across reboots). Even after ceph-volume corrects the symlink, bluestore
will continue to use the stale device path.