-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
"duplicate listen options" config error when using wildcard ingress resource host #359
Comments
@vdavidoff what is the version of your ingress? I guess this was already solved on #141 |
NGINX 0.9.0-beta.2 (note that I haven't had a chance to review the issue you pointed me at, yet) |
I can't reproduce this, did you customize your template? Please paste your ingress config and the ingress deployment. |
I have not modified the template. The only customizations I have done are via the nginx.conf ConfigMap and annotations on the Ingress. Here's the live Deployment. Note that I built the image from the 0.9.0-beta.2 release tarball, it was not pulled from an existing 3rd party repo or built from Git.
Here's the live ConfigMap
Here's the live Ingress - this is the version that results in the errors I'm reporting. Though again, to be clear, the config was written successfully once (what is described in this Ingress is reflected in the live nginx.conf), and if I modify the Ingress, those changes do appear. Only after the config is initially written do the errors start to appear.
I see the changes from issue #141 in the template in the running container:
I also see them applied, as you'd suspect, in the newest config dropping in /tmp that fails validation:
I am not familiar with reuseport, but if it's only necessary after the initial listen directive, then it appears as though the "listen [::]:80" directives are in the proper order. If order applies here. I do see the note about it only working with kernels 3.9+, but that looks OK:
|
@vdavidoff thanks for the info, I'll take a look on this during the weekend |
This flag only can be defined once per listen port (that is why is defined in |
@vdavidoff I can confirm the issue on release 0.9.0-beta.2, but I can't reproduce on the master branch, so looks like it's fixed. You can wait for the next release or build a custom ingress |
OK, thanks. I appreciate you digging into this for me. |
@vdavidoff I was able to reproduce this error. The issue is that the nginx template uses the position in the iteration to add a listen option (ipv6only) and we can specify options only in one listen per port. When the server name start with wildcard or numbers the server contains the ipv6only option and then in the default server the other options. This triggers the error. |
Great, thanks again. |
If I configure an ingress resource like this:
nginx.conf is written successfully, but then I can see from the ingress controller logs that subsequent attempts to generate the config result in the error:
This only seems to happen if the "host" in the ingress resource is a wildcard name, though maybe it happens other times, too, that I'm not running into.
If I make further edits to the ingress resource, they show up, so whatever this is, it doesn't appear to make further updates block. But for some reason between the first successful write and the next edit, config generation fails in this way.
I'm attaching three files:
Apologies if what's happening here is obvious and I'm just not seeing it, or if what I'm trying to do here isn't meant to be supported.
The text was updated successfully, but these errors were encountered: