Skip to content

feature: implement grpc-client update#585

Merged
bfjelds merged 12 commits into
mainfrom
user/bfjelds/update-grpc-client
Apr 2, 2026
Merged

feature: implement grpc-client update#585
bfjelds merged 12 commits into
mainfrom
user/bfjelds/update-grpc-client

Conversation

@bfjelds
Copy link
Copy Markdown
Member

@bfjelds bfjelds commented Mar 31, 2026

🔍 Description

  • Implement grpc-client update
  • For rollback tests and host e2e tests, where update is run with unified stage & finalize, adjust test code to use trident grpc-client update. For container tests and servicing tests and e2e tests where stage and finalize are separate update calls, trident update will remain.

Validation

@bfjelds bfjelds changed the title User/bfjelds/update grpc client WIP: implement grpc-client update Mar 31, 2026
Comment thread tools/cmd/mkcosi/generator/cih.go
@bfjelds bfjelds force-pushed the user/bfjelds/update-grpc-client branch from 9b10941 to 2de0634 Compare March 31, 2026 19:17
Comment thread tools/storm/rollback/tests/helper.go
Comment thread crates/trident/src/grpc_client/mod.rs Outdated
@bfjelds bfjelds force-pushed the user/bfjelds/update-grpc-client branch from 88df893 to be989f2 Compare April 1, 2026 21:48
@bfjelds bfjelds changed the base branch from user/frhuelsz/grpc/update-stable to main April 1, 2026 21:49
@bfjelds bfjelds changed the title WIP: implement grpc-client update feature: implement grpc-client update Apr 1, 2026
@frhuelsz frhuelsz marked this pull request as ready for review April 1, 2026 22:55
@frhuelsz frhuelsz requested a review from a team as a code owner April 1, 2026 22:55
Copilot AI review requested due to automatic review settings April 1, 2026 22:55
@frhuelsz frhuelsz marked this pull request as draft April 1, 2026 22:55
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds support for performing A/B updates via the CLI gRPC client (trident grpc-client update) and updates Storm-based tests and test images to use that path where appropriate, including ensuring socket activation is enabled for the daemon.

Changes:

  • Add/update gRPC client support for Update (stage/finalize/unified) and adjust Trident’s update handling to allow finalize-only flows without requiring a new host config.
  • Update Storm rollback/e2e/servicing helpers to invoke trident grpc-client update depending on runtime/test scenario.
  • Enable tridentd.socket in multiple VM test image YAMLs to support gRPC socket activation.

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tools/storm/servicing/tests/update.go Switches servicing update commands to trident grpc-client update for stage/finalize calls.
tools/storm/rollback/tests/helper.go Uses trident grpc-client update for rollback update path and improves command logging.
tools/storm/helpers/ab_update.go Chooses update vs grpc-client update based on runtime type when invoking update.
tools/storm/e2e/scenario/ab_update.go Chooses update vs grpc-client update based on runtime type for e2e A/B update flows.
tools/pkg/tridentgrpc/grpc.go Adds UpdateServiceClient to the Go gRPC client wrapper.
tests/images/trident-vm-testimage/base/updateimg-grub.yaml Enables tridentd.socket on VM test images.
tests/images/trident-vm-testimage/base/updateimg-grub-verity.yaml Enables tridentd.socket on VM test images.
tests/images/trident-vm-testimage/base/updateimg-grub-verity-azure.yaml Enables tridentd.socket on VM test images.
tests/images/trident-vm-testimage/base/baseimg-usr-verity.yaml Enables tridentd.socket on VM test images.
tests/images/trident-vm-testimage/base/baseimg-root-verity.yaml Enables tridentd.socket on VM test images.
tests/images/trident-vm-testimage/base/baseimg-grub.yaml Enables tridentd.socket on VM test images.
tests/images/trident-vm-testimage/base/baseimg-grub-verity.yaml Enables tridentd.socket on VM test images.
tests/images/trident-vm-testimage/base/baseimg-grub-verity-azure.yaml Enables tridentd.socket on VM test images.
crates/trident/src/lib.rs Allows finalize-only update to use stored HostStatus spec when no new host config is provided.
crates/trident/src/grpc_client/tridentclient.rs Implements update RPC calls (unified, stage-only, finalize-only) in Rust gRPC client.
crates/trident/src/grpc_client/mod.rs Wires grpc-client update CLI command to the new update RPC methods and reads config input.

Comment on lines 23 to 27
// Stable APIs
tridentpbv1.VersionServiceClient
tridentpbv1.StreamingServiceClient
tridentpbv1.UpdateServiceClient
grpcConn *grpc.ClientConn
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

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

UpdateServiceClient is added to TridentClient but NewTridentClientFromNetworkConnection doesn’t populate it, leaving the embedded interface nil; any use of the update RPCs through this client will fail at runtime. Initialize UpdateServiceClient in the constructor alongside VersionServiceClient and StreamingServiceClient.

Copilot uses AI. Check for mistakes.
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.

i think that's ok for now? nothing should be using it yet

Comment on lines +162 to +164
updateCmd := fmt.Sprintf("sudo trident -v trace grpc-client update %s", vmHostConfigPath)
logrus.Tracef("Invoking `trident update` on VM: '%s'", updateCmd)
updateOutput, err := stormssh.SshCommandCombinedOutput(u.VMConfig.VMConfig, u.VMIP, updateCmd)
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

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

The trace log message says Invoking trident update`` but the command being executed is trident ... grpc-client update, which can be misleading when debugging failures. Update the log message (and the later "`trident update` invoked" message) to match the actual command being run.

Copilot uses AI. Check for mistakes.
Comment on lines 196 to 198
logrus.Tracef("Running Trident update staging command on VM")
combinedStagingOutput, stageErr := stormssh.SshCommandCombinedOutput(vmConfig.VMConfig, vmIP, fmt.Sprintf("sudo trident update %s %s --allowed-operations stage", tridentLoggingArg, updateConfig))
combinedStagingOutput, stageErr := stormssh.SshCommandCombinedOutput(vmConfig.VMConfig, vmIP, fmt.Sprintf("sudo trident grpc-client update %s %s --allowed-operations stage", tridentLoggingArg, updateConfig))
if testConfig.Verbose {
Copy link

Copilot AI Apr 1, 2026

Choose a reason for hiding this comment

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

PR description says servicing tests (and tests that split stage/finalize) should keep using trident update, but this test now invokes trident grpc-client update for separate stage and finalize calls. Either update the PR description to match this behavior or revert this test to trident update if split update via gRPC client isn’t intended here.

Copilot uses AI. Check for mistakes.
@bfjelds bfjelds marked this pull request as ready for review April 1, 2026 23:44
@bfjelds
Copy link
Copy Markdown
Member Author

bfjelds commented Apr 1, 2026

/AzurePipelines run [GITHUB]-trident-pr-e2e

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

frhuelsz
frhuelsz previously approved these changes Apr 2, 2026
Copy link
Copy Markdown
Contributor

@frhuelsz frhuelsz left a comment

Choose a reason for hiding this comment

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

LGTM

@bfjelds bfjelds marked this pull request as draft April 2, 2026 00:41
@bfjelds bfjelds marked this pull request as ready for review April 2, 2026 00:41
@bfjelds bfjelds merged commit 9e74b4e into main Apr 2, 2026
18 checks passed
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.

3 participants