Uploaded image for project: 'National Data Service'
  1. National Data Service
  2. NDS-1155

Inconsistent return values for QuickStart on apps with dependencies

    XMLWordPrintableJSON

Details

    • Bug
    • Resolution: Fixed
    • Normal
    • Workbench 1.1.0
    • None
    • Backend
    • None
    • NDS Sprint 38, NDS Sprint 39

    Description

      Steps to Reproduce

      1. Open your Develop Console to the "Networks" tab
      2. Using latest webui/apiserver images, navigate to https://www.local.ndslabs.org/dashboard/home/?quickstart=owncloud

      Expected Results

      • After logging in, you should see a request to /start?key=owncloud that has returned with a 422 (Unprocessable Entity)

      Actual Results

      1. After logging in, I receive a popup saying that the service was not found and my "Networks" tab shows that that request has return with an HTTP 500 (Internal Server Error)
      2. Running through the same test case, willis8 was receiving a 404 back from the same request
      3. In the apiserver logs, I see a stack trace:

        runtime error: invalid memory address or nil pointer dereference
        goroutine 803 [running]:
        runtime/debug.Stack(0xc4202333b8, 0x103e0c0, 0xc420018060)
        	/usr/local/go/src/runtime/debug/stack.go:24 +0x79
        github.com/ndslabs/apiserver/vendor/github.com/ant0ine/go-json-rest/rest.(*RecoverMiddleware).MiddlewareFunc.func1.1(0xc420344f50, 0x19c96c0, 0xc420437770)
        	/go/src/github.com/ndslabs/apiserver/vendor/github.com/ant0ine/go-json-rest/rest/recover.go:41 +0x6e
        panic(0x103e0c0, 0xc420018060)
        	/usr/local/go/src/runtime/panic.go:458 +0x243
        main.(*Server).QuickstartStack(0xc420094a50, 0x19c9680, 0xc420111c00, 0xc42042f5c0)
        	/go/src/github.com/ndslabs/apiserver/cmd/server/server.go:2086 +0x3b8
        main.(*Server).QuickstartStack-fm(0x19c9680, 0xc420111c00, 0xc42042f5c0)
        	/go/src/github.com/ndslabs/apiserver/cmd/server/server.go:316 +0x48
        github.com/ndslabs/apiserver/vendor/github.com/ant0ine/go-json-rest/rest.(*router).AppFunc.func1(0x19c9680, 0xc420111c00, 0xc42042f5c0)
        	/go/src/github.com/ndslabs/apiserver/vendor/github.com/ant0ine/go-json-rest/rest/router.go:56 +0xa4
        github.com/ndslabs/apiserver/vendor/github.com/StephanDollberg/go-json-rest-middleware-jwt.(*JWTMiddleware).middlewareImpl(0xc420466720, 0x19c9680, 0xc420111c00, 0xc42042f5c0, 0xc42042d820)
        	/go/src/github.com/ndslabs/apiserver/vendor/github.com/StephanDollberg/go-json-rest-middleware-jwt/auth_jwt.go:103 +0x256
        github.com/ndslabs/apiserver/vendor/github.com/StephanDollberg/go-json-rest-middleware-jwt.(*JWTMiddleware).MiddlewareFunc.func2(0x19c9680, 0xc420111c00, 0xc42042f5c0)
        	/go/src/github.com/ndslabs/apiserver/vendor/github.com/StephanDollberg/go-json-rest-middleware-jwt/auth_jwt.go:82 +0x51
        github.com/ndslabs/apiserver/vendor/github.com/ant0ine/go-json-rest/rest.(*IfMiddleware).MiddlewareFunc.func1(0x19c9680, 0xc420111c00, 0xc42042f5c0)
        	/go/src/github.com/ndslabs/apiserver/vendor/github.com/ant0ine/go-json-rest/rest/if.go:47 +0x78
        github.com/ndslabs/apiserver/vendor/github.com/ant0ine/go-json-rest/rest.(*CorsMiddleware).MiddlewareFunc.func1(0x19c9680, 0xc420111c00, 0xc42042f5c0)
        	/go/src/github.com/ndslabs/apiserver/vendor/github.com/ant0ine/go-json-rest/rest/cors.go:86 +0x681
        github.com/ndslabs/apiserver/pkg/middleware.(*NoCacheMiddleware).MiddlewareFunc.func1(0x19c9680, 0xc420111c00, 0xc42042f5c0)
        	/go/src/github.com/ndslabs/apiserver/pkg/middleware/no_cache.go:17 +0x135
        github.com/ndslabs/apiserver/vendor/github.com/ant0ine/go-json-rest/rest.(*ContentTypeCheckerMiddleware).MiddlewareFunc.func1(0x19c9680, 0xc420111c00, 0xc42042f5c0)
        	/go/src/github.com/ndslabs/apiserver/vendor/github.com/ant0ine/go-json-rest/rest/content_type_checker.go:38 +0x1fe
        github.com/ndslabs/apiserver/vendor/github.com/ant0ine/go-json-rest/rest.(*JsonIndentMiddleware).MiddlewareFunc.func1(0x19c96c0, 0xc420437770, 0xc42042f5c0)
        	/go/src/github.com/ndslabs/apiserver/vendor/github.com/ant0ine/go-json-rest/rest/json_indent.go:35 +0xd5
        github.com/ndslabs/apiserver/vendor/github.com/ant0ine/go-json-rest/rest.(*RecoverMiddleware).MiddlewareFunc.func1(0x19c96c0, 0xc420437770, 0xc42042f5c0)
        	/go/src/github.com/ndslabs/apiserver/vendor/github.com/ant0ine/go-json-rest/rest/recover.go:57 +0x8a
        github.com/ndslabs/apiserver/vendor/github.com/ant0ine/go-json-rest/rest.(*PoweredByMiddleware).MiddlewareFunc.func1(0x19c96c0, 0xc420437770, 0xc42042f5c0)
        	/go/src/github.com/ndslabs/apiserver/vendor/github.com/ant0ine/go-json-rest/rest/powered_by.go:26 +0xae
        github.com/ndslabs/apiserver/vendor/github.com/ant0ine/go-json-rest/rest.(*RecorderMiddleware).MiddlewareFunc.func1(0x19c9700, 0xc42042f620, 0xc42042f5c0)
        	/go/src/github.com/ndslabs/apiserver/vendor/github.com/ant0ine/go-json-rest/rest/recorder.go:22 +0xc4
        github.com/ndslabs/apiserver/vendor/github.com/ant0ine/go-json-rest/rest.(*TimerMiddleware).MiddlewareFunc.func1(0x19c9700, 0xc42042f620, 0xc42042f5c0)
        	/go/src/github.com/ndslabs/apiserver/vendor/github.com/ant0ine/go-json-rest/rest/timer.go:20 +0x11e
        github.com/ndslabs/apiserver/vendor/github.com/ant0ine/go-json-rest/rest.(*AccessLogApacheMiddleware).MiddlewareFunc.func1(0x19c9700, 0xc42042f620, 0xc42042f5c0)
        	/go/src/github.com/ndslabs/apiserver/vendor/github.com/ant0ine/go-json-rest/rest/access_log_apache.go:87 +0x54
        github.com/ndslabs/apiserver/vendor/github.com/ant0ine/go-json-rest/rest.adapterFunc.func1(0x19c8580, 0xc42046a750, 0xc4204461e0)
        	/go/src/github.com/ndslabs/apiserver/vendor/github.com/ant0ine/go-json-rest/rest/middleware.go:70 +0x10c
        net/http.HandlerFunc.ServeHTTP(0xc42042dca0, 0x19c8580, 0xc42046a750, 0xc4204461e0)
        	/usr/local/go/src/net/http/server.go:1726 +0x44
        net/http.(*ServeMux).ServeHTTP(0x1a07360, 0x19c8580, 0xc42046a750, 0xc4204461e0)
        	/usr/local/go/src/net/http/server.go:2022 +0x7f
        net/http.serverHandler.ServeHTTP(0xc420483a00, 0x19c8580, 0xc42046a750, 0xc4204461e0)
        	/usr/local/go/src/net/http/server.go:2202 +0x7d
        net/http.(*conn).serve(0xc420422200, 0x19c9400, 0xc420111b80)
        	/usr/local/go/src/net/http/server.go:1579 +0x4b7
        created by net/http.(*Server).Serve
        	/usr/local/go/src/net/http/server.go:2293 +0x44d
        18/Jan/2018:23:01:39 +0000 500 36793μs "GET /api/start?key=owncloud HTTP/1.1" lambert8 "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36"
        

      Potential Cause(s)

      1. Following this stack trace down, we see that the line that fails seems to be this one: https://github.com/nds-org/ndslabs/blob/c1b2ef046d1cab842983376b843197765f1e5f22/apiserver/cmd/server/server.go#L2086
        • Is it possible that this integer "422" is unexpected, and that the method instead expects "http.StatusUnprocessableEntity"? (see https://golang.org/pkg/net/http/ - maybe these are simply aliases for the constant values)

      This ticket is complete

      Gliffy Diagrams

        Attachments

          Issue Links

            Activity

              People

                willis8 Craig Willis
                lambert8 Sara Lambert
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Tasks