oxidecomputer / oxidecomputer/omicron

Deleting a switch port settings object can cause dangling references

Open
#6,874 0 comments 0 reactions 1 assignee View on GitHub

@internet-diglett is already working on this.

Since Oct 16, 2024.

networking
Dominant language
Rust
Stars
572
Forks
97
Avg merge
2d 12h
Merged PRs (30d)
96

Description

Currently the switch port configuration process is as follows:

  1. an operator defines a desired configuration via switch-port-settings
  2. the operator then applies the defined configuration via switch-port-settings apply

However, if an operator decides to delete a defined configuration object, we do not currently check to see if it is "in use" or "applied" to any switch ports. This means you can delete the configuration and the RPWs will then attempt to apply a nonexistent configuration to the switch port.

To resolve this bug, we should probably update the transaction to check to see if a configuration is in use before deleting it.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.