Commit Graph

33 Commits

Author SHA1 Message Date
Erik Olof Gunnar Andersson 52ad1c4c13 Removed deprecated pool-manager implementation
The pool-manager has been deprecated since Newton and
is now being removed with the Train release.

Change-Id: Ib258043d492bb25e1c061d765b40885317c73804
2019-09-24 11:10:54 +00:00
Erik Olof Gunnar Andersson 4e3c35931d Make unit-testing more robust
* Cleaned up producer tests.
* Fixed a mutable argument.
* Removed unused rpc timeout override for devstack.
* Set retry interval to 0 in pool manager tests.

Change-Id: I4105d192e9de8b95c792969c7432cf6d5d9fb9fb
2019-02-19 23:40:08 -08:00
Nguyen Van Trung 274c2cb82c Migrate object to OVO (4)
This commit will migrate:
- Pool and PoolList
- Related objects

Co-authored-By: Dai Dang Van <daidv@vn.fujitsu.com>

Change-Id: I59da0628a9dc23efe8d8665bbf3359e652eaa8c9
Implements: blueprint designate-rolling-upgrade
2018-02-25 16:07:38 +00:00
Graham Hayes 46c1c2a8dd
Update tests to fix gate
Change-Id: I6f9814581645eda09fe9c9a87993ab1b51c79133
2017-09-28 14:55:42 +01:00
Nguyen Van Trung 02fd771d97 Add '.' into zone format in _build_zones method
- This bug will affected to Periodic sync validation.
- 'test_periodic_sync' method will raise error if Zone object
perform validate with schema vadilator.

Co-authored-By: Dai Dang Van <daidv@vn.fujitsu.com>

Change-Id: I83aff40022bab1bb308a319e58a8bf1de297429b
2017-05-25 06:30:52 +00:00
Hieu LE 2de180038e Fix wrong usage of producer interval type in UT
The test is now more strict in usage of configuration type.

Change-Id: I12439bd39c0d51cb5688d45501451a064c9a9bfa
Closes-Bug: #1690793
2017-05-15 18:11:32 +07:00
Cuong Nguyen 423e539e1e Use designate.utils.generate_uuid instead of str(uuid.uuid4)
This patch replaces str(uuid.uuid4) with designate.utils.generate_uuid

Change-Id: I424a13f9d241930414bfb4c4508fc56de2df0dcc
Closes-Bug: #1656765
2017-01-16 16:12:08 +07:00
ZhiQiang Fan b9ce7e5903 replace logging with oslo.log
oslo.log provides more features and is a fundamental recommended
library to use.

Also the library oslo.log provides compatibility for log levels,
logging namespace is not needed.

Change-Id: I5636cdf3f804d4f811bd05add3fb42c0beea58a2
2016-04-26 02:59:12 +08:00
Kiall Mac Innes e612a3974f Enable use of Pools YAML
This change adds the tooling to use the DB Tables created for pool
config data and the tooling to migrate the config info itself.

Change-Id: If99dbf527ef1ac0f05f15fe77f68f64e357fe0a5
2016-03-17 19:13:31 +00:00
Tim Simmons defe3a8f29 Actually poll for zone deletes
- This implements a few `TODO`s in the code around actually polling
nameservers for zone deletes. I found this necessary for changes
that were truing up missed DELETEs, and wanted to make a poll/
update_status call to verify deletion across a fleet of nameservers
when one was down.
- This originally failed in PowerDNS, because in older versions
that are still in all the distro repos, PDNS responded with a
NOERROR and empty answer section when it got a query for a zone
it knew nothing about. NEAT.
http://blog.powerdns.com/2015/03/02/from-noerror-to-refused/

- NOTE: This increases timeout for functional tests and we maybe
shouldn't do that.

Change-Id: Ied1e5daf4798127e00a06265164759d98fc9ba72
2016-02-16 22:30:37 +00:00
Tim Simmons 04e26c32d2 Improve performance and utility of Recovery
This makes a couple small, but significant changes to periodic recovery.

- Change the CUD calls for periodic recovery to use the Pool Manager's RPCAPI.

Periodic recovery is charged with fixing problems that have come about in
the normal course of operation. Sometimes things go very wrong and there
are a lot of resources that have an ERROR state. This change allows the work
generated to be distributed among active `designate-pool-manager` processes.
Hopefully resolving the issues faster, and reducing risk of random failure on
the one process generating the recovery events.

- Include zones that have been PENDING for a long time

After a certain time, a product of timeouts, intervals, and delays, changes
either should have successfully propagated, or gone to an ERROR state.
Unfortunately this doesn't happen on occaison. Certain random failures and
undiscovered bugs leave zones hanging out in PENDING state forever. By treating
these as states as errors, we (hopefully) ensure that Designate will clean up
these zones and return them to the happy path.

Change-Id: Ifb375bc9383e7dd8fd6e51a42a4a50dc5015cb13
2016-02-16 16:29:12 -06:00
venkatamahesh 999cb1f2de Fix misspellings
Change-Id: I9f414d52e3c169fac85a44c09be3388aec63063b
2016-02-04 14:13:51 +00:00
Federico Ceratto 8b761de321 Add retry logic on periodic_sync
Change-Id: I15dadb0d90c7cbdd5fcead9e64398c75be3304b5
Closes-Bug: #1523691
2016-01-15 10:44:20 +00:00
Federico Ceratto 9e87843b4d Add Pool Manager tests
Refactor Pool Manager

Change-Id: I468a53a8f5fb3a0e5d50565476db57700dac02d3
2016-01-04 14:46:50 +00:00
Federico Ceratto 937e6dd523 Set zone in ERROR status on periodic sync fail
Improve testing
Code style cleanup

Change-Id: I1d65ed13fc185858ffe477e4bca6303e01a12c1d
Closes-Bug: #1416263
2015-12-09 17:11:53 +00:00
Graham Hayes c5949ccb28 Rename all references of Domain to Zone
This is a pretty invasive change :)

A non complete list of changes:

* Database Tables
* Database Columns
* Designate Objects and fields on Objects
* Designate Objects Adaptors stop doing some of the renames
* All RPCAPI versions are bumped - totally backward
  incompatable (function names have changed)

Change-Id: Ib99e918998a3909fa4aa92bf1ee0475f8a519196
2015-11-17 15:22:16 +00:00
Bertrand Lallau 69217969ef Use assertTrue/False instead of assertEqual(T/F)
Usage of assertEqual(True/False, ***) should be changed to a more
meaningful format of assertTrue/False(***).

Change-Id: I8623f5534f00ea1690f74a297488957a8d35f074
Closes-Bug: #1510001
2015-10-30 20:02:16 +01:00
Jenkins e362e06a45 Merge "Use assertFalse instead of assertEqual(False, ***)" 2015-10-13 01:50:20 +00:00
TimSimmons 94dfad359f retry creates/deletes in the pool manager
- The pool manager doesn't retry creates/deletes right away. If there's
just a small net split, or the DNS server has some temporary failure, trying
a second time will usually succeed. This should fix a lot of premature ERROR
states

Change-Id: Ib61110c4e460e93b8b5cfa8a9256151a5cabc43b
closes-bug: #1503350
2015-10-06 11:08:13 -05:00
sonu.kumar f9d5266ea0 Use assertFalse instead of assertEqual(False, ***)
The usage of assertEqual(False, ***) should be changed to a more
meaningful format of assertFalse(***).

Change-Id: I133f7784280132ca1dcfeeba5f42bb17806a497a
2015-10-06 11:09:40 +05:30
Tim Simmons 520c32e514 Refactor notify logic into backends
The idea here is, like many things, the time and frequency of sending
NOTIFYs is not the same for every backend. So we let the backends decide
when to send their NOTIFYs. Ideally this makes the Pool Manager code simpler
and the backend code easier to understand, and avoids sending some
unnecessary NOTIFYs.

This requires a change to MiniDNS' rpcapi to make notify_zone_changed and
get_serial_number take a host and port, instead of a nameserver object.

Change-Id: I8d67cebeecc8261e715849aefeafd20f0d60d304
2015-08-12 18:57:57 +00:00
Doug Hellmann f9c55abbff Drop use of 'oslo' namespace package
The Oslo libraries have moved all of their code out of the 'oslo'
namespace package into per-library packages. The namespace package was
retained during kilo for backwards compatibility, but will be removed by
the liberty-2 milestone. This change removes the use of the namespace
package, replacing it with the new package names.

The patches in the libraries will be put on hold until application
patches have landed, or L2, whichever comes first. At that point, new
versions of the libraries without namespace packages will be released as
a major version update.

Please merge this patch, or an equivalent, before L2 to avoid problems
with those library releases.

Blueprint: remove-namespace-packages
https://blueprints.launchpad.net/oslo-incubator/+spec/remove-namespace-packages

Change-Id: Ia21c15e8eca6bf456f7cfe13f815f5ce068601e7
2015-05-06 20:36:49 +00:00
Doug Hellmann 1ff8469ef7 Drop use of 'oslo' namespace package
The Oslo libraries have moved all of their code out of the 'oslo'
namespace package into per-library packages. The namespace package was
retained during kilo for backwards compatibility, but will be removed by
the liberty-2 milestone. This change removes the use of the namespace
package, replacing it with the new package names.

