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 715 forks source link

fabric: wrong EtcdRaft.Consenters.Port generated in configtxOrderer_default.tpl and configtxProfile_default.tpl #1907

Closed uqix closed 2 years ago

uqix commented 2 years ago

Describe the bug

Wrong EtcdRaft.Consenters.Port generated in configtxOrderer_default.tpl and configtxProfile_default.tpl

To Reproduce

  1. With network orderers config:
network:
  # Network level configuration specifies the attributes required for each organization
  # to join an existing network.
  type: fabric
  version: 2.2.2                 # currently tested 1.4.8 and 2.2.2

  # frontend: enabled #Flag for frontend to enabled for nodes/peers

  #Environment section for Kubernetes setup
  env:
    type: test             # tag for the environment. Important to run multiple flux on single cluster
    proxy: none                  # values can be 'haproxy' or 'ambassador'

# ...

      # Services maps to the pods that will be deployed on the k8s cluster
      # This sample is an orderer service and includes a zk-kafka consensus
      services:
        ca:
          name: ca
          subject: "/C=CN/ST=Hunan/L=Changsha/O=Orderer/CN=ca.hl-fabric-orderer-net"
          type: ca
          grpc:
            port: 7054

        consensus:
          name: raft
          # type: broker        #This field is not consumed for raft consensus
          # replicas: 4         #This field is not consumed for raft consensus
          # grpc:
          #   port: 9092        #This field is not consumed for raft consensus

        orderers:
        # This sample has multiple orderers as an example.
        # You can use a single orderer for most production implementations.
        # For RAFT consensus, have odd number (2n+1) of orderers for consensus agreement to have a majority.
        - orderer:
          name: orderer1
          type: orderer
          consensus: raft
          grpc:
            port: 7050
        - orderer:
          name: orderer2
          type: orderer
          consensus: raft
          grpc:
            port: 7050
        - orderer:
          name: orderer3
          type: orderer
          consensus: raft
          grpc:
            port: 7050
  1. Run site playbook ansible-playbook platforms/shared/configuration/site.yaml ...

  2. cat ./build/configtx.yaml

Orderer: &OrdererDefaults
  OrdererType: etcdraft
  Addresses:
    - orderer1.hl-fabric-orderer-net:7050
    - orderer2.hl-fabric-orderer-net:7050
    - orderer3.hl-fabric-orderer-net:7050

  BatchTimeout: 2s
  BatchSize:
    MaxMessageCount: 10
    AbsoluteMaxBytes: 98 MB
    PreferredMaxBytes: 1024 KB
  EtcdRaft:
    Consenters:
      - Host: orderer1.hl-fabric-orderer-net
        Port: 8443
        ClientTLSCert: ./crypto-config/ordererOrganizations/hl-fabric-orderer-net/orderers/orderer1.hl-fabric-orderer-net/tls/server.crt
        ServerTLSCert: ./crypto-config/ordererOrganizations/hl-fabric-orderer-net/orderers/orderer1.hl-fabric-orderer-net/tls/server.crt
      - Host: orderer2.hl-fabric-orderer-net
        Port: 8443
        ClientTLSCert: ./crypto-config/ordererOrganizations/hl-fabric-orderer-net/orderers/orderer2.hl-fabric-orderer-net/tls/server.crt
        ServerTLSCert: ./crypto-config/ordererOrganizations/hl-fabric-orderer-net/orderers/orderer2.hl-fabric-orderer-net/tls/server.crt
      - Host: orderer3.hl-fabric-orderer-net
        Port: 8443
        ClientTLSCert: ./crypto-config/ordererOrganizations/hl-fabric-orderer-net/orderers/orderer3.hl-fabric-orderer-net/tls/server.crt
        ServerTLSCert: ./crypto-config/ordererOrganizations/hl-fabric-orderer-net/orderers/orderer3.hl-fabric-orderer-net/tls/server.crt
  1. See error of {pod="orderer3-0"}
2022-04-12 02:08:23.874 UTC [orderer.consensus.etcdraft] logSendFailure -> ERRO 028 Failed to send StepRequest to 1, because: rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial tcp 10.244.14.89:8443: connect: connection refused" channel=syschannel node=3Show context

Expected behavior

The Consenters.Port should be consistent with Addresses and equals to 7050, but was 8443.

Environment (please complete the following information):

mgCepeda commented 2 years ago

I'll take this issue