Skip to content

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

@michaelkhalsa

Description

@michaelkhalsa

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"
]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions