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

Templates can lead to bad config #32

Closed
tadanki opened this issue Nov 7, 2017 · 3 comments
Closed

Templates can lead to bad config #32

tadanki opened this issue Nov 7, 2017 · 3 comments
Labels

Comments

@tadanki
Copy link

tadanki commented Nov 7, 2017

Hi,
We have noticed that in some instances we can end up with stale config being served by Nginx.
On digging further we see that in the upstream block in the candidate nginx.conf that is written out, is missing a host and just reads
server :
This seems to happen when the .Host variable in the .Tasks struct is empty.
Is it possible to add some simple filtering to nixy to ensure that tasks are only valid if they have both .Host and .Ports non empty?
We tried to suppress them in templating but that can potentially lead to an empty upstream block which is also invalid. Can't seem to find a clean way to do it in templating.
Thoughts?

@martensson
Copy link
Owner

Hi @tadanki! Sorry for the delay, and I will look into it.
Just a question, what kind of app are you deploying that is missing even a host? Did not know that was even possible 😕 . So if you have a snippet of the app in question it would be great!
But the fix should be really easy, already have a check if ports are set, just need to add another for the host field as well.

@martensson
Copy link
Owner

You can now also try the latest release including the fix.

@martensson
Copy link
Owner

I am closing this issue now, please report if its still a problem!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants