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

[3/n] use update engine for reconfigurator execution #6399

Conversation

sunshowers
Copy link
Contributor

@sunshowers sunshowers commented Aug 20, 2024

This starts to introduce the ability for the reconfigurator execution to be driven by the update engine. Doing so does add some complexity -- there's a new system driving updates -- but has several advantages that will be coming in future patches:

  1. More fine-grained step reporting.
  2. Progress reporting (not hooked up yet).

This is really basic so far -- for example, we don't currently report skipped steps, nor do we model nesting within the update engine. But it's a good place to get started, and we can keep enhancing this as time permits.

One change is that we now return and store a single anyhow::Error rather than a list of errors. If a step returns more than one error, we use a hack to combine the cause chains into a single message.

To serialize errors, we use the NestedError that's currently in update-engine. One benefit is that we now record the entire chain of error sources.

Within omdb, I also switched the blueprint executor display (and nothing else so far) to use tabled for easy alignment. This is what it looks like now:

task: "blueprint_executor"
  configured period: every 1m
  currently executing: no
  last completed activation: iter 110, triggered by a periodic timer firing
    started at 2024-08-27T05:36:57.748Z (7s ago) and ran for 227ms
    target blueprint:  70004e05-fc43-4534-ba51-ab0239b13f63
    execution:         enabled
    status:            failed at: Ensure dataset records (step 6/13)
    error:             step failed: Ensure dataset records
      caused by:       failed to insert dataset record for dataset 9d128b27-c9e9-4acf-b40b-44cbfbb0e2ba
      caused by:       Object (of type ById(6549a5fa-3f2e-4132-b2a1-56caf9028064)) not found: zpool

Depends on:

Created using spr 1.3.6-beta.1
Created using spr 1.3.6-beta.1

[skip ci]
Created using spr 1.3.6-beta.1
Created using spr 1.3.6-beta.1

[skip ci]
@sunshowers sunshowers changed the title [WIP] use update engine for reconfigurator execution [2/n] use update engine for reconfigurator execution Aug 27, 2024
Created using spr 1.3.6-beta.1
Created using spr 1.3.6-beta.1

[skip ci]
Created using spr 1.3.6-beta.1
@sunshowers sunshowers changed the title [2/n] use update engine for reconfigurator execution [3/n] use update engine for reconfigurator execution Aug 27, 2024
sunshowers added a commit that referenced this pull request Aug 27, 2024
…th_overrides (#6444)

We're going to do more things in this wrapper in #6399.
Created using spr 1.3.6-beta.1

[skip ci]
Created using spr 1.3.6-beta.1
@sunshowers sunshowers changed the base branch from sunshowers/spr/main.wip-use-update-engine-for-reconfigurator-execution to main August 30, 2024 03:57
Created using spr 1.3.6-beta.1
Created using spr 1.3.6-beta.1
Created using spr 1.3.6-beta.1
Copy link
Contributor

@jgallagher jgallagher left a comment

Choose a reason for hiding this comment

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

LGTM, just a few nits/questions

nexus/reconfigurator/execution/src/lib.rs Outdated Show resolved Hide resolved
nexus/reconfigurator/execution/src/lib.rs Outdated Show resolved Hide resolved
nexus/reconfigurator/execution/src/lib.rs Show resolved Hide resolved
Created using spr 1.3.6-beta.1
@sunshowers sunshowers enabled auto-merge (squash) September 6, 2024 22:09
@sunshowers sunshowers disabled auto-merge September 6, 2024 22:09
@sunshowers sunshowers enabled auto-merge (squash) September 6, 2024 22:10
Created using spr 1.3.6-beta.1
@sunshowers sunshowers merged commit b45ec6d into main Sep 7, 2024
18 checks passed
@sunshowers sunshowers deleted the sunshowers/spr/wip-use-update-engine-for-reconfigurator-execution branch September 7, 2024 00:13
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