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

stop mount process when duplicate device link found #1131

Merged
merged 2 commits into from
Sep 18, 2023

Conversation

SSmallMonster
Copy link
Member

What this PR does / why we need it:

fix #1116

Special notes for your reviewer:

Does this PR introduce a user-facing change?


@SSmallMonster
Copy link
Member Author

@AmazingPangWei cc

}

var matchedDevices []manager.Attribute
for i, device := range allDevices {
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we can add serial number to ldv status, and you can match serial number here. It's right if there is only one device whose serial number match ldv's serial number.

Copy link
Member Author

Choose a reason for hiding this comment

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

add serial number in the status may be another topic.

in my opinion the essence of this PR fix is errors that may be caused by duplicate devlink. Finding whether devlink is duplicated may be more direct and effective than serial, although in most cases this link is generated by serial, I am not sure if there are inequality situations in some special scenarios.

Signed-off-by: SSmallMonster <mingming.zhou@daocloud.io>
Signed-off-by: SSmallMonster <mingming.zhou@daocloud.io>
@codecov-commenter
Copy link

Codecov Report

Merging #1131 (96fb90d) into main (0d36f91) will decrease coverage by 0.56%.
Report is 3 commits behind head on main.
The diff coverage is 0.00%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

@@            Coverage Diff             @@
##             main    #1131      +/-   ##
==========================================
- Coverage   39.39%   38.83%   -0.56%     
==========================================
  Files          25       25              
  Lines        1942     1970      +28     
==========================================
  Hits          765      765              
- Misses       1075     1103      +28     
  Partials      102      102              
Files Changed Coverage Δ
...manager/handler/localdiskvolume/localdiskvolume.go 7.97% <0.00%> (-0.90%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@SSmallMonster SSmallMonster merged commit ae188d2 into hwameistor:main Sep 18, 2023
3 checks passed
@SSmallMonster SSmallMonster deleted the fix-1116 branch October 9, 2023 12:54
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.

Pod may write wrong disk if two disks that own same serial number exist in same node
3 participants