Skip to content
This repository has been archived by the owner on Feb 5, 2024. It is now read-only.

Commit

Permalink
Merge pull request #108 from SubstraFoundation/fix-chaincode-operator
Browse files Browse the repository at this point in the history
Fix empty chaincode.list file in chaincode operator
  • Loading branch information
Inal Djafar authored Dec 5, 2020
2 parents e99b5ba + 0de4ff3 commit 4d71a75
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion charts/hlf-k8s/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
apiVersion: v1
name: hlf-k8s
home: https://substra.org/
version: 5.0.1
version: 5.0.2
description: Tolling package for Substra that configure the network
icon: https://avatars1.githubusercontent.com/u/38098422?s=200&v=4
sources:
Expand Down
6 changes: 6 additions & 0 deletions charts/hlf-k8s/templates/deployment-chaincode-operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@ spec:
peer lifecycle chaincode queryinstalled -O json > chaincode.list 2>/dev/null
while ! [ -s chaincode.list ]; do
printf "[DEBUG] chaincode.list file is empty, retry in 5s\n"
sleep 5
peer lifecycle chaincode queryinstalled -O json > chaincode.list 2>/dev/null
done
until jq -e '.installed_chaincodes[] | select(.label=="{{ .name }}")' chaincode.list > /dev/null; do
printf "[DEBUG] Chaincode {{ .name }} not installed\n"
printf "[DEBUG] Installing chaincode {{ .name }}\n"
Expand Down

0 comments on commit 4d71a75

Please sign in to comment.