Take the self-aliveness checks out of require_same_or_newer_map() and use
the new function for that and for require_up_osd_peer().
Signed-off-by: Greg Farnum <greg@inktank.com>
(cherry picked from commit e179e9227b)
This checks both that a Message originates from an OSD, and that the OSD
is up in the given map epoch.
We use it in handle_replica_op so that we don't inadvertently add operations
from down peers, who might or might not know it.
Signed-off-by: Greg Farnum <greg@inktank.com>
(cherry picked from commit ccd0eec501)
Pool create interfaces would now refer to updated osdmap
for pool existence, such that an appropriate message is
thrown to the user when run via CLI.
Fixes: #8835
Signed-off-by: Pavan Rallabhandi <pavan.rallabhandi@sandisk.com>
If you call erase() on a multiset it will delete all instances of a value;
we only want to delete one of them. Fix this by passing an iterator.
Backport: firefly
Signed-off-by: Sage Weil <sage@redhat.com>
Each message belongs to a session. Further, no ordering is implied
between messages which arrived on different sessions. Breaking the
global waiting_for_pg structure into a per-session structure lets
us avoid the problem of taking a write lock on a global structure
(pg_map_lock) in get_pg_or_queue_for_pg at the cost of some
complexity in updating each session's waiting_for_pg structure when
we receive a new map (due to pg splits) or when we locally create
a pg.
Signed-off-by: Samuel Just <sam.just@inktank.com>
There might be messages for which we still don't have the
map. Dispatching waiting won't actually help.
Signed-off-by: Samuel Just <sam.just@inktank.com>
231fe1b685 reintroduced erroneously
this call to wake_pg_waiters. All _create_lock_pg callers handle
calling wake_pg_waiters after the pg lock has been dropped.
Fixes: #8691
Signed-off-by: Samuel Just <sam.just@inktank.com>
Originally, this flag indicated that the object had already been stashed and
that therefore recording subsequent changes is unecessary. We want to set it
on create() as well since operations like [create, writefull] should not need
to stash the object.
Fixes: #8625
Signed-off-by: Samuel Just <sam.just@inktank.com>
In lookup_pool and pool_delete, a lock is taken
before invoking wait_for_osdmap, but is not
released for the failure case of the call. Fixing the same.
Fixes: #9022
Signed-off-by: Pavan Rallabhandi <pavan.rallabhandi@sandisk.com>
If we have a huge xattr (or many little ones), the _fgetattrs() for the
inline_set will fail with E2BIG. The conditions later where we decide
whether to clean up the old xattr will then also fail. We *will* put
the xattr in omap, but the non-omap version isn't cleaned up.
Fix this by setting a flag if we get E2BIG that the inline_set is known
to be incomplete. In that case, take the conservative step of assuming
the xattr might be present and chain_fremovexattr(). Ignore any error
because it might not be there.
This is clearly harmless in the general case because it won't be there.
If it is, we will hopefully remove enough xattrs that the E2BIG
condition will go away (usually by removing some really big chained
xattr).
See original bug #7779. With this in place, we can repair objects in
the broken state if we know the rados attr(s) that are responsible.
Usually that is user.rgw.manifset, and a rados get + set of the attr
will repair things.
Reviewed-by: Yehuda Sadeh <yehuda@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
Signed-off-by: Sage Weil <sage@redhat.com>