Version 1.0.6 (now installed by bootsrap) doesn't understand the 'rpc'
port. Also, its config file name has to end in '.json'.
Signed-off-by: Alain Jobart <alainjobart@google.com>
It seems it's just simpler all around if the zk topology plugin creates
the higher level directories when needed. The deletion still stops at
the root though, seems safer.
Please refer to #2694 and #2670 for motivation and reasoning for
this change.
I've tried to follow best practice in inserting the copyright
headers. In other open source projects, not all files carry
the notice. For example documentation doesn't. I've followed
similar ground rules.
I did not change the php because there is a separate LICENSE
file there by Pixel Federation. We'll first need to notify
them our intent before changing anything there.
As for the presubmit check, it's going to be non-trivial
because of the number of exceptions, like file types,
directories and generated code. So, it will have to be
a separate project.
This change adds full support for a Consul-based topology service.
See https://www.consul.io/ for more information.
- Adding consul server to bootstrap.sh for download.
- Adding client library to vendor.json.
- In unit tests, we start a dev Consul instance.
- Adding consul support in end-to-end tests.
Also running the test in travis.
- Updating topo doc.
- Adding Consul to 2.1 features.
It is not run any more, and the feature it's based on (graceful transfer
of traffic between an old and new vttablet) is not in the code any more.
Also making both zookeeper and zk2 run tabletmanager.py with bad hosts
to duplicate the same test i both implementations.
The new etcd2 topology service is the new more consistent version of the
etcd topology. It has the following improvements:
- Uses the same file structure as zk2topo. It then also uses the generic
vtctld.Explorer as well.
- Uses the new etcd clientv3 library, with new key-value API and leases.
It is not backwards compatible with the old etcd topology.
- Uses a configurable toplevel directory for topology data in global and
local cells.
Vitess 2.1 will still include the old etcd topology client, but it will
be deprecated, and removed from Vitess 2.2. Use topo2topo binary to
upgrade, see documentation.
Implementation details:
- bootstrap.sh now downloads etcd.
- etcd is used in unit tests of the library, instead of using a mock.
- Fixing wrangler.InitTablet error return.
And adding -allow_update to test calls, so they work anyway.
- Running tabletmanager.py for zookeeper, zk2, etcd, etcd2 flavors.
- Ignoring the 'test' tag for vendored libraries. See:
https://github.com/kardianos/govendor#ignoring-build-tags-and-excluding-packages
- in end-to-end tests, restarting etcd to wipe it.
- publish web site.
- Introducing topodata.CellInfo. Stored in the global topology server, it
describes a connection to a topology server for a cell. It has both a
server address and a root directory to use. Also adding vtctl commands
to deal with it. Existing zk and etcd implementations ignore these flags
for now.
- Now passing toplevel server address and root as generic topology
parameters. And using a topo server factory method.
- Changing the topo server registration to use a Factory method. It
creates a topology server implementation with a server address and a
root path. Existing zk and etcd implementations ignore these flags for
now.
- adding a zk2 topology implementation. It doesn't use any of the go/zk
code, and allows the specification of a root directory for both the
global cell, and each individual cell. It also is using a different
directory structure, consistent with what we want all new topo
implementations to use. And it stores the data as protobuf, not json.
- deprecating the legacy 'zookeeper' implementation. Adding instructions
to migrate from old server style to new server style.
- removing old janitor code, been replaced by topo validator workflow.
- Using a more generic vtctld topo explorer, will use it in all servers
soon.
- Fixing the ZK command line to decode protos and use new connection
library.
- topo2topo now also copies VSchema.
This is the first pass for some subdirectories.
Recurring issues include:
1. Inconsistent quote chars. Use the same quote character as the first
use in the file (usually single-quote). Double quotes are OK if the
quoted string contains single quotes.
2. Bad indentation. Indent 2 for logic, 4 for continuations if the
previous line ends with '(', '[', or '{'. If drop does not immediately
follow the group-symbol, align with the opening group-symbol. I suggest
immediate drops, since these are stable if the content of the first
line changes, while aligning with the opening group-symbol requires
shifting the continuation lines.
3. Bad docstrings. A full docstring looks like:
"""Initial line ending with punctuation.
Optional text.
Args:
Arg1: Description.
Arg2: Description with
indented continuation.
Returns:
Return text.
Raises:
ErrorClass: Description.
"""
4. Vertical spacing. Exactly two blank lines before top-level classes
or functions. Exactly one blank line before non-top-level classes or
functions. No more than one blank line within top-level constructs.
If your /etc/hosts file contains something like this:
127.0.0.1 localhost localhost.localdomain.
Then both Python and Go will resolve the FQDN as localhost.localdomain.
However, in Go we additionally call net.LookupCNAME(), which converts
localhost.localdomain back to just localhost, since it comes first in
the /etc/hosts line. In Python, we need to also do the equivalent CNAME
lookup, or else we won't match the hostname that Vitess sees.
Add travis configuration and dependencies script
Split integration test make targets to allow parallel execution in Travis
Add go packages required for coverage upload to Coveralls
Add coveralls and travis badges to README
Travis: Retry make targets to address flaky targets
3ee8a59c made ZK ports non-global which broke teardown in Java
integration tests. This is because the Java integration test helper
does not keep track of the ports assigned to ZK between setup and
teardown calls. This change makes sure that port assignment is called
exactly once during setUp and tearDown.