Bug 2041169

Summary: Designate DNS – missing Notification in queue
Product: Red Hat OpenStack Reporter: Arkady Shtempler <ashtempl>
Component: openstack-designateAssignee: Michael Johnson <michjohn>
Status: NEW --- QA Contact: Toni Freger <tfreger>
Severity: medium Docs Contact:
Priority: medium    
Version: 17.0 (Wallaby)CC: beagles, michjohn, njohnston, scohen, tkajinam
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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 Arkady Shtempler 2022-01-16 08:11:50 UTC
Scenario:
1) Execute all tempest tests with:
sudo tox -e all-plugin – designate_tempest_plugin.tests

2) Run this script: http://pastebin.test.redhat.com/1021659 as “root” to detect missing Designate notification messages:

3) Actual result:
Missing notification messages has been detected.
Script output:

--> rabbitmqadmin get -V / -u test-admin -p testpass queue=notifications.info count=10000000
Error - notification message:dns.zone.touch was not detected:
Error - notification message:dns.record.update was not detected:
Error - notification message:dns.zone_transfer_request.update was not detected:
Error - notification message:dns.zone_transfer_accept.update was not detected:
Error - notification message:dns.zone_transfer_accept.delete was not detected:


I've added some print to the transfer_request_client.py trying to understand why "dns.zone_transfer_accept is missing by adding a print into its client:

@base.handle_errors
def delete_transfer_request(self, uuid, params=None):
    print('delete_transfer_request')
and in fact, I do see that the tempest does send these messages (not a surprise, we have cleanups and tests for delete)

 (test are PAS)
stack@ubuntu-0104-1338:~/
/usr/lib/python3.8/runpy.py:
  warn(RuntimeWarning(msg))
Tests running...
delete_transfer_request
delete_transfer_request
delete_transfer_request
delete_transfer_request
delete_transfer_request
delete_transfer_request
delete_transfer_request
delete_transfer_request
delete_transfer_request
delete_transfer_request

Ran 7 tests in 84.098s
OK

and I still don't see these notification messages, how could it be?
Tests are PASS, all cleanups seem to be OK.
There are no queues except the "notifications.info" with existing messages (in list command all the rest of the queues are shown with 0 messages).


4) Expected Result:
We would expect all the notification to be exist in the queue after executing Tempest tests (all APIs are covered in it).

Comment 1 Takashi Kajinami 2022-01-17 12:56:47 UTC
This seems like the sideeffect of https://review.opendev.org/c/openstack/tripleo-heat-templates/+/715394 which disabled notification driver globally.

If Designate requires notification from neutron then we need to enable it specifically.
I recently submitted a similar fix for barbican and we can follow the same method.
 https://review.opendev.org/c/openstack/tripleo-heat-templates/+/823441

Comment 2 Takashi Kajinami 2022-01-17 13:26:31 UTC
(In reply to Takashi Kajinami from comment #1)
> This seems like the sideeffect of
> https://review.opendev.org/c/openstack/tripleo-heat-templates/+/715394 which
> disabled notification driver globally.

@Arkady
If the deployment is created by TripleO then I'd suggest you check notification driver
enabled in designate.conf .

> If Designate requires notification from neutron then we need to enable it
> specifically.
> I recently submitted a similar fix for barbican and we can follow the same
> method.
>  https://review.opendev.org/c/openstack/tripleo-heat-templates/+/823441

I noticed this is not related to the original issue reported hear, but is likely to be
an issue which we should solve separately.

Comment 3 Michael Johnson 2022-01-17 16:21:38 UTC
Takashi,

This is unrelated to any open TripleO issues as all of the other notifications are being created as expected. It is just this small list that were not detected in testing and need to be investigated. Also note, this bug is about Designate generated notifications and not the designate-sink process that would receive notifications (also note, nova/neutron no longer use notifications to communicate with Designate).

Along those lines, dns.zone.touch is dead code and no longer used in Designate, so this one is expected to not be generated.

These four will need to be investigated:

Error - notification message:dns.record.update was not detected:
Error - notification message:dns.zone_transfer_request.update was not detected:
Error - notification message:dns.zone_transfer_accept.update was not detected:
Error - notification message:dns.zone_transfer_accept.delete was not detected:

Comment 4 Takashi Kajinami 2022-01-17 17:02:11 UTC
Thanks for the clarification. I understand it. Sorry about the noise I made :-( .

Comment 5 Takashi Kajinami 2022-01-17 17:05:37 UTC
// removing the needinfo flag