Overly strict error reporting for parsing dmidecode output
Bug #1521202 reported by
Dmitry Tantsur
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ironic-python-agent |
Fix Released
|
Low
|
Trevor McCasland |
Bug Description
Currently we issue ERROR-level messages when we can't parse "Size" expression in the dmidecode output: https:/
However, things like
Size: No Module Installed
are pretty common and completely normal. Currently they cause a confusing error message. I suggest we lower this message to a warning, and maybe filter out common strings (like above).
description: | updated |
Changed in ironic-python-agent: | |
assignee: | nobody → Trevor McCasland (twm2016) |
To post a comment you must log in.
IMHO the parsing code should be reworked completely.
On one of my machines, "dmidecode --type memory | grep Size" returns:
Maximum Memory Module Size: 4096 MB
Maximum Total Memory Size: 8192 MB
Installed Size: 2048 MB (Double-bank Connection)
Enabled Size: 2048 MB (Double-bank Connection)
Installed Size: 2048 MB (Double-bank Connection)
Enabled Size: 2048 MB (Double-bank Connection)
Size: 2048 MB
Size: 2048 MB
First six lines cause parsing errors as current implementation simply strips first token from the left and tries to parse the rest as size value.
On another one I get:
Installed Size: Not Installed
Enabled Size: Not Installed
Installed Size: 1024 MB (Double-bank Connection)
Enabled Size: 1024 MB (Double-bank Connection)
Size: No Module Installed
Size: 1024 MB
Which hits the "No Module Installed" case you mentioned.
I'd change it so, that the ones with names other than "Size" (e.g. Enabled Size or Installed Size) would be skipped silently and the ones with "No Module Installed" would be reported as warning at most.