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

[Bug] recovery_plan fails to create in module plugin_modules/prism/recovery_plans.py #515

Open
stahnjones opened this issue Nov 2, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@stahnjones
Copy link

Describe the bug
a valid recovery plan configuration specification does not create due to API requiring "kind": "cluster" when referring to a cluster's UUID

To Reproduce
Steps to reproduce the behavior:

  1. ansible command: ansible-playbook create-test-recovery-plan.yml
  2. sample playbook used
- hosts: localhost
  gather_facts: false

  tasks:
    - name: create test recovery plan
      ntnx_recovery_plans:
        nutanix_host: "<pcip>"
        nutanix_username: "<pc-username>"
        nutanix_password: "<pc-password>"
        validate_certs: false
        state: "present"
        name: example-rp
        desc: recovery plan desc
        stages:
          - vms:
              - name: "test-check"
            delay: 0
        primary_location:
          url: "<pc_uuid>"
          cluster: "<source_pe_uuid>"
        recovery_location:
          url: "<pc_uuid>"
          cluster: "<dest_pe_uuid>"
        network_type: NON_STRETCH
        network_mappings:
          - primary:
              test:
                name: "<subnet-name>"
              prod:
                name: "<subnet-name>"
            recovery:
              test:
                name: "<subnet-name>"
              prod:
                name: "<subnet-name>"
      register: result

Expected behavior
a recovery plan is created with the specification provided

Additional context
fails to create with a vague error about being unprocessable entity. When using check_mode, take the resultant API request body into the Prism Central API directly and returns a more specific error about the lack of kind: cluster
adding in "kind": "cluster" to the resultant request json allows the RP to be created as desired

@stahnjones stahnjones added the bug Something isn't working label Nov 2, 2024
@stahnjones
Copy link
Author

#516

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants