When anonymous tries access public bucket, it gets 404,
because rgw doesn't check tenant correctly.
A previous fix for this broke legacy implicit tenants,
because it didn't check for anonymous access. This version
restricts its behavior to the anonymous user.
Fixes: https://tracker.ceph.com/issues/48001https://tracker.ceph.com/issues/48382
Original fix by
Author: Rafał Wądołowski <rafal@rafal.net.pl>
Signed-off-by: Rafał Wądołowski <rwadolowski@cloudferro.com>
This fix
Signed-off-by: Marcus Watts <mwatts@redhat.com>
In order to test filters, we need to be able to instantiate one and
stack it over a store. Add a temporary config option to specify a
filter that can be used for testing. This will be replaced with a
better system once the loadable module work is done.
Signed-off-by: Daniel Gryniewicz <dang@redhat.com>
This is the base implementation for filters. It passes each call on
each object through to the next layer down. This allows filters to
subclass these, and only implement the bits they care about, leaving the
rest as pass-through.
Signed-off-by: Daniel Gryniewicz <dang@redhat.com>
This makes ceph-volume support passing symlinks as devices.
Fixes: https://tracker.ceph.com/issues/49103
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
Also, the committed journal head should be updated atomically with the
rest of the complete-commit logics.
Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
`dev['NAME']` can't match `part` given that it's the name of the
parent device being compared to the partition name.
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
The existing code accesses the states of the scrub FSM via the
standard "state iterator", which is definitely not thread-safe.
It is also a bit time consuming.
As it happened, new code that tried to create the state string
while not holding the PG lock - crashed the OSD.
This PR changes the relevant lines to allow for safe and fast
access to the state description text.
Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
crimson/monc: replace then_unpack() with discard_result() if possible
Reviewed-by: Samuel Just <sjust@redhat.com>
Reviewed-by: Kefu Chai <tchaikov@gmail.com>
When building on 32 bit platforms (tested on armhf), 2 errors were detected:
The first involves the compiler being unable to disambiguate a call to
deserialize an integer (apparently because there isn't a specialization for it).
The second involves invalid usage of the builtin reinterpret_cast.
Signed-off-by: Luciano Lo Giudice <luciano.logiudice@canonical.com>
now that fmt/ranges.h provides a generic mechinary for printing
ranges. let's just use it.
the output format is changed a little bit when it comes to
set and map, but as long as it makes sense, and we don't use
a tool to parse the logging messages for extracting information
from the messages printed by fmt::format(), we should be safe.
Signed-off-by: Kefu Chai <tchaikov@gmail.com>
disk.has_bluestore_label() does the same thing without a subprocess call.
Fixes: https://tracker.ceph.com/issues/56622
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
This flaw can explain the following crash observed at Sepia:
```
ceph-osd: /home/jenkins-build/build/workspace/ceph-dev-new-build/ARCH/x86_64/AVAILABLE_ARCH/x86_64/AVAILABLE_DIST/centos8/DIST/centos8/MACHINE_SIZE/gigantic/release/17.0.0-13661-g3a14f283/rpm/el8/BUILD/ceph-17.0.0-13661-g3a14f283/x86_64-redhat-linux-gnu/boost/include/boost/smart_ptr/intrusive_ptr.hpp:199: T* boost::intrusive_ptr<T>::operator->() const [with T = MOSDRepOpReply]: Assertion `px != 0' failed.
Aborting on shard 0.
Backtrace:
0# gsignal in /lib64/libc.so.6
1# abort in /lib64/libc.so.6
2# 0x00007FB1346F4CD9 in /lib64/libc.so.6
3# 0x00007FB13471A3F6 in /lib64/libc.so.6
4# crimson::osd::OSD::handle_rep_op_reply(seastar::shared_ptr<crimson::net::Connection>, boost::intrusive_ptr<MOSDRepOpReply>) in ceph-osd
5# 0x000055C4100FF8D0 in ceph-osd
6# 0x000055C410100639 in ceph-osd
7# crimson::osd::OSD::ms_dispatch(seastar::shared_ptr<crimson::net::Connection>, boost::intrusive_ptr<Message>) in ceph-osd
8# crimson::net::ChainedDispatchers::ms_dispatch(seastar::shared_ptr<crimson::net::Connection>, boost::intrusive_ptr<Message>) in ceph-osd
9# 0x000055C4165220EF in ceph-osd
10# 0x000055C416532791 in ceph-osd
11# 0x000055C4165328B2 in ceph-osd
12# 0x000055C40FDD33D5 in ceph-osd
13# 0x000055C40FDEE2CE in ceph-osd
14# 0x000055C40FDEEEF0 in ceph-osd
15# 0x000055C41CA41215 in ceph-osd
16# 0x000055C41CA97959 in ceph-osd
17# 0x000055C41CBF73A0 in ceph-osd
18# 0x000055C41CBF93F5 in ceph-osd
19# 0x000055C41C629A46 in ceph-osd
20# 0x000055C41C62E012 in ceph-osd
21# main in ceph-osd
22# __libc_start_main in /lib64/libc.so.6
23# _start in ceph-osd
```
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
According to the `seastar::lowres_system_clock` reference:
> This clock has the same granularity as lowres_clock,
> but it is not required to be monotonic and its time
> points correspond to system time.
we should similar check as the classical `MonClient` does:
```cpp
if ((now > last_rotating_renew_sent) &&
double(now - last_rotating_renew_sent) < 1) {
ldout(cct, 10) << __func__ << " called too often (last: "
<< last_rotating_renew_sent << "), skipping refresh" << dendl;
return 0;
}
```
This check is rather paranoidal and the main reason behind it
in crimson is replicating the classical behaviour.
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
zone_size and zone_capacity are reported in 512B sectors by the
kernel. Update the superblock correctly with zone size/capacity
in bytes.
Currently we are using stat() to get the device size, but it
fails on block devices to get the size. Use BLKGETSIZE ioctl
to get the actual size of the zns device in sectors and convert
to bytes.
Signed-off-by: Aravind Ramesh <aravind.ramesh@wdc.com>