]> git.apps.os.sepia.ceph.com Git - ceph-cm-ansible.git/commitdiff
Set PMCD_CONNECT_TIMEOUT in pmmgr.options
authorZack Cerza <zack@redhat.com>
Thu, 31 Mar 2016 15:34:56 +0000 (09:34 -0600)
committerZack Cerza <zack@redhat.com>
Thu, 31 Mar 2016 15:41:00 +0000 (09:41 -0600)
With ~400 hosts, polling takes a very long time with default values.
Dropping the connect timeout to 0.1s speeds things way up.

Signed-off-by: Zack Cerza <zack@redhat.com>
roles/pcp/README.rst
roles/pcp/defaults/main.yml
roles/pcp/tasks/manager.yml

index 79dea44b724ef88b8fb71eb0fa41a977673c624b..fe2952056410abce4174c8fc4a8d60d1987e6ade 100644 (file)
@@ -30,6 +30,11 @@ To tell a ``pcp_manager`` host to probe hosts on its local network for the PCP s
 
     pcp_probe: true
 
+To tell a ``pcp_manager`` host to use a larger timeout when attempting to
+connect to hosts that it monitors (in seconds)::
+
+    pmcd_connect_timeout: 1
+
 To tell a ``pcp_manager`` host to run PCP's various web UIs::
 
     pcp_web: true
index e0e05c154f11010de24ad8d3300343f54f72a4b8..ae1ad08f4d761e2d8822062dcab2116a0fb0d9e3 100644 (file)
@@ -10,6 +10,8 @@ pcp_manager: false
 pcp_use_avahi: false
 # Whether or not to probe the local network to auto-discover hosts
 pcp_probe: false
+# PMCD_CONNECT_TIMEOUT in /etc/pcp/pmmgr/pmmgr.options
+pmcd_connect_timeout: "0.1"
 
 ## PCP Web UI options
 # Set up the web UI
index 4fd666b7a618153e90d0d629813f28ce8a708230..5e6448e54f5155aaa93e91552fdbf050154797ec 100644 (file)
     group: "{{ pcp_user }}"
     recurse: yes
 
+# This greatly speeds up polling for hosts
+- name: Set PMCD_CONNECT_TIMEOUT in pmmgr.options
+  lineinfile:
+    dest: /etc/pcp/pmmgr/pmmgr.options
+    regexp: "^PMCD_CONNECT_TIMEOUT="
+    line: "PMCD_CONNECT_TIMEOUT={{ pmcd_connect_timeout }}"
+  register: pmmgr_options
+
 - name: Restart pmmgr
   service:
     name: "{{ pmmgr_service }}"
@@ -80,4 +88,5 @@
     install_pmmgr_apt|changed or
     install_pmmgr_yum|changed or
     target_host|changed or
-    target_discovery|changed
+    target_discovery|changed or
+    pmmgr_options|changed