Skip to content
This repository has been archived by the owner on May 7, 2021. It is now read-only.

Prep patches for upgrade tests #1170

Merged
merged 17 commits into from
Jan 24, 2020
Merged

Conversation

jlebon
Copy link
Member

@jlebon jlebon commented Jan 22, 2020

Most of those are pretty straight-forward, though there are a few tricky ones. I can split into further PRs if preferred. As usual, see individual commit messages. :)

Allow `kola run` to take more than a single test pattern on its CLI.
This seems like an obvious extension to the current interface.
So that it doesn't split the functions that implement `kola list`.
We don't use this anymore.
Most of the FCOS/RHCOS code now consider `us-east-1` the primary region.
For example, both RHCOS and FCOS first upload to `us-east-1` before
replicating to other regions. So let's switch the default to reduce
friction there.
Copy link
Contributor

@arithx arithx left a comment

Choose a reason for hiding this comment

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

LGTM!

cmd/kola/options.go Outdated Show resolved Hide resolved
fcos/metadata.go Show resolved Hide resolved
jlebon added 13 commits January 23, 2020 09:38
Prep for more code that will leverage those.
First, use the new helper `ParseBuild` method added in the last commit.
Also, keep that `cosa.Build` object around so that we can access it
directly from other parts of the codebase.
We're going to have some tighter integration with FCOS-specific metadata
like the release index. This is prep for that.
Split out the "auto-fill" functionality of `--cosa-build` into a
separate function. Rework it to make it easier to expand for other
platforms in the future. Prep for a future patch where we don't want to
do this directly.
Factor things out a bit so that `kola` and `kolet` can handle multiple
suites of tests, though for now there's only one such suite (the one
that gets run by `kola run`). Prep for adding another suite.
It seems like a common pattern to do `c.SSH(m, fmt.Sprintf(...))` so
let's just formalize that.
Before initiating the reboot, read the boot ID from the node and use
that to confirm that the node actually rebooted. This constitutes much
stronger proof and allows dropping the `systemctl stop sshd.socket`
hack.

This is also what the rpm-ostree VM testsuite does.
This is complementary to `Reboot()`. That one initiates the reboot and
waits for the node to come back up, while `WaitForReboot()` assumes that
the reboot has already been initiated. This will be useful for tests
that need to test actions that are known to start rebooting.
In my own tests, `XZ2File` is *much* slower at decompressing FCOS qemu
images than using `xz` directly.

It's likely we could try to optimize the builtin code here by playing
with the buffer sizes and options, etc... but really, it's more
productive to leverage all the performance optimization work that went
into making `xz` itself faster if we can.
Just basic helper function that's handy to have around. Not used yet.
We don't use the CL pubkey anymore for FCOS/RHCOS artifacts, so nuke it.
Instead, if no specific keyring is given, default to creating a keyring
from the keys in `/etc/pki/rpm-gpg`. This matches how FCOS validates
OSTree commits, RPM packages, image artifacts, etc...
Move all the FCOS-related types we had defined in plume to the
centralized `fcos` package.

While we're there, rename some of the types to be more explicit, and
correspondingly tweak the variable names in the plume code.
@jlebon jlebon force-pushed the pr/fcos-upgrade-prep branch from 25f75ab to cf0079b Compare January 23, 2020 15:41
@jlebon
Copy link
Member Author

jlebon commented Jan 23, 2020

Gonna leave this one open for a bit more in case anyone else wants to review since there's a lot here.

@jlebon jlebon merged commit b9ad41e into coreos:master Jan 24, 2020
@cgwalters
Copy link
Member

Awesome work here!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants