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

[disk] Fix tag_by_label when used together with use_mount #10418

Merged
merged 2 commits into from
Oct 18, 2021

Conversation

albertvaka
Copy link
Contributor

What does this PR do?

  • Fixes accessing devices_label using the wrong key (ie: the mountpoint instead of the device name)
  • Removes an unused dictionary in the same code path

Motivation

If tag_by_label and use_mount were both set, we would end up accessing
the devices_label array by mountpoint instead of the actual device path.

If `tag_by_label` is set and `use_mount` is set, we would end up accessing
the labels array by mountpoint instead of the actual device path.
@albertvaka albertvaka requested review from a team as code owners October 14, 2021 21:49
@ghost ghost added the integration/disk label Oct 14, 2021
@codecov
Copy link

codecov bot commented Oct 14, 2021

Codecov Report

Merging #10418 (9b2d4ba) into master (8ed69d9) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Flag Coverage Δ
disk 91.13% <100.00%> (-0.51%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

@albertvaka albertvaka merged commit 4c3d9fa into master Oct 18, 2021
@albertvaka albertvaka deleted the albertvaka/fix-tag-by-label-with-use-mount branch October 18, 2021 09:28
github-actions bot pushed a commit that referenced this pull request Oct 18, 2021
If tag_by_label and use_mount were both set, we would end up accessing
the devices_label array by mountpoint instead of the actual device path. 4c3d9fa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants