title: Hyperledger fabric 2.0 : Chaincode commit fails with the error ' chaincode definition not agreed to by this org'
body: <p>I am trying to learn HLF 2.0 chaincode lifecycle, my network configuration as follows</p>
  <ol>
  <li>Two orgs with one peer each</li>
  <li>RAFT as ordering service(total 3 orderes)</li>
  </ol>
  <p>Following the official doc to install the chaincode <a href="https://hyperledger-fabric.readthedocs.io/en/release-2.0/deploy_chaincode.html" rel="nofollow noreferrer">https://hyperledger-fabric.readthedocs.io/en/release-2.0/deploy_chaincode.html</a></p>
  <p>when I try to commit the chaincode getting the following error</p>
  <pre><code>Error: proposal failed with status: 500 - failed to invoke backing implementation of 'CommitChaincodeDefinition': chaincode definition not agreed to by this org (LeftOrgMSP)
  </code></pre>
  <p>however when i check the commitreadyness</p>
  <pre><code>{
      &quot;approvals&quot;: {
          &quot;LeftOrgMSP&quot;: true,
          &quot;RightOrgMSP&quot;: false
      }
  }
  </code></pre>
  <p>i got the <code>LeftOrgMSP</code> as true</p>
  <p><strong>UPDATE</strong></p>
  <p>command for approving org</p>
  <pre><code>peer lifecycle chaincode approveformyorg -o  orderer1.base.order:7050 --channelID basechannel --name fabcar --version 1.0 --package-id $CC_PACKAGE_ID --sequence 1 --tls \
  --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/base.order/orderers/orderer1.base.order/msp/tlscacerts/tlsca.base.order-cert.pem
  </code></pre>
  <p>command to commit</p>
  <pre><code>peer lifecycle chaincode commit -o orderer1.base.order:7050 --channelID basechannel \
   --name fabcar --version 1.0 \
   --sequence 1  --tls true \
   --cafile /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ordererOrganizations/base.order/orderers/orderer1.base.order/msp/tlscacerts/tlsca.base.order-cert.pem \
   --peerAddresses peer1.base.left:7051  \
   --tlsRootCertFiles   /opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/base.left/peers/peer1.base.left/tls/ca.crt
  </code></pre>