designate/releasenotes/notes/bug-1768824-service_statuses-constraint-7a30eb78dc63b86f.yaml
Erik Olof Gunnar Andersson 1924abff40 Add unique constraint to service_statuses
In the current implementation, if for any reason a duplicate
service entry gets created, the call to update that service
will fail endlessly, and instead cause the service to create
new entries everytime update_service_status gets called. Causing
it to fill the database with duplicate entries.

This patch adds a unique constraint to the service_statuses
table based on the service_name and hostname, to ensure that
this cannot happen.

In addition we add a new test to the storage driver and further
expanded the central service test coverage.

Change-Id: I307a8f7dd8b8a83effa447a846db3288efa32dba
Closes-Bug: #1768824
2018-05-20 12:41:21 -07:00

16 lines
482 B
YAML

---
upgrade:
- |
If there are duplicate service entries in the service_statuses table
and the db sync command fails, you may need to truncate the
service_statuses table.
fixes:
- |
Fixed `bug 1768824`_ which could cause the service_statuses table
to be flooded with duplicate service entries.
We fixed this by introducing a new unique constraint to the
service_statuses table.
.. _Bug 1768824: https://bugs.launchpad.net/designate/+bug/1768824