0

我有两台机器已经安装了 openstack(使用 RDO all-in-one)。一台机器的IP地址是10.0.3.139。另一个 IP 地址是 10.0.3.113。我按照官方文档配置了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 ?非常感谢!

4

2 回答 2

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)
于 2015-01-21T08:31:38.300 回答
1

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

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

如果不在那里

#useradd -g haproxy haproxy
于 2014-01-04T11:18:55.897 回答