tinkerbell / hegel

Instance Metadata Service
https://tinkerbell.org
Apache License 2.0
97 stars 32 forks source link

TestServe/serve_endpoint_success periodically fails locally and the CI #83

Closed chrisdoherty4 closed 2 years ago

chrisdoherty4 commented 2 years ago
{"level":"info","ts":1650309873.165194,"caller":"http-server/http_handlers.go:167","msg":"got ip from request","service":"github.com/tinkerbell/hegel","pkg":"httpserver","userIP":"192.168.1.5"}
{"level":"info","ts":1650309873.1657662,"caller":"http-server/http_handlers.go:167","msg":"got ip from request","service":"github.com/tinkerbell/hegel","pkg":"httpserver","userIP":"172.18.1.1"}
{"level":"info","ts":1650309873.1658058,"caller":"http-server/http_handlers.go:171","msg":"failed to get hardware by ip","service":"github.com/tinkerbell/hegel","pkg":"httpserver","userIP":"172.18.1.1","error":"rpc error: code = Unknown desc = unexpected end of JSON input"}
{"level":"info","ts":1650309873.165877,"caller":"http-server/http_handlers.go:167","msg":"got ip from request","service":"github.com/tinkerbell/hegel","pkg":"httpserver","userIP":"192.168.1.5"}
{"level":"info","ts":1650309873.1661358,"caller":"http-server/http_handlers.go:167","msg":"got ip from request","service":"github.com/tinkerbell/hegel","pkg":"httpserver","userIP":"172.18.0.1"}
{"level":"info","ts":1650309873.166156,"caller":"http-server/http_handlers.go:171","msg":"failed to get hardware by ip","service":"github.com/tinkerbell/hegel","pkg":"httpserver","userIP":"172.18.0.1","error":"rpc error: code = Unknown desc = unexpected end of JSON input"}
{"level":"info","ts":1650309873.1661942,"caller":"http-server/http_handlers.go:167","msg":"got ip from request","service":"github.com/tinkerbell/hegel","pkg":"httpserver","userIP":"172.18.0.6"}
{"level":"info","ts":1650309873.1662076,"caller":"http-server/http_handlers.go:171","msg":"failed to get hardware by ip","service":"github.com/tinkerbell/hegel","pkg":"httpserver","userIP":"172.18.0.6","error":"rpc error: code = Unknown desc = unexpected end of JSON input"}
{"level":"info","ts":1650309873.1662545,"caller":"http-server/http_handlers.go:167","msg":"got ip from request","service":"github.com/tinkerbell/hegel","pkg":"httpserver","userIP":"192.168.1.5"}
{"level":"info","ts":1650309873.1665125,"caller":"http-server/http_handlers.go:167","msg":"got ip from request","service":"github.com/tinkerbell/hegel","pkg":"httpserver","userIP":"172.18.0.6"}
{"level":"info","ts":1650309873.166535,"caller":"http-server/http_handlers.go:171","msg":"failed to get hardware by ip","service":"github.com/tinkerbell/hegel","pkg":"httpserver","userIP":"172.18.0.6","error":"rpc error: code = Unknown desc = unexpected end of JSON input"}
{"level":"info","ts":1650309873.1665835,"caller":"http-server/http_handlers.go:167","msg":"got ip from request","service":"github.com/tinkerbell/hegel","pkg":"httpserver","userIP":"192.168.1.5"}
{"level":"info","ts":1650309873.1668615,"caller":"http-server/http_handlers.go:167","msg":"got ip from request","service":"github.com/tinkerbell/hegel","pkg":"httpserver","userIP":"192.168.1.5"}
{"level":"info","ts":1650309873.167133,"caller":"http-server/http_handlers.go:167","msg":"got ip from request","service":"github.com/tinkerbell/hegel","pkg":"httpserver","userIP":"192.168.1.5"}
{"level":"info","ts":1650309873.1674082,"caller":"http-server/http_handlers.go:167","msg":"got ip from request","service":"github.com/tinkerbell/hegel","pkg":"httpserver","userIP":"192.168.1.5"}
{"level":"info","ts":1650309873.1676779,"caller":"http-server/http_handlers.go:167","msg":"got ip from request","service":"github.com/tinkerbell/hegel","pkg":"httpserver","userIP":"192.168.1.5"}
{"level":"info","ts":1650309873.16797,"caller":"http-server/http_handlers.go:107","msg":"got ip from request","service":"github.com/tinkerbell/hegel","pkg":"httpserver","userIP":"192.168.1.5"}
{"level":"info","ts":1650309873.1684883,"caller":"http-server/http_handlers.go:107","msg":"got ip from request","service":"github.com/tinkerbell/hegel","pkg":"httpserver","userIP":"192.168.1.5"}
{"level":"info","ts":1650309873.1689386,"caller":"http-server/http_handlers.go:107","msg":"got ip from request","service":"github.com/tinkerbell/hegel","pkg":"httpserver","userIP":"192.168.1.5"}
{"level":"info","ts":1650309873.1691763,"caller":"http-server/http_handlers.go:107","msg":"got ip from request","service":"github.com/tinkerbell/hegel","pkg":"httpserver","userIP":"192.168.1.5"}
{"level":"info","ts":1650309873.1694627,"caller":"http-server/http_handlers.go:107","msg":"got ip from request","service":"github.com/tinkerbell/hegel","pkg":"httpserver","userIP":"192.168.1.5"}
{"level":"info","ts":1650309873.16967,"caller":"http-server/http_handlers.go:107","msg":"got ip from request","service":"github.com/tinkerbell/hegel","pkg":"httpserver","userIP":"192.168.1.5"}
{"level":"info","ts":1650309873.1698678,"caller":"http-server/http_handlers.go:107","msg":"got ip from request","service":"github.com/tinkerbell/hegel","pkg":"httpserver","userIP":"192.168.1.5"}
{"level":"info","ts":1650309873.1700807,"caller":"http-server/http_handlers.go:107","msg":"got ip from request","service":"github.com/tinkerbell/hegel","pkg":"httpserver","userIP":"192.168.1.5"}
{"level":"info","ts":1650309873.1703928,"caller":"http-server/http_handlers.go:107","msg":"got ip from request","service":"github.com/tinkerbell/hegel","pkg":"httpserver","userIP":"192.168.1.5"}
{"level":"info","ts":1650309873.1708915,"caller":"http-server/http_handlers.go:107","msg":"got ip from request","service":"github.com/tinkerbell/hegel","pkg":"httpserver","userIP":"192.168.1.5"}
{"level":"info","ts":1650309873.1714287,"caller":"http-server/http_handlers.go:107","msg":"got ip from request","service":"github.com/tinkerbell/hegel","pkg":"httpserver","userIP":"192.168.1.5"}
{"level":"info","ts":1650309873.1720138,"caller":"http-server/http_handlers.go:107","msg":"got ip from request","service":"github.com/tinkerbell/hegel","pkg":"httpserver","userIP":"192.168.1.5"}
{"level":"info","ts":1650309873.1725342,"caller":"http-server/http_handlers.go:107","msg":"got ip from request","service":"github.com/tinkerbell/hegel","pkg":"httpserver","userIP":"192.168.1.5"}
{"level":"info","ts":1650309873.1729639,"caller":"http-server/http_handlers.go:135","msg":"failed to filter metadata","service":"github.com/tinkerbell/hegel","pkg":"httpserver","userIP":"192.168.1.5","error":"error while filtering with gojq: function not defined: invalid/0","errorVerbose":"function not defined: invalid/0\nerror while filtering with gojq\ngithub.com/tinkerbell/hegel/http-server.filterMetadata\n\t/home/runner/work/hegel/hegel/http-server/http_handlers.go:234\ngithub.com/tinkerbell/hegel/http-server.getMetadata.func1\n\t/home/runner/work/hegel/hegel/http-server/http_handlers.go:133\nnet/http.HandlerFunc.ServeHTTP\n\t/opt/hostedtoolcache/go/1.17.5/x64/src/net/http/server.go:2047\ngo.opentelemetry.io/contrib/instrumentation/net/http/otelhttp.WithRouteTag.func1\n\t/home/runner/go/pkg/mod/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp@v0.28.0/handler.go:233\nnet/http.HandlerFunc.ServeHTTP\n\t/opt/hostedtoolcache/go/1.17.5/x64/src/net/http/server.go:2047\nnet/http.(*ServeMux).ServeHTTP\n\t/opt/hostedtoolcache/go/1.17.5/x64/src/net/http/server.go:2425\ngithub.com/tinkerbell/hegel/http-server.TestRegisterEndpoints.func1\n\t/home/runner/work/hegel/hegel/http-server/http_server_test.go:248\ntesting.tRunner\n\t/opt/hostedtoolcache/go/1.17.5/x64/src/testing/testing.go:1259\nruntime.goexit\n\t/opt/hostedtoolcache/go/1.17.5/x64/src/runtime/asm_amd64.s:1581"}
{"level":"info","ts":1650309873.173078,"caller":"http-server/http_handlers.go:167","msg":"got ip from request","service":"github.com/tinkerbell/hegel","pkg":"httpserver","userIP":"192.168.1.5"}
{"level":"info","ts":1650309873.1748269,"caller":"http-server/http_handlers.go:167","msg":"got ip from request","service":"github.com/tinkerbell/hegel","pkg":"httpserver","userIP":"192.168.1.5"}
{"level":"info","ts":1650309873.1758068,"caller":"http-server/http_handlers.go:167","msg":"got ip from request","service":"github.com/tinkerbell/hegel","pkg":"httpserver","userIP":"192.168.1.5"}
{"level":"info","ts":1650309873.1760507,"caller":"http-server/http_handlers.go:178","msg":"failed to process ec2 query","service":"github.com/tinkerbell/hegel","pkg":"httpserver","userIP":"192.168.1.5","error":"invalid metadata item","errorVerbose":"invalid metadata item\ngithub.com/tinkerbell/hegel/http-server.processEC2Query\n\t/home/runner/work/hegel/hegel/http-server/http_handlers.go:257\ngithub.com/tinkerbell/hegel/http-server.ec2Handler\n\t/home/runner/work/hegel/hegel/http-server/http_handlers.go:176\nnet/http.HandlerFunc.ServeHTTP\n\t/opt/hostedtoolcache/go/1.17.5/x64/src/net/http/server.go:2047\nnet/http.(*ServeMux).ServeHTTP\n\t/opt/hostedtoolcache/go/1.17.5/x64/src/net/http/server.go:2425\ngithub.com/tinkerbell/hegel/http-server.TestEC2Endpoint.func1\n\t/home/runner/work/hegel/hegel/http-server/http_server_test.go:284\ntesting.tRunner\n\t/opt/hostedtoolcache/go/1.17.5/x64/src/testing/testing.go:1259\nruntime.goexit\n\t/opt/hostedtoolcache/go/1.17.5/x64/src/runtime/asm_amd64.s:1581"}
{"level":"info","ts":1650309873.1762288,"caller":"http-server/http_handlers.go:167","msg":"got ip from request","service":"github.com/tinkerbell/hegel","pkg":"httpserver","userIP":"192.168.1.5"}
{"level":"info","ts":1650309873.1767154,"caller":"http-server/http_handlers.go:167","msg":"got ip from request","service":"github.com/tinkerbell/hegel","pkg":"httpserver","userIP":"192.168.1.5"}
{"level":"info","ts":1650309873.1774023,"caller":"http-server/http_handlers.go:167","msg":"got ip from request","service":"github.com/tinkerbell/hegel","pkg":"httpserver","userIP":"192.168.1.5"}
{"level":"info","ts":1650309873.1781933,"caller":"http-server/http_handlers.go:167","msg":"got ip from request","service":"github.com/tinkerbell/hegel","pkg":"httpserver","userIP":"192.168.1.5"}
{"level":"info","ts":1650309873.1790524,"caller":"http-server/http_handlers.go:167","msg":"got ip from request","service":"github.com/tinkerbell/hegel","pkg":"httpserver","userIP":"192.168.1.5"}
{"level":"info","ts":1650309873.179788,"caller":"http-server/http_handlers.go:167","msg":"got ip from request","service":"github.com/tinkerbell/hegel","pkg":"httpserver","userIP":"192.168.1.5"}
{"level":"info","ts":1650309873.180473,"caller":"http-server/http_handlers.go:167","msg":"got ip from request","service":"github.com/tinkerbell/hegel","pkg":"httpserver","userIP":"192.168.1.5"}
{"level":"info","ts":1650309873.1811352,"caller":"http-server/http_handlers.go:167","msg":"got ip from request","service":"github.com/tinkerbell/hegel","pkg":"httpserver","userIP":"192.168.1.5"}
{"level":"info","ts":1650309873.181856,"caller":"http-server/http_handlers.go:167","msg":"got ip from request","service":"github.com/tinkerbell/hegel","pkg":"httpserver","userIP":"192.168.1.5"}
{"level":"info","ts":1650309873.1824799,"caller":"http-server/http_handlers.go:167","msg":"got ip from request","service":"github.com/tinkerbell/hegel","pkg":"httpserver","userIP":"192.168.1.5"}
{"level":"info","ts":1650309873.183025,"caller":"http-server/http_handlers.go:167","msg":"got ip from request","service":"github.com/tinkerbell/hegel","pkg":"httpserver","userIP":"192.168.1.5"}
{"level":"info","ts":1650309873.1836739,"caller":"http-server/http_handlers.go:167","msg":"got ip from request","service":"github.com/tinkerbell/hegel","pkg":"httpserver","userIP":"192.168.1.5"}
{"level":"info","ts":1650309873.1874921,"caller":"http-server/http_server.go:65","msg":"Starting http server","service":"github.com/tinkerbell/hegel","pkg":"httpserver","port":52000}
--- FAIL: TestServe (0.00s)
    --- FAIL: TestServe/serve_endpoint_success (0.00s)
        http_server_test.go:934: request failed: Get "http://localhost:52000/_packet/version": dial tcp [::1]:52000: connect: connection refused
chrisdoherty4 commented 2 years ago

This is basically a duplicate of #73.