Cluster downscaling fails with "FOREIGN KEY constraint failed"

Bug #2020182 reported by Martin Kalcok
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
microovn
Fix Released
Undecided
Martin Kalcok

Bug Description

Executing `microovn cluster remove <MEMBER>` fails with:

Error: Delete "internal_cluster_members": FOREIGN KEY constraint failed

In addition to fixing this, there doesn't seem to be a code that would actually downscale the ovn-central service. When ovn-central member is being removed, it needs to be explicitly removed from the Northbound and Southbound database clusters, otherwise the remaining members will just consider it as "DOWN" and they'll expect it's return.
To properly remove ovn-central cluster member there are two options. Either the departing member executes

ovn-appctl cluster/leave OVN_Southbound
ovn-appctl cluster/leave OVN_Northbound

Or one of the remaining members must execute

ovn-appctl cluster/kick OVN_Southbound <member_id>
ovn-appctl cluster/kick OVN_Northbound <member_id>

The second option is more reliable as it works also for removing members that were already lost but it requires knowledge of the removed member ID in both Northbound and Southbound clustes.

Changed in microovn:
status: New → In Progress
assignee: nobody → Martin Kalcok (martin-kalcok)
Revision history for this message
Martin Kalcok (martin-kalcok) wrote :
Changed in microovn:
status: In Progress → Fix Committed
Frode Nordahl (fnordahl)
Changed in microovn:
status: Fix Committed → Fix Released
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.