Details
-
Bug
-
Status: Closed
-
Medium
-
Resolution: Done
-
v2.3.0
-
20eb852
-
(Please add steps to reproduce)
Description
Description: As part of channel participation api testing, it is failing to delete system channel and application channel in the fabric network when launched in kubernetes using data persistence.
curl -X DELETE http://xx.xx.xxx.xx:32500/participation/v1/channels/orderersystemchannel {"error":"cannot remove: error removing ledger for system channel orderersystemchannel"} curl -X DELETE http://xxx.xx.xxx.xx:32500/participation/v1/channels/orderersystemchannel curl: (52) Empty reply from server curl -X DELETE http://xxx.xx.xxx.xx:32500/participation/v1/channels/testorgschannel0 {"error":"cannot remove: system channel exists"}
Orderer has the following logs after the second attempt of deleting system channel:
2020-10-07 15:20:01.571835 I | http: panic serving 10.177.88.40:63270: runtime error: invalid memory address or nil pointer dereference goroutine 2291695 [running]: net/http.(*conn).serve.func1(0xc0043172c0) /usr/local/go/src/net/http/server.go:1772 +0x139 panic(0xf0cbe0, 0x19612e0) /usr/local/go/src/runtime/panic.go:975 +0x3e3 github.com/hyperledger/fabric/orderer/consensus/etcdraft.(*Consenter).RemoveInactiveChainRegistry(0xc000237400) /go/src/github.com/hyperledger/fabric/orderer/consensus/etcdraft/consenter.go:286 +0x2a github.com/hyperledger/fabric/orderer/common/multichannel.(*Registrar).removeSystemChannel(0xc00014ea00, 0xc000746440, 0x14) /go/src/github.com/hyperledger/fabric/orderer/common/multichannel/registrar.go:955 +0x201 github.com/hyperledger/fabric/orderer/common/multichannel.(*Registrar).RemoveChannel(0xc00014ea00, 0xc001909b62, 0x14, 0x0, 0x0) /go/src/github.com/hyperledger/fabric/orderer/common/multichannel/registrar.go:849 +0x101 github.com/hyperledger/fabric/orderer/common/channelparticipation.(*HTTPHandler).serveRemove(0xc00038eed0, 0x1223f60, 0xc0002089a0, 0xc0035e3000) /go/src/github.com/hyperledger/fabric/orderer/common/channelparticipation/restapi.go:278 +0xcf net/http.HandlerFunc.ServeHTTP(0xc000be2fe0, 0x1223f60, 0xc0002089a0, 0xc0035e3000) /usr/local/go/src/net/http/server.go:2012 +0x44 github.com/gorilla/mux.(*Router).ServeHTTP(0xc0002149c0, 0x1223f60, 0xc0002089a0, 0xc0035e2e00) /go/src/github.com/hyperledger/fabric/vendor/github.com/gorilla/mux/mux.go:212 +0xe2 github.com/hyperledger/fabric/orderer/common/channelparticipation.(*HTTPHandler).ServeHTTP(0xc00038eed0, 0x1223f60, 0xc0002089a0, 0xc0035e2e00) /go/src/github.com/hyperledger/fabric/orderer/common/channelparticipation/restapi.go:98 +0xff github.com/hyperledger/fabric/core/middleware.(*requestID).ServeHTTP(0xc00023e080, 0x1223f60, 0xc0002089a0, 0xc0035e2d00) /go/src/github.com/hyperledger/fabric/core/middleware/request_id.go:50 +0x297 net/http.(*ServeMux).ServeHTTP(0xc000152640, 0x1223f60, 0xc0002089a0, 0xc0035e2d00) /usr/local/go/src/net/http/server.go:2387 +0x1a5 net/http.serverHandler.ServeHTTP(0xc000208620, 0x1223f60, 0xc0002089a0, 0xc0035e2d00) /usr/local/go/src/net/http/server.go:2807 +0xa3 net/http.(*conn).serve(0xc0043172c0, 0x1227fa0, 0xc0018d9940) /usr/local/go/src/net/http/server.go:1895 +0x86c created by net/http.(*Server).Serve /usr/local/go/src/net/http/server.go:2933 +0x35c
Fabric image tag: amd64-2.3-stable
Network Configuration: Launched network using fabric-test/regression/testdata/k8s-run-network-spec.yml, 5 orderers with etcdraft, 2 organizations with 2 peers each.
NOTE: The above test is failing when data persistence is enabled using NFS. When launched network without using data persistence, able to remove system channel and application channel without any issues.
Steps Followed:
1. launched the network using genesisFile
2. created the channel - testorgschannel0
3. joined peers to channel
4. update anchor peers on channel
5. installed cc
6. instantiated cc
7. start sending invokes using one terminal
8. in another terminal ran curl command to delete