From fc268dabd0c5d93ba5e7a5cbdc1e02c366b5827a Mon Sep 17 00:00:00 2001 From: Kostas Christidis Date: Fri, 21 Apr 2017 01:24:46 -0400 Subject: [PATCH] [FAB-3288] Sync configtx.yaml with Compose configs The default value in configtx.yaml for "Absolute Max Bytes", the size batches that the ordering service outputs, breaks the Docker Compose configuration files in "bddtests/environments". This changeset brings all configurations in sync. Change-Id: Ib1eac16331cc311335b1479a048b39983d350aba Signed-off-by: Kostas Christidis --- .../orderer-1-kafka-1/docker-compose.yml | 2 ++ .../orderer-1-kafka-3/docker-compose.yml | 6 ++++ sampleconfig/configtx.yaml | 32 +++++++++++-------- 3 files changed, 26 insertions(+), 14 deletions(-) diff --git a/bddtests/environments/orderer-1-kafka-1/docker-compose.yml b/bddtests/environments/orderer-1-kafka-1/docker-compose.yml index 337fc353f5a..c2e84c9008a 100644 --- a/bddtests/environments/orderer-1-kafka-1/docker-compose.yml +++ b/bddtests/environments/orderer-1-kafka-1/docker-compose.yml @@ -21,6 +21,8 @@ services: image: hyperledger/fabric-kafka environment: KAFKA_BROKER_ID: 0 + KAFKA_MESSAGE_MAX_BYTES: 103809024 + KAFKA_REPLICA_FETCH_MAX_BYTES: 103809024 KAFKA_UNCLEAN_LEADER_ELECTION_ENABLE: "false" KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 depends_on: diff --git a/bddtests/environments/orderer-1-kafka-3/docker-compose.yml b/bddtests/environments/orderer-1-kafka-3/docker-compose.yml index 443fa0df308..0ee081ea42e 100644 --- a/bddtests/environments/orderer-1-kafka-3/docker-compose.yml +++ b/bddtests/environments/orderer-1-kafka-3/docker-compose.yml @@ -24,6 +24,8 @@ services: environment: KAFKA_BROKER_ID: 0 KAFKA_DEFAULT_REPLICATION_FACTOR: 3 + KAFKA_MESSAGE_MAX_BYTES: 103809024 + KAFKA_REPLICA_FETCH_MAX_BYTES: 103809024 KAFKA_UNCLEAN_LEADER_ELECTION_ENABLE: "false" KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 depends_on: @@ -34,6 +36,8 @@ services: environment: KAFKA_BROKER_ID: 1 KAFKA_DEFAULT_REPLICATION_FACTOR: 3 + KAFKA_MESSAGE_MAX_BYTES: 103809024 + KAFKA_REPLICA_FETCH_MAX_BYTES: 103809024 KAFKA_UNCLEAN_LEADER_ELECTION_ENABLE: "false" KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 depends_on: @@ -44,6 +48,8 @@ services: environment: KAFKA_BROKER_ID: 2 KAFKA_DEFAULT_REPLICATION_FACTOR: 3 + KAFKA_MESSAGE_MAX_BYTES: 103809024 + KAFKA_REPLICA_FETCH_MAX_BYTES: 103809024 KAFKA_UNCLEAN_LEADER_ELECTION_ENABLE: "false" KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 depends_on: diff --git a/sampleconfig/configtx.yaml b/sampleconfig/configtx.yaml index 0485ef4ac3e..a965b0d734a 100644 --- a/sampleconfig/configtx.yaml +++ b/sampleconfig/configtx.yaml @@ -92,9 +92,10 @@ Organizations: # MSPDir is the filesystem path which contains the MSP configuration. MSPDir: msp - # AdminPrincipal dictates the type of principal used for an organization's Admins policy - # Today, only the values of Role.ADMIN ad Role.MEMBER are accepted, which indicates a principal - # of role type ADMIN and role type MEMBER respectively + # AdminPrincipal dictates the type of principal used for an + # organization's Admins policy. Today, only the values of Role.ADMIN and + # Role.MEMBER are accepted, which indicates a principal of role type + # ADMIN and role type MEMBER respectively. AdminPrincipal: Role.ADMIN # BCCSP: Select which crypto implementation or library to use for the @@ -102,20 +103,21 @@ Organizations: BCCSP: Default: SW SW: - # TODO: The default Hash and Security level needs refactoring to be - # fully configurable. Changing these defaults requires coordination - # SHA2 is hardcoded in several places, not only BCCSP + # TODO: The default Hash and Security level needs refactoring to + # be fully configurable. Changing these defaults requires + # coordination SHA2 is hardcoded in several places, not only + # BCCSP. Hash: SHA2 Security: 256 - # Location of key store. If this is unset, a location will - # be chosen using: 'MSPDir'/keystore + # Location of key store. If this is unset, a location will be + # chosen using: 'MSPDir'/keystore FileKeyStore: KeyStore: AnchorPeers: - # AnchorPeers defines the location of peers which can be used - # for cross org gossip communication. Note, this value is only - # encoded in the genesis block in the Application section context. + # AnchorPeers defines the location of peers which can be used for + # cross-org gossip communication. Note, this value is only encoded + # in the genesis block in the Application section context. - Host: 127.0.0.1 Port: 7051 @@ -147,7 +149,9 @@ Orderer: &OrdererDefaults MaxMessageCount: 10 # Absolute Max Bytes: The absolute maximum number of bytes allowed for - # the serialized messages in a batch. + # the serialized messages in a batch. If the "kafka" OrdererType is + # selected, set 'message.max.bytes' and 'replica.fetch.max.bytes' on the + # Kafka brokers to a value that is equal to or larger than this one. AbsoluteMaxBytes: 99 MB # Preferred Max Bytes: The preferred maximum number of bytes allowed for @@ -156,8 +160,8 @@ Orderer: &OrdererDefaults # bytes. PreferredMaxBytes: 512 KB - # Max Channels is the maximum number of channels to allow on the ordering network - # When set to 0, this implies no maximum number of channels + # Max Channels is the maximum number of channels to allow on the ordering + # network. When set to 0, this implies no maximum number of channels. MaxChannels: 0 Kafka: