The meta-store would open but may not have finished loading the raft log. If write
requests came in, they could fail or be dropped because of missing shard group
info. This change makes the meta store only return after it has found the leader
and is really ready.
This change also fixed a race in the ClusterRestart test that may be causing it
to fail sporadically.
Fixes#3677#3960
Instead of trying to start all the nodes with dynamic peer addresses
set, alwasy start one, then join the rest to this one. The SetPeers
in the test may be causing leadership changes and sporadic failures.
If the -hostname flag is passed, the node will startup and be accessible from
remote nodes using the specified hostname. At startup, we attempt to update
the hostname if it's different. For data-only nodes, this is pretty straight-forward.
For nodes part of the raft cluster, it is much more complicated as the the cluster
must be up and stable (with a leader) for a the update to take place. The main
complication in this case is that the node starting up will have a different
hostname and will fail to take part of the raft cluster because each other node
does not have this new name in the it's raft peers list. Since this is very problematic
and very easy to break a cluster, this PR just aborts startup and alerts the operator that
some manual actions must be taken to update the raft peer on all raft members before
the hostname can be fully updated.
Fixes#3421
Hostnames were always being resolved to an IP address and the IP
address was used as the host address and raft peer address. There
was no way to use an actual hostname instead of an IP address.
This adds some basic plumbing to make remote procedure calls to other cluster
members. This first implementation allows a node to contact the raft leader
and fetch a copy of the meta data. This will be used by non-raft members to
pull down the latest metadata.
This commit adds a requirement that retention policies must
be fully committed. This means that the replication factor
must be set to whatever the node count is in the cluster.
Fixes#2738
This commit sets a cluster ID when the first node is initialized.
The ID is generated on every CreateNodeCommand so that it can be
applied consistently in the state machine of every server.
This commit adds the meta.RaftStore which can start a single node
cluster and create nodes on the meta.Data internal structure.
Conflicts:
meta/meta.go
This commit moves meta data from the influxdb.Server and extracts it
out to a new "meta" package. This package handles all strongly
consistent data in the database and maintains a small set of metadata
in-memory.
Conflicts:
meta/store.go