Skip to content

AmcRedfishDiagPlugin - #287

Open
alexandraBara wants to merge 1 commit into
developmentfrom
alex_proxy
Open

alexandraBara wants to merge 1 commit into
developmentfrom
alex_proxy

Conversation

@alexandraBara

Copy link
Copy Markdown
Collaborator

Summary

-AmcRedfishDiagPlugin collects AMC Redfish diagnostic archives by SSH’ing to the BMC and curling the AMC Redfish service
-It discovers a LogService that advertises CollectDiagnosticData, posts the job, polls the task, and downloads the attachment.
-Collects OEM AllLogs tar + Managers dump

Test plan

  • pytest test/unit
  • pytest test/functional (if applicable)
  • pre-commit run --all-files

Checklist

  • Added/updated tests (or explained why not)
  • Updated docs/README if behavior changed
  • No secrets or credentials committed

Sample connection_config.json:

{
  "RedfishSshProxyConnectionManager": {
    "host": "192.168.31.1",
    "port": 80,
    "use_https": false,
    "timeout_seconds": 60,
    "api_root": "redfish/v1",
    "ssh": {
      "hostname": "<BMC_hostname/IP>",
      "username": "...",
      "password": "...",
      "port": 22
    }
  }
}

Sample amc_redfish_diag_plugin_config.json:

{
  "name": "AmcRedfishDiagnostics",
  "desc": "Collect AMC Manager and System diagnostic bundles through BMC SSH proxy",
  "global_args": {},
  "plugins": {
    "AmcRedfishDiagPlugin": {
      "collection": true,
      "analysis": true,
      "collection_args": {
        "manager_ids": [],
        "system_ids": [],
        "collections": [
          {
            "root": "Managers",
            "diagnostic_data_type": "Manager"
          },
          {
            "root": "Systems",
            "diagnostic_data_type": "OEM",
            "oem_data_type": "AllLogs"
          }
        ],
        "task_timeout_s": 1800
      },
      "analysis_args": {
        "require_all_success": true
      }
    }
  },
  "result_collators": {}
}

Run:

node-scraper  --connection-config ~/configs/connection_config.json   --plugin-config  amc_redfish_diag_plugin_config.json

@amd-ansonyim amd-ansonyim left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

one thing but other that LGTM


success_count = sum(1 for r in results.values() if r.success)
self.result.message = f"AMC diag: {success_count}/{len(results)} collections succeeded"
self.result.status = ExecutionStatus.OK if success_count else ExecutionStatus.ERROR

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This sets OK as long as any job succeeds. If the Manager dump succeeds but the Systems AllLogs collection fails, the top-level result is OK even though half the data is missing. Users relying on the status to gate downstream processing will be misled. A stricter check — e.g., OK only when success_count == len(results) and PARTIAL/WARNING otherwise — would be safer.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

good point, ill take a look

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