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

Peer ignore 'CORE_PEER_BCCSP_SW_FILEKEYSTORE_KEYSTORE' docker environment

    XMLWordPrintable

Details

    • Bug
    • Status: Unverified
    • Medium
    • Resolution: Unresolved
    • v2.1.0, v1.4.5
    • None
    • fabric-common, fabric-peer
    • Hide
      1) Prepare fabric network with Docker Compose

      2) Set the wrong path to dummy FileKeystore.KeyStorePath config on peer container

      environment:
         ...
         - CORE_PEER_BCCSP_SW_FILEKEYSTORE_KEYSTORE=/wrongpath

      3) Start fabric network ( It should fail but success to startup )
      Show
      1) Prepare fabric network with Docker Compose 2) Set the wrong path to dummy FileKeystore.KeyStorePath config on peer container environment:    ...    - CORE_PEER_BCCSP_SW_FILEKEYSTORE_KEYSTORE=/wrongpath 3) Start fabric network ( It should fail but success to startup )

    Description

      1.Condition
      Use SW BCCCSP
      Set BCCSP FileKeystore.KeyStorePath with path different to default - /etc/hyperledger/fabric/msp/keystore - as docker environment( CORE_PEER_BCCSP_SW_FILEKEYSTORE_KEYSTORE )

      2. Symptom
      Peer ignore 'CORE_PEER_BCCSP_SW_FILEKEYSTORE_KEYSTORE' docker environment

      If key files really exist on that path, the peer node fail to strat.

      3. Reason
      The internal/peer/common/InitCrypto function does not set "peer.BCCSP.SW.FileKeyStore.KeyStore" propely.

      4. Solution
      *Should set k*eyStorePath properly in InitCrypto function like below :

      bccspConfig.SwOpts.FileKeystore.KeyStorePath = viper.Get("peer.BCCSP.SW.FileKeyStore.KeyStore")

       

      + If this bug is fixed, then peer node will always fail to start even with proper 'CORE_PEER_BCCSP_SW_FILEKEYSTORE_KEYSTORE' docker environment.
      It is because of other bug related with Ephemeral setting. (FAB-18323)

      I think 2 bugs should be fixed at the same time.

      Attachments

        Issue Links

          Activity

            People

              sykesm Matthew Sykes
              magpie73 Jeehoon Lim
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated: