waku-org / nwaku-compose

Deployment docker-compose files to deploy an nwaku node
13 stars 19 forks source link

register_rln.sh: explicitly setting keystore folder in current folder #18

Closed Ivansete-status closed 10 months ago

Ivansete-status commented 10 months ago

This is needed to make it clearer that the "keystore" folder is created in the current folder rather than in /

Therefore, we will have the next log (see the "path" component :)

INF 2023-11-08 08:38:25.847+00:00 credentials persisted                      topics="rln_keystore_generator" tid=1 file=rln_keystore_generator.nim:95 path=./keystore/keystore.json

Instead of the following, which can be misunderstood as being stored in /:

INF 2023-11-08 08:09:01.951+00:00 credentials persisted                      topics="rln_keystore_generator" tid=1 file=rln_keystore_generator.nim:95 path=/keystore/keystore.json

Also, most importantly, I found permission issues because the script was trying to create it in the root folder (/)

ERR 2023-11-08 08:03:48.588+00:00 failed to persist credentials              topics="rln_keystore_generator" tid=1 file=rln_keystore_generator.nim:92 error="keystore error: OS specific error: Cannot open file for writing"
alrevuelta commented 10 months ago

Unsure if I'm missing something but the keystore.json is indeed created in /keystore. That path refers to the docker image path, and not your machine. or?

Ivansete-status commented 10 months ago

Unsure if I'm missing something but the keystore.json is indeed created in /keystore. That path refers to the docker image path, and not your machine. or?

Good observation!

The ./keystore folder is created locally in the next step, which should be made manually: image

...and then, as you properly pointed out, it is passed to the root folder within the docker container in: https://github.com/waku-org/nwaku-compose/blob/8753a9423619e03d25d8b13709b5ff9fd0d792d2/docker-compose.yml#L60

Ivansete-status commented 10 months ago

Please disregard this PR. The "writing issue" happened because the local keystore folder didn't exist. This situation is enhanced by https://github.com/waku-org/nwaku/pull/2199