configMap无法在openshift origin pod中创建haproxy配置文件

时间:2016-08-30 15:10:40

标签: haproxy openshift-origin

我有一个带有2个节点(主服务器和从服务器)的openshift集群,我想更改我的HAproxy路由器的配置文件,所以我选择做一个configmap。 在我关注这个tuto之后:https://docs.openshift.org/latest/install_config/install/deploy_router.html

创建了configmap,但是pod不想重启,我收到了这个错误:

  

I0830 12:35:37.112924 1 router.go:161]路由器包含所有>命名空间中的路由   E0830 12:35:37.372029 1 ratelimiter.go:50]错误重装路由器:退出>状态1   [ALERT] 242/123537(28):[/ usr / sbin / haproxy.main()]未找到启用的侦听器>(检查关键字)!离开。

在我删除rc中的“livenessProb”和“readenesProb”后,我可以访问我的路由器pod,但配置文件为空。 当我在pod中“findmnt -o + PROPAGATION”时,我得到了这个:

TARGET                           SOURCE               FSTYPE OPTIONS      PROPAGATION
/                                /dev/mapper/docker-253:0-202065893-       4b0b4dede29e355551067e03212ee75cd293545839a9e5014525b8fc8453e5e4[/rootfs]
                                                  xfs    rw,relat private
|-/proc                          proc                 proc   rw,nosui private
| |-/proc/bus                    proc[/bus]           proc   ro,nosui private
| |-/proc/fs                     proc[/fs]            proc   ro,nosui private
| |-/proc/irq                    proc[/irq]           proc   ro,nosui private
| |-/proc/sys                    proc[/sys]           proc   ro,nosui private
| |-/proc/sysrq-trigger          proc[/sysrq-trigger] proc   ro,nosui private
| |-/proc/kcore                  tmpfs[/null]         tmpfs  rw,nosui private
| `-/proc/timer_stats            tmpfs[/null]         tmpfs  rw,nosui private
|-/dev                           tmpfs                tmpfs  rw,nosui private
| |-/dev/pts                     devpts               devpts rw,nosui private
| |-/dev/mqueue                  mqueue               mqueue rw,nosui private
| |-/dev/termination-log         /dev/mapper/centos-    root[/var/lib/origin/openshift.local.volumes/pods/3deedc57-6eae-11e6-8091-   020000a17bb0/containers/router/58cbfd4d]
                                                      xfs    rw,relat   private,slave
| `-/dev/shm                     shm                  tmpfs  rw,nosui   private
|-/sys                           sysfs                sysfs  ro,nosui private
| `-/sys/fs/cgroup               tmpfs                tmpfs  ro,nosui private
|   |-/sys/fs/cgroup/systemd     cgroup[/system.slice/docker-297a37b2903e3a3bcd64d74a4e0c8e71d90cf240377bbc4b778e73ebda53af0c.scope]
                                                  cgroup ro,nosui  private,slave
|   |-/sys/fs/cgroup/cpuacct,cpu cgroup[/system.slice/docker-297a37b2903e3a3bcd64d74a4e0c8e71d90cf240377bbc4b778e73ebda53af0c.scope]
                                                      cgroup ro,nosui private,slave
|   |-/sys/fs/cgroup/cpuset      cgroup[/system.slice/docker-297a37b2903e3a3bcd64d74a4e0c8e71d90cf240377bbc4b778e73ebda53af0c.scope]
                                                      cgroup ro,nosui  private,slave
|   |-/sys/fs/cgroup/net_cls     cgroup[/system.slice/docker-297a37b2903e3a3bcd64d74a4e0c8e71d90cf240377bbc4b778e73ebda53af0c.scope]
                                                  cgroup ro,nosui private,slave
|   |-/sys/fs/cgroup/memory      cgroup[/system.slice/docker-297a37b2903e3a3bcd64d74a4e0c8e71d90cf240377bbc4b778e73ebda53af0c.scope]
                                                  cgroup ro,nosui private,slave
|   |-/sys/fs/cgroup/blkio       cgroup[/system.slice/docker-297a37b2903e3a3bcd64d74a4e0c8e71d90cf240377bbc4b778e73ebda53af0c.scope]
                                                  cgroup ro,nosui private,slave
|   |-/sys/fs/cgroup/perf_event  cgroup[/system.slice/docker-297a37b2903e3a3bcd64d74a4e0c8e71d90cf240377bbc4b778e73ebda53af0c.scope]
                                                  cgroup ro,nosui private,slave
|   |-/sys/fs/cgroup/devices     cgroup[/system.slice/docker-297a37b2903e3a3bcd64d74a4e0c8e71d90cf240377bbc4b778e73ebda53af0c.scope]
                                                  cgroup ro,nosui private,slave
|   |-/sys/fs/cgroup/freezer     cgroup[/system.slice/docker-297a37b2903e3a3bcd64d74a4e0c8e71d90cf240377bbc4b778e73ebda53af0c.scope]
                                                  cgroup ro,nosui private,slave
|   `-/sys/fs/cgroup/hugetlb     cgroup[/system.slice/docker-297a37b2903e3a3bcd64d74a4e0c8e71d90cf240377bbc4b778e73ebda53af0c.scope]
                                                  cgroup ro,nosui private,slave
|-/run/secrets                   /dev/mapper/centos-  root[/var/lib/docker/containers/297a37b2903e3a3bcd64d74a4e0c8e71d90cf240377bbc4b778e73ebda53af0c/secrets]
                                                  xfs    rw,relat private,slave
| `-/run/secrets/kubernetes.io/serviceaccount
                             tmpfs                tmpfs  ro,relat private,slave
|-/etc/hosts                     /dev/mapper/centos-root[/var/lib/docker/containers/56f5ea1e5e2fb9392b9cb3cfc6eecc43d42eb23f9769793e6b2e4f7250c7cf5c/hosts]
                                                  xfs    rw,relat private
|-/etc/resolv.conf               /dev/mapper/centos-root[/var/lib/docker/containers/56f5ea1e5e2fb9392b9cb3cfc6eecc43d42eb23f9769793e6b2e4f7250c7cf5c/resolv.conf]
                                                  xfs    rw,relat private
|-/etc/hostname                  /dev/mapper/centos-root[/var/lib/docker/containers/56f5ea1e5e2fb9392b9cb3cfc6eecc43d42eb23f9769793e6b2e4f7250c7cf5c/hostname]
                                                  xfs    rw,relat private
`-/var/lib/haproxy/conf/custom   tmpfs                tmpfs  rw,relat private,slave

有任何帮助吗?感谢

1 个答案:

答案 0 :(得分:0)

您需要为openshift路由器使用模板文件。

这详细解释了您需要做什么。

https://docs.openshift.org/latest/install_config/install/deploy_router.html#using-configmap-replace-template