Error when using package in runbook template

Greetings.

We are trying to use the Helm Update template for a runbook to install the AWS Load Balancer Controller in our External Feed in JFrog. The original repository where the Chart is located is the following: “AWS EKS Helm Repository | eks-charts” and the image is “eks/aws-load-balancer-controller”. The image is downloaded correctly but after that, it appears this error at the execution:

SharpCompress.Compressors.Deflate.ZlibException: Bad GZIP header. 
July 13th 2022 12:57:22Error
   at SharpCompress.Common.GZip.GZipFilePart.ReadAndValidateGzipHeader(Stream stream) 
July 13th 2022 12:57:22Error
   at SharpCompress.Common.GZip.GZipFilePart..ctor(Stream stream, ArchiveEncoding archiveEncoding) 
July 13th 2022 12:57:22Error
   at SharpCompress.Common.GZip.GZipEntry.GetEntries(Stream stream, OptionsBase options)+MoveNext() 
July 13th 2022 12:57:22Error
   at SharpCompress.Readers.AbstractReader`2.LoadStreamForReading(Stream stream) 
July 13th 2022 12:57:22Error
   at SharpCompress.Readers.AbstractReader`2.MoveToNextEntry() 
July 13th 2022 12:57:22Error
   at Calamari.Common.Features.Packages.TarGzipPackageExtractor.GetCompressionStream(Stream stream) in C:\BuildAgent\work\e0cefbed4ad11812\source\Calamari.Common\Features\Packages\TarGzipPackageExtractor.cs:line 19 
July 13th 2022 12:57:22Error
   at Calamari.Common.Features.Packages.TarPackageExtractor.Extract(String packageFile, String directory) in C:\BuildAgent\work\e0cefbed4ad11812\source\Calamari.Common\Features\Packages\TarPackageExtractor.cs:line 31 
July 13th 2022 12:57:22Error
   at Calamari.Common.Features.Packages.CombinedPackageExtractor.Extract(String packageFile, String directory) in C:\BuildAgent\work\e0cefbed4ad11812\source\Calamari.Common\Features\Packages\CombinedPackageExtractor.cs:line 39 
July 13th 2022 12:57:22Error
   at Calamari.Common.Features.Packages.ExtractPackage.Extract(PathToPackage pathToPackage, String targetPath, String extractedToPathOutputVariableName, IPackageExtractor customPackageExtractor) in C:\BuildAgent\work\e0cefbed4ad11812\source\Calamari.Common\Features\Packages\ExtractPackage.cs:line 66 
July 13th 2022 12:57:22Error
   at Calamari.Common.Features.Packages.ExtractPackage.ExtractToStagingDirectory(PathToPackage pathToPackage, IPackageExtractor customPackageExtractor) in C:\BuildAgent\work\e0cefbed4ad11812\source\Calamari.Common\Features\Packages\ExtractPackage.cs:line 31 
July 13th 2022 12:57:22Error
   at Calamari.Kubernetes.Commands.HelmUpgradeCommand.<Execute>b__10_0(RunningDeployment d) in C:\BuildAgent\work\e0cefbed4ad11812\source\Calamari\Kubernetes\Commands\HelmUpgradeCommand.cs:line 71 
July 13th 2022 12:57:22Error
   at Calamari.Commands.DelegateInstallConvention.Install(RunningDeployment deployment) in C:\BuildAgent\work\e0cefbed4ad11812\source\Calamari.Shared\Commands\DelegateInstallConvention.cs:line 18 
July 13th 2022 12:57:22Error
   at Calamari.Deployment.ConventionProcessor.RunInstallConventions() in C:\BuildAgent\work\e0cefbed4ad11812\source\Calamari.Shared\Deployment\ConventionProcessor.cs:line 75 
July 13th 2022 12:57:22Error
   at Calamari.Deployment.ConventionProcessor.RunConventions() in C:\BuildAgent\work\e0cefbed4ad11812\source\Calamari.Shared\Deployment\ConventionProcessor.cs:line 32 
