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

[network metrics] instance data link schema #6402

Closed
wants to merge 2 commits into from

Conversation

zeeshanlakhani
Copy link
Collaborator

@zeeshanlakhani zeeshanlakhani commented Aug 21, 2024

This is related to the ongoing work in plumbing instance/guest metrics through to an oximeter producer in propolis.

Includes:

  • Rewriting the comment for trait Target in Oximeter to not being prepped for deprecation, as it does come in handy for custom needs
  • The main differentiating field among link information here is interface_id, which is exposed to propolis via the client's NetworkInterfaceRequest. We currently match the nic.slot to the port.slot to pass which of the requested nics interface_id uuids are part of the request.

Dependencies

  • Propolis

@zeeshanlakhani zeeshanlakhani marked this pull request as draft August 21, 2024 19:59
Copy link
Collaborator

@bnaecker bnaecker left a comment

Choose a reason for hiding this comment

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

Looks pretty good, a few small questions and nits. Thanks!

oximeter/oximeter/schema/instance-data-link.toml Outdated Show resolved Hide resolved
oximeter/oximeter/schema/instance-data-link.toml Outdated Show resolved Hide resolved
oximeter/oximeter/schema/instance-data-link.toml Outdated Show resolved Hide resolved
oximeter/oximeter/schema/instance-data-link.toml Outdated Show resolved Hide resolved
oximeter/oximeter/schema/instance-data-link.toml Outdated Show resolved Hide resolved
oximeter/oximeter/schema/instance-data-link.toml Outdated Show resolved Hide resolved
oximeter/oximeter/schema/instance-data-link.toml Outdated Show resolved Hide resolved
oximeter/types/src/traits.rs Outdated Show resolved Hide resolved
sled-agent/src/instance.rs Outdated Show resolved Hide resolved
Comment on lines 683 to 684
// We expect to match NIC slots to OPTE port slots.
.find(|nic| nic.slot == port.slot())
Copy link
Collaborator

Choose a reason for hiding this comment

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

There should always be one port for each guest NIC. Should we do something here if that's not the case?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@bnaecker after thinking about it, and knowing that a requested nic should match to a port, I've updated to throw an error otherwise. Thoughts?

Copy link
Collaborator

Choose a reason for hiding this comment

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

That seems good!

This is related to the ongoing work in [plumbing instance/guest
metrics](oxidecomputer/propolis#742) through to an
oximeter producer in propolis.

Includes:
- Rewriting the comment for `trait Target` in Oximeter to not being prepped for deprecation,
  as it does come in handy for custom needs
- The main differentiating field among link information here is `interface_id`, which is
  exposed to propolis via the client's `NetworkInterfaceRequest`. We currently match the `nic.slot` to the `port.slot` to pass which of the
  requested nics `interface_id` uuids are part of the request.
Copy link
Collaborator

@bnaecker bnaecker left a comment

Choose a reason for hiding this comment

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

Thanks, the error-handling looks good! I've suggested a bit more minor wordsmithing on the descriptions, hopefully my comments make sense.

oximeter/oximeter/schema/instance-data-link.toml Outdated Show resolved Hide resolved
oximeter/oximeter/schema/instance-data-link.toml Outdated Show resolved Hide resolved
oximeter/oximeter/schema/instance-data-link.toml Outdated Show resolved Hide resolved
Comment on lines +56 to +58
[fields.interface_id]
type = "uuid"
description = "The ID of the data link"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Sorry for all the back and forth on this one, I appreciate your patience.

Seeing this called interface_id with a description referring to a "data link" makes me wonder if we've gotten the target name wrong. We picked instance_data_link to match up with the sled_data_link and switch_data_link targets. That's nice, except the public API doesn't refer to "data links" anywhere. As this field name indicates, the customer operates on NetworkInterface objects through the API. I worry it'd be a bit confusing to say, "Hey, I wonder what this interface is doing? Let me go look for a timeseries about 'interfaces'", only to find out that the timeseries is really instance_data_link:bytes_sent or whatever. I think I'd find that annoying or confusing, learning it for the first time.

What do you think about renaming the target to instance_network_interface or virtual_network_interface, or possibly just network_interface?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, keeping to the naming around instance-data-link has been confusing. I'd say just network_interface and therefore network-interface.toml, right?

Then this description is "The ID of the network interface". Thoughts @bnaecker?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Sweet, yeah the description sounds right in that case. I would personally vote for instance_network_interface, just to avoid any possibility of confusion. That sound OK to you?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Oh, and I would s/data link/network interface in the other descriptions too.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sure, instance_network_interface it is. I'll push up a new PR.

@zeeshanlakhani
Copy link
Collaborator Author

Closing in favor of another PR capturing the correct naming.

@zeeshanlakhani zeeshanlakhani deleted the zl/instance-data-link branch August 22, 2024 19:20
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.

2 participants