Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ucs_disk_group_policy doesn't support use_jbod attribute in the class. #22

Open
gve-vse-tim opened this issue Feb 1, 2021 · 2 comments

Comments

@gve-vse-tim
Copy link

In at least version UCSM 3.2, disk group policies have an option to use JBOD disks to build the disk group. However, the Ansible module does not support that option, despite supporting the use_remaining_disks option.

Can you please add support for this option?

Thanks!

@MallocArray
Copy link

I just discovered the same thing and we rely on the JBOD option for our M5 servers with dual M.2 boot drives. We are on 4.1.3b

We need this feature added to the module to complete our configuration.

@MallocArray
Copy link

Using ucs_managed_objects I was able to get this value set, so I can fully configure the policy, although it is broken over two tasks until it is added to the proper module

Variables

disk_group_policies:
  - name: RAID1_2_Drives
    description: RAID 1 across 2 drives. Used for servers with 2 M.2 boot drives
    raid_level: mirror
    configuration_mode: automatic
    num_drives: '2'
    drive_type: unspecified
    use_jbod_disks: 'yes'

Tasks for playbook

    - name: Disk Group Policy
      # See group_vars/all/storage.yml for loop variable
      cisco.ucs.ucs_disk_group_policy:
        hostname: "{{ inventory_hostname }}"
        username: "{{ ucs_username }}"
        password: "{{ ucs_password }}"
        name: "{{ item.name }}"
        description: "{{ item.description | default(omit) }}"
        raid_level: "{{ item.raid_level | default(omit) }}"
        configuration_mode: "{{ item.configuration_mode | default(omit) }}"
        num_drives: "{{ item.num_drives | default(omit) }}"
        drive_type: "{{ item.drive_type | default(omit) }}"
        num_ded_hot_spares: "{{ item.num_ded_hot_spares | default(omit) }}"
        num_glob_hot_spares: "{{ item.num_glob_hot_spares | default(omit) }}"
        min_drive_size: "{{ item.min_drive_size | default(omit) }}"
        use_remaining_disks: "{{ item.use_remaining_disks | default(omit) }}"
        virtual_drive:
          access_policy: "{{ item.access_policy | default(omit) }}"
          drive_cache: "{{ item.drive_cache | default(omit) }}"
          io_policy: "{{ item.io_policy | default(omit) }}"
          read_policy: "{{ item.read_policy | default(omit) }}"
          strip_size: "{{ item.strip_size | default(omit) }}"
          write_cache_policy: "{{ item.write_cache_policy | default(omit) }}"
      loop: "{{ disk_group_policies }}"
      loop_control:
        label: "{{ item.name }}"
      when: disk_group_policies is defined


    - name: Disk Group Policy JBOD Setting
      # ucs_disk_group_policy does not support the 'Use JBOD' option, so using ucs_managed_objects to set as a separate task
      # See group_vars/all/storage.yml for loop variable
      cisco.ucs.ucs_managed_objects:
        hostname: "{{ inventory_hostname }}"
        username: "{{ ucs_username }}"
        password: "{{ ucs_password }}"
        objects:
        - module: ucsmsdk.mometa.lstorage.LstorageDiskGroupConfigPolicy
          # https://github.com/CiscoUcs/ucsmsdk/blob/master/ucsmsdk/mometa/lstorage/LstorageDiskGroupConfigPolicy.py
          class: LstorageDiskGroupConfigPolicy
          properties:
            parent_mo_or_dn: org-root
            name: "{{ item.name }}"
          children:
            - module: ucsmsdk.mometa.lstorage.LstorageDiskGroupQualifier
              # https://github.com/CiscoUcs/ucsmsdk/blob/master/ucsmsdk/mometa/lstorage/LstorageDiskGroupQualifier.py
              class: LstorageDiskGroupQualifier
              properties:
                use_jbod_disks: "{{ item.use_jbod_disks }}"
      loop: "{{ disk_group_policies }}"
      loop_control:
        label: "{{ item.name }}"
      when: disk_group_policies is defined

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants