iDRAC 驱动程序

概述

集成的 Dell 远程访问控制器 (iDRAC) 是 Dell EMC 服务器的带外管理平台,并直接受 idrac 硬件类型支持。此驱动程序利用分布式管理任务组 (DMTF) Redfish 协议来执行所有功能。在 Ironic 的早期版本中,此驱动程序利用 Web 服务管理 (WSMAN) 协议。

iDRAC 硬件也受通用 ipmiredfish 硬件类型支持,但功能集较小。

Dell iDRAC 驱动程序的主要功能包括

  • 带外节点检查

  • 启动设备管理和固件管理

  • 电源管理

  • RAID 控制器管理和 RAID 卷配置

  • BIOS 设置配置

Ironic 功能

idrac 硬件类型扩展了 redfish 硬件类型,并支持以下 Ironic 接口

先决条件

如果 Ironic 节点配置为使用 idrac-redfish 接口实现,则 idrac 硬件类型需要安装 sushy 库和供应商扩展到 ironic conductor 节点上,例如

sudo pip install 'sushy>=2.0.0' 'sushy-oem-idrac>=2.0.0'

启用

iDRAC 驱动程序支持 Redfish 用于 bios、inspect、management、power 和 raid 接口。

必须启用 idrac-redfish 实现才能为接口使用 Redfish。

要启用 idrac 硬件类型,请将以下内容添加到您的 /etc/ironic/ironic.conf

[DEFAULT]
enabled_hardware_types=idrac
enabled_management_interfaces=idrac-redfish
enabled_power_interfaces=redfish

要启用所有可选功能(BIOS、检查、RAID 和供应商直通),请使用以下配置

[DEFAULT]
enabled_hardware_types=idrac
enabled_bios_interfaces=redfish
enabled_firmware_interfaces=redfish
enabled_inspect_interfaces=idrac-redfish
enabled_management_interfaces=idrac-redfish
enabled_power_interfaces=idrac-redfish
enabled_raid_interfaces=idrac-redfish
enabled_vendor_interfaces=idrac-redfish

以下是受支持的接口实现列表,按优先级顺序排列

接口

受支持的实现

bios

idrac-redfish, no-bios

boot

ipxe, pxe, http-ipxe, http, redfish-https, idrac-redfish-virtual-media

console

no-console

deploy

direct, ansible, ramdisk

firmware

redfish, no-firmware

inspect

idrac-redfish, inspector, no-inspect

management

idrac-redfish

network

flat, neutron, noop

power

redfish, idrac-redfish

raid

idrac-redfish, no-raid

rescue

no-rescue, agent

storage

noop, cinder, external

供应商

redfish, idrac-redfish, no-vendor

特定协议的属性

Redfish 协议需要指定不同的属性到 Ironic 节点的 driver_info 字段中,才能与裸机系统的 iDRAC 通信。

Redfish 协议需要以下属性

  • redfish_username:与 iDRAC 通信时使用的 Redfish 用户名。通常为 root

  • redfish_password:与 iDRAC 通信时使用的 Redfish 用户的密码。

  • redfish_address:iDRAC 的 URL 地址。它必须包含 URL 的权限部分,并且可以选择包含方案。如果缺少方案,则假定为 https。

  • redfish_system_id:要管理的服务器的 Redfish ID。这应始终为:/redfish/v1/Systems/System.Embedded.1

有关其他 Redfish 协议参数,请参阅 Redfish 驱动程序

注册

以下命令使用 Redfish 为所有接口注册具有 idrac 硬件类型的裸机节点

baremetal node create --driver idrac \
    --driver-info redfish_username=user \
    --driver-info redfish_password=pa$$w0rd \
    --driver-info redfish_address=drac.host \
    --driver-info redfish_system_id=/redfish/v1/Systems/System.Embedded.1 \
    --bios-interface redfish \
    --inspect-interface idrac-redfish \
    --management-interface idrac-redfish \
    --power-interface redfish \
    --raid-interface idrac-redfish \
    --vendor-interface redfish

BIOS 接口

idrac 硬件类型支持的 BIOS 接口实现允许使用标准的 clean/deploy 步骤方法配置 BIOS。

示例

启用 VirtualizationSRIOV 在 iDRAC BMC 的 BIOS 中的 clean 步骤如下

{
  "target":"clean",
  "clean_steps": [
    {
      "interface": "bios",
      "step": "apply_configuration",
      "args": {
        "settings": [
          {
            "name": "ProcVirtualization",
            "value": "Enabled"
          },
          {
            "name": "SriovGlobalEnable",
            "value": "Enabled"
          }
        ]
      }
    }
  ]
}

有关 factory_reset clean 步骤的已知问题,请参阅 已知问题。有关 BIOS 配置的更多详细信息,请参阅 BIOS 配置

检查接口

Dell iDRAC 带外检查过程编录了服务器的所有相同属性,就像 IPMI 驱动程序一样。与 IPMI 不同,它在无需重新启动系统甚至无需通电的情况下执行此操作。检查使用 Redfish 协议直接执行,不会影响被检查系统的运行。

检查会发现以下属性

  • cpu_arch:cpu 架构

  • local_gb:以千兆字节为单位的磁盘大小

  • memory_mb:以兆字节为单位的内存大小

额外的功能

  • boot_mode:UEFI 或 BIOS 启动模式。

  • pci_gpu_devices:连接到裸机的 GPU 设备的数量。

它还会为系统中检测到的每个 NIC 端口创建 baremetal 端口。 idrac-redfish 检查接口当前未在端口上设置 pxe_enabled。用户应确保在使用 idrac-redfish 检查接口检查后,正确设置端口上的 pxe_enabled

管理接口

idrac-redfish 的管理接口支持

  • 使用手动清理步骤更新节点上的固件。有关固件更新支持的更多信息,请参阅 Redfish 驱动程序

  • 使用配置模具更新系统并获取其清单。有关更多信息,请参阅 导入和导出配置

导入和导出配置

警告

此功能已被弃用,预计将在 Ironic 具有用于执行超出“部署”裸机节点之外的方面步骤模板表达的通用接口后删除。

本节中提供的 clean 和 deploy 步骤允许使用配置模具文件配置系统并收集系统清单。

此功能在 Wallaby 版本中的引入是实验性的。

这些步骤是

  • export_configuration,使用 export_configuration_location 输入参数将现有系统的配置导出。

  • import_configuration,使用 import_configuration_location 输入参数将现有的配置模具导入到系统中。

  • import_export_configuration,使用 export_configuration_locationimport_configuration_location 输入参数。此步骤将前两个步骤合并为一个步骤,该步骤首先将现有的配置模具导入到系统中,然后导出结果配置。

提供的输入参数包括将配置模具存储在导出之后的位置的 URL,或导入的参考位置。有关设置存储和可用选项的更多信息,请参阅 存储设置

配置模具是包含三个顶级部分的 JSON 文件:biosraidoem。以下是配置模具的示例

{
  "bios": {
    "reset": false,
    "settings": [
      {
        "name": "ProcVirtualization",
        "value": "Enabled"
      },
      {
        "name": "MemTest",
        "value": "Disabled"
      }
    ]
  }
  "raid": {
    "create_nonroot_volumes": true,
    "create_root_volume": true,
    "delete_existing": false,
    "target_raid_config": {
      "logical_disks": [
        {
          "size_gb": 50,
          "raid_level": "1+0",
          "controller": "RAID.Integrated.1-1",
          "volume_name": "root_volume",
          "is_root_volume": true,
          "physical_disks": [
            "Disk.Bay.0:Encl.Int.0-1:RAID.Integrated.1-1",
            "Disk.Bay.1:Encl.Int.0-1:RAID.Integrated.1-1"
          ]
        },
        {
          "size_gb": 100,
          "raid_level": "5",
          "controller": "RAID.Integrated.1-1",
          "volume_name": "data_volume",
          "physical_disks": [
            "Disk.Bay.2:Encl.Int.0-1:RAID.Integrated.1-1",
            "Disk.Bay.3:Encl.Int.0-1:RAID.Integrated.1-1",
            "Disk.Bay.4:Encl.Int.0-1:RAID.Integrated.1-1"
          ]
        }
      ]
    }
  }
  "oem": {
    "interface": "idrac-redfish",
    "data": {
      "SystemConfiguration": {
        "Model": "PowerEdge R640",
        "ServiceTag": "8CY9Z99",
        "TimeStamp": "Fri Jun 26 08:43:15 2020",
        "Components": [
          {
            [...]
            "FQDD": "NIC.Slot.1-1-1",
            "Attributes": [
              {
              "Name": "BlnkLeds",
              "Value": "15",
              "Set On Import": "True",
              "Comment": "Read and Write"
              },
              {
              "Name": "VirtMacAddr",
              "Value": "00:00:00:00:00:00",
              "Set On Import": "False",
              "Comment": "Read and Write"
              },
              {
              "Name": "VirtualizationMode",
              "Value": "NONE",
              "Set On Import": "True",
              "Comment": "Read and Write"
              },
            [...]
            ]
          }
        ]
      }
  }
}

目前,仅支持 OEM 部分。OEM 部分使用 iDRAC 服务器配置配置文件 (SCP),如果符合 SCP,可以根据需要进行编辑。有关 SCP 及其功能的更多信息,请参阅 SCP_Reference_Guide

注意

为了避免在导入步骤中使用未修改的导出的配置模具到另一个系统时覆盖这些设置,iDRAC BMC 连接设置不会导出到配置模具中。如果需要复制 iDRAC BMC 连接设置,则需要手动将这些设置添加到导入步骤的配置模具中。

要将系统配置复制到类似的系统,请执行以下步骤

  1. 配置一个黄金系统,或一个到多个系统。

  2. 使用 export_configuration 步骤将配置导出到所需位置。

  3. 调整导出的配置模具以用于其他系统进行复制。例如,删除不需要复制的部分,例如 iDRAC 连接设置。可以直接从存储位置访问配置模具。

  4. 使用 import_configuration 步骤将选定的配置模具导入到其他系统中。

不强制使用 export_configuration 步骤来创建配置模具。如果已手动或其他方式创建,则将文件上传到指定存储位置,而无需使用 Ironic。

存储设置

要开始使用这些步骤,请配置存储位置。可以在 [molds] 部分中找到设置。从 molds.storage 设置配置存储类型。目前,默认启用 swift,并且支持 http

在设置输入参数中,使用完整的 HTTP URL。这要求预先创建容器(对于 swift)和目录(对于 http),并相应地配置读/写访问权限。

注意

强烈建议使用 TLS。

此设置配置允许用户在 Ironic 之外访问这些位置以列出、创建、更新和删除配置模具。

有关更多信息,请参阅 Swift 配置HTTP 配置

Swift 配置

要使用 Swift 配置模具,

  1. 创建要用于配置模具存储的容器。

  2. 对于在 [swift] 部分中配置的 Ironic Swift 用户,请添加对这些容器的读/写访问权限。

HTTP 配置

要使用 HTTP 服务器配置模具,

  1. 启用 HTTP PUT 支持。

  2. 创建要用于配置模具存储的目录。

  3. 为 HTTP 基本身份验证配置读/写访问权限,并在 molds.usermolds.password 字段中提供用户凭据。

HTTP Web 服务器不支持多租户,旨在用于独立的 Ironic 或单租户 OpenStack 环境。

RAID 接口

有关 Ironic RAID 支持的更多信息,请参阅 RAID 配置

RAID 接口的 redfish 硬件类型可以在 iDRAC 系统上使用。与 redfish RAID 接口相比,使用 idrac-redfish 增加了

  • 等待 RAID 控制器上可用的实时操作。使用 redfish 时,这不能保证,并且可能需要间歇性地重新启动才能完成,

  • 将非 RAID 磁盘转换为 RAID 模式(如果有),

  • 在删除虚拟磁盘后清除外部配置(如果有)。

Redfish RAID 接口实现支持以下属性

注意

使用 idrac-redfish 用于 RAID 接口时,需要 iDRAC 固件大于 4.40.00.00。

强制属性

  • size_gb:以千兆字节为单位的大小(整数)的逻辑磁盘。如果应使用可用剩余空间,请将 size_gb 用作 MAX

  • raid_level:逻辑磁盘的 RAID 等级。有效值为 01561+05+06+0

注意

JBOD2 不受支持,并会因以下原因而失败:“无法计算 RAID 等级的跨度。”

可选属性

  • is_root_volume:可选。指定此磁盘是否为根卷。默认情况下,此值为 False

  • volume_name:可选。要创建的卷的名称。如果未指定此名称,则将自动生成。

后端物理磁盘提示

有关后端磁盘提示的更多信息,请参阅 RAID 配置

这些是与机器无关的信息。为每个逻辑磁盘指定提示,以帮助 Ironic 找到用于 RAID 配置的所需磁盘。

  • disk_type

  • interface_type

  • share_physical_disks

  • number_of_physical_disks

后端物理磁盘

这些是 Dell RAID 控制器特定的值,必须与 iDRAC 提供的名称匹配。

  • controller:必需。要使用的控制器的名称。

  • physical_disks:可选。要使用的物理磁盘的名称。

注意

physical_disks 是一个必需参数,如果将属性 size_gb 设置为 MAX

示例

在单个控制器上使用六个磁盘创建 RAID 1+0 逻辑磁盘

{ "logical_disks":
  [ { "controller": "RAID.Integrated.1-1",
      "is_root_volume": "True",
      "physical_disks": [
        "Disk.Bay.0:Enclosure.Internal.0-1:RAID.Integrated.1-1",
        "Disk.Bay.1:Enclosure.Internal.0-1:RAID.Integrated.1-1",
        "Disk.Bay.2:Enclosure.Internal.0-1:RAID.Integrated.1-1",
        "Disk.Bay.3:Enclosure.Internal.0-1:RAID.Integrated.1-1",
        "Disk.Bay.4:Enclosure.Internal.0-1:RAID.Integrated.1-1",
        "Disk.Bay.5:Enclosure.Internal.0-1:RAID.Integrated.1-1"],
      "raid_level": "1+0",
      "size_gb": "MAX"}]}

手动 RAID 调用

以下命令可用于删除任何现有的 RAID 配置。它会删除所有虚拟磁盘/RAID 卷,取消分配所有全局和专用热备用物理磁盘,并清除外来配置

baremetal node clean --clean-steps \
  '[{"interface": "raid", "step": "delete_configuration"}]' ${node_uuid}

以下命令显示了如何设置目标 RAID 配置的示例

baremetal node set --target-raid-config '{ "logical_disks":
  [ { "controller": "RAID.Integrated.1-1",
      "is_root_volume": true,
      "physical_disks": [
        "Disk.Bay.0:Enclosure.Internal.0-1:RAID.Integrated.1-1",
        "Disk.Bay.1:Enclosure.Internal.0-1:RAID.Integrated.1-1"],
      "raid_level": "0",
      "size_gb": "MAX"}]}' ${node_uuid}

以下命令可用于创建 RAID 配置

baremetal node clean --clean-steps \
  '[{"interface": "raid", "step": "create_configuration"}]' <node>

当不知道物理磁盘名称或控制器名称时,以下 Python 代码示例显示了如何使用 python-dracclient 直接从 Dell 裸机获取信息。

import dracclient.client


client = dracclient.client.DRACClient(
    host="192.168.1.1",
    username="root",
    password="calvin")
controllers = client.list_raid_controllers()
print(controllers)

physical_disks = client.list_physical_disks()
print(physical_disks)

或者使用 sushy 和 Redfish

import sushy


client = sushy.Sushy('https://192.168.1.1', username='root', password='calvin', verify=False)
for s in client.get_system_collection().get_members():
  print("System: %(id)s" % {'id': s.identity})
  for c in system1.storage.get_members():
      print("\tController: %(id)s" % {'id': c.identity})
      for d in c.drives:
        print("\t\tDrive: %(id)s" % {'id': d.identity})

供应商接口

idrac-redfish

通过 idrac-redfish 供应商直通接口,这些方法可用

方法名称

HTTP 方法

描述

eject_media

POST

弹出虚拟媒体设备。如果未提供设备,则将弹出所有连接的设备。可选参数:boot_device - 要弹出的启动设备,可以是 cddvdusbfloppy

已知问题

节点进入维护模式

一段时间后,由 idrac 硬件类型管理的节点可能会在 Ironic 中进入维护模式。可以通过将 Ironic 电源状态轮询间隔更改为 70 秒来解决此问题。请参阅 conductor.sync_power_state_interval/etc/ironic/ironic.conf 中。

使用“factory_reset”BIOS 清理步骤的 PXE 重置

当使用 UEFI 启动 模式 且非默认 PXE 接口时,工厂重置可能会导致 PXE 接口重置为默认值,从而阻止服务器进行任何进一步操作的 PXE 启动。这可能会导致节点上出现 clean_failed 状态或 deploy_failed(如果您尝试在此步骤之后部署节点)。目前,唯一的解决方案是操作员手动恢复服务器的 PXE 设置,以便再次进行 PXE 启动。问题的原因是,使用 UEFI 启动 模式 时,idrac 使用 BIOS 设置来管理 PXE 配置。这与 BIOS 启动 模式 不同,在 BIOS 启动 模式 中,PXE 配置作为集成 NIC 上的配置作业进行处理,独立于 BIOS 设置。

关机时超时

某些服务器在软关机时速度较慢,并且会超时。默认重试次数为 6,导致 30 秒超时(默认重试间隔由 post_deploy_get_power_state_retry_interval 设置为 5 秒)。要解决此问题,请将重试次数增加到 18,将超时时间增加到 90 秒,如下所示

[agent]
post_deploy_get_power_state_retries = 18

无法使用 iDRAC 固件 4.40.00.00 之前的版本挂载远程共享

当使用 iDRAC 固件 4.40.00.00 及其连续版本低于 4.40.40.00 且使用虚拟媒体启动和新的 Virtual Console 插件类型 eHTML5 时,会出现错误:“无法挂载远程共享”。这是 iDRAC 固件 4.40.40.00 版本中已知的错误。如果无法升级,则调整 iDRAC 中的设置以使用插件类型 HTML5。在 iDRAC Web UI 中,转到配置 -> 虚拟控制台,并将插件类型选择为 HTML5。

升级到 4.40.00.00 或更高版本的 iDRAC 固件时,如果使用默认插件类型且从未更改过,则会自动选择 eHTML5。已更改插件类型的系统在 iDRAC 固件升级后将保留所选插件类型。

从 Swift 升级失败,固件版本低于 6.00.00.00

使用低于 6.00.00.00 的 iDRAC 固件,并且使用 Swift 在 Management 接口 firmware_update 清理步骤中对 redfishidrac 硬件类型进行固件更新文件分阶段处理时,清理将因 iDRAC 作业中的错误“发生内部错误。无法完成指定的操作。”而失败。此错误已在 iDRAC 固件 6.00.00.00 中修复。如果无法升级,则使用 HTTP 服务对 iDRAC 进行固件文件分阶段处理。