Page MenuHomePhabricator

Use Interface transactions, not Device transactions, to destroy Interfaces
ClosedPublic

Authored by epriestley on Apr 10 2018, 1:28 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Dec 18, 12:20 AM
Unknown Object (File)
Tue, Dec 17, 3:50 AM
Unknown Object (File)
Mon, Dec 9, 6:28 PM
Unknown Object (File)
Mon, Dec 9, 6:28 PM
Unknown Object (File)
Mon, Dec 9, 6:28 PM
Unknown Object (File)
Mon, Dec 9, 6:23 PM
Unknown Object (File)
Mon, Dec 9, 5:50 PM
Unknown Object (File)
Sat, Dec 7, 4:43 AM
Subscribers
None

Details

Summary

Depends on D19324. Ref T13120. Ref T12414.

This moves "Destroy Interface" to use Interface transactions instead of Device transactions, so we can ultimately get rid of the complex and difficult-to-modernize AlmanacDeviceTransaction::TYPE_INTERFACE.

This transaction is a bit weird since it makes the interface delete itself, but this should work OK for now. At some point in the future I'd probably want to change this into more of a "disable" action, but I don't think we face any immediate peril by retaining this behavior for now.

Test Plan
  • Destroyed interfaces on devices using the web UI, saw them vanish.
  • Ran daemons, nothing fataled/exploded even though the transaction is weird and destroys the object it affects.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley added a child revision: Restricted Differential Revision.Apr 10 2018, 1:38 PM
epriestley added a child revision: Restricted Differential Revision.
  • Only raise an error about deletion of in-use interfaces if there's actually a deleting transaction.
This revision is now accepted and ready to land.Apr 10 2018, 6:42 PM
This revision was automatically updated to reflect the committed changes.