dellemc.powerflex.sds 模块 – 管理 Dell PowerFlex 上的 SDS

注意

此模块是 dellemc.powerflex 集合(版本 2.5.0)的一部分。

如果您正在使用 ansible 包,您可能已经安装了这个集合。它不包含在 ansible-core 中。要检查是否已安装,请运行 ansible-galaxy collection list

要安装它,请使用:ansible-galaxy collection install dellemc.powerflex。您需要进一步的要求才能使用此模块,请参阅 要求 获取详细信息。

要在剧本中使用它,请指定:dellemc.powerflex.sds

dellemc.powerflex 1.1.0 中的新增功能

概要

  • 在 PowerFlex 存储系统上管理 SDS 包括创建新的 SDS、获取 SDS 的详细信息、添加/删除 SDS 的 IP、修改 SDS 的属性以及删除 SDS。

要求

执行此模块的主机需要满足以下要求。

  • Dell PowerFlex 存储系统版本 3.6 或更高版本。

  • PyPowerFlex 1.12.0。

参数

参数

注释

fault_set_id

字符串

故障集的唯一标识符。

与 *fault_set_name* 互斥。

fault_set_name

字符串

故障集的名称。

与 *fault_set_id* 互斥。

hostname

别名:gateway_host

字符串 / 必需

PowerFlex 主机的 IP 或 FQDN。

password

字符串 / 必需

PowerFlex 主机的密码。

performance_profile

字符串

要应用于 SDS 的性能配置文件。

HighPerformance 配置文件为非常高性能的用例配置一组预定义的参数。

API 的默认值为 HighPerformance

选择

  • "Compact"

  • "HighPerformance"

port

整数

与 PowerFlex 主机通信的端口号。

默认值: 443

protection_domain_id

字符串

保护域的 ID。

与 *protection_domain_name* 互斥。

protection_domain_name

字符串

保护域的名称。

与 *protection_domain_id* 互斥。

rfcache_enabled

布尔值

是否启用读取闪存缓存。

选择

  • false

  • true

rmcache_enabled

布尔值

是否启用读取 RAM 缓存。

选择

  • false

  • true

rmcache_size

整数

读取 RAM 缓存大小(以 MB 为单位)。

最小大小为 128 MB。

最大大小为 3911 MB。

sds_id

字符串

SDS 的 ID。

除了创建操作外,所有其他操作都可以使用 *sds_id* 执行。

与 *sds_name* 互斥。

sds_ip_list

列表 / 元素=字典

SDS 的 IP 及其角色的字典。

创建 SDS 时,至少需要一个 IP 角色。

IP 角色也可以更新。

ip

字符串 / 必需

SDS 的 IP 地址。

role

字符串 / 必需

分配给 SDS IP 地址的角色。

选择

  • "sdsOnly"

  • "sdcOnly"

  • "all"

sds_ip_state

字符串

IP 相对于 SDS 的状态。

选择

  • "present-in-sds"

  • "absent-in-sds"

sds_name

字符串

SDS 的名称。

对于创建操作是必需的。

它在 PowerFlex 阵列中是唯一的。

与 *sds_id* 互斥。

sds_new_name

字符串

SDS 新名称。

state

字符串 / 必需

SDS 的状态。

选择

  • "present"

  • "absent"

timeout

整数

连接终止的时间。

以秒为单位提及。

默认值: 120

username

字符串 / 必需

PowerFlex 主机的用户名。

validate_certs

别名:verifycert

布尔值

布尔变量,用于指定是否验证 SSL 证书。

true - 表示应验证 SSL 证书。

false - 表示不应验证 SSL 证书。

选择

  • false

  • true ← (默认)

备注

注意

  • 可以与 SDS 关联的 IP 的最大限制为 8 个。

  • 需要至少 1 个 IP 用于 SDS 通信和 1 个用于 SDC 通信。

  • 如果只有 1 个 IP 存在,则其角色必须为“all”;否则 1 个 IP 的角色可以为“all”,而其他 IP 的角色为“sdcOnly”;或者 1 个 IP 的角色必须为“sdsOnly”,而其他 IP 的角色为“sdcOnly”。

  • 可以有一个或多个具有 'sdcOnly' 角色的 IP 地址。

  • 必须只有一个具有 SDS 角色的 IP 地址(角色为 'all' 或 'sdsOnly' )。

  • 可以创建禁用 RF 缓存的 SDS,但请注意,RF 缓存并非总是更新。在这种情况下,用户应重试该操作。

  • 支持 check_mode 模式。

  • 名为“dellemc.powerflex”的集合中的模块旨在支持 Dell PowerFlex 存储平台。

示例

- name: Create SDS
  dellemc.powerflex.sds:
    hostname: "{{hostname}}"
    username: "{{username}}"
    password: "{{password}}"
    validate_certs: "{{validate_certs}}"
    port: "{{port}}"
    sds_name: "node0"
    protection_domain_name: "domain1"
    sds_ip_list:
      - ip: "198.10.xxx.xxx"
        role: "all"
    sds_ip_state: "present-in-sds"
    state: "present"

