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

Reload if HAProxy config has been changed #150

Closed
wants to merge 2 commits into from

Conversation

che
Copy link

@che che commented Dec 5, 2015

No description provided.

@jolynch
Copy link
Collaborator

jolynch commented Dec 5, 2015

I'm a little confused by the purpose of this patch. Synapse already reloads haproxy if it can't make the stats socket update. What is your concern with that approach?

@jolynch
Copy link
Collaborator

jolynch commented Dec 5, 2015

@che can you give more context?

@che
Copy link
Author

che commented Dec 5, 2015

@jolynch you are right, but this is a fix for the situation when we need have only active servers in HAProxy config. If server is down - don't show this server in any case (for DOWN statuses).

Thanx!

@jolynch
Copy link
Collaborator

jolynch commented Dec 7, 2015

@che the stats socket option should allow you to automatically down servers (put them in maint). Try setting socket_file_path and do_reloads, or am I missing something?

@che
Copy link
Author

che commented Dec 11, 2015

@jolynch I changed solution(new commit) and renamed argument for more understanding.
Also current solution linked with #94

Thanx!

@jolynch
Copy link
Collaborator

jolynch commented Dec 11, 2015

@che I think that #94 has to do with a bad interaction in Docker, I don't believe that this change would fix it.

The current master branch of Synapse can automatically MAINT backends (bring them down). If you want to reload every time a server goes down instead of MAINTing then you set do_reloads to true and do_socket to false. If you want to use the stats socket to MAINT without reloading (preferable in the general case) then you set do_reloads and do_socket to true.

@jolynch
Copy link
Collaborator

jolynch commented Dec 11, 2015

I guess to get to the root of this, what is the problem you are observing that you are trying to fix?

@che
Copy link
Author

che commented Dec 11, 2015

I guess to get to the root of this, what is the problem you are observing that you are trying to fix?

You are right, NET_ADMIN and qdisk solved our problems on Docker side.

@che
Copy link
Author

che commented Dec 11, 2015

The current master branch of Synapse can automatically MAINT backends (bring them down). If you want to reload every time a server goes down instead of MAINTing then you set do_reloads to true and do_socket to false. If you want to use the stats socket to MAINT without reloading (preferable in the general case) then you set do_reloads and do_socket to true.

We have in config: do_writes: true, do_reloads: true, do_socket: true
We use HAProxy 1.5.15 and Synapse 0.12.2, but it doesn't work because if server is DOWN - the server still show as DOWN.
Our solution makes it possible to check the status of the server and if the server is not active (DOWM), then restart HAProxy then we will show only active (UP) servers.

@jolynch
Copy link
Collaborator

jolynch commented Dec 23, 2015

@che Are there any warnings or errors on the command line? My understanding of the logic is that if it can't talk over the stats socket then it will initiate a reload, so I'm slightly puzzled by this situation.

Are you running this inside a docker container? If so what are you using as an init substitute?

@jolynch
Copy link
Collaborator

jolynch commented Jan 18, 2016

@che bump

@jolynch
Copy link
Collaborator

jolynch commented Feb 12, 2016

I'm going to close this because I don't think it's needed. Please re-open with more context if I'm wrong about that :-)

@jolynch jolynch closed this Feb 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants