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

bug(fabric): chaincode installation fails #2624

Open
kostiantyn-bonebriukh opened this issue Oct 15, 2024 · 0 comments
Open

bug(fabric): chaincode installation fails #2624

kostiantyn-bonebriukh opened this issue Oct 15, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@kostiantyn-bonebriukh
Copy link

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!

@kostiantyn-bonebriukh kostiantyn-bonebriukh added the bug Something isn't working label Oct 15, 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