Add 'Container' field for MD parser
The logic of filtering of fake RAID MD heavily relies on the presence of of 'Container' field inside of parsed data. If this field is missing, it will never figure out the name of any fake RAID devices and its component. This patch adds this field to a parser. In addition to that, it also logs all found fake RAIDs and their components for the sake of easy debugging. Change-Id: I2066c5a0e995e542271cd308c9d83e2373787be4 Closes-Bug: #1617071
This commit is contained in:
parent
79ca6e27f7
commit
6017353766
6
agent
6
agent
|
@ -913,7 +913,8 @@ class NodeAgent
|
|||
begin
|
||||
description, _, components = data.split(/Number\s+Major\s+Minor\s+RaidDevice\s+(State\s+)?/m)
|
||||
line_patterns = ['Version', 'Raid Level', 'Raid Devices', 'Active Devices',
|
||||
'Spare Devices', 'Failed Devices', 'State', 'UUID']
|
||||
'Spare Devices', 'Failed Devices', 'State', 'UUID',
|
||||
'Container']
|
||||
for line in (description.split("\n")[1..-1] rescue [])
|
||||
line.strip!
|
||||
next if line == ""
|
||||
|
@ -961,6 +962,9 @@ class NodeAgent
|
|||
|
||||
mds, devices = _find_fake_raid_mds()
|
||||
|
||||
@logger.debug("Found fake RAIDs: #{mds}")
|
||||
@logger.debug("Found components of fake RAIDs: #{devices}")
|
||||
|
||||
Dir["/sys/block/*"].each do |block_device_dir|
|
||||
basename_dir = File.basename(block_device_dir)
|
||||
# Entries in /sys/block for cciss look like cciss!c0d1 while
|
||||
|
|
Loading…
Reference in New Issue