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

Create nginx hosts only for "running" container #51

Open
rtyshyk opened this issue Mar 6, 2018 · 16 comments
Open

Create nginx hosts only for "running" container #51

rtyshyk opened this issue Mar 6, 2018 · 16 comments

Comments

@rtyshyk
Copy link

rtyshyk commented Mar 6, 2018

Hi,

Thanks for a great tool.

I noticed that there are no checks for container state.

As result container upstream may contain two IP addresses when the upgrade is not approved (old container still alive), or even IP part is missing on upstream when config generated at the moment when the new container is starting.

Missing IP address causing invalid nginx conf as well as a duplicate entry for the same container with the right IP address (on next config update)

I might be mistaken somewhere, but in general, I have one-two times for a week this issue, it is more or less reproducible with a heavy container where container entrypoint takes some time to start.

@adi90x
Copy link
Owner

adi90x commented Mar 6, 2018 via email

@rtyshyk
Copy link
Author

rtyshyk commented Mar 6, 2018

go-rancher-gen has "state" and "health" properties for a container, so the one more if statement can be added to a dynamic container configuration

@adi90x
Copy link
Owner

adi90x commented Mar 6, 2018 via email

@adi90x
Copy link
Owner

adi90x commented Mar 6, 2018 via email

@adi90x
Copy link
Owner

adi90x commented Mar 6, 2018 via email

@rtyshyk
Copy link
Author

rtyshyk commented Mar 6, 2018

Sorry, my bad, I did not find any related issue in the changelog from version 0.9.2 which I use.
Will try to update and let you know.
Actually, I used a fork from v0.9.2 with some custom ldap and so on.

@adi90x
Copy link
Owner

adi90x commented Mar 6, 2018 via email

@rtyshyk
Copy link
Author

rtyshyk commented Mar 6, 2018

It is not public.

We use it for our dev infrastructure. I added next features:

  • basic auth based on ldap (https://github.com/kvspb/nginx-auth-ldap), ldap might be enable skipped for all RAP instance or for the specific container
  • "secret link" to bypass ldap authentication (e.g. to share something who has no ldap account)
  • bypass ldap basic auth if request made from docker local network

Is it interesting to you?

@adi90x
Copy link
Owner

adi90x commented Mar 6, 2018 via email

@adi90x
Copy link
Owner

adi90x commented Mar 6, 2018 via email

@rtyshyk
Copy link
Author

rtyshyk commented Mar 6, 2018

I merged the latest change to my fork. looks ok.

Should I create PR on gitlab or github?

@adi90x
Copy link
Owner

adi90x commented Mar 6, 2018 via email

@rtyshyk
Copy link
Author

rtyshyk commented Mar 6, 2018

@rtyshyk
Copy link
Author

rtyshyk commented Mar 6, 2018

I guess this issue might be closed, hope only health containers will help with the issue.

@adi90x
Copy link
Owner

adi90x commented Mar 6, 2018

Closing this issue , PR posted on GitLab , do not hesitate if you have any other issue !

@rtyshyk
Copy link
Author

rtyshyk commented Mar 22, 2018

The issue still reproducible (from time to time).

I have two times completely the same upstream + hosts configuration ({{ define "server" }} section).

There are even the same IP addresses in two templates.
the old container IP address is $alive, and the old one is not (commented)

I am completely out of ideas how it is possible :(
Do you have some?

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

No branches or pull requests

2 participants