]> git.apps.os.sepia.ceph.com Git - ceph-cm-ansible.git/commitdiff
testnode: Mount /var/lib/ceph to NVMe partition on smithi 342/head
authorDavid Galloway <dgallowa@redhat.com>
Fri, 29 Sep 2017 18:59:40 +0000 (14:59 -0400)
committerDavid Galloway <dgallowa@redhat.com>
Thu, 5 Oct 2017 15:40:14 +0000 (11:40 -0400)
Fixes: http://tracker.ceph.com/issues/20910
Signed-off-by: David Galloway <dgallowa@redhat.com>
roles/testnode/tasks/main.yml
roles/testnode/tasks/var_lib.yml [new file with mode: 0644]
roles/testnode/tasks/zap_disks.yml

index 50ba841c269421df2b0600f5a66bd1a55293068b..5f51156632433a08af0d8e749fe4b2effbdf9f10 100644 (file)
   tags:
     - partition
 
+- name: set up LVM
+  include: lvm.yml
+  tags:
+    - lvm
+
+- name: mount /var/lib/ceph to specified partition
+  include: var_lib.yml
+  when: var_lib_partition is defined
+  tags:
+    - varlib
+
 - name: configure ssh
   include: ssh.yml
   tags:
   tags:
     - cpan
 
-- include: lvm.yml
-  tags:
-    - lvm
-
 # configure ntp
 - include: ntp.yml
   tags:
diff --git a/roles/testnode/tasks/var_lib.yml b/roles/testnode/tasks/var_lib.yml
new file mode 100644 (file)
index 0000000..be95e4a
--- /dev/null
@@ -0,0 +1,21 @@
+---
+# This set of tasks is intended to mount a small NVMe partition to /var/lib/ceph
+# to fix http://tracker.ceph.com/issues/20910
+
+- name: "Create /var/lib/ceph"
+  file:
+    path: "/var/lib/ceph"
+    state: directory
+
+- name: "Create xfs filesystem on {{ var_lib_partition }}"
+  filesystem:
+    dev: "{{ var_lib_partition }}"
+    fstype: xfs
+    force: yes
+
+- name: "Mount {{ var_lib_partition }} to /var/lib/ceph"
+  mount:
+    path: "/var/lib/ceph"
+    src: "{{ var_lib_partition }}"
+    fstype: xfs
+    state: mounted
index e893f5ed450f0de63044720f9f46924288664409..ad6ef74370252fe7e4a2757dfd6b3f646688d612 100644 (file)
   shell: "lsblk --list --noheadings | grep part | grep -v {{ root_disk|regex_replace('/dev/', '') }} | awk '{ print $1 }'"
   register: non_root_partitions
 
+- name: Unmount any non-root mountpoints
+  mount:
+    path: "{{ item.mount }}"
+    state: unmounted
+  with_items: "{{ ansible_mounts }}"
+  when: item.mount != '/'
+
 ## http://tracker.ceph.com/issues/20533
 ## Trusty version of wipefs lacks --force option
 - name: Wipe filesystems on non-root partitions