librados,test,rgw: cleanups to deprecate safe_cb related functions
Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Casey Bodley <cbodley@redhat.com>
Reviewed-by: Jason Dillaman <dillaman@redhat.com>
replace `librados::Rados::aio_create_completion(arg, complete_cb,
safe_cb)` with `librados::Rados::aio_create_completion(arg,
complete_cb)`
the former is deprecated
Signed-off-by: Kefu Chai <kchai@redhat.com>
in mds_add() command, both "num" and "hosts" are optional, so they
should have default values of "None". this change was introduced in
c35db383.
Signed-off-by: Kefu Chai <kchai@redhat.com>
silence warnings like:
src/librbd/io/ImageRequestWQ.cc:576:7: warning: 'length' may be used uninitialized in this function [-Wmaybe-uninitialized]
if (block_overlapping_io(&m_in_flight_extents, offset, length)) {
^~
...
src/librbd/io/ImageRequestWQ.cc:935:12: note: 'length' was declared here
uint64_t length;
^~~~~~
Signed-off-by: Kefu Chai <kchai@redhat.com>
in librados, wait_for_safe() is an alias of wait_for_complete(). so in
this change, wait_for_safe() calls wait_for_complete(), and the callers
of wait_for_safe() will just call wait_for_complete(), instead of
calling both of them.
also, rados_aio_create_completion() is replaced with
rados_aio_create_completion2().
Signed-off-by: Kefu Chai <kchai@redhat.com>
which does not take safe_cb, and will take the place of
Rados::aio_create_completion(arg, cb_complete, cb_safe)
Signed-off-by: Kefu Chai <kchai@redhat.com>
rados_aio_create_completion2() is almost identical to
rados_aio_create_completion(). the only difference is that the former
does not accept the `safe` callback. as it's an alias of `complete`
callback since af01db76f6
Signed-off-by: Kefu Chai <kchai@redhat.com>
safe is an alias of completed since
af01db76f6. there is no need to have
two callbacks for tracking the state of an async operation anymore.
in this change, wait_for_safe() and friends are marked "deprecated"
Signed-off-by: Kefu Chai <kchai@redhat.com>
* refs/pull/31206/head:
qa: test fs:upgrade when running upgrade suite
Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
* refs/pull/31270/head:
ceph-daemon: no extra newline needed in authorized_keys file
ceph-daemon: use client.admin keyring during bootstrap
Reviewed-by: Alfredo Deza <adeza@redhat.com>
mgr/dashboard: edit/clone/copy rbd image after its data is received
Reviewed-by: Laura Paduano <lpaduano@suse.com>
Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Reviewed-by: Volker Theile <vtheile@suse.com>
* refs/pull/31231/head:
qa: add tests for CephFS admin commands
mds/MDSRank: report state to mgr as mds id, not rank
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
It's usually okay to use the mon. key for CLI commands, except we had a
mgr but that prevented you from issuing mgr commands correctly. We have
the new client.admin key available, so use that instead.
Update tests to not --skip-ssh (now that it doesn't hang).
Signed-off-by: Sage Weil <sage@redhat.com>
* refs/pull/31264/head:
ceph-daemon: deal with lack of TemporaryDirectory on py2
ceph-daemon: make StringIO usage py2 compatible
ceph-daemon: make ConfigParser py2 compatible
Reviewed-by: Alfredo Deza <adeza@redhat.com>
pre-single-major.yaml kernel doesn't have any of the monitor client
fixes that came in 4.6. If the connection is closed, it closes the
session and retries only after 10 seconds. On top of that, there is
nothing to prevent it from picking the same monitor when reconnecting.
This means that when given both v1 and v2 ports (which look like two
different monitors), it is susceptible to mount_timeout (60 seconds):
$ sudo rbd map img
rbd: sysfs write failed
In some cases useful info is found in syslog - try "dmesg | tail".
rbd: map failed: (5) Input/output error
[ 822.242313] libceph: mon0 172.21.15.132:3300 socket closed (con state CONNECTING)
[ 832.265494] libceph: mon0 172.21.15.132:3300 socket closed (con state CONNECTING)
[ 842.296175] libceph: mon0 172.21.15.132:3300 socket closed (con state CONNECTING)
[ 852.326924] libceph: mon0 172.21.15.132:3300 socket closed (con state CONNECTING)
[ 862.357611] libceph: mon0 172.21.15.132:3300 socket closed (con state CONNECTING)
[ 872.388373] libceph: mon0 172.21.15.132:3300 socket closed (con state CONNECTING)
[ 882.676136] libceph: mon0 172.21.15.132:3300 socket closed (con state CONNECTING)
Unlike newer kernels that return ETIMEDOUT, it returns EIO.
Newer kernels are much more aggressive about retries and will pick
a different monitor when reconnecting, hence they are always able to
establish the session in time.
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Otherwise,
Traceback (most recent call last):
File "../src/ceph-daemon", line 1698, in <module>
r = args.func()
File "../src/ceph-daemon", line 767, in command_bootstrap
with StringIO() as f:
AttributeError: StringIO instance has no attribute '__exit__'
Signed-off-by: Sage Weil <sage@redhat.com>
This is no longer need since the values are already in seconds.
Fixes: https://tracker.ceph.com/issues/42567
Signed-off-by: Tiago Melo <tmelo@suse.com>