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

Helm-Broker does not handle chart install errors in a proper way #2197

Closed
piotrmiskiewicz opened this issue Jan 9, 2019 · 2 comments
Closed
Assignees
Labels
area/service-management Issues or PRs related to service management duplicate This issue or pull request already exists kind/bug Categorizes issue or PR as related to a bug.

Comments

@piotrmiskiewicz
Copy link
Member

piotrmiskiewicz commented Jan 9, 2019

Description

The helm install operation fail is not handle by the Helm-Broker in a proper way.

Expected result

When installing helm chart fails, the user sees a proper error in Service Catalog UI

Actual result

When user is trying to provision instance where the chart install is failing, the helm-broker creates the following logs:

{"level":"info","log":{"message":"started handling request","method":"PUT","remote":"10.244.3.20:36828","request":"/v2/service_instances/1f780841-13e0-11e9-a896-06aeb525fc07?accepts_incomplete=true","time":"2019-01-09T07:28:13.817Z"}}
{"level":"info","log":{"action":"provision","message":"action response","resp:async":true,"resp:operation:id":"01D0RR5YFVBEAQ2QY14TPBVQFY","service":"server","time":"2019-01-09T07:28:13.835Z"}}
{"level":"info","log":{"message":"completed handling request","method":"PUT","remote":"10.244.3.20:36828","request":"/v2/service_instances/1f780841-13e0-11e9-a896-06aeb525fc07?accepts_incomplete=true","size":63,"status":202,"time":"2019-01-09T07:28:13.836Z","took":18760330}}
{"level":"info","log":{"message":"Merging values for operation [01D0RR5YFVBEAQ2QY14TPBVQFY], releaseName [hb-testing-full-1f780841-13e0-11e9-a896-06aeb525fc07], namespace [qa], bundlePlan [full]. Plan values are: [map[planName:Full]], overrides: [map[additionalData:123 planName:123]], merged: [map[planName:123 additionalData:123]] ","service":"provisioner","time":"2019-01-09T07:28:13.836Z"}}
{"level":"info","log":{"message":"Installing chart with release name [hb-testing-full-1f780841-13e0-11e9-a896-06aeb525fc07] in namespace [qa]","service":"helm_client","time":"2019-01-09T07:28:13.836Z"}}
{"level":"info","log":{"message":"started handling request","method":"GET","remote":"10.244.3.20:36828","request":"/v2/service_instances/1f780841-13e0-11e9-a896-06aeb525fc07/last_operation?operation=01D0RR5YFVBEAQ2QY14TPBVQFY\u0026plan_id=a6078799-70a1-4674-af91-aba44dd6a56\u0026service_id=faebbe18-0a84-11e9-ab14-d663bd873d94","time":"2019-01-09T07:28:14.909Z"}}
{"level":"info","log":{"action":"getLastOperation","instance:id":"1f780841-13e0-11e9-a896-06aeb525fc07","message":"action response","operation:id":"01D0RR5YFVBEAQ2QY14TPBVQFY","resp:operation:desc":"provisioning failed on error: while installing helm release: while installing release from chart with name [hb-testing-full-1f780841-13e0-11e9-a896-06aeb525fc07] in namespace [qa]: rpc error: code = Unknown desc = release hb-testing-full-1f780841-13e0-11e9-a896-06aeb525fc07 failed: ConfigMap in version \"v1\" cannot be handled as a ConfigMap: v1.ConfigMap.Data: ReadString: expects \" or n, but found 1, error found in #10 byte of ...|lanName\":123},\"kind\"|..., bigger context ...|\":\"v1\",\"data\":{\"additionalData\":\"123\",\"planName\":123},\"kind\":\"ConfigMap\",\"metadata\":{\"name\":\"hb-test|...","resp:operation:state":"failed","service":"server","time":"2019-01-09T07:28:14.91Z"}}
{"level":"info","log":{"message":"completed handling request","method":"GET","remote":"10.244.3.20:36828","request":"/v2/service_instances/1f780841-13e0-11e9-a896-06aeb525fc07/last_operation?operation=01D0RR5YFVBEAQ2QY14TPBVQFY\u0026plan_id=a6078799-70a1-4674-af91-aba44dd6a56\u0026service_id=faebbe18-0a84-11e9-ab14-d663bd873d94","size":644,"status":200,"time":"2019-01-09T07:28:14.91Z","took":745805}}
{"level":"info","log":{"message":"started handling request","method":"DELETE","remote":"10.244.3.20:36828","request":"/v2/service_instances/1f780841-13e0-11e9-a896-06aeb525fc07?accepts_incomplete=true\u0026plan_id=a6078799-70a1-4674-af91-aba44dd6a56\u0026service_id=faebbe18-0a84-11e9-ab14-d663bd873d94","time":"2019-01-09T07:28:15.31Z"}}
{"level":"info","log":{"action":"deprovision","message":"action response","resp:async":true,"resp:operation:id":"01D0RR5ZYF3RHPW27YXMVB66K5","service":"server","time":"2019-01-09T07:28:15.313Z"}}
{"level":"info","log":{"message":"completed handling request","method":"DELETE","remote":"10.244.3.20:36828","request":"/v2/service_instances/1f780841-13e0-11e9-a896-06aeb525fc07?accepts_incomplete=true\u0026plan_id=a6078799-70a1-4674-af91-aba44dd6a56\u0026service_id=faebbe18-0a84-11e9-ab14-d663bd873d94","size":63,"status":202,"time":"2019-01-09T07:28:15.314Z","took":3516024}}
{"level":"info","log":{"message":"Deleting chart with release name [hb-testing-full-1f780841-13e0-11e9-a896-06aeb525fc07]","purge":true,"service":"helm_client","time":"2019-01-09T07:28:15.313Z"}}
{"level":"info","log":{"message":"started handling request","method":"GET","remote":"10.244.3.20:36828","request":"/v2/service_instances/1f780841-13e0-11e9-a896-06aeb525fc07/last_operation?operation=01D0RR5ZYF3RHPW27YXMVB66K5\u0026plan_id=a6078799-70a1-4674-af91-aba44dd6a56\u0026service_id=faebbe18-0a84-11e9-ab14-d663bd873d94","time":"2019-01-09T07:28:17.018Z"}}
{"level":"info","log":{"action":"getLastOperation","instance:id":"1f780841-13e0-11e9-a896-06aeb525fc07","message":"action response","operation:id":"01D0RR5ZYF3RHPW27YXMVB66K5","resp:operation:desc":"deprovisioning succeeded","resp:operation:state":"succeeded","service":"server","time":"2019-01-09T07:28:17.019Z"}}
{"level":"info","log":{"message":"completed handling request","method":"GET","remote":"10.244.3.20:36828","request":"/v2/service_instances/1f780841-13e0-11e9-a896-06aeb525fc07/last_operation?operation=01D0RR5ZYF3RHPW27YXMVB66K5\u0026plan_id=a6078799-70a1-4674-af91-aba44dd6a56\u0026service_id=faebbe18-0a84-11e9-ab14-d663bd873d94","size":62,"status":200,"time":"2019-01-09T07:28:17.02Z","took":1413209}}
{"level":"info","log":{"message":"started handling request","method":"PUT","remote":"10.244.3.20:36828","request":"/v2/service_instances/1f780841-13e0-11e9-a896-06aeb525fc07?accepts_incomplete=true","time":"2019-01-09T07:28:18.716Z"}}
{"level":"warning","log":{"message":"Server responds with error: [HTTP 400]: [while inserting instance to storage: element already exists] []","service":"server","time":"2019-01-09T07:28:18.724Z"}}
{"level":"info","log":{"message":"completed handling request","method":"PUT","remote":"10.244.3.20:36828","request":"/v2/service_instances/1f780841-13e0-11e9-a896-06aeb525fc07?accepts_incomplete=true","size":88,"status":400,"time":"2019-01-09T07:28:18.725Z","took":8991762}}

