Openstack Harproxy配置文件

时间:2014-01-02 03:24:42

标签: openstack haproxy rdo

我有两台机器已安装openstack(使用RDO一体机)。一台机器的IP地址是10.0.3.139。另一个IP地址是10.0.3.113。我跟着official document配置了haproxy.cfg。 这是配置文件:

global
  chroot  /var/lib/haproxy
  daemon
  group  haproxy
  maxconn  4000
  pidfile  /var/run/haproxy.pid
  user  haproxy

defaults
  log  global
  maxconn  8000
  option  redispatch
  retries  3
  timeout  http-request 10s
  timeout  queue 1m
  timeout  connect 10s
  timeout  client 1m
  timeout  server 1m
  timeout  check 10s

listen dashboard_cluster
  bind 10.0.3.113:443
  balance  source
  option  tcpka
  option  httpchk
  option  tcplog
  server controller1 10.0.3.113:443 check inter 2000 rise 2 fall 5

listen galera_cluster
  bind 10.0.3.113:3306
  balance  source
  option  httpchk
  server controller1 10.0.3.113:3306 check port 9200 inter 2000 rise 2 fall 5

listen glance_api_cluster
  bind 10.0.3.113:9292
  balance  source
  option  tcpka
  option  httpchk
  option  tcplog

当我跑步时

haproxy -f openstack-haproxy.cfg

它说

[ALERT] 000/192001 (45698) : parsing [openstack-haproxy.cfg:4] : cannot find group id    for 'haproxy' (0:Success)
[ALERT] 000/192001 (45698) : parsing [openstack-haproxy.cfg:7] : cannot find user id for 'haproxy' (0:Success)
[ALERT] 000/192001 (45698) : Error(s) found in configuration file : openstack-haproxy.cfg
[WARNING] 000/192001 (45698) : config : log format ignored for proxy 'dashboard_cluster' since it has no log address.
[WARNING] 000/192001 (45698) : config : log format ignored for proxy 'glance_api_cluster' since it has no log address.
[WARNING] 000/192001 (45698) : config : log format ignored for proxy 'glance_registry_cluster' since it has no log address.
[WARNING] 000/192001 (45698) : config : log format ignored for proxy  'keystone_admin_cluster' since it has no log address.
[WARNING] 000/192001 (45698) : config : log format ignored for proxy 'keystone_public_internal_cluster' since it has no log address.
[WARNING] 000/192001 (45698) : config : log format ignored for proxy 'nova_ec2_api_cluster' since it has no log address.
[WARNING] 000/192001 (45698) : config : log format ignored for proxy 'nova_compute_api_cluster' since it has no log address.
[WARNING] 000/192001 (45698) : config : log format ignored for proxy 'nova_metadata_api_cluster' since it has no log address.
[WARNING] 000/192001 (45698) : config : log format ignored for proxy 'cinder_api_cluster' since it has no log address.
[WARNING] 000/192001 (45698) : config : log format ignored for proxy 'ceilometer_api_cluster' since it has no log address.
[WARNING] 000/192001 (45698) : config : log format ignored for proxy 'spice_cluster' since it has no log address.
[WARNING] 000/192001 (45698) : config : log format ignored for proxy 'neutron_api_cluster' since it has no log address.
[WARNING] 000/192001 (45698) : config : log format ignored for proxy 'swift_proxy_cluster' since it has no log address.
[ALERT] 000/192001 (45698) : Fatal errors found in configuration.

我的配置文件在哪里错了?有人能帮助我吗?或者我应该怎么做openstack-haproxy?非常感谢!

2 个答案:

答案 0 :(得分:2)

添加群组,将用户添加到群组

[root@server2 haproxy-1.5.3]# groupadd haproxy
[root@server2 haproxy-1.5.3]# useradd -g haproxy haproxy
[root@server2 haproxy-1.5.3]# id haproxy
uid=500(haproxy) gid=500(haproxy) groups=500(haproxy)

答案 1 :(得分:1)

检查您是否有“haproxy群组& 用户您将需要它来启动服务

#egrep -i "^haproxy" /etc/group

如果不存在

#useradd -g haproxy haproxy