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

kola: add raid0 tests for root and data devices #36

Merged
merged 5 commits into from
Oct 22, 2021

Conversation

dongsupark
Copy link
Member

We should test root and data devices not only with raid1 but also with raid0, to catch issues with raid0 devices.

To be able to parametrize raid levels for RAID tests, we should create a helper function ExecTemplate() that reads template and parses it into an actual output string. Also make the existing raid tests use ExecTemplate().

@tormath1
Copy link
Contributor

opened "Dec 13, 2019" ahah - @dongsupark are you still interested by contributing to this PR ? I think it would be nice to have this new tests !

@dongsupark
Copy link
Member Author

@tormath1 Thanks for the reminder. 👍
I will soon try to rebase this PR.
It looks like there's a non-trivial merge conflict.

@dongsupark
Copy link
Member Author

Rebased.
Had to update format of the input data raid partition into ignition, IgnitionConfigDataRaid, to make the code consistent with changes in #234.

Locally tested.

sudo -E ./bin/kola run --qemu-image=.../flatcar_production_qemu_image.img \
cl.disk.raid0.data cl.disk.raid0.root cl.disk.raid1.data cl.disk.raid1.root

Copy link
Contributor

@tormath1 tormath1 left a comment

Choose a reason for hiding this comment

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

It looks good to me, happy to have more tests to cover this part. 💪 I added some suggestions to reduce code duplication. :)

kola/tests/misc/raid.go Outdated Show resolved Hide resolved
kola/tests/misc/raid.go Show resolved Hide resolved
kola/tests/misc/raid.go Outdated Show resolved Hide resolved
To be able to parametrize raid levels for RAID tests, we should create
a helper function `ExecTemplate()` that reads template and parses it
into an actual output string.

Also make the existing root raid test use `ExecTemplate()`.
The existing data raid test should also make use of `ExecTemplate()`
helper.

Convert the input config for raid1 data also into the ignition format,
to make it consistent with the raid1 root config.
Instead of manually checking if a type is raid1, we should create
a helper `isValidRaidType()` that checks if it is one of the
pre-defined raid types.
Copy link
Contributor

@tormath1 tormath1 left a comment

Choose a reason for hiding this comment

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

Last thing and we'll good to go: we can just add an entry into the changelog :)

kola/tests/misc/raid.go Outdated Show resolved Hide resolved
kola/tests/misc/raid.go Outdated Show resolved Hide resolved
We should test root & data devices, not only with raid1 but also with raid0,
to catch issues with raid0 devices.
To reduce amount of code, we iterate through the map of raidTypes.
Add an entry for new kola raid0 tests.
Fix a typo.
@dongsupark
Copy link
Member Author

Done, added changelog.

@dongsupark dongsupark merged commit 8a14489 into flatcar-master Oct 22, 2021
@dongsupark dongsupark deleted the dongsu/kola-raid0 branch October 22, 2021 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants