openshift/ansible-service-broker

Broker reports : Unable to load secret 'afe58628-6998-444a-9ce4-584bec842e22' from namespace 'automation-broker'

cmoulliard opened this issue · 3 comments

Issue

When we use cloudfoundry client cf bind-service spring-music mypostgresql to do a service binding, then that fails and the broker reports the following error

[2020-04-03T09:15:42.759Z] [INFO] - Request: "PUT /ansible-service-broker/v2/service_instances/afe58628-6998-444a-9ce4-584bec842e22/service_bindings/a677fe9b-8982-47ec-88bf-3160b1b566b8?accepts_incomplete=true HTTP/1.1\r\nHost: broker.automation-broker.svc:1338\r\nAccept: application/json\r\nAuthorization: Basic YWRtaW46YWRtaW4=\r\nContent-Length: 535\r\nContent-Type: application/json\r\nDate: Fri, 03 Apr 2020 09:15:42 GMT\r\nUser-Agent: HTTPClient/1.0 (2.8.3, ruby 2.5.5 (2019-03-15))\r\nX-Api-Info-Location: api.95.217.161.67.nip.io/v2/info\r\nX-Broker-Api-Originating-Identity: cloudfoundry ewogICJ1c2VyX2lkIjogIjE2MTA5MWYzLWU4MDEtNDNkYi1hNDkyLWVkYWM2ZmFhNDY1MSIKfQ==\r\nX-Broker-Api-Request-Identity: 9572d43d-4039-4990-a254-3f9c9b41e4c7\r\nX-Broker-Api-Version: 2.15\r\nX-Vcap-Request-Id: a045008d-c9eb-4810-acb4-db706b8dff36::f9c6b1b2-2411-4fd6-b632-d159a32822d8\r\n\r\n{\n  \"service_id\": \"1dda1477cace09730bd8ed7a6505607e\",\n  \"plan_id\": \"7f4a5e35e4af2beb70076e72fab0b7ff\",\n  \"app_guid\": \"5b035c1c-065a-4150-9aff-6607726fa003\",\n  \"bind_resource\": {\n    \"app_guid\": \"5b035c1c-065a-4150-9aff-6607726fa003\",\n    \"space_guid\": \"541112a3-030b-44fd-bb6e-b7fd6c865e6e\"\n  },\n  \"context\": {\n    \"platform\": \"cloudfoundry\",\n    \"organization_guid\": \"ad599517-2149-4fb1-bca4-606448da4e4c\",\n    \"space_guid\": \"541112a3-030b-44fd-bb6e-b7fd6c865e6e\",\n    \"organization_name\": \"redhat.com\",\n    \"space_name\": \"demo\"\n  }\n}"
[2020-04-03T09:15:42.76Z] [DEBUG] - get service instance: afe58628-6998-444a-9ce4-584bec842e22
[2020-04-03T09:15:42.767Z] [DEBUG] - get spec: 1dda1477cace09730bd8ed7a6505607e
[2020-04-03T09:15:42.771Z] [DEBUG] - Auto Escalate has been set to true, we are escalating permissions
[2020-04-03T09:15:42.771Z] [DEBUG] - Injecting PlanID as parameter: { _apb_plan_id: dev }
[2020-04-03T09:15:42.771Z] [DEBUG] - Injecting ServiceClassID as parameter: { _apb_service_class_id: 1dda1477cace09730bd8ed7a6505607e }
[2020-04-03T09:15:42.771Z] [DEBUG] - Injecting ServiceInstanceID as parameter: { _apb_service_instance_id: afe58628-6998-444a-9ce4-584bec842e22 }
[2020-04-03T09:15:42.771Z] [DEBUG] - Injecting lastRequestingUserKey as parameter: { _apb_last_requesting_user:  }
[2020-04-03T09:15:42.771Z] [DEBUG] - Injecting ServiceBindingID as parameter: { _apb_service_binding_id: a677fe9b-8982-47ec-88bf-3160b1b566b8 }
time="2020-04-03T09:15:42Z" level=error msg="Unable to load secret 'afe58628-6998-444a-9ce4-584bec842e22' from namespace 'automation-broker'"
time="2020-04-03T09:15:42Z" level=error msg="unable to get secret data for afe58628-6998-444a-9ce4-584bec842e22, in namespace: automation-broker"
[2020-04-03T09:15:42.774Z] [DEBUG] - get binding instance: a677fe9b-8982-47ec-88bf-3160b1b566b8
[2020-04-03T09:15:42.777Z] [DEBUG] - set binding instance: a677fe9b-8982-47ec-88bf-3160b1b566b8
[2020-04-03T09:15:42.784Z] [WARNING] - Broker configured to *NOT* launch and run APB bind
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x11d6398]