- name: Create SDS with all parameters
  dellemc.powerflex.sds:
    hostname: "{{hostname}}"
    username: "{{username}}"
    password: "{{password}}"
    validate_certs: "{{validate_certs}}"
    port: "{{port}}"
    sds_name: "node1"
    protection_domain_name: "domain1"
    fault_set_name: "faultset1"
    sds_ip_list:
      - ip: "198.10.xxx.xxx"
        role: "sdcOnly"
    sds_ip_state: "present-in-sds"
    rmcache_enabled: true
    rmcache_size: 128
    performance_profile: "HighPerformance"
    state: "present"

- name: Get SDS details using name
  dellemc.powerflex.sds:
    hostname: "{{hostname}}"
    username: "{{username}}"
    password: "{{password}}"
    validate_certs: "{{validate_certs}}"
    port: "{{port}}"
    sds_name: "node0"
    state: "present"

- name: Get SDS details using ID
  dellemc.powerflex.sds:
    hostname: "{{hostname}}"
    username: "{{username}}"
    password: "{{password}}"
    validate_certs: "{{validate_certs}}"
    port: "{{port}}"
    sds_id: "5718253c00000004"
    state: "present"

- name: Modify SDS attributes using name
  dellemc.powerflex.sds:
    hostname: "{{hostname}}"
    username: "{{username}}"
    password: "{{password}}"
    validate_certs: "{{validate_certs}}"
    port: "{{port}}"
    sds_name: "node0"
    sds_new_name: "node0_new"
    rfcache_enabled: true
    rmcache_enabled: true
    rmcache_size: 256
    performance_profile: "HighPerformance"
    state: "present"

- name: Modify SDS attributes using ID
  dellemc.powerflex.sds:
    hostname: "{{hostname}}"
    username: "{{username}}"
    password: "{{password}}"
    validate_certs: "{{validate_certs}}"
    port: "{{port}}"
    sds_id: "5718253c00000004"
    sds_new_name: "node0_new"
    rfcache_enabled: true
    rmcache_enabled: true
    rmcache_size: 256
    performance_profile: "HighPerformance"
    state: "present"

- name: Add IP and role to an SDS
  dellemc.powerflex.sds:
    hostname: "{{hostname}}"
    username: "{{username}}"
    password: "{{password}}"
    validate_certs: "{{validate_certs}}"
    port: "{{port}}"
    sds_name: "node0"
    sds_ip_list:
      - ip: "198.10.xxx.xxx"
        role: "sdcOnly"
    sds_ip_state: "present-in-sds"
    state: "present"

- name: Remove IP and role from an SDS
  dellemc.powerflex.sds:
    hostname: "{{hostname}}"
    username: "{{username}}"
    password: "{{password}}"
    validate_certs: "{{validate_certs}}"
    port: "{{port}}"
    sds_name: "node0"
    sds_ip_list:
      - ip: "198.10.xxx.xxx"
        role: "sdcOnly"
    sds_ip_state: "absent-in-sds"
    state: "present"

- name: Delete SDS using name
  dellemc.powerflex.sds:
    hostname: "{{hostname}}"
    username: "{{username}}"
    password: "{{password}}"
    validate_certs: "{{validate_certs}}"
    port: "{{port}}"
    sds_name: "node0"
    state: "absent"

- name: Delete SDS using ID
  dellemc.powerflex.sds:
    hostname: "{{hostname}}"
    username: "{{username}}"
    password: "{{password}}"
    validate_certs: "{{validate_certs}}"
    port: "{{port}}"
    sds_id: "5718253c00000004"
    state: "absent"

返回值

通用返回值在此处记录 此处,以下是此模块特有的字段

描述

changed

布尔值

指示资源是否已更改。

返回: 总是

示例: false

sds_details

字典

SDS 的详细信息。

返回: 当 SDS 存在时

