Reputation: 3
I followed the tutorial from the https://www.youtube.com/watch?v=DKuGU5CYV_E&t=5s, and successfully added the third organisation into the existing fabric network. Also, I tried the forth. However, When I tried to add the fifth organisation into this network following the steps(https://hyperledger-fabric.readthedocs.io/en/latest/channel_update.html), when I running the command "peer channel update -f org5_update_in_envelope.pb -c $CHANNEL_NAME -o orderer.example.com:7050 --tls --cafile $ORDERER_CA", it mentioned the error about 3 policies, and one policy is remaining. I checked the Order log, it shows error log. I am using the command "peer chaincode upgrade -o orderer.example.com:7050 --tls $CORE_PEER_TLS_ENABLED --cafile $ORDERER_CA -C $CHANNEL_NAME -n mycc -v 2.0 -c '{"Args":["init","a","90","b","210"]}' -P "OR ('Org1MSP.member','Org2MSP.member','Org3MSP.member')" to change the endorsement policy. I think it is an issue about the "MSP policy". Anyone has met the same issue?
Upvotes: 0
Views: 706
Reputation: 9
You have to run peer channel signconfigtx in your Previous Organizations. Then Only you can update your channel.
"Loop Org1,org2,org3,org4"
docker cp org5_update_in_envelope.pb peer0.org1.example-swarm.com:/opt/gopath/src/github.com/hyperledger/fabric/
docker exec -e "CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/configtx/crypto-config/peerOrganizations/org1.example.com/users/[email protected]/msp" -e "CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/configtx/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt" peer0.org1.example-swarm.com peer channel signconfigtx -f org5_update_in_envelope.pb
docker cp peer0.org1.example-swarm.com:/opt/gopath/src/github.com/hyperledger/fabric/org5_update_in_envelope.pb org5_update_in_envelope.pb
"End Loop"
docker cp org5_update_in_envelope.pb peer0.org1.example-swarm.com:/opt/gopath/src/github.com/hyperledger/fabric/
docker exec -e "CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/configtx/crypto-config/peerOrganizations/org1.example.com/users/[email protected]/msp" -e "CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/configtx/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt" peer0.org1.example-swarm.com peer channel update -f org5_update_in_envelope.pb -c $CHANNEL_NAME -o orderer.example.com:7050
Upvotes: 0
Reputation: 723
It looks like you need to run the channel update using the crypto from an admin for either Org3 or Org4. You have signatures for Org 1 and Org2. But you need 3 of Orgs1-4.
Follow the steps for
Export the Org2 environment variables:
except change everything to either Org3 or Org4 admin. Then run the upgrade command.
Or you could sign it as an admin from Org3 or Org4 and then any admin can upgrade it.
Upvotes: 2