Bug 2089743

Summary: acm-ice fails to deploy: helm chart does not appear to be a gzipped archive
Product: OpenShift Container Platform Reporter: Constantin Vultur <cvultur>
Component: Special Resource OperatorAssignee: Pablo Acevedo <pacevedo>
Status: CLOSED ERRATA QA Contact: Constantin Vultur <cvultur>
Severity: high Docs Contact:
Priority: high    
Version: 4.11CC: bthurber, mlammon
Target Milestone: ---   
Target Release: 4.11.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-08-10 11:13:40 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Constantin Vultur 2022-05-24 10:53:24 UTC
Description of problem:
SRO fails to deploy with error:
"failed to reconcile chart for SepcialResourceModule 'acm-ice': could not load helm chart 'acm-ice': file '/home/nonroot/.cache/special-resource-operator/helm/cache/acm-ice-0.0.1.tgz' does not appear to be a gzipped archive; got 'application/octet-stream'"


Version-Release number of selected component (if applicable):
SRO bundle: release-4.11
OCP: 4.10.0-0.nightly-2022-05-20-023246

How reproducible:


Steps to Reproduce:
1. clone sro from https://github.com/openshift/special-resource-operator.git
2. change directory to special-resource-operator/charts/example/
3. run: helm package acm-ice-0.0.1 -d /tmp/ace-ice
4. run: helm repo index /tmp/ace-ice
5. run: oc new-project acm-ice
6. run oc create cm acm-ice-chart --from-file=/tmp/acm-ice/acm-ice-0.0.1.tgz --from-file=/tmp/acm-ice/index.yaml 
7. adjust the acm-ice.yaml for the spokes and registry settings then apply it

Actual results:
- deployment does not start

- checking operator logs, this error can he seen:
{"level":"error","ts":1653389385.4247239,"logger":"controller.specialresourcemodule","msg":"Reconciler error","reconciler group":"sro.openshift.io","reconciler kind":"SpecialResourceModule","name":"acm-ice","namespace":"","error":"failed to reconcile chart for SepcialResourceModule 'acm-ice': could not load helm chart 'acm-ice': file '/home/nonroot/.cache/special-resource-operator/helm/cache/acm-ice-0.0.1.tgz' does not appear to be a gzipped archive; got 'application/octet-stream'","stacktrace":"sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2\n\t/workspace/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:227"}

- checking the configmaps:
# oc get cm 
NAME                       DATA   AGE
acm-ice-chart              2      3m42s
kube-root-ca.crt           1      50m
openshift-service-ca.crt   1      50m

- checking the acm-ice-0.0.1.tgz 
# file /tmp/acm-ice/acm-ice-0.0.1.tgz 
/tmp/acm-ice/acm-ice-0.0.1.tgz: gzip compressed data, extra field, has comment, original size 40448

# cd /tmp/acm-ice

# gunzip acm-ice-0.0.1.tgz 

# ls
acm-ice-0.0.1.tar  index.yaml

# tar -xvf acm-ice-0.0.1.tar 
acm-ice/Chart.yaml
acm-ice/templates/0001-buildconfig.yaml
acm-ice/templates/0002-policy.yaml
acm-ice/templates/0003-placement.yaml
acm-ice/README.md
acm-ice/acm-ice.yaml
[root@ocp-edge32 acm-ice]# 



Expected results:
build to be successfull

Additional info:

Comment 2 Constantin Vultur 2022-06-23 12:49:21 UTC
Note on uniqueness of helm repository is added to the project's Readme

Comment 4 errata-xmlrpc 2022-08-10 11:13:40 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Important: OpenShift Container Platform 4.11.0 bug fix and security update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:5069