dellemc.powerflex.mdm_cluster (2.3.0) — module

Manage MDM cluster on Dell PowerFlex

| "added in version" 1.3.0 of dellemc.powerflex"

Authors: Bhavneet Sharma (@sharmb5) <ansible.team@dell.com>

Install collection

Install with ansible-galaxy collection install dellemc.powerflex:==2.3.0


Add to requirements.yml

  collections:
    - name: dellemc.powerflex
      version: 2.3.0

Description

Managing MDM cluster and MDMs on PowerFlex storage system includes adding/removing standby MDM, modify MDM name and virtual interface.

It also includes getting details of MDM cluster, modify MDM cluster ownership, cluster mode, and performance profile.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Add a standby MDM
  dellemc.powerflex.mdm_cluster:
    hostname: "{{hostname}}"
    username: "{{username}}"
    password: "{{password}}"
    validate_certs: "{{validate_certs}}"
    port: "{{port}}"
    mdm_name: "mdm_1"
    standby_mdm:
      mdm_ips:
        - "10.x.x.x"
      role: "TieBreaker"
      management_ips:
        - "10.x.y.z"
    state: "present"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Remove a standby MDM
  dellemc.powerflex.mdm_cluster:
    hostname: "{{hostname}}"
    username: "{{username}}"
    password: "{{password}}"
    validate_certs: "{{validate_certs}}"
    port: "{{port}}"
    mdm_name: "mdm_1"
    state: "absent"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Switch cluster mode from 3 node to 5 node MDM cluster
  dellemc.powerflex.mdm_cluster:
    hostname: "{{hostname}}"
    username: "{{username}}"
    password: "{{password}}"
    validate_certs: "{{validate_certs}}"
    port: "{{port}}"
    cluster_mode: "FiveNodes"
    mdm:
      - mdm_id: "5f091a8a013f1100"
        mdm_type: "Secondary"
      - mdm_name: "mdm_1"
        mdm_type: "TieBreaker"
    sdc_state: "present-in-cluster"
    state: "present"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Switch cluster mode from 5 node to 3 node MDM cluster
  dellemc.powerflex.mdm_cluster:
    hostname: "{{hostname}}"
    username: "{{username}}"
    password: "{{password}}"
    validate_certs: "{{validate_certs}}"
    port: "{{port}}"
    cluster_mode: "ThreeNodes"
    mdm:
      - mdm_id: "5f091a8a013f1100"
        mdm_type: "Secondary"
      - mdm_name: "mdm_1"
        mdm_type: "TieBreaker"
    sdc_state: "absent-in-cluster"
    state: "present"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Get the details of the MDM cluster
  dellemc.powerflex.mdm_cluster:
    hostname: "{{hostname}}"
    username: "{{username}}"
    password: "{{password}}"
    validate_certs: "{{validate_certs}}"
    port: "{{port}}"
    state: "present"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Change ownership of MDM cluster
  dellemc.powerflex.mdm_cluster:
    hostname: "{{hostname}}"
    username: "{{username}}"
    password: "{{password}}"
    validate_certs: "{{validate_certs}}"
    port: "{{port}}"
    mdm_name: "mdm_2"
    is_primary: true
    state: "present"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Modify performance profile
  dellemc.powerflex.mdm_cluster:
    hostname: "{{hostname}}"
    username: "{{username}}"
    password: "{{password}}"
    validate_certs: "{{validate_certs}}"
    port: "{{port}}"
    performance_profile: "HighPerformance"
    state: "present"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Rename the MDM
  dellemc.powerflex.mdm_cluster:
    hostname: "{{hostname}}"
    username: "{{username}}"
    password: "{{password}}"
    validate_certs: "{{validate_certs}}"
    port: "{{port}}"
    mdm_name: "mdm_1"
    mdm_new_name: "new_mdm_1"
    state: "present"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Modify virtual IP interface of the MDM
  dellemc.powerflex.mdm_cluster:
    hostname: "{{hostname}}"
    username: "{{username}}"
    password: "{{password}}"
    validate_certs: "{{validate_certs}}"
    port: "{{port}}"
    mdm_name: "mdm_1"
    virtual_ip_interface:
      - "ens224"
    state: "present"
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Clear virtual IP interface of the MDM
  dellemc.powerflex.mdm_cluster:
    hostname: "{{hostname}}"
    username: "{{username}}"
    password: "{{password}}"
    validate_certs: "{{validate_certs}}"
    port: "{{port}}"
    mdm_name: "mdm_1"
    clear_interfaces: true
    state: "present"

Inputs

    
mdm:
    description:
    - Specifies parameters to add/remove MDMs to/from the MDM cluster.
    elements: dict
    suboptions:
      mdm_id:
        description:
        - ID of MDM that will be added/removed to/from the cluster.
        type: str
      mdm_name:
        description:
        - Name of MDM that will be added/removed to/from the cluster.
        type: str
      mdm_type:
        choices:
        - Secondary
        - TieBreaker
        description:
        - Type of the MDM.
        - Either I(mdm_id) or I(mdm_name) must be passed with mdm_type.
        required: true
        type: str
    type: list

port:
    default: 443
    description:
    - Port number through which communication happens with PowerFlex host.
    type: int

state:
    choices:
    - present
    - absent
    description:
    - State of the MDM cluster.
    required: true
    type: str

mdm_id:
    description:
    - The ID of the MDM.
    - Mutually exclusive with I(mdm_name).
    type: str

timeout:
    default: 120
    description:
    - Time after which connection will get terminated.
    - It is to be mentioned in seconds.
    required: false
    type: int

hostname:
    aliases:
    - gateway_host
    description:
    - IP or FQDN of the PowerFlex host.
    required: true
    type: str

mdm_name:
    description:
    - The name of the MDM. It is unique across the PowerFlex array.
    - Mutually exclusive with I(mdm_id).
    - If mdm_name passed in add standby operation, then same name will be assigned to
      the new standby mdm.
    type: str

password:
    description:
    - The password of the PowerFlex host.
    required: true
    type: str

username:
    description:
    - The username of the PowerFlex host.
    required: true
    type: str

mdm_state:
    choices:
    - present-in-cluster
    - absent-in-cluster
    description:
    - Mapping state of MDM.
    type: str

is_primary:
    description:
    - Set I(is_primary) as C(true) to change MDM cluster ownership from the current master
      MDM to different MDM.
    - Set I(is_primary) as C(false), will return MDM cluster details.
    - New owner MDM must be an MDM with a manager role.
    type: bool

standby_mdm:
    description:
    - Specifies add standby MDM parameters.
    suboptions:
      allow_multiple_ips:
        description:
        - Allow the added node to have different number of IPs from the primary node.
        type: bool
      management_ips:
        description:
        - List of management IPs to manage MDM. It can contain IPv4 addresses.
        elements: str
        type: list
      mdm_ips:
        description:
        - List of MDM IPs that will be assigned to new MDM. It can contain IPv4 addresses.
        elements: str
        required: true
        type: list
      port:
        description:
        - Specifies the port of new MDM.
        type: int
      role:
        choices:
        - Manager
        - TieBreaker
        description:
        - Role of new MDM.
        required: true
        type: str
      virtual_interfaces:
        description:
        - List of NIC interfaces that will be used for virtual IP addresses.
        elements: str
        type: list
    type: dict

cluster_mode:
    choices:
    - OneNode
    - ThreeNodes
    - FiveNodes
    description:
    - Mode of the cluster.
    type: str

mdm_new_name:
    description:
    - To rename the MDM.
    type: str

validate_certs:
    aliases:
    - verifycert
    default: true
    description:
    - Boolean variable to specify whether or not to validate SSL certificate.
    - C(true) - Indicates that the SSL certificate should be verified.
    - C(false) - Indicates that the SSL certificate should not be verified.
    type: bool

clear_interfaces:
    description:
    - Clear all virtual IP interfaces.
    - The I(clear_interfaces) is mutually exclusive with I(virtual_ip_interfaces).
    type: bool

performance_profile:
    choices:
    - Compact
    - HighPerformance
    description:
    - Apply performance profile to cluster MDMs.
    type: str

virtual_ip_interfaces:
    description:
    - List of interfaces to be used for virtual IPs.
    - The order of interfaces must be matched with virtual IPs assigned to the cluster.
    - Interfaces of the primary and secondary type MDMs are allowed to modify.
    - The I(virtual_ip_interfaces) is mutually exclusive with I(clear_interfaces).
    elements: str
    type: list

Outputs

changed:
  description: Whether or not the resource has changed.
  returned: always
  sample: 'false'
  type: bool
mdm_cluster_details:
  contains:
    clusterMode:
      description: Mode of the MDM cluster.
      type: str
    clusterState:
      description: State of the MDM cluster.
      type: str
    goodNodesNum:
      description: Number of Nodes in MDM cluster.
      type: int
    goodReplicasNum:
      description: Number of nodes for Replication.
      type: int
    id:
      description: The ID of the MDM cluster.
      type: str
    master:
      contains:
        id:
          description: ID of the MDM.
          type: str
        ips:
          description: List of IPs for master MDM.
          type: list
        managementIPs:
          description: List of management IPs for master MDM.
          type: list
        name:
          description: Name of the MDM.
          type: str
        opensslVersion:
          description: OpenSSL version.
          type: str
        port:
          description: Port of the MDM.
          type: str
        role:
          description: Role of MDM.
          type: str
        status:
          description: Status of MDM.
          type: str
        versionInfo:
          description: Version of MDM.
          type: str
        virtualInterfaces:
          description: List of virtual interfaces
          type: list
      description: The details of the master MDM.
      type: dict
    name:
      description: Name of MDM cluster.
      type: str
    slaves:
      contains:
        id:
          description: ID of the MDM.
          type: str
        ips:
          description: List of IPs for secondary MDM.
          type: list
        managementIPs:
          description: List of management IPs for secondary MDM.
          type: list
        name:
          description: Name of the MDM.
          type: str
        opensslVersion:
          description: OpenSSL version.
          type: str
        port:
          description: Port of the MDM.
          type: str
        role:
          description: Role of MDM.
          type: str
        status:
          description: Status of MDM.
          type: str
        versionInfo:
          description: Version of MDM.
          type: str
        virtualInterfaces:
          description: List of virtual interfaces
          type: list
      description: The list of the secondary MDMs.
      elements: dict
      type: list
    standbyMDMs:
      contains:
        id:
          description: ID of the MDM.
          type: str
        ips:
          description: List of IPs for MDM.
          type: list
        managementIPs:
          description: List of management IPs for MDM.
          type: list
        name:
          description: Name of the MDM.
          type: str
        opensslVersion:
          description: OpenSSL version.
          type: str
        port:
          description: Port of the MDM.
          type: str
        role:
          description: Role of MDM.
          type: str
        status:
          description: Status of MDM.
          type: str
        versionInfo:
          description: Version of MDM.
          type: str
        virtualInterfaces:
          description: List of virtual interfaces.
          type: list
      description: The list of the standby MDMs.
      elements: dict
      type: list
    tieBreakers:
      contains:
        id:
          description: ID of the MDM.
          type: str
        ips:
          description: List of IPs for tie-breaker MDM.
          type: list
        managementIPs:
          description: List of management IPs for tie-breaker MDM.
          type: list
        name:
          description: Name of the MDM.
          type: str
        opensslVersion:
          description: OpenSSL version.
          type: str
        port:
          description: Port of the MDM.
          type: str
        role:
          description: Role of MDM.
          type: str
        status:
          description: Status of MDM.
          type: str
        versionInfo:
          description: Version of MDM.
          type: str
      description: The list of the TieBreaker MDMs.
      elements: dict
      type: list
    virtualIps:
      description: List of virtual IPs.
      type: list
  description: Details of the MDM cluster.
  returned: When MDM cluster exists
  sample:
    clusterMode: ThreeNodes
    clusterState: ClusteredNormal
    goodNodesNum: 3
    goodReplicasNum: 2
    id: cdd883cf00000002
    master:
      id: 5908d328581d1400
      ips:
      - 10.x.y.z
      managementIPs:
      - 10.x.y.z
      name: sample_mdm
      opensslVersion: OpenSSL 1.0.2k-fips  26 Jan 2017
      port: 9011
      role: Manager
      status: Normal
      versionInfo: R3_6.0.0
      virtualInterfaces:
      - ens1
    perfProfile: HighPerformance
    slaves:
    - id: 5908d328581d1401
      ips:
      - 10.x.x.z
      managementIPs:
      - 10.x.x.z
      name: sample_mdm1
      opensslVersion: OpenSSL 1.0.2k-fips  26 Jan 2017
      port: 9011
      role: Manager
      status: Normal
      versionInfo: R3_6.0.0
      virtualInterfaces:
      - ens1
    standbyMDMs:
    - id: 5908d328581d1403
      ips:
      - 10.x.z.z
      managementIPs:
      - 10.x.z.z
      opensslVersion: N/A
      port: 9011
      role: TieBreaker
      status: Normal
      versionInfo: R3_6.0.0
      virtualInterfaces: []
    tieBreakers:
    - id: 5908d328581d1402
      ips:
      - 10.x.y.y
      managementIPs: []
      opensslVersion: N/A
      port: 9011
      role: TieBreaker
      status: Normal
      versionInfo: R3_6.0.0
      virtualInterfaces: []
  type: dict