'frontend_port': frontend_port,
'monitor_port': spec.monitor_port,
'default_server_opts': server_opts,
- 'health_check_interval': spec.health_check_interval or '2s',
+ 'health_check_interval': spec.health_check_interval or ('30s' if backend_spec.service_type == 'nfs' else '2s'),
'v4v6_flag': v4v6_flag,
'monitor_ssl_file': monitor_ssl_file,
'peer_hosts': peer_hosts,
)
if enable_haproxy_protocol:
haproxy_txt += ' default-server send-proxy-v2\n'
- haproxy_txt += ' server nfs.foo.0 192.168.122.111:12049 check\n'
+ haproxy_txt += ' server nfs.foo.0 192.168.122.111:12049 check inter 30s\n'
haproxy_expected_conf = {
'files': {'haproxy.cfg': haproxy_txt}
}
' stick on src\n'
' hash-type consistent\n'
' default-server send-proxy-v2\n'
- ' server nfs.foo.0 192.168.122.111:12049 check\n'
+ ' server nfs.foo.0 192.168.122.111:12049 check inter 30s\n'
)
haproxy_expected_conf = {
'files': {'haproxy.cfg': haproxy_txt}
),
)
gen_config_lines = haproxy_generated_conf['files']['haproxy.cfg']
- assert 'server nfs.foo.0 10.10.2.20:12049 check' in gen_config_lines
+ assert 'server nfs.foo.0 10.10.2.20:12049 check inter 30s' in gen_config_lines
nfs_generated_conf, _ = nfs_svc.generate_config(
CephadmDaemonDeploySpec(