mirror of https://github.com/ceph/ceph-ansible.git
tests/rgw: add timeout 5s to radosgw-admin command
If the radosgw daemons aren't up and running correctly (like not registered
in the servicemap or the OSD are down) then the radosgw-admin will hang
forever.
Jenkins will kill the jobs after 3h but we don't want to wait until this global
timeout.
Adding the timeout 5 command to the radosgw-admin commands (which is already
present on other ceph calls) allows the job to fail earlier.
Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit f01ae82eec
)
pull/6873/head
parent
ac5353a2d8
commit
0186819855
|
@ -13,13 +13,13 @@ class TestRGWs(object):
|
|||
|
||||
@pytest.mark.no_docker
|
||||
def test_rgw_bucket_default_quota_is_applied(self, node, host, setup):
|
||||
radosgw_admin_cmd = "sudo radosgw-admin --cluster={cluster} -n client.rgw.{hostname}.rgw0 --keyring /var/lib/ceph/radosgw/{cluster}-rgw.{hostname}.rgw0/keyring user info --uid=test".format( # noqa E501
|
||||
radosgw_admin_cmd = "timeout --foreground -s KILL 5 sudo radosgw-admin --cluster={cluster} -n client.rgw.{hostname}.rgw0 --keyring /var/lib/ceph/radosgw/{cluster}-rgw.{hostname}.rgw0/keyring user info --uid=test".format( # noqa E501
|
||||
hostname=node["vars"]["inventory_hostname"],
|
||||
cluster=setup['cluster_name']
|
||||
)
|
||||
radosgw_admin_output = host.run(radosgw_admin_cmd)
|
||||
if radosgw_admin_output.rc == 22:
|
||||
radosgw_admin_cmd = "sudo radosgw-admin --cluster={cluster} -n client.rgw.{hostname}.rgw0 --keyring /var/lib/ceph/radosgw/{cluster}-rgw.{hostname}.rgw0/keyring user create --uid=test --display-name Test".format( # noqa E501
|
||||
radosgw_admin_cmd = "timeout --foreground -s KILL 5 sudo radosgw-admin --cluster={cluster} -n client.rgw.{hostname}.rgw0 --keyring /var/lib/ceph/radosgw/{cluster}-rgw.{hostname}.rgw0/keyring user create --uid=test --display-name Test".format( # noqa E501
|
||||
hostname=node["vars"]["inventory_hostname"],
|
||||
cluster=setup['cluster_name']
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue