You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2020/12/08 20:02:59 UTC

[GitHub] [trafficcontrol] rawlinp opened a new issue #5364: TODB should cascade delete interfaces and IP addresses when deleting a server via SQL

rawlinp opened a new issue #5364:
URL: https://github.com/apache/trafficcontrol/issues/5364


   ## I'm submitting a ...
   -  bug report
   
   ## Traffic Control components affected ...
   -  Traffic Ops
   
   ## Current behavior:
   When trying to delete a server via `DELETE FROM server WHERE ...`, you are restricted due to the `ON DELETE RESTRICT` FK clauses on the `interface` and `ip_address` tables. Additionally, deleting server interfaces is restricted via the `ON DELETE RESTRICT` FK clause on the `ip_address` table.
   
   ## Expected behavior:
   If you delete a server via `DELETE FROM server WHERE ...`, it should cascade delete all the server's associated interfaces and IP addresses. If you delete an interface, it should cascade delete all the interface's associated IP addresses.
   
   Basically these FK clauses should be `ON DELETE CASCADE` instead of `ON DELETE RESTRICT`.
   
   ## Minimal reproduction of the problem with instructions:
   For a server that has at least one interface, attempt to delete it via the SQL query: `DELETE FROM server WHERE id = ...`. For an interface with at least one IP address, attempt to delete it via the SQL query: `DELETE FROM interface WHERE server = ... AND name = ...`.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [trafficcontrol] ocket8888 closed issue #5364: TODB should cascade delete interfaces and IP addresses when deleting a server via SQL

Posted by GitBox <gi...@apache.org>.
ocket8888 closed issue #5364:
URL: https://github.com/apache/trafficcontrol/issues/5364


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [trafficcontrol] ocket8888 closed issue #5364: TODB should cascade delete interfaces and IP addresses when deleting a server via SQL

Posted by GitBox <gi...@apache.org>.
ocket8888 closed issue #5364:
URL: https://github.com/apache/trafficcontrol/issues/5364


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org