Skip to content

Commit

Permalink
[FAB-13149] Disable etcdraft for v1.4
Browse files Browse the repository at this point in the history
This change set disables etcdraft as it's not supported in v1.4

Change-Id: I89faff522af8d9d625cf1bac3b6fe0c50b070acd
Signed-off-by: yacovm <yacovm@il.ibm.com>
  • Loading branch information
yacovm committed Dec 4, 2018
1 parent 4c7ffa3 commit 9d87d37
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 113 deletions.
1 change: 1 addition & 0 deletions common/tools/configtxgen/encoder/encoder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@ func TestNewOrdererGroup(t *testing.T) {
})

t.Run("etcd/raft-based Orderer", func(t *testing.T) {
t.Skip()
config := configtxgentest.Load(genesisconfig.SampleDevModeEtcdRaftProfile)
group, _ := NewOrdererGroup(config.Orderer)
consensusType := group.GetValues()[channelconfig.ConsensusTypeKey]
Expand Down
2 changes: 1 addition & 1 deletion integration/e2e/cft_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"github.com/tedsuo/ifrit/grouper"
)

var _ = Describe("EndToEnd Crash Fault Tolerance", func() {
var _ = PDescribe("EndToEnd Crash Fault Tolerance", func() {
var (
testDir string
client *docker.Client
Expand Down
8 changes: 4 additions & 4 deletions integration/e2e/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ var _ = Describe("EndToEnd", func() {
})
})

Describe("basic single node etcdraft network with 2 orgs", func() {
PDescribe("basic single node etcdraft network with 2 orgs", func() {
BeforeEach(func() {
network = nwo.New(nwo.BasicEtcdRaft(), testDir, client, BasePort(), components)
network.GenerateConfigTree()
Expand All @@ -172,7 +172,7 @@ var _ = Describe("EndToEnd", func() {
})
})

Describe("three node etcdraft network with 2 orgs", func() {
PDescribe("three node etcdraft network with 2 orgs", func() {
BeforeEach(func() {
network = nwo.New(nwo.MultiNodeEtcdRaft(), testDir, client, BasePort(), components)
network.GenerateConfigTree()
Expand Down Expand Up @@ -250,7 +250,7 @@ var _ = Describe("EndToEnd", func() {
})
})

Describe("etcd raft, checking valid configuration update of type B", func() {
PDescribe("etcd raft, checking valid configuration update of type B", func() {
BeforeEach(func() {
network = nwo.New(nwo.BasicEtcdRaft(), testDir, client, BasePort(), components)
network.GenerateConfigTree()
Expand Down Expand Up @@ -299,7 +299,7 @@ var _ = Describe("EndToEnd", func() {
})
})

Describe("basic single node etcdraft network with 2 orgs and 2 channels", func() {
PDescribe("basic single node etcdraft network with 2 orgs and 2 channels", func() {
BeforeEach(func() {
network = nwo.New(nwo.MultiChannelEtcdRaft(), testDir, client, BasePort(), components)
network.GenerateConfigTree()
Expand Down
1 change: 1 addition & 0 deletions orderer/common/server/etcdraft_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
)

func TestSpawnEtcdRaft(t *testing.T) {
t.Skip()
gt := NewGomegaWithT(t)

cwd, err := filepath.Abs(".")
Expand Down
21 changes: 2 additions & 19 deletions orderer/common/server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import (
"syscall"
"time"

"github.com/golang/protobuf/proto"
"github.com/hyperledger/fabric/common/channelconfig"
"github.com/hyperledger/fabric/common/crypto"
"github.com/hyperledger/fabric/common/flogging"
Expand Down Expand Up @@ -363,24 +362,8 @@ func initializeBootstrapChannel(genesisBlock *cb.Block, lf blockledger.Factory)
}
}

func isClusterType(genesisBlock *cb.Block) bool {
if genesisBlock.Data == nil || len(genesisBlock.Data.Data) == 0 {
logger.Fatalf("Empty genesis block")
}
env := &cb.Envelope{}
if err := proto.Unmarshal(genesisBlock.Data.Data[0], env); err != nil {
logger.Fatalf("Failed to unmarshal the genesis block's envelope: %v", err)
}
bundle, err := channelconfig.NewBundleFromEnvelope(env)
if err != nil {
logger.Fatalf("Failed creating bundle from the genesis block: %v", err)
}
ordConf, exists := bundle.OrdererConfig()
if !exists {
logger.Fatalf("Orderer config doesn't exist in bundle derived from genesis block")
}
_, exists = clusterTypes[ordConf.ConsensusType()]
return exists
func isClusterType(_ *cb.Block) bool {
return false
}

func initializeGrpcServer(conf *localconfig.TopLevel, serverConfig comm.ServerConfig) *comm.GRPCServer {
Expand Down
90 changes: 1 addition & 89 deletions sampleconfig/configtx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -287,61 +287,6 @@ Orderer: &OrdererDefaults
- kafka1:9092
- kafka2:9092

# EtcdRaft defines configuration which must be set when the "etcdraft"
# orderertype is chosen.
EtcdRaft:
# The set of Raft replicas for this network. For the etcd/raft-based
# implementation, we expect every replica to also be an OSN. Therefore,
# a subset of the host:port items enumerated in this list should be
# replicated under the Orderer.Addresses key above.
Consenters:
- Host: raft0.example.com
Port: 7050
ClientTLSCert: path/to/ClientTLSCert0
ServerTLSCert: path/to/ServerTLSCert0
- Host: raft1.example.com
Port: 7050
ClientTLSCert: path/to/ClientTLSCert1
ServerTLSCert: path/to/ServerTLSCert1
- Host: raft2.example.com
Port: 7050
ClientTLSCert: path/to/ClientTLSCert2
ServerTLSCert: path/to/ServerTLSCert2

# Options to be specified for all the etcd/raft nodes. The values here
# are the defaults for all new channels and can be modified on a
# per-channel basis via configuration updates.
Options:
# TickInterval is the time interval between two Node.Tick
# invocations.
# Unit: millisecond
TickInterval: 100

# ElectionTick is the number of Node.Tick invocations that must pass
# between elections. That is, if a follower does not receive any
# message from the leader of current term before ElectionTick has
# elapsed, it will become candidate and start an election.
# ElectionTick must be greater than HeartbeatTick.
ElectionTick: 10

# HeartbeatTick is the number of Node.Tick invocations that must
# pass between heartbeats. That is, a leader sends heartbeat
# messages to maintain its leadership every HeartbeatTick ticks.
HeartbeatTick: 1

# MaxInflightMsgs limits the max number of in-flight append messages
# during optimistic replication phase.
MaxInflightMsgs: 256

# MaxSizePerMsg limits the max size of each append message. Smaller
# value lowers the raft recovery cost(initial probing and message
# lost during normal operation). On the other side, it might affect
# the throughput during normal replication.
MaxSizePerMsg: 1048576

# SnapshotInterval defines number of blocks per which a snapshot is taken
SnapshotInterval: 500

# Organizations lists the orgs participating on the orderer side of the
# network.
Organizations:
Expand Down Expand Up @@ -546,37 +491,4 @@ Profiles:
Application:
<<: *ApplicationDefaults
Organizations:
- *SampleOrg

# SampleDevModeEtcdRaft defines a configuration that differs from the
# SampleDevModeSolo one only in that it uses the etcd/raft-based orderer.
SampleDevModeEtcdRaft:
<<: *ChannelDefaults
Orderer:
<<: *OrdererDefaults
OrdererType: etcdraft
Organizations:
- <<: *SampleOrg
Policies:
<<: *SampleOrgPolicies
Admins:
Type: Signature
Rule: "OR('SampleOrg.member')"
Application:
<<: *ApplicationDefaults
Organizations:
- <<: *SampleOrg
Policies:
<<: *SampleOrgPolicies
Admins:
Type: Signature
Rule: "OR('SampleOrg.member')"
Consortiums:
SampleConsortium:
Organizations:
- <<: *SampleOrg
Policies:
<<: *SampleOrgPolicies
Admins:
Type: Signature
Rule: "OR('SampleOrg.member')"
- *SampleOrg

0 comments on commit 9d87d37

Please sign in to comment.