Check that allow_all() returns false when 'allow *' is not specified.
This would have caught #3228.
Add tests for the output operators as well.
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
OSD_CAP_ANY is not a mask. Treating it as one made any allowance
equivalent to 'allow *'.
Fixes: #3228
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
OSD_CAP_ANY is not a flag, but a value (0xff) that will always
be true when treated as a mask with a non-zero rwxa_t.
Don't duplicate the rwxa_t output operator in the OSDCapSpec output
operator, just use it.
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
This moves the shutdown of the messenger outside of the client
to be able to handle error cases more appropriately.
Signed-off-by: Sam Lang <sam.lang@inktank.com>
Add perf counters tracking the number of inbound pushes along with the
amount of data in each request.
Signed-off-by: Mike Ryan <mike.ryan@inktank.com>
Previously, we considered backfill_pos degraded in order to delay
ops since a write to backfill_pos could generate a snap before
backfill_pos, and we assume that (0, backfill_pos) is fully
backfilled. This is a problem since it's possible that
backfill_pos is a valid object, but not one that currently exists.
For example, it might have been deleted since last_backfill was
last changed. Instead, we will explicitly delay ops on
backfill_pos in waiting_for_backfill_pos.
This error resulted in #2691 since wait_for_degraded_object also
attempts to recover the object. At this point, the primary would
attempt to recover the object, find that it isn't there, and put
it in the missing set with need=0,0. Eventually, recover_primary
attempts to recover that object, finds that it has been deleted
in the log, and asserts.
Signed-off-by: Samuel Just <sam.just@inktank.com>
When we encounter a divergent log entry, we put the
object into the missing set at the prior_version
for the divergent event. Unfortunately, the event
at prior_version might have been trimmed leaving
the missing set with an item with a need prior to
log_tail. Thus, last_complete also ends up being
prior to log_tail.
Caused #3208.
There is another bug related to this one: #3213.
Signed-off-by: Samuel Just <sam.just@inktank.com>
When copying an object with new attrs, we still need to
maintain the ETAG.
Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Conflicts:
src/rgw/rgw_rados.cc
Parsing has side effects that must be undone if it fails. A
capability string like 'allow rwx pool=bar' will add the grant for
'allow rwx' and then fail on the 'pool=bar'. Thus, the client will
effectively have 'rwx' permissions on all pools.
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
The OSD processes only a single string. The existing example wouldn't
even be passed to the OSD, since it would be interpreted as an option
to the ceph command.
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
A failure in the ceph tool -> osd connection may mean this command is sent
twice. This regularly causes failures in QA.
Signed-off-by: Sage Weil <sage@inktank.com>
* document osd capabilities
* fix librados user example
* fix example with outdated syntax (pool= and uid= are not supported)
* ignore auid, object prefix, and class restrictions for now since
they aren't usable yet
* fix header for keyring file section
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
* note that it's only for librbd
* put settings in the [client] section for clarity
* fix typo
* re-indent and clarify sentence about clustered fs on top of RBD
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
* 'Ceph common' is not a package name
* config dir is /etc/nova, not /etc/conf
* remove trailing whitespace
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>