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 (ndm-operator) Allow claim sparse device #679

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

nobiit
Copy link

@nobiit nobiit commented Sep 25, 2022

Pull Request template

Why is this PR required? What issue does it fix?:
There is currently no way to get a sparse Device
What this PR does?:
Combined with openebs/dynamic-localpv-provisioner#145. It provides a way to get the device sparse by specifying the DeviceType explicitly

Does this PR require any upgrade changes?:
No
If the changes in this PR are manually verified, list down the scenarios covered::

  • Create a BlockDeviceClaim with the DeviceType specified as sparse. Make sure the status is Bound

Any additional information for your reviewer? :
Mention if this PR is part of any design or a continuation of previous PRs

Checklist:

  • Fixes #
  • PR Title follows the convention of <type>(<scope>): <subject>
  • Has the change log section been updated?
  • Commit has unit tests
  • Commit has integration tests
  • (Optional) Are upgrade changes included in this PR? If not, mention the issue/PR to track:
  • (Optional) If documentation changes are required, which issue on https://github.com/openebs/openebs-docs is used to track them:

PLEASE REMOVE BELOW INFORMATION BEFORE SUBMITTING

The PR title message must follow convention:
<type>(<scope>): <subject>.

Where:
Most common types are:
* feat - for new features, not a new feature for build script
* fix - for bug fixes or improvements, not a fix for build script
* chore - changes not related to production code
* docs - changes related to documentation
* style - formatting, missing semi colons, linting fix etc; no significant production code changes
* test - adding missing tests, refactoring tests; no production code change
* refactor - refactoring production code, eg. renaming a variable or function name, there should not be any significant production code changes
* cherry-pick - if PR is merged in develop branch and raised to release branch(like v0.4.x)

IMPORTANT: Please review the CONTRIBUTING.md file for detailed contributing guidelines.

Copy link
Member

@niladrih niladrih left a comment

Choose a reason for hiding this comment

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

nit: Should use defined blockdevice type constants when checking for device type.

pkg/select/blockdevice/select.go Outdated Show resolved Hide resolved
@@ -58,10 +58,12 @@ func (c *Config) getCandidateDevices(bdList *apis.BlockDeviceList) (*apis.BlockD
FilterBlockDeviceName,
)
} else {
if c.ClaimSpec.DeviceType != blockdevice.SparseBlockDeviceType {
Copy link

Choose a reason for hiding this comment

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

typecheck: undeclared name: blockdevice


ℹ️ Learn about @sonatype-lift commands

You can reply with the following commands. For example, reply with @sonatype-lift ignoreall to leave out all findings.

Command Usage
@sonatype-lift ignore Leave out the above finding from this PR
@sonatype-lift ignoreall Leave out all the existing findings from this PR
@sonatype-lift exclude <file|issue|path|tool> Exclude specified file|issue|path|tool from Lift findings by updating your config.toml file

Note: When talking to LiftBot, you need to refresh the page to see its response.
Click here to add LiftBot to another repo.


Was this a good recommendation?
[ 🙁 Not relevant ] - [ 😕 Won't fix ] - [ 😑 Not critical, will fix ] - [ 🙂 Critical, will fix ] - [ 😊 Critical, fixing now ]

@nobiit nobiit force-pushed the features/allow-claim-sparse-device branch from c54ea7e to a02ddc6 Compare September 27, 2022 04:31
@codecov-commenter
Copy link

Codecov Report

Merging #679 (128de36) into develop (6863cc2) will increase coverage by 0.31%.
The diff coverage is 0.00%.

❗ Current head 128de36 differs from pull request most recent head a02ddc6. Consider uploading reports for the commit a02ddc6 to get more accurate results

@@             Coverage Diff             @@
##           develop     #679      +/-   ##
===========================================
+ Coverage    45.01%   45.32%   +0.31%     
===========================================
  Files           79       79              
  Lines         3992     3993       +1     
===========================================
+ Hits          1797     1810      +13     
+ Misses        2028     2014      -14     
- Partials       167      169       +2     
Impacted Files Coverage Δ
pkg/select/blockdevice/select.go 0.00% <0.00%> (ø)
cmd/ndm_daemonset/probe/udevprobe.go 50.00% <0.00%> (+1.55%) ⬆️
cmd/ndm_daemonset/probe/addhandler.go 70.91% <0.00%> (+2.94%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

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.

3 participants