The patches in the libraries will be put on hold until application
patches have landed, or L2, whichever comes first. At that point, new
versions of the libraries without namespace packages will be released as
a major version update.

Please merge this patch, or an equivalent, before L2 to avoid problems
with those library releases.

Blueprint: remove-namespace-packages
https://blueprints.launchpad.net/oslo-incubator/+spec/remove-namespace-packages

Change-Id: Iae62b48993eef3b31420f8cc245a55f5e303c4fc
2015-04-28 18:32:15 +00:00
Kiall Mac Innes 0877cddb1c Update PM pooling defaults
Based on testing with multiple PM/mDNS/Nameservers etc in
a production-ish deploy, increasing these counts and
intervals reduces the chances of a zone entering ERROR state
and requiring correction via the periodic sync/recovery
timers.

The tests currently hardcode some of the config values as
expected arguments, we'll want to fix this up to be less
brittle ASAP.

Change-Id: Ib999a6b21ab271c1c46bca5319e5ba204fe951c1
2015-04-18 10:52:42 +01:00
Kiall Mac Innes 15a81095c5 Add also-notifies support to Pool Manager
Change-Id: I2bf72390fde1fc0296df684074260cfe5ff1d883
2015-03-31 16:48:44 +01:00
Kiall Mac Innes 3386d9539c Implement Pool Targets
We separate out the idea of targets (backends you write to), to places you read
from (DNS servers you query). This allows for backends like Akamai/Dynect/Agent
to work correctly with multiple DNS servers behind one target.

Change-Id: If1060ccd83bce8201f52e9927789db21fc2675c9
2015-03-31 16:48:44 +01:00
Vinod Mangalpally 810c9e8f16 Add memcache support to Pool Manager
* Change the cache interface to have only store, retrieve
and clear.
* Add memcache support to Pool Manager
* Add tests

Change-Id: I8b89846adfe9839b7297f4da0b249598445fcaad
Partial-Bug: 1413346
2015-02-19 14:58:56 -06:00
rjrjr 565e5026eb Ensure Pool Manager Cache is Cleared
When actions (create, delete, update) are completed for a domain, remove
the statuses from the pool manager cache.

Change-Id: Icb452e3c83dca5bbcbf38ab44394b61a26867a3b
Closes-Bug: #1408202
2015-01-21 17:48:30 -07:00
rjrjr 679c420878 Call the Correct Pool Manager Instance for the Domain
Rather than check to see if the domain is in the Pool Manager instance in
the Pool Manager service, call the correct Pool Manager instance for the
domain.  This is done by:

- Having each Pool Manager instance listen on it's own topic
- Client calls the Pool Manager instance by topic

The topic per instance is 'pool_manager.<pool_id>'.

Change-Id: I4211601305670c6b972fb778dd68fe511a34c777
Closes-Bug: #1412605
2015-01-20 13:43:44 -07:00
Vinod Mangalpally 293390f6e4 Update mDNS to accept server object
Mdns now accepts a server object rather than
destination host:port. This simplifies processing on the
pool manager.

Change-Id: I17ee0d65167cbc57098e5f0fd75593f75bf946b3
Closes-Bug: 1412601
2015-01-19 20:00:15 -06:00
rjrjr 73a9703f08 Pool Manager Throws An Error When No Servers are Defined
Before when no pool servers were defined, Pool Manager would run and throw a
ZeroDivisionError.  Now, Pool Manager throws a NoPoolServersConfigured error
and stops running.

Change-Id: I534e1fc813b8bd35209acd2574a5b17e171c7de9
Closes-Bug: 1403591
2015-01-16 08:29:14 -07:00
rjrjr fe9c1ac77a Add Unit Tests for Pool Manager
Add basic unit tests for the pool manager service.

More enhanced unit tests will be addressed with bug 1411700.

Change-Id: I3cbb08e4d2ae19cc2da69a96dcdaef9933767560
Closes-Bug: 1408201
2015-01-16 07:51:16 -07:00
rjrjr 4e75f5b54c Pool Manager Integration with Central
Full integration of Pool Manager with Central (no longer using the proxy
backend driver.)

This patch fixes:

- Fix concurrent requests that cause lockup issue (bug #1392762)
- Fixed bug where creating a domain fails the first time in mdns
- Fixed bug where records in recordsets do not have the correct
  status/action/serial
- Changed 'ADD' to 'CREATE' for ACTION column
- Ported Fake backend to pools
- Removed transitional pool_manager_proxy backend

Change-Id: Icb40448f760ff2a573d08a04bb4dec1f550119bb
Closes-Bug: 1392762
2014-12-15 18:48:51 +00:00