Skip to content

bug(fabric): chaincode installation fails #2624

@kostiantyn-bonebriukh

Description

@kostiantyn-bonebriukh

Describe the bug
Chaincode installation fails when you're running a playbook from step 3 of this README.md
https://github.com/hyperledger/bevel/blob/v1.1.0/platforms/hyperledger-fabric/configuration/README.md#execution

To Reproduce
Steps to reproduce the behavior:

  1. Follow https://github.com/hyperledger/bevel/blob/v1.1.0/platforms/hyperledger-fabric/configuration/README.md#execution
  2. When you reach step 3, it won't finish successfully.
  3. In the failing pod see the error:
Getting Orderer TLS certificates from Vault.
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100    60  100    60    0     0   1261      0 --:--:-- --:--:-- --:--:--  1304
Vault read API call response: {"errors":["1 error occurred:\n\t* permission denied\n\n"]}
Error: Failed to read Vault secret.
Error Details: 1 error occurred:
	* permission denied

Expected behavior
No issues when you follow the README.md.

Screenshots
No screenshot.

Environment (please complete the following information):

Additional context
Adding information mentioned in Discord.
https://discord.com/channels/905194001349627914/1291821929807872030/1293882579392401448

<@383004601542115342>
On both 1.1.0 and develop branches, the chaincode setup doesn't work.

TLS and stuff is published to Vault for peers and orderes using this pattern
https://github.com/hyperledger/bevel/blob/develop/platforms/hyperledger-fabric/configuration/roles/helm_component/templates/value_peer.tpl#L32

        secretEngine: {{ vault.secret_path | default("secretsv2") }}
        secretPrefix: "data/{{ network.env.type }}{{ name }}"

And this is Chaincode Vault key generation pattern
https://github.com/hyperledger/bevel/blob/develop/platforms/hyperledger-fabric/configuration/roles/helm_component/templates/install_chaincode_job.tpl#L39

      orderersecretprefix: {{ vault.secret_path | default('secretsv2') }}/data/{{ org.name | lower }}/peerOrganizations/{{ namespace }}/orderer

Of course
{{ network.env.type }}{{ name }} is not the same as {{ org.name | lower }}.

{{ name }} is the org.name .

And the rest of the secret path is also invalid. There is no
peerOrganizations/{{ namespace }}/orderer in Vault which is expected by the Chaincode setup Bevel playbook.

Could you advise how chaincodes could be set up?

Alvaro Picazo — Yesterday at 10:36 AM
Feel free to create an Issue and we can work on it!

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