ansible-collections / ibm.storage_virtualize

GNU General Public License v3.0
3 stars 9 forks source link

Error observed while renaming the resources, with missing parameter and for idempotency. #7

Closed lavanya-c-r closed 1 year ago

lavanya-c-r commented 1 year ago

SUMMARY

  1. When trying to rename resources (backup_snapshot and DRAID array) the tasks fail with error. Despite errors, "Required while creating FlashCopy mapping: 'source', 'target' and 'copytype'". and for Draid renaming is happening properly but the counter is not changing.
  2. while creating a backup snapshot with missing parameter source volume the task fail with the error "msg": "The source volume [None] doesn't exist.".
  3. while creating a Draid array to check for idempotency the task fail with the error "Not supported parameters passed for update: driveclass, drivecount, level".

ISSUE TYPE

ANSIBLE VERSION ansible [core 2.11.12]

COLLECTION VERSION ibm-storage_virtualize-2.0.0

OS / ENVIRONMENT IBM FlashSystem 7200 8.6.0.0 (build 169.9.2305171701000)

STEPS TO REPRODUCE

-  name: rename the backup type snapshot
   ibm.storage_virtualize.ibm_svc_manage_flashcopy:
      clustername: "{{ clustername }}"
      domain: "{{ domain }}"
      username: "{{ username }}"
      password: "{{ password }}"
      log_path: /tmp/playbook.debug
      old_name: snapshot0
      name: snapshot1
      state: present
- name: Rename an existing DRAID array
  ibm.storage_virtualize.ibm_svc_mdisk:
    clustername: "{{ clustername }}"
    domain: "{{ domain }}"
    username: "{{ username }}"
    password: "{{ password }}"
    log_path: /tmp/playbook.debug
    old_name: mdisk0
    name: mdisk1
    state: present
- name: Create FlashCopy mapping for backup with missing parameter source volume.
  ibm.storage_virtualize.ibm_svc_manage_flashcopy:
      clustername: "{{clustername}}"
      username: "{{username}}"
      password: "{{password}}"
      log_path: /tmp/playbook.debug
      state: present
      name: snapshot1
      copytype: backup
      source: 
      target: tar_volume
      mdiskgrp: {{pool}}
      copyrate: 50
      grainsize: 64`
-  name: Create a DRAID array to check for idempotency
   ibm.storage_virtualize.ibm_svc_mdisk:
      clustername: "{{clustername}}"
      username: "{{username}}"
      password: {{password}}"
      log_path: "/tmp/playbook.debug"
      state: present
      name: mdisk1                                                                                                        
      driveclass: 0
      drivecount: 1                                        
      level: raid1                                                             
      mdiskgrp: {{pool}} 

EXPECTED RESULTS

  1. snapshot and DRAID name should update properly
  2. should get the message "msg": "Required while creating FlashCopy mapping: 'source'" for missing source volume parameter while creating a flashcopy.
  3. playbook should execute properly for idempotency behaviour.

Thank you!

Shilpi-J commented 1 year ago

Fixed in PR: https://github.com/ansible-collections/ibm.storage_virtualize/pull/5 Please verify on latest code and share the results.

lavanya-c-r commented 1 year ago

verified, getting the expected output sharing the results

  1. "msg": "mapping [snapshot0] has been successfully rename to [snapshot1]." ok=1 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
  2. "msg": "mdisk [mdisk0] has been successfully rename to [mdisk1]."
    ok=1 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
  3. "msg": "Required while creating FlashCopy mapping: 'source'" ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
  4. "msg": "Mdisk [mdisk1] already exists. No modifications done"
    ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 so closing the issue thanks!