Skip to content

Fix nginx config error parsing configmap - #200

Merged
Andrei Kvapil (kvaps) merged 1 commit into
cozystack:mainfrom
kingdonb:fix-nginx-error
Jul 8, 2024
Merged

Andrei Kvapil (kvaps) merged 1 commit into
cozystack:mainfrom
kingdonb:fix-nginx-error

Conversation

@kingdonb

Copy link
Copy Markdown
Member

The error manifests as:

W0705 16:07:35.694677 7 configmap.go:431] unexpected error merging defaults: 2 error(s) decoding:

  • cannot parse 'proxy-connect-timeout' as int: strconv.ParseInt: parsing "10s": invalid syntax
  • cannot parse 'proxy-read-timeout' as int: strconv.ParseInt: parsing "10s": invalid syntax

I came across this trying to understand why my nginx ingress addon config isn't working, (this didn't help, but at least the warning is gone now.)

I'll continue to try to debug, but I think this can merge any time

The error manifests as:

W0705 16:07:35.694677       7 configmap.go:431] unexpected error merging defaults: 2 error(s) decoding:

* cannot parse 'proxy-connect-timeout' as int: strconv.ParseInt: parsing "10s": invalid syntax
* cannot parse 'proxy-read-timeout' as int: strconv.ParseInt: parsing "10s": invalid syntax

Signed-off-by: Kingdon Barrett <[email protected]>

@kvaps Andrei Kvapil (kvaps) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks LGTM

@kvaps
Andrei Kvapil (kvaps) merged commit 7a3e9f5 into cozystack:main Jul 8, 2024
@kingdonb

Copy link
Copy Markdown
Member Author

it looks like a second issue is that kubevirt-launcher pods (node virtual machines) are not labeled with the expected ingress-nginx role label, so when the kubernetes-*-ingress-nginx frontend ingress service tries to route packets to the backend virtual machine nodes (who run nginx as daemonset) there is a service with no endpoints, and the traffic does not pass.

I went ahead and labeled one of those pods because I was sure it should have the label, and it was added to endpoints, but then a second problem:

my backend was configured for serving TLS, but it looks like the frontend didn't understand:

400 Bad Request
The plain HTTP request was sent to HTTPS port

So everything looked to me like nginx was configured for passthrough tls, but it's making HTTP requests to 443. Changing the ingress to have a backend port 80 setting worked (I was able to get traffic through to the podinfo service running on the virtualized cluster nodes) but that's obviously not the intended configuration, I will keep looking to see what went wrong with passthrough TLS and add to this PR when I figure it out.

It looks like there's more than one issue, (perhaps I'd better file them as separate issues so people following can see what happened when it's over)

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