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

[sled-agent] Self assembling external DNS zone #5059

Merged
merged 22 commits into from
Feb 23, 2024

Conversation

karencfv
Copy link
Contributor

@karencfv karencfv commented Feb 14, 2024

Overview

In addition to implementing the external DNS self assembling zone, this PR contains a new SMF service called opte-interface-setup.

Closes: #2881
Related: #1898

Implementation

This service makes use of the zone-network CLI tool to avoid having too many CLIs doing things.

The CLI is now shipped independently so it can be called by two different services.

The zone-networking opte-interface-set-up command sets up what the ensure_address_for_port() method used to set up.

Justification

The reasoning behind this new service is to avoid setting up too many things via the method_script.sh file, and to avoid code duplication. The Nexus zone will also be using this service to set up the OPTE interface.

@karencfv karencfv marked this pull request as ready for review February 19, 2024 07:54
@karencfv
Copy link
Contributor Author

Heya @smklein @citrus-it! Tiny ping to see if I could get a review for this?

Copy link
Collaborator

@smklein smklein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work on this! I imagine that the other zones (like Nexus, NTP) exposing an external IP will share similar functionality?

Comment on lines 67 to 69

#[error("Output of [{command}] is empty")]
EmptyOutput { command: String },
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this being used anywhere?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ha! no, I was using it and then I wasn't anymore. Will remove

Comment on lines +667 to +684
[package.zone-network-install]
service_name = "zone-network-setup"
only_for_targets.image = "standard"
source.type = "local"
source.paths = [
{ from = "smf/zone-network-setup/manifest.xml", to = "/var/svc/manifest/site/zone-network-setup/manifest.xml" },
]
output.type = "zone"
output.intermediate_only = true

[package.zone-network-setup]
service_name = "zone-network-cli"
only_for_targets.image = "standard"
source.type = "local"
source.rust.binary_names = ["zone-networking"]
source.rust.release = true
output.type = "zone"
output.intermediate_only = true
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason why these are two different packages? They seem very tightly coupled

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I separated them since the new opte-interface-setup service uses the CLI as well. It was a bit awkward to have that service use the CLI from another service.

@karencfv
Copy link
Contributor Author

I imagine that the other zones (like Nexus, NTP) exposing an external IP will share similar functionality?

Yep! That's why I thought it was best to have a tiny service that did this for those zones now :)

@karencfv karencfv enabled auto-merge (squash) February 22, 2024 22:19
@karencfv karencfv merged commit 2088693 into oxidecomputer:main Feb 23, 2024
15 checks passed
@karencfv karencfv deleted the external-dns-zone branch February 23, 2024 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Convert External DNS zone to be self-assembling
2 participants