servalproject / serval-dna

The Serval Project's core daemon that implements Distributed Numbering Architecture (DNA), MDP, VoMP, Rhizome, MeshMS, etc.
http://servalproject.org
Other
170 stars 81 forks source link

keyring add needs restart #126

Closed adur1990 closed 6 years ago

adur1990 commented 6 years ago

After I add my first sid with keyring add serval has to be restarted. Otherwise, neither id self nor the rest api will return the generated sid.

lakeman commented 6 years ago

Correct, unless you use the restful keyring api that is.

quixotique commented 6 years ago

The CLI interface needs to be changed to act as a REST API client if the daemon is running, otherwise fall back to acting directly on the keyring/database if not (with suitable file locks to avoid race conditions if the daemon is starting). That is a non-trivial architectural change with no allocated budget at the moment, so for the time being while the server is running you must use the RESTful API to make keyring changes. Fortunately it is well documented.