diff options
-rwxr-xr-x | designate/backend/impl_dynect.py | 4 | ||||
-rw-r--r-- | designate/dnsutils.py | 4 | ||||
-rw-r--r-- | designate/notification_handler/base.py | 6 | ||||
-rw-r--r-- | designate/tests/__init__.py | 8 | ||||
-rw-r--r-- | designate/tests/test_notification_handler/test_base.py | 88 | ||||
-rw-r--r-- | designate/worker/processing.py | 4 | ||||
-rw-r--r-- | releasenotes/source/locale/en_GB/LC_MESSAGES/releasenotes.po | 109 | ||||
-rw-r--r-- | releasenotes/source/locale/fr/LC_MESSAGES/releasenotes.po | 11 |
8 files changed, 196 insertions, 38 deletions
diff --git a/designate/backend/impl_dynect.py b/designate/backend/impl_dynect.py index 19f586f5..7e30443c 100755 --- a/designate/backend/impl_dynect.py +++ b/designate/backend/impl_dynect.py @@ -202,11 +202,11 @@ class DynClient(object): self._http_log_req(method, url, kwargs) if self.timings: - start_time = time.time() + start_time = time.monotonic() resp = self.http.request(method, url, **kwargs) if self.timings: self.times.append(("%s %s" % (method, url), - start_time, time.time())) + start_time, time.monotonic())) self._http_log_resp(resp) if resp.status_code >= 400: diff --git a/designate/dnsutils.py b/designate/dnsutils.py index 81df8409..43c45dff 100644 --- a/designate/dnsutils.py +++ b/designate/dnsutils.py @@ -203,12 +203,12 @@ class ZoneLock(object): with self.lock: # If no one holds the lock for the zone, grant it if zone not in self.data: - self.data[zone] = time.time() + self.data[zone] = time.monotonic() return True # Otherwise, get the time that it was locked locktime = self.data[zone] - now = time.time() + now = time.monotonic() period = now - locktime diff --git a/designate/notification_handler/base.py b/designate/notification_handler/base.py index 8a270eb3..159eb786 100644 --- a/designate/notification_handler/base.py +++ b/designate/notification_handler/base.py @@ -144,8 +144,8 @@ class NotificationHandler(ExtensionPlugin): class BaseAddressHandler(NotificationHandler): - default_formatv4 = ('%(hostname)s.%(domain)s',) - default_formatv6 = ('%(hostname)s.%(domain)s',) + default_formatv4 = ('%(hostname)s.%(zone)s',) + default_formatv6 = ('%(hostname)s.%(zone)s',) def _get_ip_data(self, addr_dict): ip = addr_dict['address'] @@ -193,7 +193,7 @@ class BaseAddressHandler(NotificationHandler): """ LOG.debug('Using Zone ID: %s', zone_id) zone = self.get_zone(zone_id) - LOG.debug('Domain: %r', zone) + LOG.debug('Zone: %r', zone) data = extra.copy() LOG.debug('Event data: %s', data) diff --git a/designate/tests/__init__.py b/designate/tests/__init__.py index d65ef2bf..ac371ab7 100644 --- a/designate/tests/__init__.py +++ b/designate/tests/__init__.py @@ -820,7 +820,7 @@ class TestCase(base.BaseTestCase): Zone imports spawn a thread to parse the zone file and insert the data. This waits for this process before continuing """ - start_time = time.time() + start_time = time.monotonic() while True: # Retrieve it, and ensure it's the same zone_import = self.central_service.get_zone_import( @@ -835,7 +835,7 @@ class TestCase(base.BaseTestCase): if error_is_ok and zone_import.status != 'PENDING': break - if (time.time() - start_time) > max_wait: + if (time.monotonic() - start_time) > max_wait: break time.sleep(0.5) @@ -870,8 +870,8 @@ class TestCase(base.BaseTestCase): Poll every `interval` seconds. `condition` can be a callable. (Caution: some mocks behave both as values and callables.) """ - t_max = time.time() + timeout - while time.time() < t_max: + t_max = time.monotonic() + timeout + while time.monotonic() < t_max: if callable(condition): result = condition() else: diff --git a/designate/tests/test_notification_handler/test_base.py b/designate/tests/test_notification_handler/test_base.py index f1a10dab..c35d4304 100644 --- a/designate/tests/test_notification_handler/test_base.py +++ b/designate/tests/test_notification_handler/test_base.py @@ -13,6 +13,8 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. +from unittest import expectedFailure + from designate.notification_handler import base from designate.tests import TestCase @@ -24,6 +26,8 @@ class InheritFormBaseAddressHandler(base.BaseAddressHandler): we need to create something to inherit from it so we have something instantiatable. """ + __plugin_name__ = 'nova_fixed' + def get_event_types(self): pass @@ -35,11 +39,91 @@ class InheritFormBaseAddressHandler(base.BaseAddressHandler): class BaseAddressHandlerTest(TestCase): + def setUp(self): + super(BaseAddressHandlerTest, self).setUp() + + self.zone = self.create_zone() + self.zone_id = self.zone['id'] + self.base = InheritFormBaseAddressHandler() + def test_get_ip_data_support_v6(self): addr_dict = {'address': '1762::B03:1:AF18', 'version': 6} - baseaddresshandler = InheritFormBaseAddressHandler() - observe = baseaddresshandler._get_ip_data(addr_dict) + observe = self.base._get_ip_data(addr_dict) expect = {'octet1': 'B03', 'octet0': '1762', 'octet3': 'AF18', 'octet2': '1', 'ip_version': 6, 'ip_address': '1762--B03-1-AF18'} self.assertEqual(observe, expect) + + def test_create_record(self): + self.base._create([ + {'address': '172.16.0.15', 'version': 4}], + {'hostname': 'test01'}, + self.zone_id, + resource_id='1fb1feba-2ea4-4925-ba2c-9a3706348a70', + resource_type='instance' + ) + + criterion = { + 'zone_id': self.zone_id, + 'type': 'A', + } + + recordsets = self.central_service.find_recordsets( + self.admin_context, criterion) + + self.assertEqual('test01.example.com.', recordsets[0].name) + self.assertEqual('A', recordsets[0].type) + + def test_delete_record(self): + self.base._create([ + {'address': '172.16.0.15', 'version': 4}], + {'hostname': 'test01'}, + self.zone_id, + resource_id='6d6deb76-e4e7-492e-8f9d-4d906653c511', + resource_type='instance' + ) + + criterion = { + 'zone_id': self.zone_id, + 'type': 'A', + } + + recordsets = self.central_service.find_recordsets( + self.admin_context, criterion) + + self.assertEqual('test01.example.com.', recordsets[0].name) + self.assertEqual('A', recordsets[0].type) + + self.base._delete(self.zone_id, '6d6deb76-e4e7-492e-8f9d-4d906653c511') + + recordsets = self.central_service.find_recordsets( + self.admin_context, criterion) + self.assertEqual(0, len(recordsets)) + + @expectedFailure + def test_delete_record_with_no_zone_id(self): + self.base._create([ + {'address': '172.16.0.15', 'version': 4}], + {'hostname': 'test01'}, + self.zone_id, + resource_id='6d6deb76-e4e7-492e-8f9d-4d906653c511', + resource_type='instance' + ) + + criterion = { + 'zone_id': self.zone_id, + 'type': 'A', + } + + recordsets = self.central_service.find_recordsets( + self.admin_context, criterion) + + self.assertEqual('test01.example.com.', recordsets[0].name) + self.assertEqual('A', recordsets[0].type) + + # NOTE(eandersson): _delete should succeed even without a zone_id. + self.base._delete(None, '6d6deb76-e4e7-492e-8f9d-4d906653c511') + + recordsets = self.central_service.find_recordsets( + self.admin_context, criterion) + self.assertEqual(0, len(recordsets)) diff --git a/designate/worker/processing.py b/designate/worker/processing.py index 59f8fcbe..cf280033 100644 --- a/designate/worker/processing.py +++ b/designate/worker/processing.py @@ -70,9 +70,9 @@ class Executor(object): if callable(tasks): tasks = [tasks] - start_time = time.time() + start_time = time.monotonic() results = [r for r in self._executor.map(self.do, tasks)] - elapsed_time = time.time() - start_time + elapsed_time = time.monotonic() - start_time LOG.debug( 'Finished Task(s): %(tasks)s in %(time)fs', diff --git a/releasenotes/source/locale/en_GB/LC_MESSAGES/releasenotes.po b/releasenotes/source/locale/en_GB/LC_MESSAGES/releasenotes.po index 7e453f6a..f2ed1769 100644 --- a/releasenotes/source/locale/en_GB/LC_MESSAGES/releasenotes.po +++ b/releasenotes/source/locale/en_GB/LC_MESSAGES/releasenotes.po @@ -9,11 +9,11 @@ msgid "" msgstr "" "Project-Id-Version: Designate Release Notes\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-03-06 16:30+0000\n" +"POT-Creation-Date: 2023-05-02 19:37+0000\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"PO-Revision-Date: 2023-02-10 12:08+0000\n" +"PO-Revision-Date: 2023-05-08 10:13+0000\n" "Last-Translator: Andi Chandler <andi@gowling.com>\n" "Language-Team: English (United Kingdom)\n" "Language: en_GB\n" @@ -29,11 +29,8 @@ msgstr "1.0.2" msgid "10.0.0" msgstr "10.0.0" -msgid "10.0.0.0rc1" -msgstr "10.0.0.0rc1" - -msgid "10.0.2-4" -msgstr "10.0.2-4" +msgid "10.0.2-6" +msgstr "10.0.2-6" msgid "11.0.0" msgstr "11.0.0" @@ -41,8 +38,8 @@ msgstr "11.0.0" msgid "11.0.2" msgstr "11.0.2" -msgid "11.0.2-4" -msgstr "11.0.2-4" +msgid "11.0.2-6" +msgstr "11.0.2-6" msgid "12.0.0" msgstr "12.0.0" @@ -50,8 +47,8 @@ msgstr "12.0.0" msgid "12.1.0" msgstr "12.1.0" -msgid "12.1.0-6" -msgstr "12.1.0-6" +msgid "12.1.0-10" +msgstr "12.1.0-10" msgid "13.0.0" msgstr "13.0.0" @@ -62,17 +59,35 @@ msgstr "13.0.1" msgid "13.0.2" msgstr "13.0.2" +msgid "13.0.2-6" +msgstr "13.0.2-6" + msgid "14.0.0" msgstr "14.0.0" msgid "14.0.1" msgstr "14.0.1" +msgid "14.0.2" +msgstr "14.0.2" + +msgid "14.0.2-3" +msgstr "14.0.2-3" + msgid "15.0.0" msgstr "15.0.0" -msgid "15.0.0.0rc1" -msgstr "15.0.0.0rc1" +msgid "15.0.0-6" +msgstr "15.0.0-6" + +msgid "16.0.0" +msgstr "16.0.0" + +msgid "16.0.0-15" +msgstr "16.0.0-15" + +msgid "16.0.0-8" +msgstr "16.0.0-8" msgid "2.0.0" msgstr "2.0.0" @@ -80,6 +95,9 @@ msgstr "2.0.0" msgid "2.1.0" msgstr "2.1.0" +msgid "2023.1 Series Release Notes" +msgstr "2023.1 Series Release Notes" + msgid "3.0.0" msgstr "3.0.0" @@ -432,6 +450,22 @@ msgstr "" "alembic package has been added." msgid "" +"Designate will now use the openstacksdk to access neutron instead of the " +"deprecated neutronclient." +msgstr "" +"Designate will now use the openstacksdk to access neutron instead of the " +"deprecated neutronclient." + +msgid "" +"Designate will now use the openstacksdk to access neutron instead of the " +"deprecated neutronclient. The python-neutronclient module requirement has " +"been replaced by the openstacksdk module." +msgstr "" +"Designate will now use the openstacksdk to access Neutron instead of the " +"deprecated neutronclient. The python-neutronclient module requirement has " +"been replaced by the openstacksdk module." + +msgid "" "Designate-Sink service now supports notification listener pooling for those " "oslo.messaging drivers that support this feature (currently those are " "``rabbit``/``kombu`` and ``kafka``). `Listener pools <https://docs.openstack." @@ -454,6 +488,13 @@ msgstr "" "flooded with duplicate service entries." msgid "" +"Fixed `bug 2015762`_ which could cause managed records to occasionally fail " +"to delete due to a race condition." +msgstr "" +"Fixed `bug 2015762`_ which could cause managed records to occasionally fail " +"to delete due to a race condition." + +msgid "" "Fixed a bug preventing `service_statuses` from properly updating when " "Designate services were configured with multiple workers." msgstr "" @@ -461,6 +502,11 @@ msgstr "" "Designate services were configured with multiple workers." msgid "" +"Fixed a bug that allowed users to create a zone share for the zone owner." +msgstr "" +"Fixed a bug that allowed users to create a zone share for the zone owner." + +msgid "" "Fixed a bug where deleting a zone transfer request may fail when using a " "system scoped token." msgstr "" @@ -518,6 +564,9 @@ msgstr "" "service statuses. In addition, a compatibility workaround was added for the " "incorrect /v2/service_status path." +msgid "Fixed compatibility issues with SQLAlchemy 2.x." +msgstr "Fixed compatibility issues with SQLAlchemy 2.x." + msgid "Fixed designate compatibility with jsonschema >= 4.16.0." msgstr "Fixed designate compatibility with jsonschema >= 4.16.0." @@ -592,6 +641,15 @@ msgstr "Liberty Series Release Notes" msgid "Mitaka Series Release Notes" msgstr "Mitaka Series Release Notes" +msgid "" +"Moved zone serial updates to a `designate-producer` task called " +"`increment_serial` to fix race conditions and to reduce the number of " +"updates to the upstream DNS servers when performing multiple DNS updates." +msgstr "" +"Moved zone serial updates to a `designate-producer` task called " +"`increment_serial` to fix race conditions and to reduce the number of " +"updates to the upstream DNS servers when performing multiple DNS updates." + msgid "New Features" msgstr "New Features" @@ -618,6 +676,13 @@ msgid "Newton Series Release Notes" msgstr "Newton Series Release Notes" msgid "" +"Now that zones can be shared with multiple projects, recordsets and records " +"can have project identifiers that are different than the parent zone." +msgstr "" +"Now that zones can be shared with multiple projects, recordsets and records " +"can have project identifiers that are different than the parent zone." + +msgid "" "OSprofiler support requires passing of trace information between various " "OpenStack services. This information is securely signed by one of HMAC keys, " "defined in designate.conf configuration file. To allow cross-project tracing " @@ -928,6 +993,17 @@ msgstr "" "config file." msgid "" +"The backend agent framework and agent based drivers are deprecated for " +"removal in the \"C\" release. The following backend agent drivers are now " +"deprecated: Bind9 (Agent), Denominator, Microsoft DNS (Agent), Djbdns " +"(Agent), Gdnsd (Agent), Knot2 (Agent)." +msgstr "" +"The backend agent framework and agent based drivers are deprecated for " +"removal in the \"C\" release. The following backend agent drivers are now " +"deprecated: Bind9 (Agent), Denominator, Microsoft DNS (Agent), Djbdns " +"(Agent), Gdnsd (Agent), Knot2 (Agent)." + +msgid "" "The central service was not using a global lock which can lead to a race " "condition in a high availability setup leading to missing recordsets in the " "DNS backend. This release includes a partial backport of a distributed " @@ -1166,6 +1242,13 @@ msgstr "Yoga Series Release Notes" msgid "Zed Series Release Notes" msgstr "Zed Series Release Notes" +msgid "" +"Zones can now be shared with other projects, allowing them to create and " +"manage recordsets and records in the zone." +msgstr "" +"Zones can now be shared with other projects, allowing them to create and " +"manage recordsets and records in the zone." + msgid "`LP#1971856 <https://bugs.launchpad.net/designate/+bug/1971856>`__" msgstr "`LP#1971856 <https://bugs.launchpad.net/designate/+bug/1971856>`__" diff --git a/releasenotes/source/locale/fr/LC_MESSAGES/releasenotes.po b/releasenotes/source/locale/fr/LC_MESSAGES/releasenotes.po index 236641bc..cffcae7a 100644 --- a/releasenotes/source/locale/fr/LC_MESSAGES/releasenotes.po +++ b/releasenotes/source/locale/fr/LC_MESSAGES/releasenotes.po @@ -3,7 +3,7 @@ msgid "" msgstr "" "Project-Id-Version: Designate Release Notes\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-03-06 16:30+0000\n" +"POT-Creation-Date: 2023-05-02 19:37+0000\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -26,15 +26,6 @@ msgstr "2.0.0" msgid "3.0.0" msgstr "3.0.0" -msgid "3.0.0.0b1" -msgstr "3.0.0.0b1" - -msgid "3.0.0.0b2" -msgstr "3.0.0.0b2" - -msgid "3.0.0.0rc1" -msgstr "3.0.0.0rc1" - msgid "ASync Export" msgstr "Export Async" |