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

[controller] Fix block device filtering and add relevant tests #19

Merged
merged 5 commits into from
Jan 31, 2024

Conversation

AleksZimin
Copy link
Member

@AleksZimin AleksZimin commented Jan 28, 2024

Description

This PR addresses an issue with our controller's filtering of block devices. Previously, in certain scenarios, the controller failed to remove block devices that have partitions. This update provides a fix to ensure accurate filtering and handling of block devices with partitions. Additionally, tests have been added with sample lsblk output to ensure that the filtering logic remains robust and future changes do not break this functionality.

Why do we need it, and what problem does it solve?

This fix addresses an issue where the controller incorrectly leaves block devices with partitions, which could lead to improper resource management or potential conflicts within the system. The added tests serve to safeguard the integrity of this fix, ensuring that any future modifications maintain the correct behavior.

What is the expected result?

After applying these changes, the controller will accurately filter and handle block devices, especially those with partitions. The added tests, which simulate scenarios using lsblk output, will verify the robustness of the filtering logic. To confirm these changes, one should observe that the controller no longer retains block devices with partitions that should be filtered out and that the tests pass successfully, indicating the correctness of the implemented logic.

Checklist

  • The code is covered by unit tests.
  • e2e tests passed.
  • Documentation updated according to the changes.
  • Changes were tested in the Kubernetes cluster manually.

Signed-off-by: Aleksandr Zimin <[email protected]>
@AleksZimin AleksZimin changed the title [controller ]Fix device filtration [controller] Fix device filtration Jan 28, 2024
@altermann1 altermann1 added the bug Something isn't working label Jan 29, 2024
Signed-off-by: Aleksandr Zimin <[email protected]>
@AleksZimin AleksZimin changed the title [controller] Fix device filtration [controller] Fix Block Device Filtering and Add Relevant Tests Jan 30, 2024
@AleksZimin AleksZimin requested a review from dxavx January 30, 2024 17:52
@AleksZimin AleksZimin changed the title [controller] Fix Block Device Filtering and Add Relevant Tests [controller] Fix block bevice diltering and add relevant tests Jan 30, 2024
@AleksZimin AleksZimin changed the title [controller] Fix block bevice diltering and add relevant tests [controller] Fix block device filtering and add relevant tests Jan 30, 2024
Signed-off-by: Aleksandr Zimin <[email protected]>
Signed-off-by: Aleksandr Zimin <[email protected]>
Signed-off-by: Aleksandr Zimin <[email protected]>
@AleksZimin AleksZimin marked this pull request as ready for review January 31, 2024 08:20
@AleksZimin AleksZimin merged commit 88652f9 into main Jan 31, 2024
3 checks passed
@AleksZimin AleksZimin deleted the fix-device-filtration branch January 31, 2024 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants