hyperledger-archives / fabric

THIS IS A READ-ONLY historic repository. Current development is at https://gerrit.hyperledger.org/r/#/admin/projects/fabric . pull requests not accepted
https://gerrit.hyperledger.org/
Apache License 2.0
1.17k stars 1.01k forks source link

Chaincode deployments hang in certain cases, need timeouts #455

Closed masterDev1985 closed 8 years ago

masterDev1985 commented 8 years ago

When using the REST API to deploy chaincode. Clients pass in the url to a repository that contains their chaincode. The peer initiates a "go get " command to pull the code and its dependencies before building it. If the chaincode repo or any of its dependency repos are private (hint hint obc-peer), then this command will hang, because the command will attempt to ask a user for credentials in the terminal. The consequence of this is that the REST deploy request never comes back. Also, this causes the deploy process to hang, which leaves the state of the peer in a bad place. We need some way to resolve this.

masterDev1985 commented 8 years ago

I've created a pull request that changes the 'go get' code to have a timeout and adds a parameter to openchain.yaml which controls that timeout.

corecode commented 8 years ago

This is somewhat related to #452

binhn commented 8 years ago

@masterDev1985 I kind of lost track of this issue. Since no reference here, have you submitted a pull request to address this?

masterDev1985 commented 8 years ago

Yeah, looks like I forgot to close the issue associated with it. This has been fixed by using the local copy of the obc-peer code and keeping chaincode in public repositories, as a policy.