Merge ~kissiel/checkbox-support:raids-are-disks-too into checkbox-support:master

Proposed by Maciej Kisielewski
Status: Merged
Approved by: Maciej Kisielewski
Approved revision: e76ddcaa729e520287744cdb5bb1f5da5f07346d
Merged at revision: 58410871b027f80b3d14dc8abd2d5e0aca198b76
Proposed branch: ~kissiel/checkbox-support:raids-are-disks-too
Merge into: checkbox-support:master
Diff against target: 15 lines (+4/-0)
1 file modified
checkbox_support/parsers/udevadm.py (+4/-0)
Reviewer Review Type Date Requested Status
Jonathan Cave (community) Approve
Review via email: mp+379459@code.launchpad.net

Description of the change

Ensure that RAIDs are properly listed by the device resource job

To post a comment you must log in.
Revision history for this message
Jonathan Cave (jocave) wrote :

Once my head got past the two "container" strings, LGTM!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/checkbox_support/parsers/udevadm.py b/checkbox_support/parsers/udevadm.py
index b85ee93..11ae6ec 100644
--- a/checkbox_support/parsers/udevadm.py
+++ b/checkbox_support/parsers/udevadm.py
@@ -829,6 +829,10 @@ class UdevadmDevice(object):
829 elif '/dev/md' in self._environment.get('DEVNAME', ''):829 elif '/dev/md' in self._environment.get('DEVNAME', ''):
830 if "MD_NAME" in self._environment:830 if "MD_NAME" in self._environment:
831 return self._environment.get("MD_NAME")831 return self._environment.get("MD_NAME")
832 # if there's MD_LEVEL in the env and it's not a container it's an
833 # actual RAID disk
834 elif self._environment.get("MD_LEVEL", "container") != "container":
835 return self._environment.get("MD_DEVNAME")
832 elif self.major == "94":836 elif self.major == "94":
833 # See http://pad.lv/1559189837 # See http://pad.lv/1559189
834 return "IBM s390 Virtual Disk"838 return "IBM s390 Virtual Disk"

Subscribers

People subscribed via source and target branches