Commit Graph

233 Commits

Author SHA1 Message Date
Jan Hartkopf 60a6ceed09 Add support for catalog zones
This implements the spec to introduce support for providing catalog zones.

Co-Authored-By: Nico Keller <nico.keller@inovex.de>
Change-Id: Ic9e593d661f2eb1db59a5b235521e0746489f9bb
Signed-off-by: Jan Hartkopf <jhartkopf@inovex.de>
2024-01-22 15:22:13 +01:00
Erik Olof Gunnar Andersson c0a5572814 Add middleware to limit request body size to api-paste
Closes-Bug: #2036642
Change-Id: Ia4d50ff0b39e3a7ed31829fbabeae4fd24cf49c9
2023-09-19 20:36:09 +00:00
Takashi Kajinami 18b6faacc8 Fix missing oslo.versionedobjects library option
This ensures the options for oslo.versionedobjects library are
included in the file generated by oslo-config-generator.

Change-Id: Icc60e155c88efdb2a2c59637b35b19c3e92918c0
2023-08-08 15:02:20 +09:00
Igor Malinovskiy f39704dcd8 Implement sharing of zones
Author: Igor Malinovskiy <u.glide@gmail.com>
Co-Authored-By: Sergey Drozdov <sergey.drozdov.dev@gmail.com, sergey.drozdov93@thehutgroup.com>
Co-Authored-By: Michael Johnson <johnsomor@gmail.com>

Change-Id: Ibd780f3c695a95be00ff97d7736d5a0bebea79b9
Closes-Bug: #1714088
Depends-On: https://review.opendev.org/c/openstack/designate-tempest-plugin/+/872069
2023-02-14 01:54:15 +00:00
Takashi Kajinami 16eba621b7 Sync rootwrap.conf from oslo.rootwrap
The current rootwrap.conf file is outdated and doesn't include some
parameters. This change updates the content to make it consistent with
the latest example file in oslo.rootwrap.

Change-Id: I5fe06cf99bb9787ec3afc67ab60a7330fe281513
2022-08-11 05:04:16 +00:00
kpdev 9541a29761 Integrate OSprofiler and Designate
*) Add osprofiler wsgi middleware

This middleware is used for 2 things:
1) It checks that person who want to trace is trusted and knows
secret HMAC key.
2) It start tracing in case of proper trace headers and add
first wsgi trace point, with info about HTTP request
*) Add initialization of osprofiler at start of serivce.

You should use python-designateclient with this patch:

https://review.opendev.org/#/c/773575

Run any command with --os-profile SECRET_KEY

  $ openstack zone create --email <email_id> <zone_name> \
    --os-profile SECRET_KEY
  # it will print <Trace ID>

Get pretty HTML with traces:

  $ osprofiler trace show --html <Trace ID> --connection-string \
   <connection_string> --out <output.html>
  e.g. --connection-string can be redis://localhost:6379

Note that osprofiler should be run from admin user name & tenant.

Implements: blueprint designate-os-profiler
Change-Id: I2a3787b6428d679555a9add3a57ffe8c2112b6d3
2022-02-07 07:12:18 +00:00
Takashi Kajinami d65faea1d5 Add missing [oslo_reports] options
The oslo.reports library provides some options under the [oslo_reports]
section. This change ensures these parameters are rendered by
the oslo-config-generator command.

Closes-Bug: #1940733
Change-Id: Ia5491fc97e431e5fce52091729738e6958f764e2
2021-08-21 17:27:36 +09:00
Thomas Goirand 3321092928 Add a /healthcheck middleware
The /healthcheck URL, as provided by oslo.middleware, is very
useful for operators to setup haproxy and to do monitoring.
Such feature is already in many services like Keystone, Glance,
and others.

The same type of patch has been approved in Neutronm, Heat, and
Cinder. It's under discussion in Nova, where they want to check
more than just the wsgi app, though the pricinple to add it has
been accepted already.

Change-Id: I8f24431db0ec88385b4b916e181d6da3e598c764
2020-07-24 22:21:05 +00:00
Sergey Kraynev 318b8d0319 Implement create/delete zone for Akamai v2 API
- Ignore duplicate Zone error
- Handle error when contractId or gid is missed
- Ignore port for masters servers, because Akamai uses only 53 port and
does not allow to specify any port in list of masters servers.
- Added timeout and retries for soft Zone Delete
- Added handling errors on the delete zone action
- Added Log info message with RequestId on soft zone delete
- Added processing for TsigKey during creation zone
- Added devsatck_plugin for akamai_v2 backend

