instead of constructing a separate RGWProcessEnv for each frontend,
initialize a single instance in AppMain and share a reference with each
frontend
RGWRealmReloader now takes a reference to RGWProcessEnv instead of a
reference to the Store pointer itself, and updates RGWProcessEnv::store
on realm reload
because RGWRealmReloader may mutate RGWProcessEnv::store, we no longer have
a separate AppMain::store pointer, so don't worry about keeping that
consistent over reloads
Signed-off-by: Casey Bodley <cbodley@redhat.com>
When creating #49359 I was testing on an outdated
branch and didn't realize part of what I was fixing
had already been fixed in #49321. Basically ended up
changing what a variable "mypy_args" is set to but that
variable is no longer being used. It has no actual effect
but we should remove the extraneous code.
Signed-off-by: Adam King <adking@redhat.com>
fail with ERR_INVALID_BUCKET_NAME if rgw_parse_url_bucket() finds a
'tenant:' but empty bucket name
Fixes: https://tracker.ceph.com/issues/58111
Signed-off-by: Casey Bodley <cbodley@redhat.com>
On the new tox version it is treating each line as a new command
so it will do something like "mypy --config-file=../../mypy.ini"
as one command and then "-m balancer" as a totally separate command.
The first one immediately fails as it doesn't include any modules
to test. Adding backslashes to the ends of the lines gets it to
handle the lines as one long command
Signed-off-by: Adam King <adking@redhat.com>
Problem:
--mon-initial-members does nothing but causes monmap
to populate ``removed_ranks`` because the way we start
monitors in standalone tests uses ``run_mon $dir $id ..``
on each mon. Regardless of --mon-initial-members=a,b,c, if
we set --mon-host=$MONA,$MONB,$MONC (which we do every single tests),
everytime we run a monitor (e.g.,run mon.b) it will pre-build
our monmap with
```
noname-a=mon.noname-a addrs v2:127.0.0.1:7127/0,
b=mon.b addrs v2:127.0.0.1:7128/0,
noname-c=mon.noname-c addrs v2:127.0.0.1:7129/0,
```
Now, with --mon-initial-members=a,b,c we are letting
monmap know that we should have initial members name:
a,b,c, which we only have `b` as a match. So what
``MonMap::set_initial_members`` do is that it will
remove noname-a and noname-c which will
populate `removed_ranks`.
Solution:
remove all instances of --mon-initial-members
in the standalone test as it has no impact on
the nature of the tests themselves.
Fixes: https://tracker.ceph.com/issues/58132
Signed-off-by: Kamoltat <ksirivad@redhat.com>
When upgrading the monitors (include booting up),
we check if `peer_tracker` is dirty or not. If
so, we clear it. Added some functions in `Elector` and
`ConnectionTracker` class to
check for clean `peer_tracker`.
Moreover, there could be some cases where due
to startup weirdness or abnormal circumstances,
we might get a report from our own rank. Therefore,
it doesn't hurt to add a sanity check in
`ConnectionTracker::report_live_connection` and
`ConnectionTracker::report_dead_connection`.
Fixes: https://tracker.ceph.com/issues/58049
Signed-off-by: Kamoltat <ksirivad@redhat.com>
In `notify_clear_peer_state()` we another
mechanism in reseting our `peer_tracker.rank`
to match our own monitor.rank.
This is added so there is a way for us
to recover from a scenrio where `peer_tracker.rank`
is messed up from adjusting the ranks or removing
ranks.
`notifiy_clear_peer_state()` can be triggered
by using the command:
`ceph connection scores reset`
Also in `clear_peer_reports`, besides
reassigning my_reports to an empty object,
we also have to make `my_reports` = `rank`
from `peer_tracker`, such that we don't get
-1 as a rank in my_reports.
Fixes: https://tracker.ceph.com/issues/58049
Signed-off-by: Kamoltat <ksirivad@redhat.com>
when a new monitor joins, there is a chance that
it will recive a monmap that recently removed
a monitor and ``removed_rank`` will have some
content in it. A new monitor that joins
should never remove rank in peer_tracker but
rather call ``notify_clear_peer_state()``
to reset the `peer_report`.
In the case when it is a monitor that
has joined quorum before and is only 1
epoch behind the newest monmap provided
by the probe_replied monitor. We can
actually remove and adjust ranks in `peer_report`
since we are sure that if there is any content in
removed_ranks, then it has to be because in the
next epoch we are removing a rank, since every
update of an epoch we always clear the removed_ranks.
There is no point in keeping the content
of ``removed_ranks`` after monmap gets updated
to the epoch.
Therefore, clear ``removed_ranks`` every update.
When there is discontinuity between
monmaps for more 1 epoch or the new monitor never joined quorum before,
we always reset `peer_tracker`.
Moreover, beneficial for monitor log to also log
which rank has been removed at the current time
of the monmap. So add removed_ranks to `print_summary`
and `dump` in MonMap.cc.
Fixes: https://tracker.ceph.com/issues/58049
Signed-off-by: Kamoltat <ksirivad@redhat.com>
PROBLEM:
In `ConnectionTracker::receive_peer_report`
we loop through ranks which is bad when
there is `notify_rank_removed` before this and
the ranks are not adjusted yet. When we rely
on the rank in certain scenarios, we end up
with extra peer_report copy which we don't
want.
SOLUTION:
In `ConnectionTracker::receive_peer_report`
instead of passing `report.rank` in the function
`ConnectionTracker::reports`, we pass `i.first`
instead so that trim old ranks properly.
We also added a assert in notify_rank_removed(),
comparing expected rank provided by the monmap
against the rank that we adjust ourself to as
a sanity check.
We edited test/mon/test_election.cc
to reflect the changes made in notify_rank_removed().
Fixes: https://tracker.ceph.com/issues/58049
Signed-off-by: Kamoltat <ksirivad@redhat.com>
Problem:
Currently there are not ConnectionTracker logs,
therefore it is really hard to debug
Solution:
Enable loggings for most functions in ConnectionTracker.cc
Most of the logs are in debug_mon = 30.
Also Added some logs in Elector and ElectionLogic
so that debugging will be easier in the future.
Fixes: https://tracker.ceph.com/issues/58049
Signed-off-by: Kamoltat <ksirivad@redhat.com>
Refine and add unselectable prompts to "Removing a Block Device Image"
in doc/rbd/rados-rbd-cmds.
https://tracker.ceph.com/issues/57001
Signed-off-by: Zac Dover <zac.dover@gmail.com>
Refine and add unselectable prompts to "Restoring a Block Device Image"
in doc/rbd/rados-rbd-cmds.rst.
https://tracker.ceph.com/issues/57001
Signed-off-by: Zac Dover <zac.dover@gmail.com>
Refine and add unselectable prompts to "Resizing a Block Device Image"
in doc/rbd/rados/rbd-cmds.rst.
https://tracker.ceph.com/issues/57001
Signed-off-by: Zac Dover <zac.dover@gmail.com>
Refine the text and prompts in "Retrieving Image Information" in
doc/rbd/rados-rbd-cmds.rst.
https://tracker.ceph.com/issues/57001
Signed-off-by: Zac Dover <zac.dover@gmail.com>
Refine the text and prompts in "Listing Block Device Images" in
doc/rbd/rados-rbd-cmds.rst.
https://tracker.ceph.com/issues/57001
Signed-off-by: Zac Dover <zac.dover@gmail.com>
Refine the English and prompts in "Creating a Block Device Image" in
doc/rbd/rados-rbd-cmds.rst.
https://tracker.ceph.com/issues/57001
Signed-off-by: Zac Dover <zac.dover@gmail.com>
Defines a hierarchy of "simple" data types ensured to be
safe to include in any context above the zipper line, and
also from CLS.
The following headers are currently defined to contain basic
types only:
rewrite src/rgw/rgw_basic_types.h (70%) // includes the whole hierarchy
create mode 100644 src/rgw/rgw_acl_types.h
create mode 100644 src/rgw/rgw_bucket_types.h
create mode 100644 src/rgw/rgw_obj_types.h
create mode 100644 src/rgw/rgw_placement_types.h
create mode 100644 src/rgw/rgw_pool_types.h
create mode 100644 src/rgw/rgw_quota_types.h
create mode 100644 src/rgw/rgw_user_types.h
create mode 100644 src/rgw/rgw_zone_types.h
This commit consolidates the following original commits:
* rgw: move RGWUploadPartInfo to rgw_basic_types.{h,cc}
* rgw: move rgw_obj_key to rgw_basic_types.{h,cc}
* rgw: move rgw_placement_rule to rgw_basic_types.{h,cc}
* rgw: move rgw_obj to rgw_basic_types.{h,cc}
* rgw: include rgw_compression_types.h in rgw_basic_types.{h,cc}
* rgw: move rgw_raw_obj to rgw_basic_types.{h,cc}
* rgw: rgw_multi.h: remove unused RGWMPObj forward decl
and the following cleanups from review:
* rgw: remove stray comments
* rgw: move rgw_obj_manifest.h inclusion to top of rgw_basic_types.h
* rgw: nit: indentation
* rgw: remove this line
* rgw: move rgw_bucket_shard to rgw_bucket_types.h, cleanup
* rgw: fix rgw_quota.h
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
Signed-off-by: Daniel Gryniewicz <dang@redhat.com>
In downstream 4.1 version this change moved rgw_pool, rgw_bucket,
and some related types--but these have already moved on more
recent branches.
Include rgw_basic_types.h only from cls_rgw_types.h (review).
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
Signed-off-by: Daniel Gryniewicz <dang@redhat.com>
All along, we've had an overload of the term "store". It was the base
class of the entrypoint, and it was the lowest layer in a stack. This
renames the base class to Driver. So, the primary elements of zipper
that to work are now Drivers, and they come in two different flavors:
Filters live in the middle of the stack, and do not need to implement
every API, but pass through instead. And Stores live a the bottom of
the stack, and must implement the entire API.
Signed-off-by: Daniel Gryniewicz <dang@redhat.com>
as we always test with ubuntu jammy, which does not provide python3.7:
py37: skipped because could not find python interpreter with spec(s): py37
so there is no point testing with python3.7.
also, in tox v4, it is not able to handle "key = value" anymore, where
value has newlines in it. so we need to find a better way passing
command line options to the test command.
this change partially reverts 2dd86c9e3e
Signed-off-by: Kefu Chai <tchaikov@gmail.com>
py3 tries to import all python modules to ensure that they are
python3 compatible. but the installation fails on jenkins test node:
Resolved https://github.com/ceph/teuthology.git to commit 4da97cf64e542f347ec47b7bdbe5eca99759f9b7
Installing build dependencies: started
error: subprocess-exited-with-error
Signed-off-by: Kefu Chai <tchaikov@gmail.com>