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

Installing Helm Genesis job using local charts and ansible controller fails if helm repo empty on controller #2633

Open
michaelkhalsa opened this issue Nov 13, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@michaelkhalsa
Copy link

Describe the bug
When playbook reaches step to install the Genesis job using helm, the Ansible helm component, first runs an update. If the repo is empty, then the job fails with an error.

Because the helm is being deployed from a local chart, there is no prior step where a CRD in installed.

FIX
Either add the following option to the role task in platforms/shared/configuration/create/job_component/tasks/main.yaml
on task Run helm install
skip_crds: true

Or else include in the instructions to add an external helm chart to the repo if empty
test by running in terminal: helm list
I used (in case would need this in future)
helm repo add kfs https://kfsoftware.github.io/hlf-helm-charts --force-update

To Reproduce
Steps to reproduce the behavior:

  1. Use main or develop branch (1.10)
  2. On controller, install all prerequisites (latest) and copy over latest binaries to reference bin directory (the versions installed by playbook are hopelessly out of date). Update flux_version from 2.3--> 2.4 in setup-k8s-environment.yaml
  3. Use an ansible controller with an empty helm repo
  4. See error

TASK [/home/ubuntu/bevel/platforms/hyperledger-fabric/configuration/../../shared/configuration/roles/create/job_component : Helm install genesis] *********************************************************
fatal: [localhost]: FAILED! => {"changed": false, "command": "/home/ubuntu/bin/helm repo update", "msg": "Failure when executing Helm command. Exited 1.\nstdout: \nstderr: Error: no repositories found. You must add one before updating\n", "stderr": "Error: no repositories found. You must add one before updating\n", "stderr_lines": ["Error: no repositories found. You must add one before updating"], "stdout": "", "stdout_lines": []}

PLAY RECAP
localhost : ok=331 changed=90 unreachable=0 failed=1 skipped=189 rescued=0 ignored=0

Expected behavior
To install the helm chart without an error

Environment (please complete the following information):

  • OS: Ubuntu (both controller and for nodes on target aws EKS cluster
  • Version 24.04

Additional context
For your info, the prior step, and results of a debug prior to the failure to check the install path.

TASK [/home/ubuntu/bevel/platforms/hyperledger-fabric/configuration/../../shared/configuration/roles/create/job_component : Check if helm release already exists in mainorg-net] **************************
ok: [localhost]

TASK [/home/ubuntu/bevel/platforms/hyperledger-fabric/configuration/../../shared/configuration/roles/create/job_component : Helm install job component diagnostics - MVK] *********************************
ok: [localhost] => {
"msg": [
"Componant Name: genesis",
"Release Namespace: mainorg-net",
"Chart Ref: /home/ubuntu/bevel/platforms/hyperledger-fabric/configuration/../../../platforms/hyperledger-fabric/charts/fabric-genesis",
"Value Files: /home/ubuntu/bevel/platforms/hyperledger-fabric/configuration/../../../platforms/hyperledger-fabric/releases/dev/mainorg/genesis.yaml",
"Kube Config File: /home/ubuntu/.kube/config"
]
}

@michaelkhalsa michaelkhalsa added the bug Something isn't working label Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant