Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HAProxy routes stop working when invalid cert/key is uploaded for any of route #1706

Closed
jpechane opened this issue Apr 13, 2015 · 8 comments
Closed
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@jpechane
Copy link

If a user misconfigures SSL for one of its routes then HAProxy stops completely serving all routes with message in log
2015-04-13T05:04:55.840373604Z [ALERT] 102/010455 (9097) : Fatal errors found in configuration.
2015-04-13T05:05:43.460748843Z E0413 01:05:43.460661 1 router.go:126] Error reloading router: exit status 1
2015-04-13T05:05:43.460748843Z Reload output: + config_file=/var/lib/haproxy/conf/haproxy.config
2015-04-13T05:05:43.460748843Z + pid_file=/var/lib/haproxy/run/haproxy.pid
2015-04-13T05:05:43.460748843Z + old_pid=
2015-04-13T05:05:43.460748843Z + '[' -f /var/lib/haproxy/run/haproxy.pid ']'
2015-04-13T05:05:43.460748843Z + old_pid=6061
2015-04-13T05:05:43.460748843Z + '[' -n 6061 ']'
2015-04-13T05:05:43.460748843Z + /usr/sbin/haproxy -f /var/lib/haproxy/conf/haproxy.config -p /var/lib/haproxy/run/haproxy.pid -sf 6061
2015-04-13T05:05:43.460748843Z [ALERT] 102/010543 (9100) : parsing [/var/lib/haproxy/conf/haproxy.config:66] : 'bind 127.0.0.1:10444' : inconsistencies between private key and certificate loaded from PEM file '/var/lib/containers/router/certs/ws.cloudapps.example.com.pem'.
2015-04-13T05:05:43.460748843Z [ALERT] 102/010543 (9100) : Error(s) found in configuration file : /var/lib/haproxy/conf/haproxy.config
2015-04-13T05:05:43.460748843Z [WARNING] 102/010543 (9100) : Setting tune.ssl.default-dh-param to 1024 by default, if your workload permits it you should set it to at least 2048. Please set a value >= 1024 to make this warning disappear.
2015-04-13T05:05:43.460748843Z [ALERT] 102/010543 (9100) : Fatal errors found in configuration.

Albeit all routes were remove the message still appears in the log.

I see two problems right now

  1. One route problem shuts down all routes
  2. The cert files are not removed after route removal

If I remove the offending file form container then it starts working again

@brenton brenton added the kind/bug Categorizes issue or PR as related to a bug. label Apr 13, 2015
@brenton
Copy link
Contributor

brenton commented Apr 13, 2015

@abhgupta could someone on the runtime team look into this?

@abhgupta
Copy link
Member

@pweil- Can you please take a look at this?

@pweil-
Copy link
Contributor

pweil- commented Apr 13, 2015

Yes, I'll take a look to see what kind of validations we can put in place.

@pweil-
Copy link
Contributor

pweil- commented Apr 17, 2015

Status update: there are two issues here:

  1. Delete was left as a TODO - I have refactored the cert manager (so it is testable by injecting a real or fake writer), written unit tests, and implemented the delete functionality today. Just waiting on [BZ-1212362] - routes using same service produce duplicate named backends #1786 to be merged so I can rebase and submit, I used the new, guaranteed unique key as the file name for deletes (files will be named -.pem)
  2. The certificates are not validated by the api - I am working on what we can put into place for this.

@pweil-
Copy link
Contributor

pweil- commented Apr 20, 2015

PR for item 1 above: #1817

@pweil-
Copy link
Contributor

pweil- commented Apr 20, 2015

PR for item 2 above: #1824

@danmcp
Copy link

danmcp commented May 11, 2015

Closing in favor of remaining PR: #1824

@danmcp danmcp closed this as completed May 11, 2015
@karamfil
Copy link

Hello,

Has this been fixed? And in what version?

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

6 participants