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

Enable PEL in worker class #390

Draft
wants to merge 1 commit into
base: P11_Dev
Choose a base branch
from

Conversation

RekhaAparna01
Copy link
Collaborator

@RekhaAparna01 RekhaAparna01 commented Oct 4, 2024

This commit adds code to log a PEL in worker class, in case of error where PEL is required.

output:
'''
root@rainvpdteam:~# peltool -i 0x50007534
{
"Private Header": {
"Section Version": "1",
"Sub-section type": "0",
"Created by": "bmc vpd",
"Created at": "10/04/2024 09:02:47",
"Committed at": "10/04/2024 09:02:47",
"Creator Subsystem": "BMC",
"CSSVER": "",
"Platform Log Id": "0x50007534",
"Entry Id": "0x50007534",
"BMC Event Log Id": "1320"
},
"User Header": {
"Section Version": "1",
"Sub-section type": "0",
"Log Committed by": "bmc error logging",
"Subsystem": "CEC Hardware - VPD Interface",
"Event Scope": "Entire Platform",
"Event Severity": "Predictive Error",
"Event Type": "Not Applicable",
"Action Flags": [
"Service Action Required",
"Report Externally",
"HMC Call Home"
],
"Host Transmission": "Not Sent",
"HMC Transmission": "Not Sent"
},
"Primary SRC": {
"Section Version": "1",
"Sub-section type": "1",
"Created by": "bmc vpd",
"SRC Version": "0x02",
"SRC Format": "0x55",
"Virtual Progress SRC": "False",
"I5/OS Service Event Bit": "False",
"Hypervisor Dump Initiated":"False",
"Backplane CCIN": "07B5",
"Terminate FW Error": "False",
"Deconfigured": "False",
"Guarded": "False",
"Error Details": {
"Message": "A VPD data exception occurred."
},
"Valid Word Count": "0x09",
"Reference Code": "BD554001",
"Hex Word 2": "00080455",
"Hex Word 3": "07B50010",
"Hex Word 4": "00000000",
"Hex Word 5": "00000000",
"Hex Word 6": "00000000",
"Hex Word 7": "00000000",
"Hex Word 8": "00000000",
"Hex Word 9": "00000000",
"Callout Section": {
"Callout Count": "1",
"Callouts": [{
"FRU Type": "Normal Hardware FRU",
"Priority": "Mandatory, replace all with this type as a unit",
"Location Code": "U78DA.ND0.WZS0065-P0-C40",
"Part Number": "78P6575",
"CCIN": "327B",
"Serial Number": "YH30MS05N008"
}]
}
},
"Extended User Header": {
"Section Version": "1",
"Sub-section type": "0",
"Created by": "bmc error logging",
"Reporting Machine Type": "9105-22A",
"Reporting Serial Number": "139F1F0",
"FW Released Ver": "NL1110_013",
"FW SubSys Version": "fw1110.00-3.10",
"Common Ref Time": "00/00/0000 00:00:00",
"Symptom Id Len": "20",
"Symptom Id": "BD554001_07B50010"
},
"Failing MTMS": {
"Section Version": "1",
"Sub-section type": "0",
"Created by": "bmc error logging",
"Machine Type Model": "9105-22A",
"Serial Number": "139F1F0"
},
"User Data 0": {
"Section Version": "1",
"Sub-section type": "1",
"Created by": "bmc error logging",
"BMCLoad": "2.68 1.10 0.84",
"BMCState": "Ready",
"BMCUptime": "0y 0d 2h 57m 11s",
"BootState": "Unspecified",
"ChassisState": "Off",
"FW Version ID": "fw1110.00-3.10-1110.2439.20240927a (NL1110_013)",
"HostState": "Off",
"System IM": "50001001"
},
"User Data 1": {
"Section Version": "1",
"Sub-section type": "1",
"Created by": "bmc error logging",
"CALLOUT_INVENTORY_PATH": "/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm19",
"CALLOUT_PRIORITY": "H",
"DESCRIPTION": "vpd parsing failed for /sys/bus/i2c/drivers/at24/313-0050/eeprom with error: Unable to determine VPD format",
"FileName": "/usr/src/debug/openpower-fru-vpd/1.0+git/src/worker.cpp",
"FunctionName": "parseAndPublishVPD",
"InternalRc": "0",
"UserData1": "",
"UserData2": ""
},
"User Data 2": {
"Section Version": "1",
"Sub-section type": "1",
"Created by": "bmc error logging",
"PEL Internal Debug Data": {
"DIMMs Info Fetch Error": [
"Failed reading DI property from VINI Interface for the LocationCode:[U78DA.ND0.WZS0065-P0-C40]"
]
}
}
}
'''

