ThalesGroup/helm-spray

Helm spay fails while patching existing installation

dfontain opened this issue · 6 comments

From Time to time, when I execute helm spray in an existing platform it starts to fail, to a point where I need to do an helm delete --purge and install from scratch.

The problem is that spay doesn't get the correct value of the deployment, and show this error:

[spray] > Error: status returned by helm differs from "DEPLOYED". Cannot continue spray processing.

After doing an helm list -a I get this result:

NAME REVISION UPDATED STATUS CHART APP VERSION NAMESPACE api-gateway 4 Mon Apr 29 17:45:39 2019 DEPLOYED ota-cloud-7.2.0+build.SNAPSHOT 7.2.0-beta.5+build.525 default cassandra 1 Thu Apr 25 14:14:24 2019 DEPLOYED cassandra-1.0.0+build.20 3.11.2 default crypto-keys 7 Mon Apr 29 17:45:37 2019 DEPLOYED ota-cloud-7.2.0+build.SNAPSHOT 7.2.0-beta.5+build.525 default example 1 Tue Apr 23 14:27:04 2019 DEPLOYED mychart-0.1.0 1.0 default http-router 8 Mon Apr 29 17:45:34 2019 DEPLOYED ota-cloud-7.2.0+build.SNAPSHOT 7.2.0-beta.5+build.525 default id-provider 3 Mon Apr 29 17:46:20 2019 DEPLOYED ota-cloud-7.2.0+build.SNAPSHOT 7.2.0-beta.5+build.525 default mysql 1 Thu Apr 25 15:22:10 2019 DEPLOYED mysql-1.0.0+build.20 5.7 default ota-activation 5 Mon Apr 29 17:46:23 2019 DEPLOYED ota-cloud-7.2.0+build.SNAPSHOT 7.2.0-beta.5+build.525 default ota-applications 5 Mon Apr 29 17:46:21 2019 DEPLOYED ota-cloud-7.2.0+build.SNAPSHOT 7.2.0-beta.5+build.525 default ota-cards 7 Mon Apr 29 17:45:35 2019 DEPLOYED ota-cloud-7.2.0+build.SNAPSHOT 7.2.0-beta.5+build.525 default ota-certificates 1 Fri Apr 19 16:29:10 2019 DEPLOYED ota-certificates-1.2.0-beta.5+build.115 1.2.0-beta.5+build.115 default ota-dashboard 7 Mon Apr 29 17:45:36 2019 DEPLOYED ota-cloud-7.2.0+build.SNAPSHOT 7.2.0-beta.5+build.525 default ota-devices 5 Mon Apr 29 17:46:17 2019 DEPLOYED ota-cloud-7.2.0+build.SNAPSHOT 7.2.0-beta.5+build.525 default ota-endpoints 8 Mon Apr 29 17:45:07 2019 DEPLOYED ota-cloud-7.2.0+build.SNAPSHOT 7.2.0-beta.5+build.525 default ota-keys 7 Mon Apr 29 17:45:33 2019 DEPLOYED ota-cloud-7.2.0+build.SNAPSHOT 7.2.0-beta.5+build.525 default ota-licenses 1 Fri Apr 19 16:29:25 2019 DEPLOYED ota-licenses-1.1.0-beta.1+build.93 default ota-logins 1 Fri Apr 19 16:28:49 2019 DEPLOYED ota-logins-1.2.0-beta.1+build.81 default ota-pull 5 Mon Apr 29 17:46:26 2019 DEPLOYED ota-cloud-7.2.0+build.SNAPSHOT 7.2.0-beta.5+build.525 default ota-roaming 5 Mon Apr 29 17:46:19 2019 DEPLOYED ota-cloud-7.2.0+build.SNAPSHOT 7.2.0-beta.5+build.525 default ota-templates 5 Mon Apr 29 17:46:25 2019 DEPLOYED ota-cloud-7.2.0+build.SNAPSHOT 7.2.0-beta.5+build.525 default psk-provider 7 Mon Apr 29 17:46:18 2019 DEPLOYED ota-cloud-7.2.0+build.SNAPSHOT 7.2.0-beta.5+build.525 default sms-gateway 7 Mon Apr 29 17:45:40 2019 DEPLOYED ota-cloud-7.2.0+build.SNAPSHOT 7.2.0-beta.5+build.525 default sms-router 8 Mon Apr 29 17:45:04 2019 DEPLOYED ota-cloud-7.2.0+build.SNAPSHOT 7.2.0-beta.5+build.525 default waf-cards 8 Mon Apr 29 17:45:09 2019 DEPLOYED ota-cloud-7.2.0+build.SNAPSHOT 7.2.0-beta.5+build.525 default waf-sor 8 Mon Apr 29 17:45:08 2019 DEPLOYED ota-cloud-7.2.0+build.SNAPSHOT 7.2.0-beta.5+build.525 default waf-webservice 8 Mon Apr 29 17:45:05 2019 DEPLOYED ota-cloud-7.2.0+build.SNAPSHOT 7.2.0-beta.5+build.525 default waf-webui 8 Mon Apr 29 17:45:06 2019 DEPLOYED ota-cloud-7.2.0+build.SNAPSHOT 7.2.0-beta.5+build.525 default
And all my deployments are in a DEPLOYED state, this error doesn't appear every time, but after doing helm spray for a while.

Hi @dfontain ,
Which version of Spray are you using ?
Can you try to execute it with the --verbose option ?

I'm using version 3.3.0,
I executed with the --verbose option and it is successfully completed, maybe is a problem with the --debug option??
If I use both options still fails.

To resume:
--verbose ==> OK
--verbose --debug ==> KO
--debug ==> KO

Spray is getting the status of execution of the internally called Helm commands using a "manual" parsing of the output (stdout) of Helm.
When you see the message "[spray] > Error: status returned by helm differs from "DEPLOYED". Cannot continue spray processing.", it is most likely that the parsing has failed due to the debug mode that prints many additional information... thus confusing the "manual" parsing done by Spray.

At least you can use a workaround (i.e. do not use the --debug mode) while I will try to reproduce the issue and correct it.

@dfontain
I don't succeed in reproducing the error using my own charts...
Do you have a simple example that easily reproduces it ?

Reproduced today with @brunopenha

Closed due to long-time inactivity