synced /next
This commit is contained in:
commit
a16760cf73
28
config.yaml
28
config.yaml
|
@ -1,4 +1,8 @@
|
||||||
options:
|
options:
|
||||||
|
loglevel:
|
||||||
|
default: 1
|
||||||
|
type: int
|
||||||
|
description: RadosGW debug level. Max is 20.
|
||||||
source:
|
source:
|
||||||
type: string
|
type: string
|
||||||
default:
|
default:
|
||||||
|
@ -104,3 +108,27 @@ options:
|
||||||
the following public endpoint for the ceph-radosgw:
|
the following public endpoint for the ceph-radosgw:
|
||||||
|
|
||||||
https://files.example.com:80/swift/v1
|
https://files.example.com:80/swift/v1
|
||||||
|
haproxy-server-timeout:
|
||||||
|
type: int
|
||||||
|
default:
|
||||||
|
description: |
|
||||||
|
Server timeout configuration in ms for haproxy, used in HA
|
||||||
|
configurations. If not provided, default value of 30000ms is used.
|
||||||
|
haproxy-client-timeout:
|
||||||
|
type: int
|
||||||
|
default:
|
||||||
|
description: |
|
||||||
|
Client timeout configuration in ms for haproxy, used in HA
|
||||||
|
configurations. If not provided, default value of 30000ms is used.
|
||||||
|
haproxy-queue-timeout:
|
||||||
|
type: int
|
||||||
|
default:
|
||||||
|
description: |
|
||||||
|
Queue timeout configuration in ms for haproxy, used in HA
|
||||||
|
configurations. If not provided, default value of 5000ms is used.
|
||||||
|
haproxy-connect-timeout:
|
||||||
|
type: int
|
||||||
|
default:
|
||||||
|
description: |
|
||||||
|
Connect timeout configuration in ms for haproxy, used in HA
|
||||||
|
configurations. If not provided, default value of 5000ms is used.
|
||||||
|
|
|
@ -98,6 +98,7 @@ class MonContext(context.OSContextGenerator):
|
||||||
'old_auth': cmp_pkgrevno('radosgw', "0.51") < 0,
|
'old_auth': cmp_pkgrevno('radosgw', "0.51") < 0,
|
||||||
'use_syslog': str(config('use-syslog')).lower(),
|
'use_syslog': str(config('use-syslog')).lower(),
|
||||||
'embedded_webserver': config('use-embedded-webserver'),
|
'embedded_webserver': config('use-embedded-webserver'),
|
||||||
|
'loglevel': config('loglevel'),
|
||||||
'port': determine_apache_port(config('port'),
|
'port': determine_apache_port(config('port'),
|
||||||
singlenode_mode=True)
|
singlenode_mode=True)
|
||||||
}
|
}
|
||||||
|
|
|
@ -626,6 +626,12 @@ class HAProxyContext(OSContextGenerator):
|
||||||
if config('haproxy-client-timeout'):
|
if config('haproxy-client-timeout'):
|
||||||
ctxt['haproxy_client_timeout'] = config('haproxy-client-timeout')
|
ctxt['haproxy_client_timeout'] = config('haproxy-client-timeout')
|
||||||
|
|
||||||
|
if config('haproxy-queue-timeout'):
|
||||||
|
ctxt['haproxy_queue_timeout'] = config('haproxy-queue-timeout')
|
||||||
|
|
||||||
|
if config('haproxy-connect-timeout'):
|
||||||
|
ctxt['haproxy_connect_timeout'] = config('haproxy-connect-timeout')
|
||||||
|
|
||||||
if config('prefer-ipv6'):
|
if config('prefer-ipv6'):
|
||||||
ctxt['ipv6'] = True
|
ctxt['ipv6'] = True
|
||||||
ctxt['local_host'] = 'ip6-localhost'
|
ctxt['local_host'] = 'ip6-localhost'
|
||||||
|
|
|
@ -12,19 +12,26 @@ defaults
|
||||||
option tcplog
|
option tcplog
|
||||||
option dontlognull
|
option dontlognull
|
||||||
retries 3
|
retries 3
|
||||||
timeout queue 1000
|
{%- if haproxy_queue_timeout %}
|
||||||
timeout connect 1000
|
timeout queue {{ haproxy_queue_timeout }}
|
||||||
{% if haproxy_client_timeout -%}
|
{%- else %}
|
||||||
|
timeout queue 5000
|
||||||
|
{%- endif %}
|
||||||
|
{%- if haproxy_connect_timeout %}
|
||||||
|
timeout connect {{ haproxy_connect_timeout }}
|
||||||
|
{%- else %}
|
||||||
|
timeout connect 5000
|
||||||
|
{%- endif %}
|
||||||
|
{%- if haproxy_client_timeout %}
|
||||||
timeout client {{ haproxy_client_timeout }}
|
timeout client {{ haproxy_client_timeout }}
|
||||||
{% else -%}
|
{%- else %}
|
||||||
timeout client 30000
|
timeout client 30000
|
||||||
{% endif -%}
|
{%- endif %}
|
||||||
|
{%- if haproxy_server_timeout %}
|
||||||
{% if haproxy_server_timeout -%}
|
|
||||||
timeout server {{ haproxy_server_timeout }}
|
timeout server {{ haproxy_server_timeout }}
|
||||||
{% else -%}
|
{%- else %}
|
||||||
timeout server 30000
|
timeout server 30000
|
||||||
{% endif -%}
|
{%- endif %}
|
||||||
|
|
||||||
listen stats {{ stat_port }}
|
listen stats {{ stat_port }}
|
||||||
mode http
|
mode http
|
||||||
|
|
|
@ -10,6 +10,7 @@ mon host = {{ mon_hosts }}
|
||||||
log to syslog = {{ use_syslog }}
|
log to syslog = {{ use_syslog }}
|
||||||
err to syslog = {{ use_syslog }}
|
err to syslog = {{ use_syslog }}
|
||||||
clog to syslog = {{ use_syslog }}
|
clog to syslog = {{ use_syslog }}
|
||||||
|
debug rgw = {{ loglevel }}/5
|
||||||
|
|
||||||
[client.radosgw.gateway]
|
[client.radosgw.gateway]
|
||||||
host = {{ hostname }}
|
host = {{ hostname }}
|
||||||
|
|
|
@ -166,6 +166,7 @@ class MonContextTest(CharmTestCase):
|
||||||
'mon_hosts': '10.5.4.1:6789 10.5.4.2:6789 10.5.4.3:6789',
|
'mon_hosts': '10.5.4.1:6789 10.5.4.2:6789 10.5.4.3:6789',
|
||||||
'old_auth': False,
|
'old_auth': False,
|
||||||
'use_syslog': 'false',
|
'use_syslog': 'false',
|
||||||
|
'loglevel': 1,
|
||||||
'port': 70
|
'port': 70
|
||||||
}
|
}
|
||||||
self.assertEqual(expect, mon_ctxt())
|
self.assertEqual(expect, mon_ctxt())
|
||||||
|
@ -199,6 +200,7 @@ class MonContextTest(CharmTestCase):
|
||||||
'mon_hosts': '10.5.4.1:6789 10.5.4.2:6789 10.5.4.3:6789',
|
'mon_hosts': '10.5.4.1:6789 10.5.4.2:6789 10.5.4.3:6789',
|
||||||
'old_auth': False,
|
'old_auth': False,
|
||||||
'use_syslog': 'false',
|
'use_syslog': 'false',
|
||||||
|
'loglevel': 1,
|
||||||
'port': 70
|
'port': 70
|
||||||
}
|
}
|
||||||
self.assertEqual(expect, mon_ctxt())
|
self.assertEqual(expect, mon_ctxt())
|
||||||
|
@ -224,6 +226,7 @@ class MonContextTest(CharmTestCase):
|
||||||
'mon_hosts': '10.5.4.1:6789 10.5.4.2:6789 10.5.4.3:6789',
|
'mon_hosts': '10.5.4.1:6789 10.5.4.2:6789 10.5.4.3:6789',
|
||||||
'old_auth': False,
|
'old_auth': False,
|
||||||
'use_syslog': 'false',
|
'use_syslog': 'false',
|
||||||
|
'loglevel': 1,
|
||||||
'port': 70
|
'port': 70
|
||||||
}
|
}
|
||||||
self.assertEqual(expect, mon_ctxt())
|
self.assertEqual(expect, mon_ctxt())
|
||||||
|
|
Loading…
Reference in New Issue