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

(eks oci repository): Installing from OCI repository causing helm seg fault #19167

Closed
mvs5465 opened this issue Feb 25, 2022 · 5 comments
Closed
Labels
@aws-cdk/aws-eks Related to Amazon Elastic Kubernetes Service bug This issue is a bug. effort/medium Medium work item – several days of effort needs-reproduction This issue needs reproduction. p2 response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.

Comments

@mvs5465
Copy link

mvs5465 commented Feb 25, 2022

What is the problem?

I am trying to use the new OCI repository support (thanks for adding that!) and am running into a helm error when trying to use it:

Received response status [FAILED] from custom resource. Message returned: Error: b'panic: runtime error: invalid memory address or nil pointer dereference\n[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x1612e03]\n\ngoroutine 1 [running]
:\nhelm.sh/helm/v3/internal/experimental/registry.(*Client).PullChart(0x0, 0xc0007d0be0, 0xc0007d0be0, 0x0, 0x0)\n\t/home/circleci/helm.sh/helm/internal/experimental/registry/client.go:156 +0x183\nhelm.sh/helm/v3/pkg/getter.(*OCIGetter).get(0xc0008535e0
, 0xc0004e4680, 0x4c, 0x20, 0x198d560, 0x1a8f801)\n\t/home/circleci/helm.sh/helm/pkg/getter/ocigetter.go:52 +0xc5\nhelm.sh/helm/v3/pkg/getter.(*OCIGetter).Get(0xc0008535e0, 0xc0004e4680, 0x4c, 0xc0007d0b80, 0x4, 0x4, 0xc000856d00, 0xc00089a690, 0x50)\n\
t/home/circleci/helm.sh/helm/pkg/getter/ocigetter.go:36 +0x77\nhelm.sh/helm/v3/pkg/repo.(*ChartRepository).DownloadIndexFile(0xc00089a690, 0xc000856c80, 0x2, 0x2, 0xc00089a690)\n\t/home/circleci/helm.sh/helm/pkg/repo/chartrepo.go:127 +0x330\nhelm.sh/hel
m/v3/pkg/repo.FindChartInAuthAndTLSRepoURL(0x7ffdf885b768, 0x41, 0x0, 0x0, 0x0, 0x0, 0x7ffdf885b74f, 0x7, 0x0, 0x0, ...)\n\t/home/circleci/helm.sh/helm/pkg/repo/chartrepo.go:240 +0x2d2\nhelm.sh/helm/v3/pkg/action.(*ChartPathOptions).LocateChart(0xc00013
8a08, 0x7ffdf885b74f, 0x7, 0xc0004f2000, 0xa, 0x10, 0x0, 0x0)\n\t/home/circleci/helm.sh/helm/pkg/action/install.go:663 +0x805\nmain.newUpgradeCmd.func2(0xc0004ff340, 0xc0005b46e0, 0x2, 0xb, 0x0, 0x0)\n\t/home/circleci/helm.sh/helm/cmd/helm/upgrade.go:13
0 +0x1cd\ngithub.com/spf13/cobra.(*Command).execute(0xc0004ff340, 0xc0005b4630, 0xb, 0xb, 0xc0004ff340, 0xc0005b4630)\n\t/go/pkg/mod/github.com/spf13/cobra@v1.1.1/command.go:850 +0x47c\ngithub.com/spf13/cobra.(*Command).ExecuteC(0xc000726b00, 0xc00000e3
a8, 0x1, 0xc00081ff60)\n\t/go/pkg/mod/github.com/spf13/cobra@v1.1.1/command.go:958 +0x375\ngithub.com/spf13/cobra.(*Command).Execute(...)\n\t/go/pkg/mod/github.com/spf13/cobra@v1.1.1/command.go:895\nmain.main()\n\t/home/circleci/helm.sh/helm/cmd/helm/he
lm.go:80 +0x24d\n'

Reproduction Steps

My CDK code looks like this:

cluster.addHelmChart(this.props.serviceName, {
      chart: 'backend',
      repository: 'oci://redactedAccountId.dkr.ecr.us-east-1.amazonaws.com/backend:0.0.1',
      namespace: this.props.serviceNamespace,
      createNamespace: false,
      values: this.values,
    });

I followed the instructions here to create an ECR OCI repo and upload my chart: https://docs.aws.amazon.com/AmazonECR/latest/userguide/push-oci-artifact.html

Then followed the instructions here to use it: https://github.com/aws/aws-cdk/blob/master/packages/%40aws-cdk/aws-eks/README.md#oci-charts

What did you expect to happen?

Expected helm to reference chart in ECR OCI repository.

What actually happened?

Seg fault

CDK CLI Version

2.14.0 (build 762d71b)

Framework Version

No response

Node.js Version

v17.3.1

OS

MacOS Catalina 10.15.7

Language

Typescript

Language Version

No response

Other information

No response

@mvs5465 mvs5465 added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Feb 25, 2022
@github-actions github-actions bot added the @aws-cdk/aws-eks Related to Amazon Elastic Kubernetes Service label Feb 25, 2022
@ryparker ryparker added the p1 label Feb 25, 2022
@mvs5465
Copy link
Author

mvs5465 commented Feb 25, 2022

Removing the tag on the end of the repository also gives this error:

Received response status [FAILED] from custom resource. Message returned: Error: b'Error: looks like "oci://accountIdRedacted.dkr.ecr.us-east-1.amazonaws.com/backend" is not a valid chart repository or cannot be reached: tag explicitly required\n'

not sure if this is expected?

@otaviomacedo otaviomacedo added effort/medium Medium work item – several days of effort and removed needs-triage This issue or PR still needs to be triaged. labels Mar 4, 2022
@otaviomacedo otaviomacedo removed their assignment Mar 4, 2022
@mvs5465
Copy link
Author

mvs5465 commented Mar 9, 2022

Now getting

Received response status [FAILED] from custom resource. Message returned: Error: b'Login succeeded\n0.0.1: Pulling from redactedAccontId.dkr.ecr.us-east-1.amazonaws.com/backend\nError: manifest does not contain a layer with mediatype application/tar+gzip\n

I'm working on debugging this...

@pahud
Copy link
Contributor

pahud commented Jan 26, 2023

With #18547 merged, are you still having this issue?

@pahud pahud added response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. p2 needs-reproduction This issue needs reproduction. and removed p1 labels Jan 26, 2023
@mvs5465
Copy link
Author

mvs5465 commented Jan 26, 2023

Hey @pahud thanks for following up. We have decided to pursue a different method of deploying helm charts so this issue is stale.

@mvs5465 mvs5465 closed this as completed Jan 26, 2023
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-eks Related to Amazon Elastic Kubernetes Service bug This issue is a bug. effort/medium Medium work item – several days of effort needs-reproduction This issue needs reproduction. p2 response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
Projects
None yet
Development

No branches or pull requests

4 participants