]> git.apps.os.sepia.ceph.com Git - ceph-ansible.git/commitdiff
Add more flags to RBD clients 276/head
authorSébastien Han <seb@redhat.com>
Tue, 9 Jun 2015 14:32:17 +0000 (16:32 +0200)
committerSébastien Han <seb@redhat.com>
Tue, 9 Jun 2015 15:20:15 +0000 (17:20 +0200)
More options.
We also now configure the rbd clients directories for logs and socket.

Signed-off-by: Sébastien Han <seb@redhat.com>
group_vars/all
roles/ceph-common/defaults/main.yml
roles/ceph-common/tasks/install_on_debian.yml
roles/ceph-common/tasks/install_on_redhat.yml
roles/ceph-common/templates/ceph.conf.j2

index c7edf2957d3dd2144827e8eeda1fd19de032cdc1..2c408dcf45bec92d95d042bcd4b1bab0ee815904 100644 (file)
@@ -61,7 +61,13 @@ dummy:
 
 ## Client options
 #
-rbd_concurrent_management_ops: 20
+#rbd_cache: "true"
+#rbd_cache_writethrough_until_flush: "true"
+#rbd_concurrent_management_ops: 20
+#rbd_client_directories: false # this will create rbd_client_log_path and rbd_client_admin_socket_path directories with proper permissions, this WON'T work if libvirt and kvm are installed
+#rbd_client_log_file: /var/log/rbd-clients/qemu-guest-$pid.log # must be writable by QEMU and allowed by SELinux or AppArmor
+#rbd_client_log_path: /var/log/rbd-clients/
+#rbd_client_admin_socket_path: /var/run/ceph/rbd-clients/$cluster-$type.$id.$pid.$cctid.asok
 
 ## Monitor options
 #
@@ -136,3 +142,23 @@ rbd_concurrent_management_ops: 20
 # enable this mode _only_ when you have a single node
 # if you don't want it keep the option commented
 #common_single_host_mode: true
+
+
+#############
+# OS TUNING #
+#############
+
+#disable_transparent_hugepage: true
+#disable_swap: true
+#os_tuning_params:
+#  - { name: kernel.pid_max, value: 4194303 }
+#  - { name: fs.file-max, value: 26234859 }
+#  - { name: vm.zone_reclaim_mode, value: 0 }
+#  - { name: vm.vfs_cache_pressure, value: 50 }
+
+
+##########
+# DOCKER #
+##########
+
+#docker: false
index 05b3b482fa675b76460bba2474213d0add2ffd6e..39def4bd4b02326c38cac632df7a7e2c58aa03a9 100644 (file)
@@ -55,10 +55,7 @@ cephx_require_signatures: true # Kernel RBD does NOT support signatures for Kern
 cephx_cluster_require_signatures: true\r
 cephx_service_require_signatures: false\r
 max_open_files: 131072\r
-\r
-# Logging\r
 disable_in_memory_logs: true # set this to false while enabling the options below\r
-rbd_client_log_file: /var/log/qemu/qemu-guest-$pid.log # must be writable by QEMU and allowed by SELinux or AppArmor\r
 \r
 # Debug logs\r
 enable_debug_global: false\r
@@ -72,7 +69,13 @@ debug_mds_level: 20
 \r
 ## Client options\r
 #\r
+rbd_cache: "true"\r
+rbd_cache_writethrough_until_flush: "true"\r
 rbd_concurrent_management_ops: 20\r
+rbd_client_directories: false # this will create rbd_client_log_path and rbd_client_admin_socket_path directories with proper permissions, this WON'T work if libvirt and kvm are installed\r
+rbd_client_log_file: /var/log/rbd-clients/qemu-guest-$pid.log # must be writable by QEMU and allowed by SELinux or AppArmor\r
+rbd_client_log_path: /var/log/rbd-clients/\r
+rbd_client_admin_socket_path: /var/run/ceph/rbd-clients/$cluster-$type.$id.$pid.$cctid.asok # must be writable by QEMU and allowed by SELinux or AppArmor\r
 \r
 ## Monitor options\r
 #\r
index c37c34e9c947d8332dbf32fea2319bc74b08b93f..76fde548cd3b593ddd4fbee3020c61f763c62f70 100644 (file)
     - ceph-fuse      #|--> however while proceding to rolling upgrades and the 'ceph' package upgrade
     - ceph-mds       #|--> they don't get update so we need to force them
     - libcephfs1     #|
+
+- name: configure rbd clients directories
+  file: >
+    path={{ item }}
+    state=directory
+    owner=libvirt-qemu
+    group=kvm
+    mode=0755
+  with_items:
+   - rbd_client_log_path
+   - rbd_client_admin_socket_path
+  when: rbd_client_directories
index 66ade47d798cb815d314e719abeaeaaca493cf39..2c915210dfebb62f548347637f974df126b7594b 100644 (file)
     - "{{ ceph_stable_ice_temp_path }}/kmod-libceph-{{ ceph_stable_ice_kmod }}.rpm"
     - "{{ ceph_stable_ice_temp_path }}/kmod-rbd-{{ ceph_stable_ice_kmod }}.rpm"
   when: ceph_stable_ice
+
+- name: configure rbd clients directories
+  file: >
+    path={{ item }}
+    state=directory
+    owner=qemu
+    group=libvirtd
+    mode=0755
+  with_items:
+   - rbd_client_log_path
+   - rbd_client_admin_socket_path
+  when: rbd_client_directories
index 4082d634b77e82437c4af622cfca55cdf3e624c0..1541cd1260d64f1e2008b18aea12d6fcab8b9b4b 100644 (file)
 {% endif %}
 
 [client]
-  rbd cache = true
+  rbd cache = {{ rbd_cache }}
   rbd cache writethrough until flush = true
   rbd concurrent management ops = {{ rbd_concurrent_management_ops }}
-  admin socket = /var/run/ceph/$cluster-$type.$id.$pid.$cctid.asok # must be writable by QEMU and allowed by SELinux or AppArmor
+  admin socket = {{ rbd_client_admin_socket_path }} # must be writable by QEMU and allowed by SELinux or AppArmor
   log file = {{ rbd_client_log_file }} # must be writable by QEMU and allowed by SELinux or AppArmor
 
 [mon]