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

add setup snapshot to install packages into snapshot #260

Merged
merged 1 commit into from
Apr 8, 2022

Conversation

richm
Copy link
Contributor

@richm richm commented Mar 17, 2022

No description provided.

@richm
Copy link
Contributor Author

richm commented Mar 17, 2022

The goal here is that we can create a snapshot of the VM image pre-loaded with packages that take a long time to install like kmod-kvdo, then use that snapshot for subsequent tests.
The code that creates and initializes the snapshot is here: https://github.com/linux-system-roles/tox-lsr/blob/main/src/tox_lsr/test_scripts/runqemu.py#L546-L597

The main thing this PR does is to allow test playbooks access to the inner variables of the role, e.g. the list of packages per-platform.

This is currently only enabled for the ansible 2.12 test runner (the rhel7 runner qemu guest crashes when trying to use the snapshot)

the test runner will need to be changed to use tests/setup-snapshot.yml

@richm richm closed this Mar 17, 2022
@richm richm reopened this Mar 17, 2022
Copy link
Contributor

@nhosoi nhosoi left a comment

Choose a reason for hiding this comment

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

lgtm

A bit confused that these files are not related to the "snapshot"; just added because they were missing?
tests/tests_create_lvm_cache_then_remove_nvme_generated.yml
tests/tests_create_lvm_cache_then_remove_scsi_generated.yml
tests/tests_fatals_cache_volume_nvme_generated.yml
tests/tests_fatals_cache_volume_scsi_generated.yml

@richm
Copy link
Contributor Author

richm commented Mar 17, 2022

lgtm

A bit confused that these files are not related to the "snapshot"; just added because they were missing?

yes - the nvme_generated and scsi_generated are supposed to be generated by the developer upon commit - I have a git post-commit hook that generates these so I don't forget . . .

tests/tests_create_lvm_cache_then_remove_nvme_generated.yml tests/tests_create_lvm_cache_then_remove_scsi_generated.yml tests/tests_fatals_cache_volume_nvme_generated.yml tests/tests_fatals_cache_volume_scsi_generated.yml

@vojtechtrefny
Copy link
Collaborator

lgtm
A bit confused that these files are not related to the "snapshot"; just added because they were missing?

yes - the nvme_generated and scsi_generated are supposed to be generated by the developer upon commit - I have a git post-commit hook that generates these so I don't forget . . .

My bad, that should have been part of #235. I have added a short paragraph about the generated tests to README-devel (#261) so I should remember it next time.

Copy link
Contributor

@spetrosi spetrosi left a comment

Choose a reason for hiding this comment

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

lgtm

@richm
Copy link
Contributor Author

richm commented Mar 21, 2022

[citest]

@richm richm merged commit 47088ce into linux-system-roles:master Apr 8, 2022
@richm richm deleted the setup-snapshot branch April 8, 2022 17:31
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.

4 participants