Commit Graph

290 Commits

Author SHA1 Message Date
Zuul 097ffc6df1 Merge "Bump hacking" 2024-03-18 10:37:22 +00:00
Takashi Kajinami cb47b4e00e Make edgegrid-python optional
The edgegrid-python library is not necessary unless akamai backend is
used, so this library should be an optional dependency to avoid pulling
unnecessary packages.

Note that akamai backend hasn't been updated since it was added 4 years
back. Probably we can deprecate and remove it assuming it's not really
used(or at least it's not maintained).

Change-Id: If13e722e5ec3cdcd11461201ea20b2dc022cce10
2024-01-22 21:47:31 +09:00
Takashi Kajinami 7472f515a6 Bump hacking
hacking 3.0.x is too old. This also removes the note about old behavior
of pip which has been changed in recent versions.

Notes:
- A few errors newly detected are also fixed.

- This also fixes the compatibility with flake8 >= 3.0 because flake8
  is also bumped when we bump hacking.

- pretty_flake8 tool is removed because it's not commonly used but
  needs maintenance effort to keep it in sync with newer releases

Change-Id: I8e91b06199bfbed1d6e9f8d62ddf52fafd60b7f9
2024-01-17 12:37:51 +09:00
Zuul c1332c04a2 Merge "Remove python-memcached indirectly used" 2023-10-31 15:51:49 +00:00
Takashi Kajinami 951f3f1fba Remove python-memcached indirectly used
The direct dependency to python-memcached was removed when pool-manager
was removed[1]. Now python-memcached is not directly required by
designate and it's part of indirect dependencies.

[1] 52ad1c4c13

Change-Id: Iaf3a5e3c92d5eec53aa9dcf5ef52636cd39b4362
2023-10-31 02:44:48 +00:00
Takashi Kajinami 1969478db1 Remove unused debtcollector
This library is no longer used since designate-agent implementation was
cleaned up by [1].

[1] 2868db4f66

Change-Id: I11e55be43020eb314356c9bafe209307ae0e5e8e
2023-10-31 11:21:01 +09:00
Takashi Kajinami 57da282b8b Drop unused os-win
The os-win library was used by designate-agent to manage Microsoft DNS
but the implementation was removed when designate-agent was removed[1].

The os-win library is part of the WinStackers project which was already
retired, so it will no longer be maintained.

[1] 2868db4f66

Change-Id: I66acc3c88da395e912f6336b5ba87e4de81de8ad
2023-10-27 00:21:10 +09:00
elajkat fd09a0cfc3 Use SDK instead of neutronclient
The python-neutronclient has been deprecated for the CLI since Ocata and
the python bindings "neutronclient" has been deprecated for removal as
of the 2023.1 (Antelope) release[1] in favor of using openstacksdk.
This patch migrates Designate from using the neutronclient to using the
openstacksdk for communicating with neutron.

[1] https://docs.openstack.org/releasenotes/python-neutronclient/2023.1.html

Co-Authored-By: Michael Johnson <johnsomor@gmail.com>
Change-Id: I0198f38afe3d5c32ea06d9e674ab0ff849f360e6
Related-Bug: #1999774
2023-03-25 06:06:30 +00:00
Erik Olof Gunnar Andersson 05a112177d Update for sqlalchemy v2.x compatibility
This patch updates Designate to be compatible with SQLAlchemy 2.x.

Depends-On: https://review.opendev.org/c/openstack/oslo.db/+/874858
Change-Id: I5b9cfb4b86bd7c342fd50d1b50dd12dce0c8e81a
2023-03-11 03:50:19 +00:00
Michael Johnson b6cfb7f10c Remove unused werkzeug requirement
The Werkzeug package was included in the designate requirements.txt, but it is
not used by designate.
This patch removes this requirement.

Change-Id: I29b1aba0e8aa455eed7977a5efe887f201963a3c
2023-02-17 00:55:33 +00:00
Zuul ab80467210 Merge "Use new get_rpc_client API from oslo.messaging" 2023-01-22 00:00:58 +00:00
Tobias Urdin 31b1959620 Use new get_rpc_client API from oslo.messaging
Use the new API that is consistent with
the existing API instead of instantiating the client
class directly.

This was introduced in release 14.1.0 here [1] and
added into oslo.messaging here [2]

[1] https://review.opendev.org/c/openstack/requirements/+/869340
[2] https://review.opendev.org/c/openstack/oslo.messaging/+/862419

Change-Id: Ibc2147fb08beae7a2190b9860e3342150c43dfab
2023-01-19 20:36:43 +00:00
Michael Johnson 969e80491c Bump minimum dnspython to 2.2.1 for python 3.10
This patch proposes bumping the minimum dnspython version to 2.2.1 to support
python 3.10 which is part of the antelope (2023.1) tested runtimes[1].

2.2.0 had a bug[2] and has been blocked in global requirements.

[1] https://governance.openstack.org/tc/reference/runtimes/2023.1.html
[2] https://github.com/rthalley/dnspython/issues/766

Change-Id: I43617fcf29e404bf58b1a3467f2aaf23c5acd460
2023-01-19 17:21:42 +00:00
Michael Johnson b3e3bbf9e2 Fix minimum versions in requirements.txt
It appears we need to bump some minimum versions for changes made in Zed.
This patch sets:
alembic>=1.8.0

Change-Id: I3e3e1a4701c52003e4adf2738b1ca8598d4cae47
2022-09-20 17:54:12 +00:00
Zuul 218e11ea20 Merge "Switch Designate to Alembic database migrations" 2022-08-30 05:11:25 +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
Michael Johnson 60c378763a Switch Designate to Alembic database migrations
Currently Designate is using sqlalchemy-migrate for database schema
migrations. sqlalchemy-migrate/migrate have been deprecated for some
time. This patch moves switches Designate to use Alembic for database
migrations.

Change-Id: I90ecb4d409b8b609b384997fa4cc9c65755409b3
2022-08-04 17:15:09 +00:00
Michael Johnson 968e3d348d Remove netaddr module requirement
This patch removes the 'netaddr' module from the Designate requirements list.
It replaces the use of netaddr in Designate with the python standard library 'ipaddress' module.

Change-Id: I2fb1549e1d6cbccf58c03810c7d74c8c378682d5
2022-08-02 22:02:13 +00:00
Zuul d05232fc07 Merge "Removed RPC calls from MDNS and moved them to the Worker" 2022-06-25 05:58:17 +00:00
Erik Olof Gunnar Andersson 8050680948 Removed RPC calls from MDNS and moved them to the Worker
This patch moved the remaining RPC calls away from the
MDNS service to the Worker and re-worked them to better
match the patterns used in the Worker. This means that
the MDNS service now only handles incoming DNS queries.

In addition the metrics backend has been removed as it was
only used by the MDNS RPC implementation and the monascastatsd
implementation no longer serves a purpose.

Closes-Bug: #1978742
Closes-Bug: #1978743
Change-Id: I5ef106717546a201fd62a51adacd43495c148cd4
2022-06-23 23:31:41 +00:00
Michael Johnson b5a7c6fc0d Update requirements for oslo.context>=4.0.0
Oslo context has made some changes we rely on for changing "tenant" to "project_id". Bump the minimum version of oslo.context required.

Change-Id: I0afa1f94edbb493041ec7cd49c5d235cc2ea71d2
2022-06-22 18:47:17 +00:00
Ghanshyam Mann 081a76a926 Drop lower-constraints.txt and its testing
As discussed in TC PTG[1] and TC resolution[2], we are
dropping the lower-constraints.txt file and its testing.
We will keep lower bounds in the requirements.txt file but
with a note that these are not tested lower bounds and we
try our best to keep them updated.

[1] https://etherpad.opendev.org/p/tc-zed-ptg#L326
[2] https://governance.openstack.org/tc/resolutions/20220414-drop-lower-constraints.html#proposal

Change-Id: I452a1149f417089a4b87f05b78c94c7a31fcbd66
2022-04-30 15:48:07 -05: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
Gunju Kim 771197c2f3 Remove Akamai (eDNS SOAP API) backend
The Akamai eDNS SOAP API this backend uses no longer exists at Akamai.

Related-Bug: 1946340
Change-Id: I6545781f263c6a3d124364785aedcf2518116485
2021-10-12 16:32:49 +00:00
Zuul 6fc04e72ec Merge "Replace md5 for fips" 2021-07-12 23:09:35 +00:00
Ghanshyam Mann 4797efae2e Fix oslo policy DeprecatedRule warnings
Since 3.7.0, oslo policy started the DeprecationWarning[1] if
deprecated_reason and deprecated_since param are not passed
in DeprecatedRule or they are passed in RuleDefault object.

These warnings are logged for every test which increase the
log size and sometime can full the log buffer and fail the
job.

[1] https://github.com/openstack/oslo.policy/blob/3.7.0/oslo_policy/policy.py#L1538

Change-Id: I7034a70950b787f1cdbc510e88ab777957339ba7
2021-07-04 18:04:14 -05:00
Ade Lee 7ea5643290 Replace md5 for fips
md5 is not an approved algorithm in FIPS mode, and trying to
instantiate a hashlib.md5() will fail when the system is running in
FIPS mode.

md5 is allowed when in a non-security context.  There is a plan to
add a keyword parameter (usedforsecurity) to hashlib.md5() to annotate
whether or not the instance is being used in a security context.

In the case where it is not, the instantiation of md5 will be allowed.
See https://bugs.python.org/issue9216 for more details.

Some downstream python versions already support this parameter.  To
support these versions, a new encapsulation of md5() has been added to
oslo_utils.  See https://review.opendev.org/#/c/750031/

In this case, md5 is used to calculate the hash of a database record
to ensure record uniqueness.

Change-Id: Ic2571caa71dc99c417ea0933d5d4947287cbe312
2021-06-28 14:13:58 -04:00
wangzihao 88a4be5e5c Remove six
Remove six Replace the following items with Python 3 style code.

- six.PY3
- six.moves.urllib
- six.PY2
- six.text_type
- six.string_types
- six.iterkeys
- six.moves.range
- six.add_metaclass
- six.moves.map
- six.moves.zip
- six.MAXSIZE

Change-Id: I4cd26693fac7c16f4fa3d3c0015cd7af796f0877
2021-06-22 06:41:24 +00:00
Ghanshyam Mann 1c0bd99c08 [goal] Deprecate the JSON formatted policy file
As per the community goal of migrating the policy file
the format from JSON to YAML[1], we need to do two things:

1. Change the default value of '[oslo_policy] policy_file''
config option from 'policy.json' to 'policy.yaml' with
upgrade checks.

2. Deprecate the JSON formatted policy file on the project side
via warning in doc and releasenotes.

Also replace policy.json to policy.yaml ref from doc.

[1]https://governance.openstack.org/tc/goals/selected/wallaby/migrate-policy-format-from-json-to-yaml.html

Change-Id: I81e7ee3243af11ebb3589f530533731b87178a96
2021-03-08 19:13:17 -06:00
Jens Harbott e8c901c323 Fix lower-constraints
An updated pip version has shown multiple inconsistencies within
our lower constraints, so bump the affected versions.

Change-Id: I558e77dbba6abf64e6857d7f880104f0237dca1b
2020-12-13 14:07:52 +01:00
Nicolas Bock 11d03924e7
Bump minimum version of oslo.policy to 2.1.0
The changes following this one require `scope_types` which was added
in oslo.policy-1.32.0. Since version oslo.policy-1.30.0 was released
in late 2017 we should bump to at least oslo.policy-2.1.0 which was
released in late January 2019 bringing us a little closer to the
present time.

Change-Id: I02a2c42c0e1fceebbe6c81f8d674f62f90ee1670
Signed-off-by: Nicolas Bock <nicolas.bock@canonical.com>
2020-11-23 18:00:23 -07:00
Lance Bragstad c62e3fa197 Bump minimum version of oslo.log to 4.3.0
This allows us to use versionutils Wallaby marker for deprecation
warnings.

Change-Id: Idca6a7b1fb72664edc9e6d662148ea0c99cae41e
2020-11-23 18:48:32 +00:00
Michael Chapman 10f19870c4 Add timeout to rndc commands
In the event of a backend BIND server being unreachable for any reason,
rndc commands will persist for a very long time and can consume
significant resources. This can be seen when running devstack with
a pool configured to point at a bind server that doesn't exist - the
rndc process count can climb into the thousands.

An optional timeout has been added to rndc to alleviate this.

Change-Id: Idd61e79715b21fdd3249136cf68a7b9d3069c3f9
Related-Bug: 1896783
2020-11-06 15:57:38 +11:00
wu.chunyang 28037784eb Fix l-c testing for ubuntu focal
As per victoria cycle testing runtime and community goal[1]
we need to migrate upstream CI/CD to Ubuntu Focal(20.04).

- Bump the lower constraints for required deps which added python3.8 support
in their later version.

Story: #2007865
Task: #40206

[1] https://governance.openstack.org/tc/goals/selected/victoria/migrate-ci-cd-jobs-to-ubuntu-focal.html

Change-Id: Ib99c13c8c4bbb21dd72836dfb1316f92cdc8aabe
2020-09-16 15:45:18 -05:00
gugug fa421e9178 Remove translation sections from setup.cfg
These translation sections are not needed anymore, Babel can
generate translation files without them.

Change-Id: Id54c22f820b1aa6315d721e354ce150c657bd4fd
2020-06-20 22:04:03 +08:00
Hervé Beraud 0a411a5097 Cap jsonschema 3.2.0 as the minimal version
Previous versions of jsonschema (<3.2.0) doesn't support python 3.8 [1].
Python 3.8 is part of the victoria supported runtimes [2] so we now force
to use jsonschema version 3.2.0 to avoid issues, remove ambiguity and ensure
that everything works with python 3 in general.

[1] https://github.com/Julian/jsonschema/pull/627
[2] https://governance.openstack.org/tc/reference/runtimes/victoria.html#python-runtimes-for-victoria

Change-Id: I8a1efc079591da32f9b1cb200b6507e5ed968673
2020-05-26 21:48:12 +02:00
Sean McGinnis 57858d9121
Switch to dnspython package
The dnspython3 package is no longer needed as py3 support has been added
to dnspython, and dnspython3 just installs dnspython now as a
dependency.

Depends-on: https://review.opendev.org/#/c/726353/

Change-Id: Ic488ccebee6d3206d6b38eededbb27fcb46694a4
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-05-08 14:27:59 -05:00
Dr. Jens Harbott 65736672da Stop setting version specific basepython binaries
Tox should be smart enough to figure out the correct python version on
its own, avoid having to follow-up for every new python release.

Change-Id: If515467fd4c9e678d54d4e8551b52611fec786ff
2020-04-06 18:11:42 -07:00
Andreas Jaeger 19ec7d9cd1 Cleanup py27 support
Make a few cleanups:
- Remove python 2.7 stanza from setup.py
- Add requires on python >= 3.6 to setup.cfg so that pypi and pip
  know about the requirement
- Remove obsolete sections from setup.cfg:
  * Wheel is not needed for python 3 only repo
  * Some other sections are obsolete
- Update classifiers
- Update requirements, no need for python_version anymore

Change-Id: Ia739f33b3db2c15a8c2eb6143134587f31591cfd
2020-04-05 08:11:51 +02: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
Ghanshyam Mann cdac0fc2f9 [ussuri][goal] Drop python 2.7 support and testing
OpenStack is dropping the py2.7 support in ussuri cycle.

Designate is ready with python 3 and ok to drop the
python 2.7 support.

Complete discussion & schedule can be found in
- http://lists.openstack.org/pipermail/openstack-discuss/2019-October/010142.html
- https://etherpad.openstack.org/p/drop-python2-support

Ussuri Communtiy-wide goal:
https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html

Depends-On: https://review.opendev.org/#/c/693631/
Change-Id: I5a5bdc859f87f82097b95b2ebb31edb6e9b72b3a
2019-12-13 18:49:14 +00:00
pengyuesheng dd72058493 Blacklist eventlet 0.21.0,0.23.0,0.25.0
more details https://review.opendev.org/#/c/678078/

Change-Id: I6bd601d14994865c166ec0160daad349b7f3d805
2019-09-05 17:27:55 +08:00
Erik Olof Gunnar Andersson c16478eb2e Blacklist Bandit 1.6.0 due to directory exclusion bug
There is a regression bug in Bandit 1.6.0 that causes
the exclusions to get ignored.

Also allow jsonschema higher than 3, as this is no longer
allowed and causes the requirement check to fail.

Change-Id: I464b35f045aec6d22bfee9b35e229b02ee676280
2019-05-09 20:27:37 -07:00
Zuul f97df023b2 Merge "Add designate-status command for upgrade checks" 2019-01-04 20:04:38 +00:00
Ben Nemec 1842802de4 Add designate-status command for upgrade checks
This checks for duplicate entries in the service_statuses table
which will be an error after change
I307a8f7dd8b8a83effa447a846db3288efa32dba.

Related-Bug: 1768824

Story: 2003657
Task: 26127

Change-Id: Ie0350b034f0eb03749138aadd0951d30073214c0
Co-authored-by: Doug Hellmann <doug@doughellmann.com>
2018-12-07 21:53:17 +00:00
Graham Hayes 72e4e13d8e
Move to GreenThreadPoolExecutor
python3.7 and eventlet cause the `future.ThreadPoolExecutor` to hang
indefinitely. Moving to `futurist.GreenThreadPoolExecutor` allows the
`designate-worker` process to use native eventlet greenthreads, which bypasses
the hanging issue.

Closes-Bug: #1782647

Related-Bug: https://bugs.python.org/issue34173
Related-Bug: eventlet/eventlet#508

Change-Id: I36c79ca72635d81cfcc8d3cc87b1bc5e0657d9e8
Signed-off-by: Graham Hayes <gr@ham.ie>
2018-10-19 17:25:30 +01:00
Jean-Philippe Evrard 16162a30c0 Allow newer versions of Flask
Since keystone bumped the version of Flask in openstack/requirements,
the upper constraint is now equal to 1.0.2 that is not allowed by
the requirements.txt of designate.

If we change the designate requirements, we could use the same
version of Flask for both Keystone and Designate, helping
deployers.

Change-Id: Ic54ceebc1af5a9d74e415f7369e1d5bb19c6e915
2018-06-28 13:36:01 +02:00
Doug Hellmann 0347a92954 uncap eventlet
We will manage the eventlet version using constraints now. See the
thread starting at
http://lists.openstack.org/pipermail/openstack-dev/2018-April/129096.html
for more details.

Amend lower constraints according to tools/fix-lower-constraints.py and
remove setuptools from requirements.txt to fix requirements job.

Change-Id: I4f336ce65904b5fde9b088a2624fb9196623e295
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-04-16 12:48:49 +00:00
OpenStack Proposal Bot f1485b035b Updated from global requirements
Change-Id: Ia668f35b1129471e617bbe4713add751a0c3b242
2018-03-26 18:18:36 +00:00
OpenStack Proposal Bot e347e1531d Updated from global requirements
Change-Id: I10b05a83452b01c547d199fee56ee721a3163b27
2018-03-16 05:19:38 +00:00