[sled-agent] Self assembling external DNS zone#5059
Conversation
|
Heya @smklein @citrus-it! Tiny ping to see if I could get a review for this? |
smklein
left a comment
There was a problem hiding this comment.
Nice work on this! I imagine that the other zones (like Nexus, NTP) exposing an external IP will share similar functionality?
|
|
||
| #[error("Output of [{command}] is empty")] | ||
| EmptyOutput { command: String }, |
There was a problem hiding this comment.
Is this being used anywhere?
There was a problem hiding this comment.
ha! no, I was using it and then I wasn't anymore. Will remove
| [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 |
There was a problem hiding this comment.
Is there a reason why these are two different packages? They seem very tightly coupled
There was a problem hiding this comment.
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.
Yep! That's why I thought it was best to have a tiny service that did this for those zones now :) |
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-upcommand sets up what theensure_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.