Skip to content

openshift/origin rebuilding default router from router/haproxy fails #14473

@zjagust

Description

@zjagust

I tried to build an image for OpenShift Router by pulling files from here: https://github.com/openshift/origin/tree/master/images/router/haproxy but it fails.

Version

oc version
oc v1.5.0
kubernetes v1.5.2+43a9be4
features: Basic-Auth GSSAPI Kerberos SPNEGO

Steps To Reproduce
  1. Remove a default haproxy router:
    oc delete pods $(oc get pods | grep router | awk '{print $1}')
    oc delete svc router
    oc delete serviceaccount router
    oc delete dc router

  2. Pull files from here: https://github.com/openshift/origin/tree/master/images/router/haproxy and create a router Docker image from Dockerfile:
    docker build -t=haproxy .

  3. Try and build a default haproxy router from image created in step 2:
    oadm router router --replicas=1 --selector='region=infra' --images=haproxy --service-account=router

Current Result

A creation of a default router fails, where "oc describe po router" gives the following output:
Back-off restarting failed docker container
Error syncing pod, skipping: failed to "StartContainer" for "router" with CrashLoopBackOff: "Back-off 10s restarting failed container=router pod=router

Output of the command "oc logs router" gives the following output:
<7>haproxy-systemd-wrapper: executing /usr/local/sbin/haproxy -p /run/haproxy.pid -f /usr/local/etc/haproxy/haproxy.cfg -Ds
[ALERT] 151/175956 (6) : Cannot open configuration file/directory /usr/local/etc/haproxy/haproxy.cfg : No such file or directory
<5>haproxy-systemd-wrapper: exit, haproxy RC=1

Expected Result

Operation above should have the same result as when running:
oadm router router --replicas=1 --selector='region=infra' --images=docker.io/openshift/origin-haproxy-router --service-account=router

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions