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

fix: do not filter out removable devices #147

Merged
merged 1 commit into from
Apr 13, 2022
Merged

fix: do not filter out removable devices #147

merged 1 commit into from
Apr 13, 2022

Conversation

leelavg
Copy link
Contributor

@leelavg leelavg commented Apr 8, 2022

  • hot pluggable devices are represented as removable in lsblk o/p
  • not all removable devices should be filtered out and this PR removes
    the existing filter
  • as a side effect ROM is being picked up for VG ops and that is
    filtered based on Type of device

fixes: #109

Signed-off-by: Leela Venkaiah G [email protected]

@leelavg
Copy link
Contributor Author

leelavg commented Apr 8, 2022

  • filtering out ROM device
{"level":"info","ts":1649414296.9406986,"logger":"controller.lvmvolumegroup.vg-manager","msg":"does not match filter","reconciler group":"lvm.topolvm.io","reconciler kind":"LVMVolumeGroup","name":"vg1","namespace":"lvm-operator-system","Device.Name":"sr0","filter.Name":"isUsableByDeviceType"}
  • no regression
{"level":"info","ts":1649415065.6944656,"logger":"controller.lvmvolumegroup.vg-manager","msg":"does not match filter","reconciler group":"lvm.topolvm.io","reconciler kind":"LVMVolumeGroup","name":"vg1","namespace":"lvm-operator-system","Device.Name":"loop4","filter.Name":"isUsableByDeviceType"}

@leelavg leelavg requested review from sp98 and nbalacha April 8, 2022 10:59
@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Apr 8, 2022
Copy link
Contributor

@nbalacha nbalacha left a comment

Choose a reason for hiding this comment

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

If, in future, there is a requirement to be able to configure the VG to not use loop devices , how would this be implemented?

Would it better to have one filter per type and add them to the list of filters for a VG dynamically depending on the configuration?

@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Apr 12, 2022
@leelavg
Copy link
Contributor Author

leelavg commented Apr 12, 2022

how would this be implemented?

  • then it'll be a straightforward implementation, we use all the strings based on device types in single case of switch and will filter them out
  • it basically boils out to filtering out devices based on device types currently loop is a special case

Would it better to have one filter per type

  • I feel adding filters per type will be too verbose and only increases filter count

- hot pluggable devices are represented as removable in lsblk o/p
- not all removable devices should be filtered out and this PR removes
  the existing filter
- as a side effect ROM is being picked up for VG ops and that is
  filtered based on Type of device

fixes: #109

Signed-off-by: Leela Venkaiah G <[email protected]>
@sp98
Copy link
Contributor

sp98 commented Apr 12, 2022

how would this be implemented?

  • then it'll be a straightforward implementation, we use all the strings based on device types in single case of switch and will filter them out
  • it basically boils out to filtering out devices based on device types currently loop is a special case

Would it better to have one filter per type

  • I feel adding filters per type will be too verbose and only increases filter count

Agree with Leela here. I don't think we need multiple filters for each device class. The current switch case usage would suffice.

@nbalacha
Copy link
Contributor

how would this be implemented?

  • then it'll be a straightforward implementation, we use all the strings based on device types in single case of switch and will filter them out
  • it basically boils out to filtering out devices based on device types currently loop is a special case

Can you elaborate on this seeing that the supported types would be dynamic?

Would it better to have one filter per type

  • I feel adding filters per type will be too verbose and only increases filter count

@nbalacha
Copy link
Contributor

how would this be implemented?

  • then it'll be a straightforward implementation, we use all the strings based on device types in single case of switch and will filter them out
  • it basically boils out to filtering out devices based on device types currently loop is a special case

Would it better to have one filter per type

  • I feel adding filters per type will be too verbose and only increases filter count

Agree with Leela here. I don't think we need multiple filters for each device class. The current switch case usage would suffice.

If, in future, we want to allow dynamic device type config, the switch case will not work. Say we want to use loopDevices for one cluster and not the other, we need a way to dynamically determine the filters.

Copy link
Contributor

@nbalacha nbalacha left a comment

Choose a reason for hiding this comment

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

Approving for now but we should relook at the filter approach.

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Apr 13, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Apr 13, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: leelavg, nbalacha, sp98

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 13, 2022
@openshift-merge-robot openshift-merge-robot merged commit 9c1af7a into openshift:main Apr 13, 2022
@nbalacha
Copy link
Contributor

/cherry-pick release-4.10

@openshift-cherrypick-robot

@nbalacha: new pull request created: #193

In response to this:

/cherry-pick release-4.10

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

lsblk detecting my mini sas hd connected drives as removable
5 participants