diff --git a/roles/ceph-iscsi-gw/tasks/main.yml b/roles/ceph-iscsi-gw/tasks/main.yml index 05732a0da..0366ce294 100644 --- a/roles/ceph-iscsi-gw/tasks/main.yml +++ b/roles/ceph-iscsi-gw/tasks/main.yml @@ -19,6 +19,10 @@ - not containerized_deployment | bool - not use_new_ceph_iscsi | bool +- name: include non-container/postrequisites.yml + include_tasks: non-container/postrequisites.yml + when: not containerized_deployment | bool + - name: include containerized.yml include_tasks: containerized.yml when: containerized_deployment | bool diff --git a/roles/ceph-iscsi-gw/tasks/non-container/postrequisites.yml b/roles/ceph-iscsi-gw/tasks/non-container/postrequisites.yml new file mode 100644 index 000000000..786cf8cd1 --- /dev/null +++ b/roles/ceph-iscsi-gw/tasks/non-container/postrequisites.yml @@ -0,0 +1,9 @@ +- name: start rbd-target-api and rbd-target-gw + service: + name: "{{ item }}" + state: started + enabled: yes + masked: no + with_items: + - rbd-target-api + - rbd-target-gw diff --git a/roles/ceph-iscsi-gw/tasks/non-container/prerequisites.yml b/roles/ceph-iscsi-gw/tasks/non-container/prerequisites.yml index c1a287069..4267c9d9c 100644 --- a/roles/ceph-iscsi-gw/tasks/non-container/prerequisites.yml +++ b/roles/ceph-iscsi-gw/tasks/non-container/prerequisites.yml @@ -73,13 +73,13 @@ - target.stat.exists - not target.stat.islnk -- name: start tcmu-runner, rbd-target-api and rbd-target-gw +# Only start tcmu-runner, so configure_iscsi.yml can create disks. +# We must start rbd-target-gw/api after configure_iscsi.yml to avoid +# races where they are both trying to setup the same object during +# a rolling update. +- name: start tcmu-runner service: - name: "{{ item }}" + name: tcmu-runner state: started enabled: yes masked: no - with_items: - - tcmu-runner - - rbd-target-gw - - rbd-target-api