Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Want transaction/rollback support for installing sets of rules #549

Open
FelixMcFelix opened this issue Jun 12, 2024 · 0 comments
Open

Want transaction/rollback support for installing sets of rules #549

FelixMcFelix opened this issue Jun 12, 2024 · 0 comments
Labels
feature Planned and requested features

Comments

@FelixMcFelix
Copy link
Collaborator

An earlier version of #490 manipulated allow-cidr logic by inserting an inbound and outbound rule in sequence. This introduced an error where failing to add the second rule would leave the first rule in place. The correct behaviour would have been to rollback to the original state and report an error.

For ioctls of similar scope (that wish to insert several rules, possibly across many tables), or control-plane operations which call several ioctls in sequence, it will be worthwhile to support rollback if any requested operation fails. Implementing this logic on an as-needed basis would be error-prone, repetitive, and make it easier to fail while rolling back.

This is an open design question, in that:

  • Scoping these internally within an individual ioctl would not be too difficult, and can be mostly hidden from API consumers.
  • In the general case however, we also need to handle the fact that external clients like omicron will inevitably want to perform a list of operations with rollback semantics. We'd need then to expose transaction start/end as ioctls, and think about how existing request bodies should carry transaction IDs or similar state.
  • The semantics of rule removal will likely need to change, at least while in a transaction context. Rules removed within a transaction need to be soft-removed, otherwise they may fail to be re-added on rollback.
  • Is there a point in future where we might want, e,.g., operations on layers to have similar functionality?
@FelixMcFelix FelixMcFelix added the feature Planned and requested features label Jun 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Planned and requested features
Projects
None yet
Development

No branches or pull requests

1 participant