rgw: Fixes to permission evaluation related to user policies.
Reviewed-by: Matt Benjamin <mbenjamin@redhat.com>
Reviewed-by: Adam C. Emerson <aemerson@redhat.com>
Reviewed-by: Casey Bodley <cbodley@redhat.com>
* Don't store my_addr in `Connection`, because my_addr can be learned
and thus changed.
* Support nonce in SocketMessenger.
* Always set nonce when set_myaddr().
* Add learned_addr() for SocketMessenger.
* Add side_t and socket_port to show the real connecting
ports of the SocketConnection.
* Fix bannder exchange logic for addresses, including nonce, type, ip,
port, socket_port for my_addr and peer_addr.
* Add more detailed logging prefixes for SocketConnection.
Signed-off-by: Yingxin <yingxin.cheng@intel.com>
DirectoryState does not have an "invalid" enum so far, since it's
defined using `enum class`, init a value of this type with a known value
could be a better choice even it is always initialized before being read.
this silences the GCC warning of:
src/cls/rbd/cls_rbd.cc:3147:3: warning: ‘on_disk_directory_state’ may be
used uninitialized in this function [-Wmaybe-uninitialized]
if (directory_state != on_disk_directory_state) {
^~
Signed-off-by: Kefu Chai <kchai@redhat.com>
In C++ "struct" is unnecessary when referencing a defined
struct. Clean up all uses in src/cls/rgw source files.
Signed-off-by: J. Eric Ivancich <ivancich@redhat.com>
The stats entries for rgw buckets has a category, which used a
combination of uint8_t and enum RGWObjClass. Clean this up by
converting RGWObjClass to an enum class and using that
throughout. This provides type safety and better code clarity. Also,
add some source code documentation.
Signed-off-by: J. Eric Ivancich <ivancich@redhat.com>
When using SSDs as encrypted OSD device, discards do not pass the
encryption layer. This option activates discard requests.
Signed-off-by: Jonas Jelten <jj@stusta.net>
in 0f814f38, we are using self.MODULE_OPTION_DEFAULTS as a fallback, but
the MgrStandbyModule does not have it defined. in this change,
* apply 0f814f38 to MgrStandbyModule
* apply 0228bd79 to MgrStandbyModule
Signed-off-by: Kefu Chai <kchai@redhat.com>
Fixed warning: librados.h:321: warning: Member compressed_bytes_alloc
(variable) of class rados_pool_stat_t is not documented.
Signed-off-by: Jos Collin <jcollin@redhat.com>
this change works around the FTBFS on arm64:
/home/jenkins-build/build/workspace/ceph-pull-requests-arm64/src/crimson/common/config_proxy.h:74:13:
internal compiler error: in tsubst_decomp_names, at cp/pt.c:16537
for (auto& [obs, keys] : rev_obs) {
^~~
Please submit a full bug report,
with preprocessed source if appropriate.
it seems that this issue is a dup of
https://bugzilla.redhat.com/show_bug.cgi?id=1639019 .
Signed-off-by: Kefu Chai <kchai@redhat.com>
GCC is somehow annoyed at seeing the combination of decltype and
initializer_list in this place. i tried to remove the `if` clause, and
only left the `else` block, GCC was happy with that change. i also tried
to pass an empty `{}` to `decltype(reply.lockers)`, and GCC was also
happy with that. so i guess there are multiple factors taking effect in
this problem. probably any of them could be the last straw that breaks
GCC.
but we cannot have a minimal reproducer for this issue here without more
efforts. and `reply.lockers` is empty after `reply` is constructed, so
it would be simpler if we just add the locker info to it instead of
assigning a newly constructed `map` to it.
Fixes: http://tracker.ceph.com/issues/37719
Signed-off-by: Kefu Chai <kchai@redhat.com>
mgr: fix crash due to multiple sessions from daemons with same name
Reviewed-by: Tim Serong <tserong@suse.com>
Reviewed-by: Boris Ranto <branto@redhat.com>
Reviewed-by: Ricardo Dias <rdias@suse.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
* refs/pull/25597/head:
mgr/hello: define some module options
pybind/mgr/mgr_module: normalize defaults to str when type is missing
mgr/telegraf: specify option types
mgr/telemetry: specify option types
mgr/zabbix: specify option types
mgr/localpool: document options and specify in native types
mgr/devicehealth: document options and specify in native types
mgr/balancer: document and specify options
common/options: make runtime vs not runtime explicit, not type-dependent
mon/MgrMonitor: mark module options with FLAG_MGR
mon/MgrMonitor: make find_module_option handle localized option names
pybind/mgr/mgr_module: set values as string
mgr: return options as appropriate python type
mgr/PythonCompat: python 3 cludges
pybind/mgr/mgr_module: make use of defined default value
mgr/PyModule: populate ModuleOptions and expose to mon
mon/ConfigMonitor: unify module options with built-in options
mon/MgrMonitor: populate options
mon/MgrMap: define ModuleOptions and include in map
common/options: expand type helpers and make them static
common/options: pin enums to values
Reviewed-by: Tim Serong <tserong@suse.com>
Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
* refs/pull/25652/head:
osd/OSDMap: disallow new upmaps on pgs that are pending merge
osd/PG: align past_intervals and last_epoch_clean for fabricated merge target
Reviewed-by: Neha Ojha <nojha@redhat.com>
The OSD has to reliably deliver a pg_created message to the mon in order
for the mon to clear the pool's CREATING flag. Previously, a mon
connection reset would drop the message.
Restructure this to:
- queue a message any time a PG peers and the pool as the CREATING flag
- track pending messages in OSDService
- resend on mon connect
- prune messages for pools that no longer have the CREATING flag
This new strategy can result in resends of these messages to the mon in
cases where the mon already knows the PG was created. However, pool
creation is rare, and these extra messages are cheap. And we can avoid
this overhead if we like by limiting the number of PGs that the mon can
create explicitly if we choose (by lowering mon_osd_max_initial_pgs).
Fixes: http://tracker.ceph.com/issues/37775
Signed-off-by: Sage Weil <sage@redhat.com>