The SELinux man page was previously located in two places and the man
page that was supposed to be updated when rgw selinux changes were
proposed did not get updated properly. Fixing this by moving
selinux/ceph_selinux.8 to man/ceph_selinux.8. Also, populate EXTRA_DIST
with ceph_selinux.8.
Signed-off-by: Boris Ranto <branto@redhat.com>
We will throw it out in dispatch_op() anyway. Remove the ancient (~2009)
reuse_caps logic too, which doesn't make any sense nowadays anyway.
Signed-off-by: Sage Weil <sage@redhat.com>
If we've closed the session we shouldn't waste our time on this op.
Fixes: #13262 (we should not add a subscription to a disconnected session)
Signed-off-by: Sage Weil <sage@redhat.com>
Unconditionally attach a Session, so that when we push an op back through
dispatch_op it isn't in a weird broken state.
Move the waitinglist check to the bottom. Use s->global_id == 0 to tell
whether a client has authenticated, and zap sessions based on that.
Signed-off-by: Sage Weil <sage@redhat.com>
There is no need to restart the daemons when removing ceph-selinux
package if SELinux is not enabled.
Fixes: #13061
Signed-off-by: Boris Ranto <branto@redhat.com>
This patch minimizes the amount of daemon stop/start procedures when
upgrading ceph-selinux package. With this patch, the daemons get
restarted only if SELinux is enabled and the SELinux policy version
changed in the meantime.
Fixes: #13061
Signed-off-by: Boris Ranto <branto@redhat.com>
Allow librados users to opt to receive ENOSPC or EDQUOT when they submit
an operation against a full cluster. This should only be used if the
librados app can handle those errors gracefully (librbd, for example,
cannot).
Also note that this allows savvy librados users to send delete operations;
they will get either a success or EDQUOT, depending on whether the
operation results in a net drop in space utilization.
Signed-off-by: Sage Weil <sage@redhat.com>
We may send a notify to the cluster multiple times due to OSDMap
changes. In some cases, earlier notify attempts may complete with
an error, while later attempts succeed. We need to only pay
attention to the most-recently send notify's completion.
Do this by making note of the notify_id in the initial ACK (only
present when talking to newer OSDs). When we get a notify
completion, match it against our expected notify_id (if we have
one) or else discard it.
This is important because in some cases an early notify completion
may be an error while a later one succeeds.
Note that if we are talking to an old cluster we will simply not record a
notify_id and our behavior will be the same as before (we will trust any
notify completion we get).
Fixes: #13114
Signed-off-by: Sage Weil <sage@redhat.com>
The OSD assigns a unique ID to each notify it queues for
processing. Include this in the reply to the notifier so that
they can match it up with the eventual completions they receive.
This is necessary to distinguish between multiple completions
they may receive if there is PG peering and the notify is resent.
In particular, an earlier notify may return an error when a later
attempt succeeds.
This is forwards and backwards compatible: new clients will make use of
this reply payload but older clients ignore it.
Signed-off-by: Sage Weil <sage@redhat.com>
This was uncovered by 7532194372. Since
rbd_create() does a stat, the obc is cached as a whiteout, and the
subsequent create(EXCL) would fall through to return false from
maybe_create_new_object(). This would then skip adding a touch() to
the transaction.
Fixes: #13281
Signed-off-by: Josh Durgin <jdurgin@redhat.com>
An ObjectStore::Sequencer provided to an ObjectStore must not be
deallocated before umount. The ObjectStore::Sequencer may hold a pointer
to the instance with no reference counting. If a Context completes after
the ObjectStore::Sequencer is deleted, it could try to use it and fail.
http://tracker.ceph.com/issues/13176Fixes: #13176
Signed-off-by: Loic Dachary <ldachary@redhat.com>