In the console UI user sees:

Status: FAILED
Error provisioning ServiceInstance of ClusterServiceClass (K8S: "faebbe18-0a84-11e9-ab14-d663bd873d94" ExternalName: "testing") at ClusterServiceBroker "core-helm-broker": Status: 400; ErrorMessage: while inserting instance to storage: element already exists; Description: ; ResponseError: <nil>

Steps to reproduce

Install a chart with a bug (chart which cannot be installed):

  1. Configure Halm-Broker with the https://github.com/piotrmiskiewicz/bundles/releases/download/latest/index-testing.yamlindex file.

  2. Create an instance of testing class with the full plan. Fill parameters with numeric value. The chart contains a bug and does not allow for a numeric value.

@piotrmiskiewicz piotrmiskiewicz added this to the Backlog_Gopher milestone Jan 9, 2019
@piotrmiskiewicz piotrmiskiewicz added area/service-management Issues or PRs related to service management kind/bug Categorizes issue or PR as related to a bug. labels Jan 9, 2019
@piotrmiskiewicz piotrmiskiewicz changed the title Helm-Broker does not handle chart install errors Helm-Broker does not handle chart install errors in a proper way Jan 9, 2019
@PK85 PK85 modified the milestones: Backlog_Gopher, Sprint_Gopher_10 Jan 14, 2019
@jasiu001
Copy link

jasiu001 commented Feb 5, 2019

PR #2573 removes from Helm Broker situation when provisioned instance already exist in storage.
It means the right error message will not be covered by information about existing instance.

It does not resolve problems what SC will try provision broken bundle again and again but this is connected with bad async failure handling (more about issue and info when eventually it could be fix is here)

@adamwalach adamwalach reopened this Feb 5, 2019
@adamwalach adamwalach self-assigned this Feb 5, 2019
@PK85 PK85 added the duplicate This issue or pull request already exists label Feb 5, 2019
@PK85
Copy link
Contributor

PK85 commented Feb 5, 2019

Already solved by: #2573

@PK85 PK85 closed this as completed Feb 5, 2019
grischperl pushed a commit to grischperl/kyma that referenced this issue Nov 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/service-management Issues or PRs related to service management duplicate This issue or pull request already exists kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

4 participants