Uploaded image for project: 'Fabric'
  1. Fabric
  2. FAB-18026

Discovery service forgets chaincodes on peer restart

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Medium
    • Resolution: Duplicate
    • v2.0.0, v2.1.0
    • None
    • None
    • None
    • Hide
      Bring up a hyperledger network, add channel and deploy chaincode etc.

      Make a discovery query. Stop one of the peers.

      e.g. docker stop peer-0

      Restart the peer.

      docker start peer-0

      Query discovery service. The discovery response is missing the instantiated abac38 chaincode on peer-0 after it was restarted.

      [
        {
          "MSPID": "OrgMSP",
          "LedgerHeight": 6,
          "Endpoint": "peer-1.Org:7051",
          "Identity": "-----BEGIN CERTIFICATE----- [....snipped....] -----END CERTIFICATE-----\n",
          "Chaincodes": [
            "_lifecycle",
            "abac38"
          ]
        },
        {
          "MSPID": "OrgMSP",
          "LedgerHeight": 6,
          "Endpoint": "peer-0.Org:7051",
          "Identity": "-----BEGIN CERTIFICATE----- [....snipped....] -----END CERTIFICATE-----\n",
          "Chaincodes": [
            "_lifecycle"
          ]
        },
        {
          "MSPID": "OrgMSP",
          "LedgerHeight": 6,
          "Endpoint": "peer-2.Org:7051",
          "Identity": "-----BEGIN CERTIFICATE----- [....snipped....] -----END CERTIFICATE-----\n",
          "Chaincodes": [
            "_lifecycle",
            "abac38"
          ]
        }
      ]
      Show
      Bring up a hyperledger network, add channel and deploy chaincode etc. Make a discovery query. Stop one of the peers. e.g. docker stop peer-0 Restart the peer. docker start peer-0 Query discovery service. The discovery response is missing the instantiated abac38 chaincode on peer-0 after it was restarted. [   {     "MSPID": "OrgMSP",     "LedgerHeight": 6,     "Endpoint": "peer-1.Org:7051",     "Identity": "-----BEGIN CERTIFICATE----- [....snipped....] -----END CERTIFICATE-----\n",     "Chaincodes": [       "_lifecycle",       "abac38"     ]   },   {     "MSPID": "OrgMSP",     "LedgerHeight": 6,     "Endpoint": "peer-0.Org:7051",     "Identity": "-----BEGIN CERTIFICATE----- [....snipped....] -----END CERTIFICATE-----\n",     "Chaincodes": [       "_lifecycle"     ]   },   {     "MSPID": "OrgMSP",     "LedgerHeight": 6,     "Endpoint": "peer-2.Org:7051",     "Identity": "-----BEGIN CERTIFICATE----- [....snipped....] -----END CERTIFICATE-----\n",     "Chaincodes": [       "_lifecycle",       "abac38"     ]   } ]

    Description

      Hi,
      I'm seeing an issue with the Fabric 2.0 - 2.1 discovery service, in that, when an individual peer is stopped/started, the chaincodes installed/instantiated on a channel are forgotten and don't appear in the Chaincodes list.
      Checking on the peer itself, the chaincode is both installed, and instantiated when it comes back up, and I can invoke the chaincode normally. i.e. it works normally.

      I've tested it with release-2.0.0 and tag v2.1.1

      Is there a way to re-discover the instantiated chaincodes?

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              colismit Colin Selig-Smith
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: