CCI-MOC / esi

Elastic Secure Infrastructure project
6 stars 12 forks source link

Explore Ironic introspection data and how it's pushed up into Ironic node metadata #508

Closed tzumainn closed 4 months ago

tzumainn commented 4 months ago

There is interest in exposing additional node data in Ironic; it's worth investigating what data Ironic introspection actually grabs, and whether that data can be pushed into the Ironic node

tzumainn commented 4 months ago
{
  "inventory": {
    "interfaces": [
      {
        "name": "eth5",
        "mac_address": "24:8a:07:1e:85:a1",
        "ipv4_address": "192.168.11.53",
        "ipv6_address": "fe80::c0d8:1bb:d410:b5a2%eth5",
        "has_carrier": true,
        "lldp": null,
        "vendor": "0x15b3",
        "product": "0x1015",
        "client_id": null,
        "biosdevname": "p5p2"
      },
      {
        "name": "eth3",
        "mac_address": "cc:c5:e5:d5:31:8b",
        "ipv4_address": null,
        "ipv6_address": null,
        "has_carrier": false,
        "lldp": null,
        "vendor": "0x14e4",
        "product": "0x168e",
        "client_id": null,
        "biosdevname": "em4"
      },
      {
        "name": "eth1",
        "mac_address": "cc:c5:e5:d5:31:7e",
        "ipv4_address": null,
        "ipv6_address": null,
        "has_carrier": false,
        "lldp": null,
        "vendor": "0x14e4",
        "product": "0x168e",
        "client_id": null,
        "biosdevname": "em2"
      },
      {
        "name": "eth4",
        "mac_address": "24:8a:07:1e:85:a0",
        "ipv4_address": "192.168.11.105",
        "ipv6_address": "fe80::382a:5b4b:4c9:7f2b%eth4",
        "has_carrier": true,
        "lldp": null,
        "vendor": "0x15b3",
        "product": "0x1015",
        "client_id": null,
        "biosdevname": "p5p1"
      },
      {
        "name": "eth2",
        "mac_address": "cc:c5:e5:d5:31:88",
        "ipv4_address": null,
        "ipv6_address": null,
        "has_carrier": false,
        "lldp": null,
        "vendor": "0x14e4",
        "product": "0x168e",
        "client_id": null,
        "biosdevname": "em3"
      },
      {
        "name": "eth0",
        "mac_address": "cc:c5:e5:d5:31:7b",
        "ipv4_address": null,
        "ipv6_address": null,
        "has_carrier": false,
        "lldp": null,
        "vendor": "0x14e4",
        "product": "0x168e",
        "client_id": null,
        "biosdevname": "em1"
      }
    ],
    "cpu": {
      "model_name": "Intel(R) Xeon(R) CPU E5-4669 v4 @ 2.20GHz",
      "frequency": "3000.0000",
      "count": 176,
      "architecture": "x86_64",
      "flags": [
        "fpu",
        "vme",
        "de",
        "pse",
        "tsc",
        "msr",
        "pae",
        "mce",
        "cx8",
        "apic",
        "sep",
        "mtrr",
        "pge",
        "mca",
        "cmov",
        "pat",
        "pse36",
        "clflush",
        "dts",
        "acpi",
        "mmx",
        "fxsr",
        "sse",
        "sse2",
        "ss",
        "ht",
        "tm",
        "pbe",
        "syscall",
        "nx",
        "pdpe1gb",
        "rdtscp",
        "lm",
        "constant_tsc",
        "arch_perfmon",
        "pebs",
        "bts",
        "rep_good",
        "nopl",
        "xtopology",
        "nonstop_tsc",
        "cpuid",
        "aperfmperf",
        "pni",
        "pclmulqdq",
        "dtes64",
        "monitor",
        "ds_cpl",
        "vmx",
        "smx",
        "est",
        "tm2",
        "ssse3",
        "sdbg",
        "fma",
        "cx16",
        "xtpr",
        "pdcm",
        "pcid",
        "dca",
        "sse4_1",
        "sse4_2",
        "x2apic",
        "movbe",
        "popcnt",
        "tsc_deadline_timer",
        "aes",
        "xsave",
        "avx",
        "f16c",
        "rdrand",
        "lahf_lm",
        "abm",
        "3dnowprefetch",
        "cpuid_fault",
        "epb",
        "cat_l3",
        "cdp_l3",
        "invpcid_single",
        "pti",
        "ssbd",
        "ibrs",
        "ibpb",
        "stibp",
        "tpr_shadow",
        "vnmi",
        "flexpriority",
        "ept",
        "vpid",
        "ept_ad",
        "fsgsbase",
        "tsc_adjust",
        "bmi1",
        "hle",
        "avx2",
        "smep",
        "bmi2",
        "erms",
        "invpcid",
        "rtm",
        "cqm",
        "rdt_a",
        "rdseed",
        "adx",
        "smap",
        "intel_pt",
        "xsaveopt",
        "cqm_llc",
        "cqm_occup_llc",
        "cqm_mbm_total",
        "cqm_mbm_local",
        "dtherm",
        "ida",
        "arat",
        "pln",
        "pts",
        "md_clear",
        "flush_l1d"
      ]
    },
    "disks": [
      {
        "name": "/dev/sda",
        "model": "MZILS1T6HEJH0D3",
        "size": 1600321314816,
        "rotational": false,
        "wwn": "0x5002538a4910ec60",
        "serial": "5002538a4910ec60",
        "vendor": "SAMSUNG",
        "wwn_with_extension": "0x5002538a4910ec60",
        "wwn_vendor_extension": null,
        "hctl": "0:0:0:0",
        "by_path": "/dev/disk/by-path/pci-0000:43:00.0-scsi-0:0:0:0"
      },
      {
        "name": "/dev/sdb",
        "model": "MZILS1T6HEJH0D3",
        "size": 1600321314816,
        "rotational": false,
        "wwn": "0x5002538a4910ef70",
        "serial": "5002538a4910ef70",
        "vendor": "SAMSUNG",
        "wwn_with_extension": "0x5002538a4910ef70",
        "wwn_vendor_extension": null,
        "hctl": "0:0:1:0",
        "by_path": "/dev/disk/by-path/pci-0000:43:00.0-scsi-0:0:1:0"
      }
    ],
    "memory": {
      "total": 2164395569152,
      "physical_mb": 2097152
    },
    "bmc_address": "10.2.13.22",
    "bmc_v6address": "::/0",
    "system_vendor": {
      "product_name": "PowerEdge FC830 (SKU=NotProvided;ModelName=PowerEdge FC830)",
      "serial_number": "15T0DV2",
      "manufacturer": "Dell Inc."
    },
    "boot": {
      "current_boot_mode": "bios",
      "pxe_interface": "24:8a:07:1e:85:a0"
    },
    "hostname": "host-192-168-11-105"
  },
  "root_disk": {
    "name": "/dev/sda",
    "model": "MZILS1T6HEJH0D3",
    "size": 1600321314816,
    "rotational": false,
    "wwn": "0x5002538a4910ec60",
    "serial": "5002538a4910ec60",
    "vendor": "SAMSUNG",
    "wwn_with_extension": "0x5002538a4910ec60",
    "wwn_vendor_extension": null,
    "hctl": "0:0:0:0",
    "by_path": "/dev/disk/by-path/pci-0000:43:00.0-scsi-0:0:0:0"
  },
  "boot_interface": "24:8a:07:1e:85:a0",
  "configuration": {
    "collectors": [
      "default",
      "logs"
    ],
    "managers": [
      {
        "name": "MellanoxDeviceHardwareManager",
        "version": "1"
      },
      {
        "name": "generic_hardware_manager",
        "version": "1.1"
      }
    ]
  },
  "error": null,
  "ipmi_address": "10.2.13.22",
  "ipmi_v6address": null,
  "all_interfaces": {
    "eth5": {
      "ip": "192.168.11.53",
      "mac": "24:8a:07:1e:85:a1",
      "client_id": null,
      "pxe": false
    },
    "eth3": {
      "ip": null,
      "mac": "cc:c5:e5:d5:31:8b",
      "client_id": null,
      "pxe": false
    },
    "eth1": {
      "ip": null,
      "mac": "cc:c5:e5:d5:31:7e",
      "client_id": null,
      "pxe": false
    },
    "eth4": {
      "ip": "192.168.11.105",
      "mac": "24:8a:07:1e:85:a0",
      "client_id": null,
      "pxe": true
    },
    "eth2": {
      "ip": null,
      "mac": "cc:c5:e5:d5:31:88",
      "client_id": null,
      "pxe": false
    },
    "eth0": {
      "ip": null,
      "mac": "cc:c5:e5:d5:31:7b",
      "client_id": null,
      "pxe": false
    }
  },
  "interfaces": {
    "eth4": {
      "ip": "192.168.11.105",
      "mac": "24:8a:07:1e:85:a0",
      "client_id": null,
      "pxe": true
    }
  },
  "macs": [
    "24:8a:07:1e:85:a0"
  ],
  "local_gb": 1489,
  "cpus": 176,
  "cpu_arch": "x86_64",
  "memory_mb": 2097152
}
tzumainn commented 4 months ago

@naved001 I've pasted some introspection data for a node for reference.

It looks like we can add introspection rules through the introspection CLI: https://docs.openstack.org/ironic-inspector/latest/user/usage.html#actions

Is there something in the introspection data above that you might want added to the node data? If so, I can work on two things:

naved001 commented 4 months ago

Is there something in the introspection data above that you might want added to the node data?

CPU model may be of interest to people. In the past people have also queried for servers based on CPU frequency so I think those 2 items will be useful

    "cpu": {
      "model_name": "Intel(R) Xeon(R) CPU E5-4669 v4 @ 2.20GHz",
      "frequency": "3000.0000",
tzumainn commented 4 months ago

PR for the introspection rules created: https://github.com/CCI-MOC/esi-pilot/pull/53

I've also run a one-time script to update all nodes in ESI with this CPU information