Skip to content

Commit

Permalink
SPEC: add warning about preserving shared resources for GC
Browse files Browse the repository at this point in the history
For plugins that may share resources or resource pools across networks,
we should make it explicitly clear that GC must only clean up resources
known to be owned by the calling network.

Signed-off-by: Casey Callendrello <c1@caseyc.net>
  • Loading branch information
squeed committed Jun 10, 2024
1 parent ed014fe commit 2c926b5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions SPEC.md
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,8 @@ Resources may, for example, include:

A plugin SHOULD remove as many stale resources as possible. For example, a plugin should remove any IPAM reservations associated with attachments not in the provided list. The plugin MAY assume that the isolation domain (e.g. network namespace) has been deleted, and thus any resources (e.g. network interfaces) therein have been removed.

Garbage collection is a per-network operation. If a plugin manages resources shared across multiple networks, it must only remove stale resources known to belong to the network provided in the `GC `action.

Plugins should generally complete a `GC` action without error. If an error is encountered, a plugin should continue; removing as many resources as possible, and report the errors back to the runtime.

Plugins MUST, additionally, forward any GC calls to delegated plugins they are configured to use (see section 4).
Expand Down

0 comments on commit 2c926b5

Please sign in to comment.