Граф коммитов

23 Коммитов

Автор SHA1 Сообщение Дата
Alain Jobart 9366062d16 Updating tests for new consul version.
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>
2018-03-30 12:56:17 -07:00
Alain Jobart a5a6fc287a Creating ZK higher level directories.
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.
2017-12-13 13:24:10 -08:00
Alain Jobart 156a196c58 Removing etcd-based integration tests. 2017-11-16 11:32:09 -08:00
Alain Jobart 8a3f720cfe Removing 'zookeeper' topo server implementation.
This will not be present in Vitess 3.0, replaced by 'zk2'.
Users should update their installs using the steps described at:
http://vitess.io/user-guide/topology-service.html#migration-between-implementations
2017-06-14 14:19:37 -07:00
Sugu Sougoumarane 7af23e1dde license: BSD->Apache v2.0
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.
2017-05-06 00:38:56 -07:00
Alain Jobart a34fe7ac2a Adding 'vtctl UpdateCellInfo' command.
To change a CellInfo once it's created.
2017-01-18 19:17:58 -08:00
Alain Jobart b983684b96 Implementing the Consul topology client.
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.
2017-01-05 08:55:02 -08:00
Alain Jobart a27b9c62dc Removing test_restart test.
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.
2016-12-29 14:30:05 -08:00
Alain Jobart 2eb97aaae7 New etcd 'etcd2' topology client implementation.
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.
2016-12-28 07:02:37 -08:00
Alain Jobart 9c1edb6cbd Topology refactor: adding zk2 topology.
- 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.
2016-12-15 16:40:53 -08:00
Liang Guo a15fbf3207 Update vtgatev2 test to better support testing gateway implementations. 2015-12-16 15:05:17 -08:00
Dean Yasuda f636e15166 Second pass of python lint fixes.
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.
2015-08-30 09:32:00 -07:00
Alain Jobart ad4dcbd726 Replacing all python %u by %d. Apparently it's what we need to do now. 2015-08-07 12:42:36 -07:00
Anthony Yeh d48074d215 Update etcd to v2.0.13. 2015-07-10 15:35:02 -07:00
Anthony Yeh 9f88ff3e30 Make utils.hostname use CNAME too, not just ZkTopoServer.
Other Python tests such as reparent.py also need the hostname
to match the one seen by Vitess.
2015-01-05 15:54:00 -08:00
Anthony Yeh f89ed0cf05 Resolve CNAME in Python ZkTopoServer to match Go's net.LookupCNAME().
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.
2015-01-05 13:47:43 -08:00
Alain Jobart 5bf39ba6bc Removing more zkocc tests. 2014-12-16 17:47:23 -08:00
Anand Henry d15af9ce82 Merge branch 'master' into travis-ci 2014-12-15 18:27:06 -08:00
Anand Henry cdfa764d7f Travis and Coveralls integration
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
2014-12-12 17:44:12 -08:00
Anthony Yeh 9145994e53 Implement etcd flavor for TopoServer. 2014-12-12 17:03:13 -08:00
Anand Henry e2cc996fda Fix teardown for Java integration tests
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.
2014-11-30 13:30:29 -08:00
Wang Jing 9f87cdba16 add logging.debug to enviroment.run to print debug info 2014-11-17 17:16:46 +08:00
Anthony Yeh 3ee8a59cf1 Make topo server flavor pluggable in integration tests. 2014-11-14 16:37:05 -08:00