[tahoe-lafs-trac-stream] [Tahoe-LAFS] #2844: readiness status API for clients

Tahoe-LAFS trac at tahoe-lafs.org
Sun Nov 20 15:39:33 UTC 2016


#2844: readiness status API for clients
-------------------------+-----------------------
     Reporter:  dawuud   |      Owner:
         Type:  defect   |     Status:  new
     Priority:  normal   |  Milestone:  undecided
    Component:  unknown  |    Version:  1.11.0
   Resolution:           |   Keywords:
Launchpad Bug:           |
-------------------------+-----------------------

Comment (by meejah):

 The following is purely for the integration tests use-case (but I think
 also applies to e.g. Docker images etc).

 The "is ready" is mostly about "are all the ports open and listening now"
 (for all non-client servers). That is, when we `spawnProcess`, that
 returns fairly rapidly -- such that if we spawn an Introducer and (without
 waiting) spawn a storage server, it will fail to connect to the
 Introducer. There are lots of different ways of tackling this (e.g. the
 integration tests could keep polling the ports they care about on the
 Introducer). Another way is what I'm doing currently: waiting for the
 "introducer running" (or similar) to appear in the stdout logs.

 Maybe there's really no better way than trolling stdout (in "some" defense
 this is one way systemd works -- waiting for `READY=1` to be printed by
 the launched process). I'm also kind of hoping there's "A Good Way" that
 people do this already...

 In any case, it would be good to standardize on something (the "introducer
 running" is a bit fragile-feeling, and the string changes depending on
 what kind of tahoe you launched).

 A JSON API would let us return more-interesting statuses -- and then e.g.
 for an integration-test use-case, the tests would have to rapidly poll the
 API (and keep re-trying on connection errors etc).

--
Ticket URL: <https://tahoe-lafs.org/trac/tahoe-lafs/ticket/2844#comment:2>
Tahoe-LAFS <https://Tahoe-LAFS.org>
secure decentralized storage


More information about the tahoe-lafs-trac-stream mailing list