hyperledger-archives / indy-sdk

indy-sdk
https://wiki.hyperledger.org/display/indy
Apache License 2.0
668 stars 735 forks source link

Running indy-pool.dockerfile fails in Plenum Python package #698

Closed PJUllrich closed 6 years ago

PJUllrich commented 6 years ago

I have been creating Docker containers of the indy-pool with the provided indy-pool.dockerfile for over 2 months now. This morning it simply stopped working with the following error message:

Step 21/23 : RUN generate_indy_pool_transactions --nodes 4 --clients 5 --nodeNum 1 2 3 4 --ips="$pool_ip,$pool_ip,$pool_ip,$pool_ip"
 ---> Running in 77a61ead17ea
Traceback (most recent call last):
  File "/usr/local/bin/generate_indy_pool_transactions", line 19, in <module>
    getTxnOrderedFields(), ConfigHelper, NodeConfigHelper)
  File "/usr/local/lib/python3.5/dist-packages/plenum/common/test_network_setup.py", line 207, in bootstrapTestNodes
    steward_defs, node_defs = cls.gen_defs(args.ips, args.nodes, startingPort)
  File "/usr/local/lib/python3.5/dist-packages/plenum/common/test_network_setup.py", line 291, in gen_defs
    d.verkey = s_signer.verkey
  File "/usr/local/lib/python3.5/dist-packages/plenum/common/signer_did.py", line 54, in verkey
    return self.abbr_prfx + self._verkey
TypeError: Can't convert 'bytes' object to str implicitly
ERROR: Service 'pool' failed to build: The command '/bin/sh -c generate_indy_pool_transactions --nodes 4 --clients 5 --nodeNum 1 2 3 4 --ips="$pool_ip,$pool_ip,$pool_ip,$pool_ip"' returned a non-zero code: 1

This seems rather unusual to me since all indy-package versions are specified within the dockerfile (e.g. ARG indy_plenum_ver=1.2.237). Any thoughts on why the provided dockerfile is failing on me out of a sudden?

kdenhartog commented 6 years ago

this is an issue that appears due to the base58 version. It was recently updated and we chose to freeze the version we we're using and will update later. For now, if you run sudo pip install base58==0.2.5 then you the problem should be resolved.

PJUllrich commented 6 years ago

So although I pinned (or froze) every version of every possible indy package (e.g. libindy, indy-plenum, anoncreds, etc. as specified in the indy-pool.dockerfile), still the latest versions of python packages are pulled? Shouldn't those be pinned as well within the ubuntu packages of e.g. indy-plenum?

My point is: For development, I would like to have a stable version that does not change, which is why I pinned all the versions. However, this issue shows that somewhere within the ubuntu packages, the python packages are not versioned and the latest versions are pulled. This makes it incredibly inconvenient to develop for Indy since one day to the next (most often just before a demo of course), everything breaks. Can you not pin the python packages as well, when you make a new release?

vimmerru commented 6 years ago

As i know team that supports Indy Node already solved this.

PJUllrich commented 6 years ago

@vimmerru can you link to an Issue or file where they fix this? I'm having another issue because of this as well and am blocked until this is resolved.

vimmerru commented 6 years ago

@PJUllrich https://jira.hyperledger.org/browse/INDY-1287

PJUllrich commented 6 years ago

Thank you. We fixed this by pinning the base58 package ourselves by pinning the base58 package in the apt-get update command. Note the added python3-base58=0.2.4 \ command.

RUN apt-get update -y && apt-get install -y \
        indy-plenum=${indy_plenum_ver} \
        indy-anoncreds=${indy_anoncreds_ver} \
        indy-node=${indy_node_ver} \
        python3-indy-crypto=${python3_indy_crypto_ver} \
        libindy-crypto=${indy_crypto_ver} \
        python3-base58=0.2.4 \
        vim