goroutine 2281 [running]:
github.com/automationbroker/bundle-lib/apb.SetExtractedCredentials(0xc420c72060, 0x24, 0x0, 0xc420c72060, 0x24)
	/builddir/build/BUILD/ansible-service-broker-1.2.21/src/github.com/automationbroker/bundle-lib/apb/ext_creds.go:220 +0x38
github.com/openshift/ansible-service-broker/pkg/broker.AnsibleBroker.Bind(0x247ada0, 0xc420210380, 0xc4203cc000, 0x1, 0x1, 0xc420498e60, 0x101010001, 0xc4204510e0, 0x18, 0xc420451140, ...)
	/builddir/build/BUILD/ansible-service-broker-1.2.21/src/github.com/openshift/ansible-service-broker/pkg/broker/broker.go:1022 +0x11c4
github.com/openshift/ansible-service-broker/pkg/broker.(*AnsibleBroker).Bind(0xc42008fc20, 0xc42001b3f0, 0x10, 0x10, 0xc420d2c4d0, 0xc42080d180, 0xc420146550, 0xc4202c8210, 0x0, 0x0, ...)
	<autogenerated>:1 +0x120
github.com/openshift/ansible-service-broker/pkg/handler.handler.bind(0x0, 0x0, 0x0, 0x0, 0xc4207560a0, 0x1, 0x1, 0xc4206492c0, 0x0, 0x24783c0, ...)
	/builddir/build/BUILD/ansible-service-broker-1.2.21/src/github.com/openshift/ansible-service-broker/pkg/handler/handler.go:572 +0x7c7
github.com/openshift/ansible-service-broker/pkg/handler.(handler).(github.com/openshift/ansible-service-broker/pkg/handler.bind)-fm(0x7fbca3120b98, 0xc4208473a0, 0xc420381b00, 0xc4205b3110)
	/builddir/build/BUILD/ansible-service-broker-1.2.21/src/github.com/openshift/ansible-service-broker/pkg/handler/handler.go:182 +0x9b
github.com/openshift/ansible-service-broker/pkg/handler.createVarHandler.func1(0x7fbca3120b98, 0xc4208473a0, 0xc420381b00)
	/builddir/build/BUILD/ansible-service-broker-1.2.21/src/github.com/openshift/ansible-service-broker/pkg/handler/handler.go:153 +0x65
net/http.HandlerFunc.ServeHTTP(0xc42083ec10, 0x7fbca3120b98, 0xc4208473a0, 0xc420381b00)
	/usr/lib/golang/src/net/http/server.go:1918 +0x44
github.com/gorilla/mux.(*Router).ServeHTTP(0xc4207bae28, 0x7fbca3120b98, 0xc4208473a0, 0xc420381b00)
	/builddir/build/BUILD/ansible-service-broker-1.2.21/src/github.com/gorilla/mux/mux.go:114 +0xdc
github.com/openshift/ansible-service-broker/pkg/handler.handler.ServeHTTP(0x0, 0x0, 0x0, 0x0, 0xc4207560a0, 0x1, 0x1, 0xc4206492c0, 0x0, 0x24783c0, ...)
	/builddir/build/BUILD/ansible-service-broker-1.2.21/src/github.com/openshift/ansible-service-broker/pkg/handler/handler.go:207 +0x52
github.com/openshift/ansible-service-broker/pkg/handler.(*handler).ServeHTTP(0xc420641c00, 0x7fbca3120b98, 0xc4208473a0, 0xc420381900)
	<autogenerated>:1 +0x9e
github.com/openshift/ansible-service-broker/pkg/handler.authHandler.func1(0x7fbca3120b98, 0xc4208473a0, 0xc420381900)
	/builddir/build/BUILD/ansible-service-broker-1.2.21/src/github.com/openshift/ansible-service-broker/pkg/handler/handler.go:93 +0x240
net/http.HandlerFunc.ServeHTTP(0xc420642840, 0x7fbca3120b98, 0xc4208473a0, 0xc420381900)
	/usr/lib/golang/src/net/http/server.go:1918 +0x44
github.com/openshift/ansible-service-broker/pkg/handler.userInfoHandler.func1(0x7fbca3120b98, 0xc4208473a0, 0xc420381800)
	/builddir/build/BUILD/ansible-service-broker-1.2.21/src/github.com/openshift/ansible-service-broker/pkg/handler/handler.go:139 +0x67c
net/http.HandlerFunc.ServeHTTP(0xc42084f6e0, 0x7fbca3120b98, 0xc4208473a0, 0xc420381800)
	/usr/lib/golang/src/net/http/server.go:1918 +0x44