示例: {"authenticationError": "None", "certificateInfo": null, "configuredDrlMode": "Volatile", "drlMode": "Volatile", "faultSetId": null, "fglMetadataCacheSize": 0, "fglMetadataCacheState": "Disabled", "fglNumConcurrentWrites": 1000, "id": "8f3bb0cc00000002", "ipList": [{"ip": "10.47.xxx.xxx", "role": "all"}], "lastUpgradeTime": 0, "links": [{"href": "/api/instances/Sds::8f3bb0cc00000002", "rel": "self"}, {"href": "/api/instances/Sds::8f3bb0cc00000002/relationships /Statistics", "rel": "/api/Sds/relationship/Statistics"}, {"href": "/api/instances/Sds::8f3bb0cc00000002/relationships /SpSds", "rel": "/api/Sds/relationship/SpSds"}, {"href": "/api/instances/Sds::8f3bb0cc00000002/relationships /Device", "rel": "/api/Sds/relationship/Device"}, {"href": "/api/instances/ProtectionDomain::9300c1f900000000", "rel": "/api/parent/relationship/protectionDomainId"}], "maintenanceState": "NoMaintenance", "maintenanceType": "NoMaintenance", "mdmConnectionState": "Connected", "membershipState": "Joined", "name": "node0", "numOfIoBuffers": null, "numRestarts": 2, "onVmWare": true, "perfProfile": "HighPerformance", "port": 7072, "protectionDomainId": "9300c1f900000000", "protectionDomainName": "domain1", "raidControllers": null, "rfcacheEnabled": true, "rfcacheErrorApiVersionMismatch": false, "rfcacheErrorDeviceDoesNotExist": false, "rfcacheErrorInconsistentCacheConfiguration": false, "rfcacheErrorInconsistentSourceConfiguration": false, "rfcacheErrorInvalidDriverPath": false, "rfcacheErrorLowResources": false, "rmcacheEnabled": true, "rmcacheFrozen": false, "rmcacheMemoryAllocationState": "AllocationPending", "rmcacheSizeInKb": 131072, "rmcacheSizeInMb": 128, "sdsConfigurationFailure": null, "sdsDecoupled": null, "sdsReceiveBufferAllocationFailures": null, "sdsState": "Normal", "softwareVersionInfo": "R3_6.0.0"}

authenticationError

字符串

指示身份验证错误。

返回: 成功

certificateInfo

字符串

有关证书的信息。

返回: 成功

configuredDrlMode

字符串

配置的 DRL 模式。

返回: 成功

drlMode

字符串

DRL 模式。

返回: 成功

faultSetId

字符串

故障集 ID。

返回: 成功

fglMetadataCacheSize

整数

FGL 元数据缓存大小。

返回: 成功

fglMetadataCacheState

字符串

FGL 元数据缓存状态。

返回: 成功

fglNumConcurrentWrites

整数

FGL 并发写入。

返回: 成功

id

字符串

SDS ID。

返回: 成功

ipList

列表 / 元素=字符串

SDS IP 列表。

返回: 成功

ip

字符串

SDS 中存在的 IP 地址。

返回: 成功

role

字符串

SDS IP 的角色。

返回: 成功

lastUpgradeTime

字符串

上次升级 SDS 的时间。

返回: 成功

列表 / 元素=字符串

SDS 链接。

返回: 成功

字符串

SDS 实例 URL。

返回: 成功

字符串

SDS 与不同实体之间的关系。

返回: 成功

maintenanceState

字符串

维护状态。

返回: 成功

maintenanceType

字符串

维护类型。

返回: 成功

mdmConnectionState

字符串

MDM 连接状态。

返回: 成功

membershipState

字符串

成员状态。

返回: 成功

name

字符串

SDS 的名称。

返回: 成功

numOfIoBuffers

整数

IO 缓冲区数。

返回: 成功

numRestarts

整数

重启次数。

返回: 成功

onVmWare

布尔值

在 VMware 上的存在情况。

返回: 成功

perfProfile

字符串

性能配置文件。

返回: 成功

port

整数

SDS 端口。

返回: 成功

protectionDomainId

字符串

保护域 ID。

返回: 成功

protectionDomainName

字符串

保护域名。

返回: 成功

raidControllers

整数

RAID 控制器的数量。

返回: 成功

rfcacheEnabled

布尔值

是否启用 RF 缓存。

返回: 成功

rfcacheErrorApiVersionMismatch

布尔值

RF 缓存 API 版本不匹配错误。

返回: 成功

rfcacheErrorDeviceDoesNotExist

布尔值

RF 缓存设备不存在错误。

返回: 成功

rfcacheErrorInconsistentCacheConfiguration

布尔值

RF 缓存缓存配置不一致错误。

返回: 成功

rfcacheErrorInconsistentSourceConfiguration

布尔值

RF 缓存源配置不一致错误。

返回: 成功

rfcacheErrorInvalidDriverPath

布尔值

RF 缓存驱动程序路径无效错误。

返回: 成功

rfcacheErrorLowResources

布尔值

RF 缓存资源不足错误。

返回: 成功

rmcacheEnabled

布尔值

是否启用读取 RAM 缓存。

返回: 成功

rmcacheFrozen

布尔值

RM 缓存已冻结。

返回: 成功

rmcacheMemoryAllocationState

布尔值

RM 缓存内存分配状态。

返回: 成功

rmcacheSizeInKb

整数

RM 缓存大小(KB)。

返回: 成功

rmcacheSizeInMb

整数

RM 缓存大小(MB)。

返回: 成功

sdsConfigurationFailure

字符串

SDS 配置失败。

返回: 成功

sdsDecoupled

字符串

SDS 已解耦。

返回: 成功

sdsReceiveBufferAllocationFailures

字符串

SDS 接收缓冲区分配失败。

返回: 成功

sdsState

字符串

SDS 状态。

返回: 成功

softwareVersionInfo

字符串

SDS 软件版本信息。

返回: 成功

作者

  • Rajshree Khare (@khareRajshree)

  • Trisha Datta (@trisha-dell)