]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
switch_to_containers: remove non-containerized systemd unit files
authorGuillaume Abrioux <gabrioux@redhat.com>
Tue, 12 Feb 2019 09:56:28 +0000 (10:56 +0100)
committerSébastien Han <seb@redhat.com>
Wed, 13 Feb 2019 08:42:27 +0000 (09:42 +0100)
remove old systemd unit files (non-containerized) during the
switch_to_containers transition.

We have seen sometimes the unit started is the old one instead of the
new systemd unit generated.

Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
infrastructure-playbooks/switch-from-non-containerized-to-containerized-ceph-daemons.yml

index 987cc1b42d9d9bf50ae279eaa713487cee95cead..ff3fcd6d38efa66328c40e2dd7c87f373abee365 100644 (file)
         state: stopped
         enabled: no
 
+    - name: remove old systemd unit files
+      file:
+        path: /usr/lib/systemd/system/{{ item }}
+        state: absent
+      with_items:
+        - ceph-mon@.service
+        - ceph-mon.target
+
     - name: set_fact ceph_uid for ubuntu
       set_fact:
         ceph_uid: 64045
         enabled: no
       failed_when: false
 
+    - name: remove old systemd unit files
+      file:
+        path: /usr/lib/systemd/system/{{ item }}
+        state: absent
+      with_items:
+        - ceph-mgr@.service
+        - ceph-mgr.target
+
     - set_fact:
         ceph_uid: 64045
       when: ceph_docker_image_tag | string is match("latest") or ceph_docker_image_tag | string is search("ubuntu")
         - /usr/lib/systemd/system/ceph-osd.target
         - /usr/lib/systemd/system/ceph-osd@.service
         - /usr/lib/systemd/system/ceph-volume@.service
-        - /etc/systemd/system/ceph.target.wants
 
     - set_fact:
         ceph_uid: 64045
         state: stopped
         enabled: no
 
+    - name: remove old systemd unit files
+      file:
+        path: /usr/lib/systemd/system/{{ item }}
+        state: absent
+      with_items:
+        - ceph-mds@.service
+        - ceph-mds.target
+
     - set_fact:
         ceph_uid: 64045
       when: ceph_docker_image_tag | string is match("latest") or ceph_docker_image_tag | string is search("ubuntu")
         state: stopped
         enabled: no
 
+    - name: remove old systemd unit file
+      file:
+        path: /usr/lib/systemd/system/ceph-radosgw@.service
+        state: absent
+
     - set_fact:
         ceph_uid: 64045
       when: ceph_docker_image_tag | string is match("latest") or ceph_docker_image_tag | string is search("ubuntu")
         state: stopped
         enabled: no
 
+    - name: remove old systemd unit files
+      file:
+        path: /usr/lib/systemd/system/{{ item }}
+        state: absent
+      with_items:
+        - ceph-rbd-mirror@.service
+        - ceph-rbd-mirror.target
+
     - set_fact:
         ceph_uid: 64045
       when: ceph_docker_image_tag | string is match("latest") or ceph_docker_image_tag | string is search("ubuntu")