From 0e046b48d4a336cd78aa6c92f0c3628600f28184 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Sun, 18 Jul 2021 17:42:00 -0400 Subject: [PATCH] Add Zookeeper logging configs --- group_vars/default/pvc.yml | 10 ++++++++-- roles/pvc/defaults/main.yml | 2 ++ roles/pvc/templates/pvc/pvcnoded.yaml.j2 | 2 ++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/group_vars/default/pvc.yml b/group_vars/default/pvc.yml index 5598473..87ab617 100644 --- a/group_vars/default/pvc.yml +++ b/group_vars/default/pvc.yml @@ -4,12 +4,16 @@ # control over the logging output of the PVC system. #pvc_log_to_file: False # Log to a file in /var/log/pvc #pvc_log_to_stdout: True # Log to stdout (i.e. journald) +#pvc_log_to_zookeeper: True # Log to Zookeeper (required for 'node log' commands) #pvc_log_colours: True # Log colourful prompts for states instead of text #pvc_log_dates: False # Log dates (useful with log_to_file, not useful with log_to_stdout as journald adds these) #pvc_log_keepalives: True # Log keepalive event every pvc_keepalive_interval seconds #pvc_log_keepalive_cluster_details: True # Log cluster details (VMs, load, etc.) duing keepalive events #pvc_log_keepalive_storage_details: True # Log storage details (OSDs, pools, health) during keepalive events #pvc_log_console_lines: 1000 # The number of VM console log lines to store in Zookeeper for 'vm log' commands. +#pvc_log_node_lines: 2000 # The number of node log lines to store in Zookeeper for 'node log' commands. + +# Timing and fencing configuration (uncomment to override defaults) # Timing and fencing configuration (uncomment to override defaults) # These default options are generally best for most clusters; override these if you want more granular @@ -79,9 +83,11 @@ pvc_routers: # here, only by editing the `files/ceph//ceph.conf` file directly. #pvc_osd_memory_limit: 939524096 # Zookeeper heap memory limit, sets Xms and Xmx values to the Java process; default is 256M. -#pvc_zookeeper_heap_limit: 32M +# WARNING: Do not set lower than 128MB when using pvc_log_to_zookeeper, or lower than 32MB otherwise! +#pvc_zookeeper_heap_limit: 128M # Zookeeper stack memory limit, sets Xss value to the Java process; default is 512M. -#pvc_zookeeper_stack_limit: 32M +# WARNING: Do not set lower than 128MB when using pvc_log_to_zookeeper, or lower than 32MB otherwise! +#pvc_zookeeper_stack_limit: 128M # Node list # > Every node configured with this playbook must be specified in this list. diff --git a/roles/pvc/defaults/main.yml b/roles/pvc/defaults/main.yml index b568913..b29cded 100644 --- a/roles/pvc/defaults/main.yml +++ b/roles/pvc/defaults/main.yml @@ -2,12 +2,14 @@ # Logging configuration (uncomment to override defaults) pvc_log_to_file: False # Log to a file in /var/log/pvc pvc_log_to_stdout: True # Log to stdout (i.e. journald) +pvc_log_to_zookeeper: True # Log to Zookeeper (required for 'node log' commands) pvc_log_colours: True # Log colourful prompts for states instead of text pvc_log_dates: False # Log dates (useful with log_to_file, not useful with log_to_stdout as journald adds these) pvc_log_keepalives: True # Log keepalive event every pvc_keepalive_interval seconds pvc_log_keepalive_cluster_details: True # Log cluster details (VMs, load, etc.) duing keepalive events pvc_log_keepalive_storage_details: True # Log storage details (OSDs, pools, health) during keepalive events pvc_log_console_lines: 1000 # The number of VM console log lines to store in Zookeeper for 'vm log' commands. +pvc_log_node_lines: 2000 # The number of node log lines to store in Zookeeper for 'node log' commands. # Timing and fencing configuration (uncomment to override defaults) pvc_vm_shutdown_timeout: 180 # Number of seconds before a 'shutdown' VM is forced off diff --git a/roles/pvc/templates/pvc/pvcnoded.yaml.j2 b/roles/pvc/templates/pvc/pvcnoded.yaml.j2 index 7fab702..f6039e4 100644 --- a/roles/pvc/templates/pvc/pvcnoded.yaml.j2 +++ b/roles/pvc/templates/pvc/pvcnoded.yaml.j2 @@ -71,12 +71,14 @@ pvc: logging: file_logging: {{ pvc_log_to_file }} stdout_logging: {{ pvc_log_to_stdout }} + zookeeper_logging: {{ pvc_log_to_zookeeper }} log_colours: {{ pvc_log_colours }} log_dates: {{ pvc_log_dates }} log_keepalives: {{ pvc_log_keepalives }} log_keepalive_cluster_details: {{ pvc_log_keepalive_cluster_details }} log_keepalive_storage_details: {{ pvc_log_keepalive_storage_details }} console_log_lines: {{ pvc_log_console_lines }} + node_log_lines: {{ pvc_log_node_lines }} networking: bridge_device: {{ pvc_bridge_device }} sriov_enable: {{ pvc_sriov_enable }}