hyperledger / bevel-operator-fabric

Hyperledger Fabric Kubernetes operator - Hyperledger Fabric operator for Kubernetes (v2.3, v2.4 and v2.5)
https://hyperledger.github.io/bevel-operator-fabric/
Apache License 2.0
266 stars 90 forks source link

OrdererNode fails to find config file with HLF v2.5.0 image #166

Closed viggys closed 1 year ago

viggys commented 1 year ago

Description: HLF v2.5.0 has updated the default value for FABRIC_CFG_PATH to /var/hyperledger/fabric/config (earlier /etc/hyperledger/fabric until v2.4.9), where the orderer.yaml exists. But, as the data volume for the orderer container is mounted to /var/hyperledger, the orderer.yaml config file gets cleaned up when the container starts, and crashes thereafter.

Actual: Orderer container fails to find config file at startup. Logs from the orderernode container below:

Create /var/hyperledger/ledger directory to avoid restarts 
ls: cannot access '/var/hyperledger/tls/client/cert/*': No such file or directory
> orderer 
2023-05-18 13:17:24.849 UTC 0001 ERRO [viperutil] ReadInConfig -> Unable to open the config file: 
2023-05-18 13:17:24.849 UTC 0002 ERRO [orderer.common.server] Main -> failed to parse config:  Error reading configuration: open : no such file or directory

Default env on hyperledger/fabric-orderer:2.5.0

$ docker run -it hyperledger/fabric-orderer:2.5.0 bash -c 'env | grep FABRIC'
FABRIC_CFG_PATH=/var/hyperledger/fabric/config
FABRIC_VER=v2.5.0

Expecting: OrdererNode to use data mount at any subPath under /var/hyperledger, or Include a configMap template for default orderer.yaml and mount it at $FABRIC_CFG_PATH.

dviejokfs commented 1 year ago

Use the 1.9.0 beta version, this is solved.

viggys commented 1 year ago

Thank you. Will close this issue in that case.