Reencode both full and incremental maps if target doesn't know how to
decode OSDMAP_ENC maps (CEPH_FEATURE_OSDMAP_ENC bit is not set). This
fixes a compatibility bug that was introduced in 3d7c69fb09 ("OSDMap:
add a CEPH_FEATURE_OSDMAP_ENC feature, and use new encoding").
Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
Commit 4e439857a6 introduced invalidate+forward cache mode, commit
81279e3bb6 renamed it to forward, but missed the CLI. Fix it.
Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
There is one path where a mds that is not sending its beacon (e.g.,
because it is not running at all) will lead to proposal of new mdsmaps.
Fix it.
Backport: emperor, dumpling
Signed-off-by: Sage Weil <sage@inktank.com>
Automake puts ceph_common.sh into libdir/ceph, but the Red Hat packaging
was not capturing this file.
Add the libdir/ceph location to the RPM packaging.
Fixes#7117
(cherry picked from commit 2d0d48b829)
bufferlist::append(istream) now filters out empty lines; reflect this in
the test
Signed-off-by: Loic Dachary <loic@dachary.org>
(cherry picked from commit 4b5f2570e9)
It leads to a 500 error when getting mds help info via rest api.
Changed "w" to "rw" in MonCommands.h
Fixes: #7180
Signed-off-by: Kai Zhang <kazhang2@cisco.com>
The POST authentication by signature validation looked up a user based
on the access key, then used the first secret key for the user. If the
access key used was not the first access key, then the expected
signature would be wrong, and the POST would be rejected.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
The signature variables for expected vs got are poorly named, and this
lead them being swapped in the signature validation failure print.
Change them to 'expected' and 'received' and make the related temporary
variables consistent to match.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
Way back in a0ed9c2004 we introduced the
dirty flag, but we did not track it in the stats until much later in
c561d5ea22. Unfortunately this interval
spans the emperor release. To avoid making scrub error out and require
repair on *any* of those old pools, flag stats that were encoded before
now such that the dirty stats are ignored. Clear the flag if we *do*
do a repair so that it will be tracked properly thereafter.
Signed-off-by: Sage Weil <sage@inktank.com>
This error is thrown when comparing a shared_ptr to NULL. To resolve
this we just use shared_ptr::operator bool that checks if the stored
pointer is null.
In C++11 the shared_ptr can be compared to nullptr, but as of yet I have
not come up with a good compatibility fix.
Details:
os/MemStore.cc:259:30: error: use of overloaded operator '!=' is ambiguous (with operand types 'ObjectRef' (aka 'shared_ptr<MemStore::Object>') and 'long')
return (c->get_object(oid) != __null);
~~~~~~~~~~~~~~~~~~ ^ ~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/c++/v1/memory:4787:1: note: candidate function [with _Tp = MemStore::Object]
operator!=(const shared_ptr<_Tp>& __x, nullptr_t) throw()
^
os/MemStore.cc:259:30: note: built-in candidate operator!=(int, long)
return (c->get_object(oid) != __null);
^
os/MemStore.cc:259:30: note: built-in candidate operator!=(unsigned __int128, long)
os/MemStore.cc:259:30: note: built-in candidate operator!=(unsigned long long, long)
.....
1 error generated.
make[3]: *** [os/MemStore.lo] Error 1
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
The definitions of hash<> for int64_t/uint64_t that were not available
on i386 in the __gnu_cxx namespace are available when we switch over to
std::tr1 namespace so we remove them to avoid the redefinition errors.
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
librados.hpp uses std::tr1::shared_ptr which may not be available such
as in libc++. This switches the use to ceph::shared_ptr and as a result
also ships include/memory.h for the definition.
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
In _get_temp_osds(), we populate temp_pg from the list in the OSDMap,
but we also skip anybody in the list who's down. We need to account
for those skips when setting the primary. It's easy enough to do -- just
look at the output pg_temp list instead of the OSDMap's starting one.
Fixes: #7177
Signed-off-by: Greg Farnum <greg@inktank.com>
Use rwlock to read cahed results, only use regular lock if
results are not cached.
Invalidate cache on new osdmap.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>