Skip to content

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

Merged
albertvaka merged 2 commits intomasterfrom
albertvaka/fix-tag-by-label-with-use-mount
Oct 18, 2021
Merged

[disk] Fix tag_by_label when used together with use_mount#10418
albertvaka merged 2 commits intomasterfrom
albertvaka/fix-tag-by-label-with-use-mount

Conversation

@albertvaka
Copy link
Copy Markdown
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
Copy Markdown

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