Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 2021033

Summary: Designate DNS – not clear Error message when the zone import is getting into Error status
Product: Red Hat OpenStack Reporter: Lilach Avraham <lavraham>
Component: openstack-designateAssignee: Don Kehn <dkehn>
Status: CLOSED ERRATA QA Contact: Toni Freger <tfreger>
Severity: medium Docs Contact:
Priority: medium    
Version: 17.0 (Wallaby)CC: ashtempl, dkehn, gthiemon, jamsmith, jschluet, michjohn, njohnston, scohen
Target Milestone: gaKeywords: Triaged
Target Release: 17.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-designate-12.0.2-0.20220614212615.f255747.el9ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-09-21 12:17:17 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Lilach Avraham 2021-11-08 07:25:19 UTC
### Scenario ###

Try to import Zone that is already exists.

## create zone example.com.
$ openstack zone create example.com. --email example

+----------------+--------------------------------------+
| Field | Value |
+----------------+--------------------------------------+
| action | CREATE |
| attributes | |
| created_at | 2021-11-07T12:49:59.000000 |
| description | None |
| email | example |
| id | 329b1e36-c4b3-4272-8901-d1e1adf37d74 |
| masters | |
| name | example.com. |
| pool_id | 794ccc2c-d751-44fe-b57f-8894c9f5c842 |
| project_id | 3bf2082af8b5464fa12fdbb61874ed47 |
| serial | 1636289398 |
| status | PENDING |
| transferred_at | None |
| ttl | 3600 |
| type | PRIMARY |
| updated_at | None |
| version | 1 |
+----------------+--------------------------------------+

##show all zones
$ openstack zone list

+--------------------------------------+-------------------+---------+------------+--------+--------+
| id | name | type | serial | status | action |
+--------------------------------------+-------------------+---------+------------+--------+--------+
| 870c5557-82e4-4e64-b393-8b289c750dfa | example-5568.org. | PRIMARY | 1636117737 | ACTIVE | NONE |
| 329b1e36-c4b3-4272-8901-d1e1adf37d74 | example.com. | PRIMARY | 1636289398 | ACTIVE | NONE |
+--------------------------------------+-------------------+---------+------------+--------+--------+

## export the zone
$ openstack zone export create 329b1e36-c4b3-4272-8901-d1e1adf37d74

+------------+--------------------------------------+
| Field | Value |
+------------+--------------------------------------+
| created_at | 2021-11-07T12:52:06.000000 |
| id | fd3ff199-467f-41bd-83aa-8014f32544cb |
| location | None |
| message | None |
| project_id | 3bf2082af8b5464fa12fdbb61874ed47 |
| status | PENDING |
| updated_at | None |
| version | 1 |
| zone_id | 329b1e36-c4b3-4272-8901-d1e1adf37d74 |
+------------+--------------------------------------+

##show the export file
$ openstack zone export showfile fd3ff199-467f-41bd-83aa-8014f32544cb -f value > zone_file.txt

##import the zone file that exported
$ openstack zone import create zone_file.txt
+------------+--------------------------------------+
| Field | Value |
+------------+--------------------------------------+
| created_at | 2021-11-07T12:53:35.000000 |
| id | 228facb7-622a-49a4-aa75-b07e96f62aca |
| message | None |
| project_id | 3bf2082af8b5464fa12fdbb61874ed47 |
| status | PENDING |
| updated_at | None |
| version | 1 |
| zone_id | None |
+------------+--------------------------------------+

##show all the parameters for import zone file
$ openstack zone import show 228facb7-622a-49a4-aa75-b07e96f62aca
+------------+--------------------------------------+
| Field | Value |
+------------+--------------------------------------+
| created_at | 2021-11-07T12:53:35.000000 |
| id | 228facb7-622a-49a4-aa75-b07e96f62aca |
| message | An undefined error occurred. |
| project_id | 3bf2082af8b5464fa12fdbb61874ed47 |
| status | ERROR |
| updated_at | 2021-11-07T12:53:35.000000 |
| version | 2 |
| zone_id | None |
+------------+--------------------------------------+

### Actual result ###

We do see an error which is not clear
+---------+-------------------------------+
| Field | Value |
+---------+-------------------------------+
| message | An undefined error occurred. |
| status | ERROR |
+---------+-------------------------------+

### Expected result ###

we expect to get error are saying that we have a duplicate zone,
 we can see it if we open the log in Central.

### Note ###

Message logged in Central is:
        Nov 07 13:26:16 seal26 designate-central[803950]: ERROR designate.central.service raise exc_dup(msg)
        Nov 07 13:26:16 seal26 designate-central[803950]: ERROR designate.central.service designate.exceptions.DuplicateZone: Duplicate Zone

Comment 4 Jon Schlueter 2022-06-13 18:21:07 UTC
Launchpad bug is marked as fix released
https://review.opendev.org/c/openstack/designate/+/835651 appears as one of the patches from LP
https://review.opendev.org/c/openstack/designate/+/844485 was backport to stable/wallaby from LP

Comment 14 errata-xmlrpc 2022-09-21 12:17:17 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Release of components for Red Hat OpenStack Platform 17.0 (Wallaby)), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2022:6543

Comment 15 Red Hat Bugzilla 2023-09-18 04:27:47 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days