July 13th 2022 12:57:22Error
Running rollback conventions... 
July 13th 2022 12:57:22Error
Bad GZIP header. 
July 13th 2022 12:57:22Error
SharpCompress.Compressors.Deflate.ZlibException 
July 13th 2022 12:57:22Error
   at SharpCompress.Common.GZip.GZipFilePart.ReadAndValidateGzipHeader(Stream stream) 
July 13th 2022 12:57:22Error
   at SharpCompress.Common.GZip.GZipFilePart..ctor(Stream stream, ArchiveEncoding archiveEncoding) 
July 13th 2022 12:57:22Error
   at SharpCompress.Common.GZip.GZipEntry.GetEntries(Stream stream, OptionsBase options)+MoveNext() 
July 13th 2022 12:57:22Error
   at SharpCompress.Readers.AbstractReader`2.LoadStreamForReading(Stream stream) 
July 13th 2022 12:57:22Error
   at SharpCompress.Readers.AbstractReader`2.MoveToNextEntry() 
July 13th 2022 12:57:22Error
   at Calamari.Common.Features.Packages.TarGzipPackageExtractor.GetCompressionStream(Stream stream) in C:\BuildAgent\work\e0cefbed4ad11812\source\Calamari.Common\Features\Packages\TarGzipPackageExtractor.cs:line 19 
July 13th 2022 12:57:22Error
   at Calamari.Common.Features.Packages.TarPackageExtractor.Extract(String packageFile, String directory) in C:\BuildAgent\work\e0cefbed4ad11812\source\Calamari.Common\Features\Packages\TarPackageExtractor.cs:line 31 
July 13th 2022 12:57:22Error
   at Calamari.Common.Features.Packages.CombinedPackageExtractor.Extract(String packageFile, String directory) in C:\BuildAgent\work\e0cefbed4ad11812\source\Calamari.Common\Features\Packages\CombinedPackageExtractor.cs:line 39 
July 13th 2022 12:57:22Error
   at Calamari.Common.Features.Packages.ExtractPackage.Extract(PathToPackage pathToPackage, String targetPath, String extractedToPathOutputVariableName, IPackageExtractor customPackageExtractor) in C:\BuildAgent\work\e0cefbed4ad11812\source\Calamari.Common\Features\Packages\ExtractPackage.cs:line 66 
July 13th 2022 12:57:22Error
   at Calamari.Common.Features.Packages.ExtractPackage.ExtractToStagingDirectory(PathToPackage pathToPackage, IPackageExtractor customPackageExtractor) in C:\BuildAgent\work\e0cefbed4ad11812\source\Calamari.Common\Features\Packages\ExtractPackage.cs:line 31 
July 13th 2022 12:57:22Error
   at Calamari.Kubernetes.Commands.HelmUpgradeCommand.<Execute>b__10_0(RunningDeployment d) in C:\BuildAgent\work\e0cefbed4ad11812\source\Calamari\Kubernetes\Commands\HelmUpgradeCommand.cs:line 71 
July 13th 2022 12:57:22Error
   at Calamari.Commands.DelegateInstallConvention.Install(RunningDeployment deployment) in C:\BuildAgent\work\e0cefbed4ad11812\source\Calamari.Shared\Commands\DelegateInstallConvention.cs:line 18 
July 13th 2022 12:57:22Error
   at Calamari.Deployment.ConventionProcessor.RunInstallConventions() in C:\BuildAgent\work\e0cefbed4ad11812\source\Calamari.Shared\Deployment\ConventionProcessor.cs:line 75 
July 13th 2022 12:57:22Error
   at Calamari.Deployment.ConventionProcessor.RunConventions() in C:\BuildAgent\work\e0cefbed4ad11812\source\Calamari.Shared\Deployment\ConventionProcessor.cs:line 32 
