Skip to content

Expose propolis' serial console channel in nexus#1766

Merged
lifning merged 1 commit into
oxidecomputer:mainfrom
lifning:passme
Oct 27, 2022
Merged

Expose propolis' serial console channel in nexus#1766
lifning merged 1 commit into
oxidecomputer:mainfrom
lifning:passme

Conversation

@lifning

@lifning lifning commented Sep 30, 2022

Copy link
Copy Markdown
Contributor
  • Includes updates to progenitor and reqwest 0.11.12 for client support for Dropshot websocket channels.
  • Literally only passes through the websocket, does not yet include the serial output buffering done by its parent GET endpoint. (This will be moved from sled-agent to propolis-server in forthcoming PRs)
  • Begins migrating sled-agent's propolis-client usage to the new progenitor-generated version (Dropshot-based websocket endpoint & Add Progenitor-based client propolis#206)
  • Adds support for ensuring a websocket endpoint gets upgraded in nexus integration tests (i.e. test_unauthorized).

I'll update how-to-run.adoc after either oxidecomputer/oxide.rs#268 lands (or if we implement it in oxide-sdk-rust instead)

@luqmana luqmana left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

sweet, thanks lif! a couple small comments, but i'm inclined to land things so we can finish the handmade->generated client migration

/// Connect to an instance's serial console
#[channel {
protocol = WEBSOCKETS,
path = "/organizations/{organization_name}/projects/{project_name}/instances/{instance_name}/serial-console/stream",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is the idea we'll have both the streaming and non-streaming endpoint in the limit? I assume the latter for the buffer playback behaviour?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

the streaming endpoint will eventually get params to start from an arbitrary byte offset (within the buffer) as well once i've moved the longer buffering into propolis-server, at which point the main reasons to keep the non-streaming one around would be

  • wanting to separate out permission to read it vs. read/write
  • wanting to provide an API for accessing it that doesn't require websocket support

Comment thread nexus/src/app/instance.rs Outdated
}
}
}
// pass along Close messages

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should we also try to gracefully send a close to the other side if one unexpectedly drops?

Comment thread sled-agent/Cargo.toml
Comment thread sled-agent/Cargo.toml Outdated
use super::sled_agent::SledAgent;

use propolis_client::api::VolumeConstructionRequest;
use crucible_client_types::VolumeConstructionRequest;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Will the generated client not re-export types it uses?

@lifning lifning Oct 26, 2022

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

kind of a rough edge i think: progenitor re-declares a copy of them based on the openapi spec it's given (which is of course generated using the derive(JsonSchema) on the original crucible_client_types types). unless there's a fancy feature of progenitor i'm missing, this means we end up needing boilerplate to convert between the two

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ah right i know you added the From impls for the generated-migration feature but I wonder if its worth just having in general too

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

i get the distinct feeling it might be, yeah.

- Includes updates to progenitor and reqwest 0.11.12 for client support
  for Dropshot websocket channels.
- Literally only passes through the websocket, does not yet include the
  serial output buffering done by its parent GET endpoint.
- Adds support for ensuring a websocket endpoint gets upgraded in nexus
  integration tests (i.e. test_unauthorized).
- Begins migrating sled-agent's propolis-client usage to the new
  progenitor-generated version (oxidecomputer/propolis#206)
@lifning lifning merged commit 8fc418e into oxidecomputer:main Oct 27, 2022
leftwo pushed a commit that referenced this pull request Sep 23, 2025
Crucible changes are:
update to latest `vergen` (#1770)
Update rand dependencies, and fallout from that. (#1764)
[crucible-downstairs] migrate to API traits (#1768)
[crucible-agent] migrate to API trait (#1766)
[crucible-pantry] migrate to API trait (#1767)
Add back job delays in the downstairs with the --lossy flag (#1761)

Propolis changes are:
Crucible update plus a few other dependency changes. (#948)
[2/n] [propolis-server] switch to API trait (#946)
[1/n] add a temporary indent to propolis server APIs (#945)
Handle Intel CPUID leaves 4 and 18h, specialize CPUID for VM shape (#941)
Increase viona receive queue length to 2048 (#935)
Expand viona header pad to account for options (#937)
fix linux p9fs multi message reads (#932)
add a D script to report VMs' CPUID queries (#934)
Update GH actions
Re-enable viona packet data loaning
leftwo added a commit that referenced this pull request Sep 26, 2025
Crucible changes are:
update to latest `vergen` (#1770)
Update rand dependencies, and fallout from that. (#1764)
[crucible-downstairs] migrate to API traits (#1768) [crucible-agent]
migrate to API trait (#1766)
[crucible-pantry] migrate to API trait (#1767)
Add back job delays in the downstairs with the --lossy flag (#1761)

Propolis changes are:
Crucible update plus a few other dependency changes. (#948) [2/n]
[propolis-server] switch to API trait (#946) [1/n] add a temporary
indent to propolis server APIs (#945) Handle Intel CPUID leaves 4 and
18h, specialize CPUID for VM shape (#941) Increase viona receive queue
length to 2048 (#935) Expand viona header pad to account for options
(#937) fix linux p9fs multi message reads (#932)
add a D script to report VMs' CPUID queries (#934) Update GH actions
Re-enable viona packet data loaning

---------

Co-authored-by: Alan Hanson <alan@oxide.computer>
Co-authored-by: Sean Klein <sean@oxide.computer>
Co-authored-by: Rain <rain@oxide.computer>
Co-authored-by: John Gallagher <john@oxidecomputer.com>
Co-authored-by: iliana etaoin <iliana@oxide.computer>
Co-authored-by: Sean Klein <sean@oxidecomputer.com>
Co-authored-by: Alex Plotnick <alex@oxidecomputer.com>
Co-authored-by: David Pacheco <dap@oxidecomputer.com>
Co-authored-by: Andrew J. Stone <andrew@oxidecomputer.com>
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