When updating database rules, the database name should come from the
rules. Enforce this by only taking the rules as a parameter, rather than
having two arguments that could possibly disagree with each other.
We can no longer list deleted databases because the server no longer
knows about them, and we now have UUIDs that are useful to know about,
so change the detailed listing of databases to return UUID instead of
possible deleted at time.
Now that the database paths use UUIDs instead of names+generation ids,
and that IoxObjectStore checks there are no files in a directory before
it'll create a database directory (and has tests for that).
Rather than requiring the user of this command to know the database UUID
or otherwise having the knowledge of how to construct a database object
store location in this debugging command.
Sadly `tonic` is a bit of a type nightmare (see
<23c1392fb7/tonic/src/transport/server/mod.rs (L452-L470)>
). So I wasn't able to pull into a simple "add all your
services"-function. Instead the server type now builds its own gRPC
server but relies on some helper macros to for common functionality.
First iteration of a common interface for the different server run
modes. This splits the existing HTTP server into a part that can be used
by all run modes (e.g. health checks, metrics endpoint, profiling) and a
part that is specific to the the database run mode.
Note that the interface is not final and might require more iterations,
but we have to start somewhere.
Running a server is now using `influxdb_iox run MODE [args]`, e.g.
`influxdb_iox run query --server-id 1`. Another mode that will follow
soon is `router`.
The old syntax `influxdb_iox run [args]` (w/o the mode part) is still
supported but a deprecation note will be printed.