Since we're decoding 32-bit integers, just use uint32_t and then cast them to
what utime_t expects.
Fixes: http://tracker.ceph.com/issues/15330
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
The operation completion could finish and be freed before we
do the info->register_tid assignment. Avoid this by doing the
assignment in _op_submit itself.
Fixes: #14364
Signed-off-by: Sage Weil <sage@redhat.com>
This breaks commands like
COMMAND("fs flag set name=flag_name,type=CephChoices,strings=enable_multiple "
"name=val,type=CephString", \
"Set a global CephFS flag", \
"fs", "rw", "cli,rest")
with only one option:
PUT fs/flag/set?flag_name=enable_multiple&val=true: 400
FAILURE: url http://localhost:5000/api/v0.1/fs/flag/set?flag_name=enable_multiple&val=true
expected 200, got 400
Response content: <html><body><table border=1><th>Possible commands:</th><th>Method</th><th>Description</th><tr><td>fs/flag/set?flag_name=enable_multiple&va
l=val(<string>)
</td><td>PUT</td><td>Set a global CephFS flag</td></tr>
</table></body></html>
...and I can't tell why it's there.
Signed-off-by: Sage Weil <sage@redhat.com>
This should only happen with a buggy client, but we should avoid crashing,
and send a polite error message back.
Signed-off-by: Sage Weil <sage@redhat.com>
Normal ops do this so they can behave when racing with split; pgnls ops
are no different.
In particular, this fixes a bug where we have an old OSDMap that doesn't
reflect a split, and the OSD replies with a 'next' value of the PG's new
max. If we resend the same value to that PG, it'll be out of bounds,
and BlueStore will notice.
Signed-off-by: Sage Weil <sage@redhat.com>
otherwise vector::push_back() will use the copy ctor if it resizes,
to enforce its strong exception guarantee.
Signed-off-by: Kefu Chai <kchai@redhat.com>
Move initialization to the few tests that actually use it.
Fixes: http://tracker.ceph.com/issues/15225
Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
We don't simply copy over the whole flag field because not all values
should necessarily be carried over from the clone. Particularly,
FLAG_CACHE_PIN should not be overridden.
Fixes: http://tracker.ceph.com/issues/14777
Backport: hammer, infernalis
Signed-off-by: Samuel Just <sjust@redhat.com>
Attempting to remove an image will remove the image from the mirroring
directory. However, if the OSD is older and doesn't support this
new feature, avoid throwing an error.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
this dodges the race in RGWRealm::create() and RGWZoneParams::create()
that decides whether to set the new object as a default. by calling
set_as_default() with exclusive=true, it will fail with EEXIST if a
default is already set
it also fixes an issue with 'realm pull' on a secondary zone, where a
'default' zone may be created but never actually set_as_default()
Signed-off-by: Casey Bodley <cbodley@redhat.com>
this was causing failures in 'radosgw-admin realm pull':
ERROR creating control for new realm realm0: (17) File exists
'realm pull' calls RGWRealm::create() with exclusive=false, but
RGWRealm::create_control() was using exclusive=true
Signed-off-by: Casey Bodley <cbodley@redhat.com>
Add a few missing commandlien switches for zone
operations (zone_id,source_zone,read_only) to the help options
Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>