src/worker.cpp Outdated
EventLogger::createAsyncPel(
types::ErrorType::JsonFailure, types::SeverityType::Error, __FILE__,
__FUNCTION__, 0,
std::string("Empty config JSON" + m_configJsonPath +

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Empty config JSON, file [" + m_configJsonPath + "], Can't enable muxes"

We need to add space if we are appending some value, otherwise previous and next words will be combined.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

{{jsonUtility::getInventoryObjPathFromJson(m_parsedJson,
SYSTEM_VPD_FILE_PATH),
types::CalloutPriority::High}},
__FILE__, __FUNCTION__, 0, "Empty VPD map. Can't Extract HW value",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HW or IM value ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its HW Value . This API is to get HW value

src/worker.cpp Outdated
i_vpdFilePath),
types::CalloutPriority::High}},
__FILE__, __FUNCTION__, 0,
std::string("vpd parsing failed for " + i_vpdFilePath +

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VPD in Caps ?
Same for below as well.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

src/worker.cpp Outdated
PelSeverity::ERROR, errBackupAndRestore, nullptr);
*/

EventLogger::createAsyncPel(types::ErrorType::VpdMismatch,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why mismatch message ?
As exception is caught while performing backup & restore.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to JsonFailure Error type.
Except Json exception remaining Error types are handled internally inside the BackupAndRestore class API's.

// TODO: Log a PEL saying that "System type not supported"
EventLogger::createAsyncPel(
types::ErrorType::InvalidSystem, types::SeverityType::Error,
__FILE__, __FUNCTION__, 0, "Error in getting system JSON.",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we add system JSON path in the message ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This API is to get system JSON. Without getting JSON, we cannot print system JSON path right?

src/worker.cpp Outdated
{{jsonUtility::getInventoryObjPathFromJson(
m_parsedJson, SYSTEM_VPD_FILE_PATH),
types::CalloutPriority::High}},
__FILE__, __FUNCTION__, 0, ex.what(), std::nullopt,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we add ?
"performInitialSetup failed , reason: " + ex.what()
and is all below

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

This commit adds code to log a PEL in worker class, in case of error
where PEL is required.

output:
'''
root@rainvpdteam:~# peltool -i 0x50007534
{
"Private Header": {
    "Section Version":          "1",
    "Sub-section type":         "0",
    "Created by":               "bmc vpd",
    "Created at":               "10/04/2024 09:02:47",
    "Committed at":             "10/04/2024 09:02:47",
    "Creator Subsystem":        "BMC",
    "CSSVER":                   "",
    "Platform Log Id":          "0x50007534",
    "Entry Id":                 "0x50007534",
    "BMC Event Log Id":         "1320"
},
"User Header": {
    "Section Version":          "1",
    "Sub-section type":         "0",
    "Log Committed by":         "bmc error logging",
    "Subsystem":                "CEC Hardware - VPD Interface",
    "Event Scope":              "Entire Platform",
    "Event Severity":           "Predictive Error",
    "Event Type":               "Not Applicable",
    "Action Flags": [
                                "Service Action Required",
                                "Report Externally",
                                "HMC Call Home"
    ],
    "Host Transmission":        "Not Sent",
    "HMC Transmission":         "Not Sent"
},
"Primary SRC": {
    "Section Version":          "1",
    "Sub-section type":         "1",
    "Created by":               "bmc vpd",
    "SRC Version":              "0x02",
    "SRC Format":               "0x55",
    "Virtual Progress SRC":     "False",
    "I5/OS Service Event Bit":  "False",
    "Hypervisor Dump Initiated":"False",
    "Backplane CCIN":           "07B5",
    "Terminate FW Error":       "False",
    "Deconfigured":             "False",
    "Guarded":                  "False",
    "Error Details": {
        "Message":              "A VPD data exception occurred."
    },
    "Valid Word Count":         "0x09",
    "Reference Code":           "BD554001",
    "Hex Word 2":               "00080455",
    "Hex Word 3":               "07B50010",
    "Hex Word 4":               "00000000",
    "Hex Word 5":               "00000000",
    "Hex Word 6":               "00000000",
    "Hex Word 7":               "00000000",
    "Hex Word 8":               "00000000",
    "Hex Word 9":               "00000000",
    "Callout Section": {
        "Callout Count":        "1",
        "Callouts": [{
            "FRU Type":         "Normal Hardware FRU",
            "Priority":         "Mandatory, replace all with this type as a unit",
            "Location Code":    "U78DA.ND0.WZS0065-P0-C40",
            "Part Number":      "78P6575",
            "CCIN":             "327B",
            "Serial Number":    "YH30MS05N008"
        }]
    }
},
"Extended User Header": {
    "Section Version":          "1",
    "Sub-section type":         "0",
    "Created by":               "bmc error logging",
    "Reporting Machine Type":   "9105-22A",
    "Reporting Serial Number":  "139F1F0",
    "FW Released Ver":          "NL1110_013",
    "FW SubSys Version":        "fw1110.00-3.10",
    "Common Ref Time":          "00/00/0000 00:00:00",
    "Symptom Id Len":           "20",
    "Symptom Id":               "BD554001_07B50010"
},
"Failing MTMS": {
    "Section Version":          "1",
    "Sub-section type":         "0",
    "Created by":               "bmc error logging",
    "Machine Type Model":       "9105-22A",
    "Serial Number":            "139F1F0"
},
"User Data 0": {
    "Section Version": "1",
    "Sub-section type": "1",
    "Created by": "bmc error logging",
    "BMCLoad": "2.68 1.10 0.84",
    "BMCState": "Ready",
    "BMCUptime": "0y 0d 2h 57m 11s",
    "BootState": "Unspecified",
    "ChassisState": "Off",
    "FW Version ID": "fw1110.00-3.10-1110.2439.20240927a (NL1110_013)",
    "HostState": "Off",
    "System IM": "50001001"
},
"User Data 1": {
    "Section Version": "1",
    "Sub-section type": "1",
    "Created by": "bmc error logging",
    "CALLOUT_INVENTORY_PATH": "/xyz/openbmc_project/inventory/system/chassis/motherboard/dimm19",
    "CALLOUT_PRIORITY": "H",
    "DESCRIPTION": "vpd parsing failed for /sys/bus/i2c/drivers/at24/313-0050/eeprom with error: Unable to determine VPD format",
    "FileName": "/usr/src/debug/openpower-fru-vpd/1.0+git/src/worker.cpp",
    "FunctionName": "parseAndPublishVPD",
    "InternalRc": "0",
    "UserData1": "",
    "UserData2": ""
},
"User Data 2": {
    "Section Version": "1",
    "Sub-section type": "1",
    "Created by": "bmc error logging",
    "PEL Internal Debug Data": {
        "DIMMs Info Fetch Error": [
            "Failed reading DI property from VINI Interface for the LocationCode:[U78DA.ND0.WZS0065-P0-C40]"
        ]
    }
}
}
'''

Signed-off-by: RekhaAparna01 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants