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

formatIP issue #1202

Closed
rikatz opened this issue Aug 21, 2017 · 13 comments
Closed

formatIP issue #1202

rikatz opened this issue Aug 21, 2017 · 13 comments

Comments

@rikatz
Copy link
Contributor

rikatz commented Aug 21, 2017

I've downloaded the latest source code and compiled here.

When trying to start, the following error happens:

F0821 14:49:24.833766 6 nginx.go:96] invalid NGINX template: template: nginx.tmpl:256: function "formatIP" not defined

Don't know which is the related commit to this.

Thanks!

@aledbf
Copy link
Member

aledbf commented Aug 21, 2017

@aledbf aledbf closed this as completed Aug 21, 2017
@rikatz
Copy link
Contributor Author

rikatz commented Aug 21, 2017

@aledbf yes I do.

Same here: 'F0821 14:56:26.559928 6 nginx.go:96] invalid NGINX template: template: nginx.tmpl:283: function "buildDenyVariable" not defined'

I'm trying to see what else is happening. Will reopen if nothing happens :)

@rikatz
Copy link
Contributor Author

rikatz commented Aug 21, 2017

@aledbf I've compiled the latest version (make build) and the error still happens :(

I'm reopening this issue.

Thanks

@rikatz
Copy link
Contributor Author

rikatz commented Aug 21, 2017

Sorry, you need to reopen the issue :D

@aledbf
Copy link
Member

aledbf commented Aug 21, 2017

@rikatz buildDenyVariable is defined in the same file I linked. Please check your local copy is in the commit e0b3fcb

@aledbf
Copy link
Member

aledbf commented Aug 21, 2017

@rikatz just in case if the code in master compiles the templates it's ok (we have a test that checks that)

@rikatz
Copy link
Contributor Author

rikatz commented Aug 21, 2017

@aledbf sorry, my bad! I've pushed the latest commit, but I didn't linked k8s.io/ingress with github.com/kubernetes/ingress :)

Now it issues the following error while compiling:

 k8s.io/ingress/vendor/k8s.io/apimachinery/pkg/util/strategicpatch
../../../../../k8s.io/ingress/vendor/k8s.io/apimachinery/pkg/util/strategicpatch/patch.go:520: undefined: sort.SliceStable
# k8s.io/ingress/core/pkg/ingress/annotations/authreq
../../../../../k8s.io/ingress/core/pkg/ingress/annotations/authreq/main.go:177: ur.Hostname undefined (type *url.URL has no field or method Hostname)
Makefile:109: recipe for target 'build' failed

@aledbf
Copy link
Member

aledbf commented Aug 21, 2017

../../../../../k8s.io/ingress/core/pkg/ingress/annotations/authreq/main.go:177: ur.Hostname undefined (type *url.URL has no field or method Hostname)

You need Go 1.8

@rikatz
Copy link
Contributor Author

rikatz commented Aug 21, 2017

Hum that's new :D

Thank you!

@jcmoraisjr for next releases, we should use (if you're not already using) Go 1.8

@rikatz
Copy link
Contributor Author

rikatz commented Aug 21, 2017

@aledbf another thing: This line is causing some issues:
if ({{ buildDenyVariable (print .Hostname "_" $path) }}) {

specifically in this:

Aug 21 13:04:35 spessrvvpr docker[30480]: E0821 16:04:35.810823       7 controller.go:428] unexpected failure restarting the backend:
Aug 21 13:04:35 spessrvvpr docker[30480]: template: nginx.tmpl:576:40: executing "SERVER" at <.Hostname>: can't evaluate field Hostname in type *ingress.Location

What am I missing now? Some bogused ingress?

Thanks!

@jcmoraisjr
Copy link
Contributor

Yep, already using on HAProxy

@rikatz
Copy link
Contributor Author

rikatz commented Aug 21, 2017

In 0.9.0-beta.11 the version was like this

Don't know what and why this was changed, I'm going to return to $server.Hostname and see what happens here.

@rikatz
Copy link
Contributor Author

rikatz commented Aug 21, 2017

OK, nevermind, the template is right. I've made some mess here while trying to solve the problems.

Ingress working fine here, and now with SSLPassthrough disabled, solving the issues related in #1000

Thanks!

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

3 participants