Destroy DB service_status in service.stop()

Bug #1998906 reported by kiran pawar
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Designate
In Progress
Undecided
Unassigned

Bug Description

Issue
=====
Desigante service status are created(in DB) in the start() method. DB consider unique service, based on service-name and host-name combination. However when services are stopped or restarted, the DB entries are not deleted, they are destroyed.

scenario
========
1. In big cluster where multiple instances of designate services e.g. mdns, worker, producer are launched, unique host-name (we use node-name of k8s) and service-name the entries are created in DB.
2. However when deployed again(e.g. using helm) and launched on new hosts, the old entries of service_status remains as it is. And also all those services are reported as UP, where actually those services no longer exist. So they should be reported either as DOWN or not reported at all. I think, its better to not report those old entries at all since they are irrelevant for current deployment.

Solution
========
To overcome this situation, we should remove the DB entry each time service is stopped or killed and create new entry again in start() method. This will give list of only relevant services at a time.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to designate (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/designate/+/866698

Changed in designate:
status: New → In Progress
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.