Comment 1 for bug 1921150

Revision history for this message
Balazs Gibizer (balazs-gibizer) wrote :

This SQL will print all the wrongly parented device RPs.

SELECT *
FROM placement.resource_providers
WHERE
  (name LIKE '%:NIC Switch agent:%' OR
   name LIKE '%:Open vSwitch agent:%') AND
  parent_provider_id=root_provider_id

I don't have enough SQL foo to formulate an UPDATE statement that fixes them. But if somebody can do that then it would be nice to provide that SQL for admins on stable branches having wrongly parented RPs and wanting to fix the tree structure and get rid of the repeated logs and placement load.