July 13th 2022 12:57:22Error
   at Calamari.Kubernetes.Commands.HelmUpgradeCommand.Execute(String[] commandLineArguments) in C:\BuildAgent\work\e0cefbed4ad11812\source\Calamari\Kubernetes\Commands\HelmUpgradeCommand.cs:line 88 
July 13th 2022 12:57:22Error
   at Calamari.Program.ResolveAndExecuteCommand(IContainer container, CommonOptions options) in C:\BuildAgent\work\e0cefbed4ad11812\source\Calamari\Program.cs:line 49 
July 13th 2022 12:57:22Error
   at Calamari.Common.CalamariFlavourProgram.Run(String[] args) in C:\BuildAgent\work\e0cefbed4ad11812\source\Calamari.Common\CalamariFlavourProgram.cs:line 78 
July 13th 2022 12:57:22Fatal
The remote script failed with exit code 100 
July 13th 2022 12:57:22Fatal
The action Install AWS Load Balancer Controller on RD-DevOps-EKS-Cluster-Prd failed

and if I look at the package in the Tentacle where it runs, the file is in ASCI text format instead of gzip. Is there a way that we can use this template and get the file in the correct format?

Hi @andres.carcamo,

Thanks for reaching out and I’m sorry to see you’re having issues with your charts.

We do have a fairly old bug that looks like similar behavior here. This was fixed a bit ago so I wanted to verify if this was occurring on your cloud instance? If you’re seeing this on Octopus cloud it’s doubtful it’s the same issue but regression is possible.

Would it be possible to get a full raw task log for this particular failed deployment? I’ve created a secure link for you to upload here if you’d prefer to not attach it to the thread: Upload link

Looking forward to hearing back.

Regards,
Garrett

Hello @garrett.dass

Thanks for the response, I just upload the raw task log you requested. In the meanwhile, we are going to use a normal script step for our runbook but we’ll be waiting for any update to use the Helm Template.

Hi @andres.carcamo,

Thanks for the log. We’re having a bit of trouble getting this package from the original repository ourselves.
We’re hitting this:

Could you run a few commands in HELM for us outside of Octopus and let us know if this chart is still working from the public side?

helm repo add aws https://aws.github.io/eks-charts/
helm pull aws/aws-load-balancer-controller --verify

As a note, we cannot seem to get this package even without the verification flag.

It does not seem like the following is the issue but I wanted to bring this to your attention. We’ve seen in the past where versions on charts prefixed with a ‘v’ make the version not semver compliant. Here’s the bug surrounding that: Helm external feeds with poorly formatted index.yaml (i.e. not semver compliant) don't work · Issue #6800 · OctopusDeploy/Issues · GitHub

Looking forward to hearing back.

Regards,
Garrett

Hi @garrett.dass

You are right, I did those commands and got the same error message, but without the verification flag it pulled the package:

Even if I install this with helm install aws-load-balancer-controller aws/aws-load-balancer-controller it works fine :confused: I’ve followed the install instructions of the repository (eks-charts/stable/aws-load-balancer-controller at master · aws/eks-charts · GitHub) and by a script step I don’t have any problem but I want to use the helm step for having all with the same standard

Hi @andres.carcamo,

Sorry about the delay on this - we got the aws-load-balancer-controller chart to install properly using the Upgrade a Helm Chart step template - using the AWS public repo and haven’t been able to reproduce the error you’re seeing.

Could you run this using the public AWS repo instead of your jfrog? There could be an issue with the way the Upgrade a Helm Chart step is configured, the package in the feed, or an issue on your particular target.

It might be worth copying the working directory and seeing what the chart looks like after it’s sent by Octopus to your target. You can use the project variable Octopus.Calamari.CopyWorkingDirectoryIncludingKeyTo with the value being the path you want to output the working directory to. This should allow you to inspect the chart file a bit closer and you can try to manually extract it as well.

We have some documentation on copying the working directory here.

Thanks for your patience while we work through this.

Regards,
Garrett