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

feat: Stratis support #439

Merged
merged 6 commits into from
Jun 10, 2024

Conversation

vojtechtrefny
Copy link
Collaborator

Support for creating and managing Stratis pools and volumes. For now this is just a draft because we need a new version of Blivet to be available for the full support. This includes support for creating Stratis pools and filesystems and adding new block devices to an existing Stratis pool (removing block devices is not supported by Stratis). Encrypted Stratis pools can be created with Clevis/Tang or TPM support.

Resolves: RHEL-31854

@vojtechtrefny vojtechtrefny changed the title [WIP] Stratis support [WIP] feat: Stratis support May 16, 2024
@vojtechtrefny vojtechtrefny changed the title [WIP] feat: Stratis support feat: Stratis support May 16, 2024
README.md Outdated Show resolved Hide resolved
@@ -9,3 +9,5 @@ blivet_package_list:
- vdo
- kmod-kvdo
- xfsprogs
- stratisd
- stratis-cli
Copy link
Contributor

Choose a reason for hiding this comment

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

Does it make sense to separate packages, and only install once that are needed. E.g. for this use case, add a blivet_stratis_packages and install these packages only when user sets stratis variables?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's probably worth installing the dependencies a bit "smarter" -- we already have VDO here which also isn't that widely used.

Copy link
Contributor

Choose a reason for hiding this comment

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

Note that blivet already has a way to return a list of package names that are required to perform the given actions - https://github.com/linux-system-roles/storage/blob/main/tasks/main-blivet.yml#L21 - can that be extended to include all of the packages we currently put in the various vars files, such as vdo, xfsprogs, etc.?

tests/verify-pool-stratis.yml Outdated Show resolved Hide resolved
tests/verify-pool-stratis.yml Outdated Show resolved Hide resolved
@vojtechtrefny vojtechtrefny marked this pull request as ready for review May 28, 2024 09:20
@vojtechtrefny
Copy link
Collaborator Author

Blivet with full support for all Stratis features in this PR is now available on both RHEL (9 and 10) and Fedora so I am marking this as ready for review. The pylint failures are fixed in #440

README.md Show resolved Hide resolved
@richm
Copy link
Contributor

richm commented May 30, 2024

[citest]

Copy link

codecov bot commented May 31, 2024

Codecov Report

Attention: Patch coverage is 0% with 127 lines in your changes missing coverage. Please review.

Project coverage is 10.90%. Comparing base (acd20be) to head (9be4bd6).
Report is 12 commits behind head on main.

Files Patch % Lines
library/blivet.py 0.00% 106 Missing ⚠️
library/blockdev_info.py 0.00% 21 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #439      +/-   ##
==========================================
- Coverage   16.54%   10.90%   -5.65%     
==========================================
  Files           2        8       +6     
  Lines         284     1917    +1633     
  Branches       79        0      -79     
==========================================
+ Hits           47      209     +162     
- Misses        237     1708    +1471     
Flag Coverage Δ
sanity ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@vojtechtrefny
Copy link
Collaborator Author

[citest]

@richm
Copy link
Contributor

richm commented Jun 2, 2024

the centos9 statis test fails:

TASK [fedora.linux_system_roles.storage : Manage the pools and volumes to match the specified state] ***
task path: /WORKDIR/git-main_stratis-support-25ax7xqcj/.collection/ansible_collections/fedora/linux_system_roles/roles/storage/tasks/main-blivet.yml:69
Friday 31 May 2024  17:45:03 +0000 (0:00:00.010)       0:01:05.969 ************ 
fatal: [sut]: FAILED! => {
    "actions": [],
    "changed": false,
    "crypts": [],
    "leaves": [],
    "mounts": [],
    "packages": [],
    "pools": [],
    "volumes": []
}

MSG:

failed to set up pool 'foo': __init__() got an unexpected keyword argument 'clevis'

@vojtechtrefny
Copy link
Collaborator Author

[citest]

@vojtechtrefny
Copy link
Collaborator Author

[citest]

@vojtechtrefny
Copy link
Collaborator Author

[citest]

@vojtechtrefny
Copy link
Collaborator Author

[citest]

@richm
Copy link
Contributor

richm commented Jun 6, 2024

please rebase on top of the latest main branch to pick up test fixes

We can use the information from `lsblk` we already use for other
checks instead of using the Ansible mountinfo facts. This makes
the check simpler and also makes it easier to check for Stratis
volume mount points, because of the complicated Stratis devices
structure in /dev.
Tang server configuration or TPM2 can now be used when creating
an encrypted Stratis Pool.

Related: RHEL-31854
Some Stratis features are not available with older versions of
Blivet.

Related: RHEL-31854
Stratis is not available on RHEL/CentOS 7.

Related: RHEL-31854
@vojtechtrefny
Copy link
Collaborator Author

[citest]

@richm richm merged commit 00dabe1 into linux-system-roles:main Jun 10, 2024
21 of 28 checks passed
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.

None yet

3 participants