-
Notifications
You must be signed in to change notification settings - Fork 59
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
restrict swap size to less than 128GB on EL7 #331
Conversation
Codecov ReportBase: 16.54% // Head: 16.54% // No change to project coverage 👍
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more Additional details and impacted files@@ Coverage Diff @@
## main #331 +/- ##
=======================================
Coverage 16.54% 16.54%
=======================================
Files 2 2
Lines 284 284
Branches 71 71
=======================================
Hits 47 47
Misses 237 237
Flags with carried forward coverage won't be shown. Click here to find out more. Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
lgtm Out of curiosity... Instead of introducing What makes me wonder most is |
The problem is that tests/provision.fmf lists 1TB disk sizes for the scsi (and nvme) disks, because we need those large sizes for some other tests. So the tests that get an unused disk for swap need to somehow tell find_unused_disk.py to return an unused disk of less than a certain size: standard-inventory-qcow2:
qemu:
m: 2048
drive:
- size: 10737418240
- size: 10737418240
- size: 10737418240
- size: 1099511627800
interface: scsi
- size: 1099511627800
interface: scsi
- size: 10737418240
interface: scsi
- size: 1099511627800
interface: nvme
- size: 10737418240
interface: nvme
- size: 10737418240
interface: nvme I'm not sure how to tell find_unused_disk.py to return an item from this list which has a scsi interface which is less than 128GB unless I introduce a
No, because find_unused_disk.py is used for all of the tests, not just swap related tests. For non-swap uses, there is no 128GB size restriction - only for the swap case.
They should know that they cannot create a swap partition of size greater than 127GB. |
Thank you for the detailed explanations, @richm! |
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.
lgtm
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 good to me, thank you.
On EL7 the swap size must be less than 128GB, so change the tests to restrict the size. This required introducing a `max_size` parameter to find_unused_disk. I also took this opportunity to do some ansible-lint 6.x cleanup for the code I touched. There is still a huge amount of tests/ code that is not ansible-lint 6.x clean.
806bd81
to
5a27124
Compare
[1.9.6] - 2023-02-01 -------------------- ### New Features - none ### Bug Fixes - none ### Other Changes - fix shellcheck issues (linux-system-roles#327) - Fix issues found by CodeQL (linux-system-roles#329) - restrict swap size to less than 128GB on EL7 (linux-system-roles#331) Signed-off-by: Rich Megginson <rmeggins@redhat.com>
On EL7 the swap size must be less than 128GB, so change the tests
to restrict the size. This required introducing a
max_size
parameterto find_unused_disk.
I also took this opportunity to do some ansible-lint 6.x cleanup
for the code I touched. There is still a huge amount of tests/
code that is not ansible-lint 6.x clean.