Allow a deployer to specify HAProxy syslog server address
authorYanis Guenane <yguenane@redhat.com>
Fri, 11 Sep 2015 13:25:01 +0000 (15:25 +0200)
committerYanis Guenane <yguenane@redhat.com>
Tue, 13 Oct 2015 09:56:20 +0000 (11:56 +0200)
This commit aims to allow a deployer to specify where to send haproxy's
logs. It is backward compatible with what is already in place and send
the logs to the UNIX socket /dev/log

The value specified here will be written in the haproxy.cfg file with
the following behavior

HAProxySyslogAddress: 127.0.0.1 -> log 127.0.0.1 local0
HAProxySyslogAddress: ::1 -> log ::1 local0
HAProxySyslogAddress: /dev/log -> log /dev/log local0 (default)

Change-Id: I46c489a1f424e2219d129f332e64c64019aef850
Depends-On: If7f7c8154e544e5d8a49f79f642e1ad01644a66d

overcloud-without-mergepy.yaml
puppet/controller.yaml

index 654c242..77e971c 100644 (file)
@@ -78,6 +78,10 @@ parameters:
     default: http
     description: Protocol to use when connecting to glance, set to https for SSL.
     type: string
+  HAProxySyslogAddress:
+    default: /dev/log
+    description: Syslog address where HAproxy will send its log
+    type: string
   HorizonAllowedHosts:
     default: '*'
     description: A list of IP/Hostname allowed to connect to horizon
@@ -781,6 +785,7 @@ resources:
           GlanceBackend: {get_param: GlanceBackend}
           GlanceNotifierStrategy: {get_param: GlanceNotifierStrategy}
           GlanceLogFile: {get_param: GlanceLogFile}
+          HAProxySyslogAddress: {get_param: HAProxySyslogAddress}
           HeatPassword: {get_param: HeatPassword}
           HeatStackDomainAdminPassword: {get_param: HeatStackDomainAdminPassword}
           HeatAuthEncryptionKey: {get_resource: HeatAuthEncryptionKey}
index 8ea7053..2f729e6 100644 (file)
@@ -174,6 +174,10 @@ parameters:
     type: string
     constraints:
     - allowed_values: ['swift', 'file', 'rbd']
+  HAProxySyslogAddress:
+    default: /dev/log
+    description: Syslog address where HAproxy will send its log
+    type: string
   HeatPassword:
     default: unset
     description: The password for the Heat service and db account, used by the Heat services.
@@ -651,6 +655,7 @@ resources:
       input_values:
         bootstack_nodeid: {get_attr: [Controller, name]}
         neutron_enable_tunneling: {get_param: NeutronEnableTunnelling}
+        haproxy_log_address: {get_param: HAProxySyslogAddress}
         heat.watch_server_url:
           list_join:
             - ''
@@ -1207,6 +1212,7 @@ resources:
                 public_virtual_interface: {get_input: public_virtual_interface}
                 tripleo::loadbalancer::control_virtual_interface: {get_input: control_virtual_interface}
                 tripleo::loadbalancer::public_virtual_interface: {get_input: public_virtual_interface}
+                tripleo::loadbalancer::haproxy_log_address: {get_input: haproxy_log_address}
                 tripleo::packages::enable_install: {get_input: enable_package_install}
                 tripleo::packages::enable_upgrade: {get_input: enable_package_upgrade}