Skip to content

Conversation

@akhilerm
Copy link
Contributor

Signed-off-by: Akhil Mohan akhil.mohan@datacore.com

Why is this PR required? What issue does it fix?:
sysfs files like dm/uuid etc are sometimes suffixed by a newline
character which need to be trimmed off for correct parsing, else
it will result in incorrect device type being detected

What this PR does?:
trim the newline suffix while reading from sysfs

Does this PR require any upgrade changes?:

If the changes in this PR are manually verified, list down the scenarios covered::

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

Checklist:

sysfs files like dm/uuid etc are sometimes suffixed by a newline
character which need to be trimmed off for correct parsing, else
it will result in incorrect device type being detected

Signed-off-by: Akhil Mohan <akhil.mohan@datacore.com>
Signed-off-by: Akhil Mohan <akhil.mohan@datacore.com>
@codecov-commenter
Copy link

codecov-commenter commented Dec 28, 2021

Codecov Report

Merging #666 (e800cb5) into develop (7094461) will increase coverage by 0.27%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #666      +/-   ##
===========================================
+ Coverage    44.78%   45.06%   +0.27%     
===========================================
  Files           79       79              
  Lines         3970     3970              
===========================================
+ Hits          1778     1789      +11     
+ Misses        2024     2016       -8     
+ Partials       168      165       -3     
Impacted Files Coverage Δ
pkg/sysfs/syspath.go 84.16% <ø> (+1.66%) ⬆️
pkg/sysfs/util.go 81.81% <100.00%> (ø)
cmd/ndm_daemonset/probe/addhandler.go 68.95% <0.00%> (+0.98%) ⬆️
cmd/ndm_daemonset/probe/udevprobe.go 49.01% <0.00%> (+2.37%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7094461...e800cb5. Read the comment docs.

@akhilerm akhilerm merged commit 5f3d680 into openebs-archive:develop Dec 28, 2021
@akhilerm akhilerm deleted the fix-sysfs-newline branch December 28, 2021 06:59
akhilerm added a commit to akhilerm/node-disk-manager that referenced this pull request Dec 28, 2021
sysfs files like dm/uuid etc are sometimes suffixed by a newline
character which need to be trimmed off for correct parsing, else
it will result in incorrect device type being detected

Signed-off-by: Akhil Mohan <akhil.mohan@datacore.com>
akhilerm added a commit that referenced this pull request Dec 28, 2021
sysfs files like dm/uuid etc are sometimes suffixed by a newline
character which need to be trimmed off for correct parsing, else
it will result in incorrect device type being detected

Signed-off-by: Akhil Mohan <akhil.mohan@datacore.com>
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.

OpenEBS NDM LUKS encrypted volume toggles between Active/Inactive state

3 participants