Commit Graph

34 Commits

Author SHA1 Message Date
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.shiming 8459ed9460 requirements: Drop os-testr
We've switched to stestr.

Change-Id: I80cb1e658761aaf16943b12e3b4dc6f208cb2eee
2020-10-16 09:34:04 +00:00
Zuul 9eae67abc6 Merge "Remove the unused coding style modules" 2020-10-15 03:11:16 +00:00
wu.shiming 0d277e9cbb
Remove the unused coding style modules
Python modules related to coding style checks (listed in blacklist.txt
in openstack/requirements repo) are dropped from lower-constraints.txt
as they are not actually used in tests (other than pep8).

more info: https://github.com/openstack/requirements/blob/master/blacklist.txt

Change-Id: I9e9badabd588b94055eccb8298d685b2ccf60095
2020-10-14 08:21:37 -06:00
Zuul 97ce48aefc Merge "Remove unnecessary lower constraints" 2020-10-12 13:52:28 +00:00
Nicolas Bock 348771951f
Remove unnecessary lower constraints
This change removes unneeded lower constraints.

Change-Id: Ibefa12ddedae14a93e9ab914f62ce8247e0ee4ce
Signed-off-by: Nicolas Bock <nicolas.bock@canonical.com>
2020-10-06 07:14:50 -06:00
Nicolas Bock a0d20514c6
Increase lower-constraint for kombu
There is no module named 'vine' on kombu==4.1.0 version [1]. Bumping
to kombu-4.2.1 (and not kombu-4.2.0) [2].

[1] https://github.com/celery/kombu/issues/851
[2] https://docs.celeryproject.org/projects/kombu/en/stable/changelog.html#version-4-2-1

Change-Id: I57a7649fde1cceda787622aa1975f3a7100aeb29
Signed-off-by: Nicolas Bock <nicolas.bock@canonical.com>
2020-10-02 10:07:44 -06: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
Nicolas Bock 7cf130870a
Remove Babel from lower-constraints
See Id54c22f820b1aa6315d721e354ce150c657bd4fd

Change-Id: I37eed6862a39c5821ac9d89b867822a110426056
Signed-off-by: Nicolas Bock <nicolas.bock@canonical.com>
2020-07-28 06:00:42 -06:00
Sean McGinnis 4b2c732df7
Use unittest.mock instead of third party mock
Now that we no longer support py27, we can use the standard library
unittest.mock module instead of the third party mock lib.

Change-Id: I4bd0de2f553c43a805670a424c44455d691891ac
2020-05-29 11:35:40 -05: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
Andreas Jaeger 663e420643 Switch to newer openstackdocstheme and reno versions
Switch to openstackdocstheme 2.2.0 and reno 3.1.0 versions. Using
these versions will allow especially:
* Linking from HTML to PDF document
* Allow parallel building of documents
* Fix some rendering problems

Update Sphinx version as well.

Set openstackdocs_pdf_link to link to PDF file. Note that
the link to the published document only works on docs.openstack.org
where the PDF file is placed in the top-level html directory. The
site-preview places the PDF in a pdf directory.

Set openstackdocs_auto_name to use 'project' as name.

Change pygments_style to 'native' since old theme version always used
'native' and the theme now respects the setting and using 'sphinx' can
lead to some strange rendering.

Remove docs requirements from lower-constraints, they are not needed
during install or test but only for docs building.

openstackdocstheme renames some variables, so follow the renames
before the next release removes them. A couple of variables are also
not needed anymore, remove them.

Add openstackdocstheme options to api-ref.

Change-Id: I0cf71327ca5d9da1d88a826225374c8801849c36
2020-05-20 08:13:38 +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 21f94dea86 Cleanup docs building
* Switch to newer openstackdocstheme version and remove settings
  that are default now

Change-Id: Iec8791077aa7f1cb8edfa64235fb718a98aaba90
2020-02-23 17:33:27 +01: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 9e3c2bb65b Switch to apache for designate-api
This patch switches to Apache and mod_wsgi by default
for devstack.

Also, use memcached as the coordinatior for single node deployments.

Change-Id: I8798c04f2bc386aca32bda8961efd29298899890
2019-10-19 07:16:14 +00: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
Vu Cong Tuan 147e487bdf Remove testrepository
This commit is a follow-up of "switch to using stestr"
which was merged already [1].
After switch to using stestr, testrepository is unnecessary
and should be removed.

[1] https://review.openstack.org/571948

Change-Id: I7b496624721173955315869b17d3f2050dc83d30
2018-07-11 17:44:40 +07: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
Doug Hellmann a10c688d23 add lower-constraints job
Create a tox environment for running the unit tests against the lower
bounds of the dependencies.

Create a lower-constraints.txt to be used to enforce the lower bounds
in those tests.

Add openstack-tox-lower-constraints job to the zuul configuration.

See http://lists.openstack.org/pipermail/openstack-dev/2018-March/128352.html
for more details.

Change-Id: Id52de99217d1187e3a1a638c41aba18258b6c824
Depends-On: https://review.openstack.org/555034
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-03-22 11:11:35 -04:00