Depends-On: https://review.opendev.org/#/c/692819/4

Change-Id: Ib221f4cf0371e70fc6900582d826ffc1bdfc12b9
2020-01-16 18:54:30 +00:00
Erik Olof Gunnar Andersson a09064a5d1 Refactored service layer
Service layer has been simplified by removing abstraction
and making the implementation more in line with other
OpenStack projects.

Moved Heartbeat code out of Service class and
into the console scripts. We only need one instance
of the Heartbeat Emitter.

Cleaned up the WSGI code by making use of the
reusable oslo_service.wsgi code.

* Added Heartbeat to designate-sink.
* Cleaned up and refactored Service layers.
* Fixed various bugs e.g. errors on shutdown.
* Removed deprecated options host, port etc.
* Simplified Heartbeat implementation.

Closes-Bug: #1442141
Change-Id: I536b92407bf6ca5bddf4c048909cd13d4e094d26
2019-09-20 15:10:46 -07:00
Erik Olof Gunnar Andersson a53c3daf16 Moved most configuration into designate.conf
Based upon the established conf paradigm used in Nova,
this patch moves most of the configuration to a
central location. Making config a lot easier to
manage, as well a lot easier to locate.

There is still some configuration listed in classes,
that I would like to eventually move to
designate.conf as well, but to lower complexity not
all config was moved.

General changes
* Centrelized most configuration under designate.conf.
* Cleaned up configuration.
* Simplified config generation.
* Renamed generated config to designate.conf.sample.

Previously broken
* xfr_timeout now in the appropriate section.
* memcached_servers now in the appropriate section.

Previously missing from sample config
* allowed_remote_exmods listed in sample config.
* backend:akamai section listed in sample config.
* backend:dynect section listed in sample config.
* backend:infoblox section listed in sample config.

blueprint centralize-config-designate

Change-Id: I3be68bf294157631a9bac128df0841220020de96
2019-05-28 23:54:00 +00:00
Nguyen Van Trung 063fb8661b Allow to check pep8 along with D000
This patch only setup package dependency which named Pygments
for this test. Pygments also exist item in lower-contraints.txt
which does not setup along with tox env.

Change-Id: I1a75150b7fd813a4126716b898a55f35c64c5ec6
2018-05-23 11:01:57 +07:00
Graham Hayes 54be325783 Fix policy name
The `update_service_status` policy was missed
named as `update_service_service_status` which seemed
to cause issues for other rules.

Closes-Bug: #1753503

Change-Id: Ic2952c36c03a4cb7a148f1518766ddefb9144dcd
2018-03-15 12:14:36 +00:00
Graham Hayes c318106c01 Remove v1 API
This completes the long awaited removal of the V1 API.

Change-Id: I30c8a5e8569b1b86286c5e3cb07856c06ebe5803
2018-01-11 14:13:43 +00:00
Zuul 53d6dc069e Merge "Add pools.yaml.sample-infoblox file" 2018-01-05 13:12:04 +00:00
Jens Harbott 33a5245874 Remove partial sample config
Instead of having a partial sample config that may be outdated, have
users reference the config file the can be generated from source by
running "tox -e genconfig". Also change the name of the generated config
so that it is covered by our .gitignore and matches the README.

Change-Id: I49afb68a170abffaf7852dd7a2dc837e4cf4a756
2017-12-07 09:00:10 +00:00
Nguyen Van Trung 935a415dee Improve powerdns pools in yaml file
'nameservers' value should listed out correctly IP address
of powerdns server in the yaml pool.

Change-Id: I83fd498c7d30fb116a6c34123453eec8aa84d8f8
2017-11-06 17:02:43 +07:00
caowei 27dcfae3f1 Add pools.yaml.sample-infoblox file
Add an external infoblox sample file.
Change-Id: I05290e45e8822c58228213ea3df5d15ad633b49d
2017-11-06 15:18:37 +08:00
Dai Dang Van d8ff46a8fd Implement policy in code (4)
This commit will move all default policies to code for:
- zone
- zone_export
- zone_import
- zone_transfer_accept
- zone_transfer_request

Change-Id: I9945fe66d127696907695c73ecef77a6f07acd38
Co-authored-By: Nam Nguyen Hoai <namnh@vn.fujitsu.com>
Implements: blueprint policy-in-code
2017-10-24 09:24:10 +00:00
Dai Dang Van 2fa4f50e89 Implement policy in code (3)
This commit will move all default policies to code for:
- quota
- record
- recordset
- service_status
- tenant
- tld
- tsigkey

Change-Id: Id090b89b32116a195530484b0d92fc6c9041a6c9
Co-authored-By: Nam Nguyen Hoai <namnh@vn.fujitsu.com>
Implements: blueprint policy-in-code
2017-10-24 09:23:58 +00:00
Dai Dang Van d43fc5fc11 Implement policy in code (2)
This commit will move all default policies to code for:
- blacklist
- context
- diagnostics
- pool

Change-Id: I0c94ecaadba21b69b1fe4c0cd924e2b9b12c4782
Co-authored-By: Nam Nguyen Hoai <namnh@vn.fujitsu.com>
Implements: blueprint policy-in-code
2017-10-24 09:23:48 +00:00
Dai Dang Van 271eba7758 Implement policy in code (1)
This commit will prepare for implementing policies in code.

- https://governance.openstack.org/tc/goals/queens/policy-in-code.html

Change-Id: Iea587cb6f4281b950eaca6bdaac3a8ea5de76c67
Co-authored-By: Nam Nguyen Hoai <namnh@vn.fujitsu.com>
Implements: blueprint policy-in-code
2017-10-24 09:23:25 +00:00
Nguyen Van Trung 3d72b9f5a1 Change correctly producer-task conf
We have "zone_purge" [1] in code-base which need to replace
old name "domain_purge" [2].

[1] https://github.com/openstack/designate/blob/master/designate/producer/tasks.py#L116
[2] https://github.com/openstack/designate/blob/master/etc/designate/designate.conf.sample#L295

Change-Id: I605eb5711bd395a571628ab67772e230f74beba7
2017-07-31 10:46:07 +07:00
Nguyen Van Trung 416ae6cd08 Auto-generate designate.conf.sample via genconfig testenv
- Keep currently config in the Designate
- Fix some warning about missing help string
- Auto-generate sample config via genconfig testenv.
- Add an instruction in README about genconfig
- Create config sample along with whole service, backend
- Create opts.py to focus list_opts.

Change-Id: Iead7772cd13316c9f4adafe1b1e70d36bbc6a11a
2017-07-01 21:32:16 +07:00
Graham Hayes 583d8eaf6e Turn off V1 API by default
Change-Id: Ia3179319c0a0e56a2e16b8d9c6dd80515c1bd36d
2017-02-15 15:55:18 +00:00
MasayaAoyama 28554cbce3 change from domain to zone at configfile
In the sink config, we use domain_XXX parameter.
But it does not work now,
because it is renamed from "domain" to "zone"
when naming rule is changed
("openstack zone XXX" cli is released).

Change-Id: Idb988fedd739692996474065e8f557c2ef54aec1
Closes-Bug: #1655616
2017-01-11 20:15:49 +09:00
zhangyanxian 366807f706 Fix typos in models.py & bind9.filters
TrivialFix

Change-Id: I2019823fff85661ac70531e448c82187fecb541c
2016-09-29 08:59:26 +00:00
Federico Ceratto 2f061879cd Add Monasca-statsd metric generation
Statsd integration is disabled by default.
Add a simple local daemon for testing/devstack use.

Change-Id: I990472fa059afde37f7e4a1284360c17162aab49
2016-09-09 17:50:11 +00:00
Jenkins dff1c3778b Merge "Worker Model" 2016-08-25 21:07:54 +00: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
Alin Balutoiu 95f451dc8a Add support for Microsoft DNS Server backend
Currently, there is no support for Microsoft DNS
in designate. This patch addresses this issue
by adding support for Microsoft DNS Server using
an agent backend in designate.

Change-Id: I8db1906e17e5fb20fa6f3e5d1f13b2d701f0c032
Implements: blueprint msdns-backend-support
Depends-On: I029747555a58e0a8e362b65e6c0c470cf2774e42
2016-08-22 12:19:54 +03:00
James Li f40681c3df Improve performance of recordsets API
The performance of /v2/recordsets API was found slow when
filtering on large amount of recordsets. The patch proposes
the following ways to improve the performance,
and was tested with 1M recordsets.

1. To explicitly mention a correct table index in sql queries
for different sort keys and filtering keys.
We found mysql optimizer is not able to choose the most suitable index;

2. Introduce a new header 'OpenStack-DNS-Hide-Counts' to give operators
the flexibility of showing total_count or not, because we found that
the count query does not scale well on a large amount of records.

Performance results are at: https://gist.github.com/jamesyli/2eb9fb474a493477a9beb42fe122180f

DB migration
Change-Id: I7f3a09ce2c7396ff6ad02d3b5d562d186f66ed30
2016-08-12 15:54:36 +00:00
Tim Simmons efa6d234a3 Change bind -> bind9 in docs, sample configs
`bind9` is the proper name for the backend

Change-Id: I84268f6c97f67eff4a29ee6743a0d8faa25e41e2
2016-07-29 17:13:38 +01:00
Jenkins ebaca6b80b Merge "different-format-for-ipv4-and-ipv6" 2016-07-26 16:22:13 +00:00
Kumar Acharya 0568b66d23 different-format-for-ipv4-and-ipv6
This change will allow users to define seperate
formats for ipv4 and ipv6 addresses.
this requires formatv4 and formatv6 to de defined in
designate.conf instead of format.

format has been marked depricated

Change-Id: Ief685ba6a00da5100013f4ab71768c661f37ee13
Implements: blueprint different-format-for-ipv4-and-ipv6
2016-07-19 17:09:35 +05:30
Federico Ceratto 4e7c65c312 Add gdnsd backend
Change-Id: Iee4227134b1d6c506e66085dcd417fe60e460ffb
2016-07-11 13:22:23 +01:00
Federico Ceratto be7e32dfaa Add djbdns backend
Add docs and basic tests
Update config sample file and support matrix
Change-Id: I709cea4e321f6bbee3b0f9f718fa6a9836af3ca5
2016-05-20 10:46:36 +00:00
Federico Ceratto 5d328f07aa Add Knot DNS backend
Change-Id: I885c003afc2496ba4aa9631568be02e7d4654e52
2016-05-17 11:59:27 +01:00
Jenkins 6dc25dfbcb Merge "Enable V2 API as default" 2016-05-13 10:50:34 +00:00
Jeff Feng 3cf67d6e75 Trivalfix of option name in designate.conf.sample
Changing max_domain_name_len to max_zone_name_len

Change-Id: I912d44dc8ba9bb145ceb05b0a4256c54a7d161d2
2016-05-10 13:47:38 -05:00
Jeff Feng c23c99ad6e Enable V2 API as default
Setting enable_api_v2 = True as default in configuration

Change-Id: I3ea14141ea4b1cf059462936da632599f7f42d35
2016-05-10 13:35:51 -05:00
Jeff Feng 26dc629c4d Typo fix
Change-Id: Ib9bfef3907a9f34f497bcb3c2f74d291d66bad15
2016-05-09 13:59:01 -05:00
Kiall Mac Innes 82fcd5438e Support multiple API and mDNS listen address pairs
Change-Id: Ic672e0f693b8f63abb729b560753cc75fb3c7094
Closes-Bug: 1536304
2016-05-04 14:33:56 +01:00
sharat.sharma 0343a7d83d Changed the spelling of command in sample file
Change-Id: Iebdf154c83485bc376a186c3789bdd8e96373d5f
Closes-Bug: #1571674
2016-04-18 19:57:24 +05:30
Endre Karlson 7abae80c61 Add support for getting Service Status
Change-Id: Iaf10d8486ac8015ecf9f394dfbf074bfb863fb78
2016-04-12 16:32:17 +02:00
Tim Simmons 5386659b90 Remove pool config from sample config
This has been deprecatd in favor of YAML and
`designate-manage`:
http://docs.openstack.org/developer/designate/pools.html

Change-Id: I929bd644ffb753200e4be739d6d7dc678ff81e7a
2016-04-05 19:46:24 +01:00
Clenimar Filemon 34fe2eca58 Update config samples to show Identity v3 params
As Designate requests its service token using Identity v3, the
config.sample and some docs should reflect this. This patch updates
these files in order to conform to new v3 parameters.

Change-Id: I3205751f0c818f85ffe2fbb2468c6c48fd27eb91
2016-03-29 12:28:02 -03: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
Graham Hayes 8fabf5f6f9 Add scheduler for pools
This adds a scheduler to central to decide what pool to place a newly
created zone in.

Change-Id: Ie4146212209fa4b22bc271e3f4ce76104090ac9b
2016-03-14 20:59:58 +00:00
Michael Krotscheck 771f5a205f Moved CORS middleware configuration into set_defaults
The default values needed for designate's implementation of cors
middleware have been moved from paste.ini into a common
set_defaults method, invoked on load. Unlike similar patches
on other services, this patch does not include config-generation
hooks, as designate does not use it.

Change-Id: I6661f67bbdc36e17bc297128b470007e4762b603
Closes-Bug: 1551836
2016-03-04 06:34:15 -08:00