github.com/gorilla/handlers.loggingHandler.ServeHTTP(0x2451a00, 0xc42000e018, 0x2453cc0, 0xc42084f6e0, 0x24652c0, 0xc420884aa0, 0xc420381800)
	/builddir/build/BUILD/ansible-service-broker-1.2.21/src/github.com/gorilla/handlers/handlers.go:69 +0x123
github.com/gorilla/handlers.(*loggingHandler).ServeHTTP(0xc42084f700, 0x24652c0, 0xc420884aa0, 0xc420381800)
	<autogenerated>:1 +0x75
net/http.(Handler).ServeHTTP-fm(0x24652c0, 0xc420884aa0, 0xc420381800)
	/builddir/build/BUILD/ansible-service-broker-1.2.21/src/k8s.io/apiserver/pkg/server/routes/metrics.go:44 +0x4d
github.com/prometheus/client_golang/prometheus.InstrumentHandlerFuncWithOpts.func1(0x7fbca320eb90, 0xc420146270, 0xc420381800)
	/builddir/build/BUILD/ansible-service-broker-1.2.21/src/github.com/prometheus/client_golang/prometheus/http.go:287 +0x26f
net/http.HandlerFunc.ServeHTTP(0xc4207db810, 0x7fbca320eb90, 0xc420146270, 0xc420381800)
	/usr/lib/golang/src/net/http/server.go:1918 +0x44
k8s.io/apiserver/pkg/server/mux.(*pathHandler).ServeHTTP(0xc420307700, 0x7fbca320eb90, 0xc420146270, 0xc420381800)
	/builddir/build/BUILD/ansible-service-broker-1.2.21/src/k8s.io/apiserver/pkg/server/mux/pathrecorder.go:248 +0x26d
k8s.io/apiserver/pkg/server/mux.(*PathRecorderMux).ServeHTTP(0xc42043eee0, 0x7fbca320eb90, 0xc420146270, 0xc420381800)
	/builddir/build/BUILD/ansible-service-broker-1.2.21/src/k8s.io/apiserver/pkg/server/mux/pathrecorder.go:234 +0xa1
k8s.io/apiserver/pkg/server.director.ServeHTTP(0x19ca65f, 0x16, 0xc420164a20, 0xc42043eee0, 0x7fbca320eb90, 0xc420146270, 0xc420381800)
	/builddir/build/BUILD/ansible-service-broker-1.2.21/src/k8s.io/apiserver/pkg/server/handler.go:161 +0x6ad
k8s.io/apiserver/pkg/server.(*director).ServeHTTP(0xc420847de0, 0x7fbca320eb90, 0xc420146270, 0xc420381800)
	<autogenerated>:1 +0x75
k8s.io/apiserver/pkg/server/filters.WithMaxInFlightLimit.func1(0x7fbca320eb90, 0xc420146270, 0xc420381800)
	/builddir/build/BUILD/ansible-service-broker-1.2.21/src/k8s.io/apiserver/pkg/server/filters/maxinflight.go:95 +0x318
net/http.HandlerFunc.ServeHTTP(0xc4203c5c00, 0x7fbca320eb90, 0xc420146270, 0xc420381800)
	/usr/lib/golang/src/net/http/server.go:1918 +0x44
k8s.io/apiserver/pkg/endpoints/filters.WithImpersonation.func1(0x7fbca320eb90, 0xc420146270, 0xc420381800)
	/builddir/build/BUILD/ansible-service-broker-1.2.21/src/k8s.io/apiserver/pkg/endpoints/filters/impersonation.go:49 +0x203a
net/http.HandlerFunc.ServeHTTP(0xc4207dac80, 0x7fbca320eb90, 0xc420146270, 0xc420381800)
	/usr/lib/golang/src/net/http/server.go:1918 +0x44
k8s.io/apiserver/pkg/server/filters.(*timeoutHandler).ServeHTTP.func1(0xc420847e60, 0x2471540, 0xc420146270, 0xc420381800, 0xc42020b7a0)
	/builddir/build/BUILD/ansible-service-broker-1.2.21/src/k8s.io/apiserver/pkg/server/filters/timeout.go:93 +0x8d
created by k8s.io/apiserver/pkg/server/filters.(*timeoutHandler).ServeHTTP
	/builddir/build/BUILD/ansible-service-broker-1.2.21/src/k8s.io/apiserver/pkg/server/filters/timeout.go:92 +0x1ab

Question

Is the problem related to this log's error ?

time="2020-04-03T09:15:42Z" level=error msg="Unable to load secret 'afe58628-6998-444a-9ce4-584bec842e22' from namespace 'automation-broker'"

/close please reopen if this is still an issue.

/close

@jmrodri: Closing this issue.

In response to this:

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.