Commit Graph

14 Commits

Author SHA1 Message Date
Thomas Herve f54f76ceae Fix task tests under py3
This makes all the unit tests pass under python3 \o/

Change-Id: I6f145ece1b0ce12843e0b9754467a79f88770bdc
2017-06-29 10:02:03 +02:00
Thomas Herve e0a670a030 Fix pool tests in py3
This fixes an assertion which was trying to sort dictionaries: it works
around it by comparing items instead.

Change-Id: Iaa9764102a18d4b4cd6c2042791991ae1ab114e3
2017-06-29 10:01:11 +02:00
Thomas Herve ff32da0bcc Make central service tests py3 compatible
This enables tests for central service, by not comparing None and int
values.

Change-Id: I001c0a5628ec2ed1c3fe53b52786a0ade16c9c95
2017-06-29 09:16:58 +02:00
Thomas Herve 6bffad2e5e Make the Zone object py3 compatible
This fixes the tests for the pool manager by making the Zone class
hashable, so that it can be used in sets.

Change-Id: Ief72a0787aa91f3e4e2b599bd0d573ac0eb9e881
2017-05-30 22:11:24 +02:00
Thomas Herve 92598a62f1 Fix remaining API tests under python3
This fixes the address_name method to return text, as the to_text
method from dnspython returns bytes, and make 3 new test modules pass.

Change-Id: I5d0e75bd9acdd517ed4a94b1959783a2437cf5a5
2017-05-30 21:53:55 +02:00
Thomas Herve 9282ae8b0d Unskip and fix handler tests in py3
This also removes from the blacklist tests passing.

Change-Id: Ic530fc9c60932cbd3742cc6026261734da7c4add
2017-05-23 14:47:22 +02:00
Thomas Herve 0c62a69eba Fix agent unit tests on py3
A bunch of agent tests fail locally for me (for a good reason it seems).
This fixes it by encoding the result of zone.to_text, which is bytes.

Change-Id: I52ce3eafe3e27d022220baf5e15bf1e4958740d5
2017-05-23 12:05:31 +02:00
Hieu LE 4faac428bf Blacklist python 3 UT because of eventlet bug
Eventlet>=0.21.0 has been blocked in uc [1] due to bug [2].
Let's re-block failed py3 UT based on eventlet 0.21.0 until
new release lands.

[1]. https://review.openstack.org/#/c/464687/
[2]. https://github.com/eventlet/eventlet/issues/401

Change-Id: I5b68731519bc7de1273ef9d397ed908be63db64e
2017-05-18 02:41:11 +00:00
Hieu LE 7e56f5dd59 Unskip py3 tests that depend on eventlet 0.21.0
Eventlet 0.21.0 has landed on uc, so these tests either no longer exist,
or don't fail under python 3 anymore.
They can be removed from the python 3 blacklist.

Change-Id: I2a66f65aa5aa8e1ec36d6e3cc4a886e73b3a6faf
2017-05-15 14:30:24 +00:00
Diana Clarke 0ebe7750bb Unskip py3 tests that no longer fail
These tests either no longer exist, or don't fail under python 3
anymore, so they can be removed from the python 3 blacklist.

Change-Id: Ic4e3f8cbe21360268bfde0ab5847820e5cf7808e
2017-04-27 16:14:11 -04:00
Hieu LE cbdec03b82 Refactor NSD4 UT for using upstream eventlet
This patch refactor NSD4 UT by mocking out instead of using eventlet
for fake NSD4 backend.

This patch also remove pinned eventlet version and use upper constraint
of eventlet for UT.

Closes-Bug: 1686601
Change-Id: Iabc7fe6a1f6932959f4531a333bcbd1ad6f06e4f
2017-04-27 17:11:16 +07:00
Tim Simmons 81ce132e90 Worker Model
- More information about the actual worker code can be found
  in `designate/worker/README.md` and in the inline docstrings

- Stand up a `designate-worker` process with an rpcapi, all
  the usual jazz

- Implement a base `Task` class that defines the behavior of
  a task and exposes resources to the task.

- Implement CUD Zone tasks, which includes Tasks that poll for zones,
  send Notifies, and update status. These are all done in parallel
  with threads using a shared threadpool, rather than iteratively.

- Implement a `recover_shard` task that serves the function
  of a periodic recovery, but only for a shard. Call that
  task with various shards from the zone manager.

- Put some shims in central and mdns so that the worker can
  be switched on/off with a few config values.

- Changes Zone Manager -> Producer
    - Removes zm rpcapi
    - Adds startable designate-producer service
    - Makes zone-manager an alias for producer service with a warning log
    - Lots of renaming

- Moves zone export to worker
    - API now uses central_api.export_zone to get zonefiles
    - Central uses worker_api.start_zone_export to init exports
    - Now including unit tests
    - Temporary workarounds for upgrade/migration move the logic
      into central if worker isn't available.

- Deprecates Pool manager polling options and adds warning msg on
  starting designate-pool-manager

- Get some devstack going

- Changes powerdns backend to get new sqlalchemy sessions for each
  action

- Sets the default number of threads in a worker process to 200,
  this is pretty much a shot in the dark, but 1000 seemed like
  too many, and 20 wasn't enough.

- Grenade upgrade testing

- Deprecation warnings for zone/pool mgr

The way to run this is simple, just stop `designate-pool-manager`
and `designate-zone-manager`, toggle the config settings in the
`service:worker` section: enabled = true, notify = true
and start `designate-worker` and `designate-producer` and you
should be good to go.

Change-Id: I259e9825d3a4eea58e082303ba3bdbdb7bf8c363
2016-08-24 14:54:31 +00:00
Federico Ceratto 4bc65992ce Fix rrset serialization, improve mdns tests
Code refactor and cleanup
Add port number logging

Change-Id: Ied150676166e038a005d73884788d406ad0e296c
Closes-Bug: #1550441
2016-05-11 15:06:31 +01:00
Victor Stinner 1d9f44143e Fix the python34 check job
Add py34 test environment to tox.ini:

* Create a whitelist of tests which pass on Python 3: tests-py3.txt
* Run tests on Python 3 using ostestr and the blacklist

With this change, it becomes possible to make the python34 check job
voting to avoid regressions.

Change-Id: I06bbad4cfb26a9f9dcc0d924f4d9a85a557ba5ea
Partially-Implements: blueprint designate-py3
2016-01-21 17:37:19 +01:00