-
Notifications
You must be signed in to change notification settings - Fork 33
Open
Description
This issue was found while upgrading chaincode on a 1.4 peer.
The issue is in plugins/module_utils/peers.py
Line 233:
p = re.compile('^Name: (.+), Version: (.+), Path: (.+),(?: Input: (.+),)? Escc: (.+), Vscc: (.+)$')
Should be:
p = re.compile('^Name: (.+), Version: (.+),(?: Path: (.+),)?(?: Input: (.+),)? Escc: (.+), Vscc: (.+)$')
Path may not necessarily be set. This causes any chaincode that does not return a path to be excluded from the list of instantiated chaincodes and the chaincode upgrade subsequently fails.
The following is the peer command listing installed and instantiated chaincodes.
marbles2 is node chaincode
marbles3 is golang chaincode
peer chaincode list -o n60cd63-orderer21.celder3-b3c-4x16-334e19b56347d9ce32b6d6a870d14f37-0000.us-south.containers.appdomain.cloud:7050 -C channel1 --tls --cafile /Users/celder/fabric/dev/ansible_dest/debug/orderercert.pem --installed
Get installed chaincodes on peer:
Name: marbles2, Version: 1.0.7, Path: /Users/celder/Developer/go/src/github.com/hyperledger/fabric-samples/chaincode/marbles04/node, Id: cbffee7ec43c91caa5adc6ccfaa6e7cebb3179e09f1c56284a5782e388d52fd3
Name: marbles3, Version: 5.0.0, Path: marbles3, Id: 5d25430e24c256d36f789192bb2570e69fff7533c73d061e332c0d82718842e1
peer chaincode list -o n60cd63-orderer21.celder3-b3c-4x16-334e19b56347d9ce32b6d6a870d14f37-0000.us-south.containers.appdomain.cloud:7050 -C channel1 --tls --cafile /Users/celder/fabric/dev/ansible_dest/debug/orderercert.pem --instantiated
Get instantiated chaincodes on channel channel1:
Name: marbles2, Version: 1.0.6, Escc: escc, Vscc: vscc
Name: marbles3, Version: 5.0.0, Path: marbles3, Input: <nil>, Escc: escc, Vscc: vscc
$ peer version
peer:
Version: 2.2.0
Commit SHA: 5ea85bc54
Go version: go1.14.4
OS/Arch: darwin/amd64
Chaincode:
Base Docker Label: org.hyperledger.fabric
Docker Namespace: hyperledger
I applied this locally and the upgrade succeeded. I need to run another test to followup.
Metadata
Metadata
Assignees
Labels
No labels