-
Notifications
You must be signed in to change notification settings - Fork 171
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
dev-synthesize-osupdate: New command #1635
Conversation
b4ead55
to
c0fdd24
Compare
OK I reworked this to use more of a "cosa model" and less "raw ostree" and added an invocation in CI to validate that it works (or at least, doesn't crash). |
I think @jlebon had similar logic to synthesize a payload for FCOS in kola, which also injects relevant commit metadata for Zincati. Is there more that can be shared/re-use between the two? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like CI failed on this.
LGTM, though IMO I think we should move away from offline-update
in general now that we have proper upgrade tests. I think it'd be great to have this integrated there instead.
Just saw your cross-link to this from openshift/machine-config-operator#1957. You have the same idea happening in ostreedev/ostree#2127 of twiddling with a percentage of ELF files. Let's just make it a hidden ostree command instead? (Or rpm-ostree; there's already |
Yeah I was referring to that in the first para of the commit message. They're different things - the current kola upgrade tests are going from "last fcos stable to current", but the problem with that is we're mostly testing the old code as far as upgrading. Here I really want to test the current code, and also with a "large" upgrade.
It's an interesting topic because the ostree test is an exttest and so using this cosa command would currently force us to pull it as a container until #1645 I'd forgotten about |
The upgrade test does both: it goes from previous to current and current to "synthesized next". There's also
Yeah, I'd like to eventually have an Anyway, we can look into this stuff again in follow-ups. We've already got the code written here and it's useful in testing an important bug, so shipping this SGTM! Want to fix CI? I think we can just swap the order in which the commands are run. |
I don't understand, how does this relate to offline-update? The plan is to use this in OpenShift CI to just synthesize a new oscontainer, |
OK I'll look at adding this to rpm-ostree. |
Ahh OK, maybe I misunderstood. I thought in addition to using this in OpenShift CI, you were targeting |
We want to test upgrades that actually change files as a general rule; in some cases we want to test "large" upgrades to validate performance. This code generates a "synthetic" upgrade that adds an ELF note to a percentage of ELF files (randomly selected). By doing it this way we are only actually testing one version of the code. Migrated from coreos/coreos-assembler#1635 using the Rust code from ostreedev/ostree#2127
We want to test upgrades that actually change files as a general rule; in some cases we want to test "large" upgrades to validate performance. This code generates a "synthetic" upgrade that adds an ELF note to a percentage of ELF files (randomly selected). By doing it this way we are only actually testing one version of the code. Migrated from coreos/coreos-assembler#1635 using the Rust code from ostreedev/ostree#2127
Migrated to coreos/rpm-ostree#2199 |
We want to test upgrades that actually change files as a general rule; in some cases we want to test "large" upgrades to validate performance. This code generates a "synthetic" upgrade that adds an ELF note to a percentage of ELF files (randomly selected). By doing it this way we are only actually testing one version of the code. Migrated from coreos/coreos-assembler#1635 using the Rust code from ostreedev/ostree#2127
We want to test upgrades that actually change files as a general rule; in some cases we want to test "large" upgrades to validate performance. This code generates a "synthetic" upgrade that adds an ELF note to a percentage of ELF files (randomly selected). By doing it this way we are only actually testing one version of the code. Migrated from coreos/coreos-assembler#1635 using the Rust code from ostreedev/ostree#2127
OK trying to use this for the OpenShift testing I belatedly realized I do really want this code, not the code that landed in rpm-ostree. The reason is this code uses the libostree APIs and hence works in an ergonomic way on an Whereas instead for the "exttest" model where the test runs in the target VM it's way simpler to just use the files that exist in What we really want I think is to switch the oscontainer to be "exploded" rather than archive-repo-in-container...but I don't want to block on that. |
I guess we could also stick this in some other container (i.e. not coreos-assembler) for now...though that has some overhead. Or I could try to adjust the rpm-ostree code to work against an archive repo too...it's just messy. |
Keeping it in cosa for now is totally fine IMO. We can enhance the rpm-ostree code and dedupe from here and ostree later on. /lgtm |
Re-adding WIP I'm going to add some more code here wrapping this to deal with oscontainers too. |
Oh right now I realize why you thought that - because I have a commit to make it easier to use offline-update to test this code. I will split that to a separate PR. But I wasn't planning to use offline-update for the actual tests. |
c0fdd24
to
c784044
Compare
OK a whole lot of hacks here but I got it to work:
|
Usage in yet another higher level script here: |
c784044
to
d5e9133
Compare
We have "real" OS update tests which look at a previous build; this is generally good, but I want to be able to reliably test e.g. a "large" upgrade in some CI scenarios, and it's OK if the upgrade isn't "real". This command takes an ostree commit and adds a note to a percentage of ELF binaries. This way one can generate a "large" update by specifying e.g. `--percentage=80` or so. Building on that, also add a wrapper which generates an update from an oscontainer. I plan to use this for testing etcd performance during large updates; see openshift/machine-config-operator#1897
d5e9133
to
be955a0
Compare
Lifting WIP on this, I dropped the attempt to test it in CI for now because there's some funky conflicts the pruning test (which seems to be a trap we need to fix). |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cgwalters, jlebon The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
We have "real" OS update tests which look at a previous build;
this is generally good, but I want to be able to reliably
test e.g. a "large" upgrade in some CI scenarios, and it's OK
if the upgrade isn't "real".
This command takes an ostree commit and adds a note to a percentage
of ELF binaries. This way one can generate a "large" update by
specifying e.g.
--percentage=80
or so.I plan to use this for testing etcd performance during
large updates; see
openshift/machine-config-operator#1897