Skip to content

Add sp version info to omdb nexus update-status #8517

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

andrewjstone
Copy link
Contributor

Fixes #8485

@andrewjstone
Copy link
Contributor Author

Some local testing with omicron-dev

Running Zones
SLED_ID ZONE_TYPE ZONE_ID VERSION
Installed SP Software
BASEBOARD_ID                 SLED_ID SLOT0_VERSION SLOT0_GIT_COMMIT SLOT1_VERSION SLOT1_GIT_COMMIT
FAKE_SIM_SIDECAR:SimSidecar0         0.0.2         ffffffff         0.0.1         fefefefe
FAKE_SIM_SIDECAR:SimSidecar1         0.0.2         ffffffff         0.0.1         fefefefe
i86pc:SimGimlet00                    0.0.2         ffffffff         0.0.1         fefefefe
i86pc:SimGimlet01                    0.0.2         ffffffff         0.0.1         fefefefe

Ok(())
}

fn print_zones(zones: impl Iterator<Item = (SledUuid, Vec<ZoneStatus>)>) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This was all just moved but didn't change.

println!("{}", table);
}

fn print_sps(sps: impl Iterator<Item = (String, SpStatus)>) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is new.

Comment on lines 68 to 71
slot0_version: String,
slot0_git_commit: String,
slot1_version: String,
slot1_git_commit: String,
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we also include the system version associated with each of these SP versions (if we know it)?

IIRC for zones, the "version" we report is based on mapping the hash reported in inventory that is then mapped back to a system version (from a TUF repo). In the SP case, these versions are reported by the SP, but they're hubris release versions, and have no direct tie to a system version, right? So to know whether an update is complete or in progress, the consumer of this would have to know or find what hubris versions of different artifacts are present in the new repo. But I think Nexus already knows this and could include it for us to show here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

🤦 Hmm, Should I just return the actual version if known? No real need for the other versions now that I think about it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I made the change to only include the TUF repo version in 3601261

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.

Looks great - thanks!

);
}
}
if let Some(new) = new.tuf_repo() {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's possible (albeit unlikely) SP versions don't change between releases - maybe put this one before checking old, so we report the newer if it matches both?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good idea! One other thing, is that testing this with omicron-dev does not seem to be doing what I expect. I also changed to parse the ArtifactVersion in case to_string was not symmetric with parse. Didn't make a difference. I think this is likely just an artifact of my test environment, but can't be sure without testing on a4x2 or a racklette.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed in dce506f

@andrewjstone andrewjstone force-pushed the update-status-sp-version-info branch from f4187f8 to dce506f Compare July 8, 2025 00:07
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.

omdb nexus update-status needs SP version information
2 participants