dell / ansible-powerscale

PowerScale (Isilon) Ansible modules
GNU General Public License v3.0
29 stars 21 forks source link

SyncIQ Policy Module fails when a resync_prep job is running on the cluster #7

Open rbenigno opened 3 years ago

rbenigno commented 3 years ago

Basic use of the SyncIQ Policy Module fails when there is a resync_prep job running on the cluster. The failure occurs even when the policy being targeted is not the policy the resync_prep job is running for.

Replicate as follows:

- name: Get SyncIQ policy details
  dellemc_powerscale_synciqpolicy:
    onefs_host: "{{onefs_host}}"
    api_user: "{{api_user}}"
    api_password: "{{api_password}}"
    verify_ssl: "{{verify_ssl}}"
    policy_name: "Policy1"
    state: "present"
TASK [Get SyncIQ policy details] *********************************************************************************************************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "Get jobs on SyncIQ policy Policy1 failed with error: Invalid value for `action` (resync_prep), must be one of ['copy', 'sync']"}

The error message reflects the current step of the resync_prep job, as seen in the log file:

2021-10-13 00:44:58,593 dellemc_powerscale_synciqpolicy.py ERROR : Get jobs on SyncIQ policy Policy1 failed with error: Invalid value foraction(resync_prep), must be one of ['copy', 'sync'] 2021-10-13 00:45:02,759 dellemc_powerscale_synciqpolicy.py INFO : Got python SDK instance for provisioning on PowerScale 2021-10-13 00:45:03,053 dellemc_powerscale_synciqpolicy.py ERROR : Get jobs on SyncIQ policy Policy1 failed with error: Invalid value foraction(resync_prep), must be one of ['copy', 'sync'] 2021-10-13 00:45:05,706 dellemc_powerscale_synciqpolicy.py INFO : Got python SDK instance for provisioning on PowerScale 2021-10-13 00:45:06,000 dellemc_powerscale_synciqpolicy.py ERROR : Get jobs on SyncIQ policy Policy1 failed with error: Invalid value foraction(resync_prep_domain_mark), must be one of ['copy', 'sync'] 2021-10-13 00:45:09,089 dellemc_powerscale_synciqpolicy.py INFO : Got python SDK instance for provisioning on PowerScale 2021-10-13 00:45:09,376 dellemc_powerscale_synciqpolicy.py ERROR : Get jobs on SyncIQ policy Policy1 failed with error: Invalid value foraction(resync_prep_restore), must be one of ['copy', 'sync']

anupamaloke commented 3 years ago

@rajendraindukuri, @dattaarindam, fyi

Jennifer-John commented 3 years ago

Hi @rbenigno,

This issue has been captured as a known issue and is captured as part of the release notes in https://github.com/dell/ansible-powerscale/blob/master/docs/Release%20Notes.md Also attaching a screenshot of the section for your reference.

Regarding your mention on policy1 failing with this error even though there is no resync_prep job running on policy1, as per design, since there could be running and scheduled jobs on a SyncIQ policy, to handle idempotency successfully, we have used the ISI SDK's list_jobs_api which will list all running and scheduled jobs (hence the error is displayed) as the api to list the jobs running on a policy returns only the current running job and not the scheduled jobs on the policy.

We will work on validating and updating the release notes once the fix is in place.

chrome_vKX75R0l2f

FYI @anupamaloke, @rajendraindukuri, @dattaarindam

Thanks, Jennifer.