hyperledger / bevel

An automation framework for rapidly and consistently deploying production-ready DLT platforms
https://hyperledger-bevel.readthedocs.io/en/latest/
Apache License 2.0
341 stars 708 forks source link

Update `refresh-certificates` playbook #2564

Closed amozghovyi closed 3 weeks ago

amozghovyi commented 1 month ago

Is your feature request related to a problem? Please describe. We tested the certificate renewal procedure and found some possible playbook errors and unstable behavior. Our environment- Fabric v2.5.4, Bevel v1.0.0 (from github tag v1.0.0.0).

Describe the solution you'd like Please check the following things in refresh-certificates playbook:

After applying these changes we were able to execute the playbook successfully. But after a couple of days we tried to launch the same playbook (without any additional changes) to ensure that all certificates have been renewed. And we have an error (some lines have been omitted):

TASK [create/refresh_certs/create_channel_block : Fetch masterchl configuration block from the blockchain] ***
task path: /var/jenkins_home/jobs/Automation/jobs/Renew_Certs/workspace/bevel/platforms/hyperledger-fabric/configuration/roles/create/refresh_certs/create_channel_block/tasks/get_update_block.yaml:8

fatal: [localhost]: FAILED! => {"attempts": 7, "changed": true, "cmd": "export PEER_CLI=$(KUBECONFIG=/root/.kube/config kubectl get po -n <ordrer_org>-net | grep \"cli\" | head -n 1 | awk '{print $1}')\nKUBECONFIG=/root/.kube/config kubectl exec -n <orderer_org> ${PEER_CLI} -- peer channel fetch config <orderer_2>_masterchl_config_block.pb -o <orderer_1>.<orderer_org>-net:7050 -c masterchl --tls --cafile ${ORDERER_CA}
---
readBlock\u001b[0m -> **Expect block, but got status: &{NOT_FOUND}**\n**Error: can't read the block: &{NOT_FOUND}**\

As I said above, the first launch of the playbook was successful.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context or screenshots about the feature request here.

alvaropicazo commented 1 month ago

I'll be working on this feature