From: Boris Ranto Date: Tue, 27 Nov 2018 12:30:24 +0000 (+0100) Subject: ceph-dashboard: Add timeout to rgw user create X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=eaa54d93091f77b62581eb95235254e0cf496d28;p=cephmetrics.git ceph-dashboard: Add timeout to rgw user create This avoids the playbook to hang indefinitely on the radosgw-admin user create command. The playbook will still fail if the command hangs but it is better to fail than to hang forever. Signed-off-by: Boris Ranto --- diff --git a/ansible/roles/ceph-dashboard/tasks/configure_dashboard.yml b/ansible/roles/ceph-dashboard/tasks/configure_dashboard.yml index 95246cc..32908d0 100644 --- a/ansible/roles/ceph-dashboard/tasks/configure_dashboard.yml +++ b/ansible/roles/ceph-dashboard/tasks/configure_dashboard.yml @@ -93,8 +93,10 @@ command: "{{ mgr_prefix }} ceph dashboard set-grafana-api-url {{ protocol }}://{{ groups['ceph-grafana'][0] }}:3000/" - name: Create radosgw system user - command: "{{ mgr_prefix }} radosgw-admin user create --uid={{ dashboard.rgw_api_user_id }} --display-name='Ceph dashboard' --system" + shell: "timeout 20 {{ mgr_prefix }} radosgw-admin user create --uid={{ dashboard.rgw_api_user_id }} --display-name='Ceph dashboard' --system" register: rgw_user_output + until: rgw_user_output.rc == 0 + retries: 3 - name: Get the rgw access and secret keys set_fact: