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] Module ntnx_vms tries to access non existent endpoint #496

Closed
EdenCore opened this issue Sep 17, 2024 · 3 comments
Closed

[Bug] Module ntnx_vms tries to access non existent endpoint #496

EdenCore opened this issue Sep 17, 2024 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@EdenCore
Copy link

Example playbook :

  • name: VM playbook
    hosts: localhost
    gather_facts: false
    collections:
    • nutanix.ncp
      module_defaults:
      group/nutanix.ncp.ntnx:
      nutanix_host: "{{ pc_ip }}"
      nutanix_username: "{{ nutanix_user }}"
      nutanix_password: "{{ nutanix_password }}"
      validate_certs: false
      tasks:
    • name: create Vm
      tags: "create_vm"
      ntnx_vms:
      state: present
      name: "ansible"
      desc: "description"
      categories:
      Environment:
      - "dev"
      cluster:
      name: "LAB"
      networks:
      - is_connected: True
      subnet:
      uuid: "{{ subnet_uuid }}"
      disks:
      - type: "DISK"
      size_gb: 30
      bus: "SATA"
      storage_container:
      name: "SelfServiceContainer"
      vcpus: 1
      cores_per_vcpu: 1
      memory_gb: 1

Stack trace
{
"status_code": 500,
"error": "HTTP Error 500: INTERNAL SERVER ERROR",
"response": null,
"msg": "Failed fetching URL: https://10.0.0.1:9440/api/nutanix/v3/groups",
"invocation": {
"module_args": {
"nutanix_host": "10.0.0.1",
"nutanix_username": "user1",
"nutanix_password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"validate_certs": false,
"state": "present",
"name": "ansible",
"desc": "description",
"categories": {
"Environment": [
"dev"
]
},
"cluster": {
"name": "LAB"
},
"networks": [
{
"is_connected": true,
"subnet": {
"uuid": "HIDDEN"
}
}
],
"disks": [
{
"type": "DISK",
"size_gb": 30,
"bus": "SATA",
"storage_container": {
"name": ""
}
}
],
"vcpus": 1,
"cores_per_vcpu": 1,
"memory_gb": 1,
"nutanix_port": "9440",
"wait": true,
"timezone": "UTC",
"force_power_off": false,
"remove_categories": false
}
},
"_ansible_no_log": false,
"changed": false
}

Additional context
Using the REST API Explorer v3.1.0 in Prism Central I noticed that there is no endpoint named "/groups".

@bhati-pradeep
Copy link
Collaborator

Can you share the PC version used ?

@bhati-pradeep
Copy link
Collaborator

bhati-pradeep commented Dec 12, 2024

Groups API we use it for fetching storage container uuid from storage container name. I can see that groups API works as expected for pc.2024.3.

  1. your api failed for Internal error 500. It seems to be some api issue. If possible can you check PC logs for more details.
  2. Can you try running this API for your setup incase its failing for you or not.
    https://<pc-i[>:9440/api/nutanix/v3/groups
{
    "entity_type": "storage_container",
    "filter_criteria": "container_name==SelfServiceContainer"
}

@EdenCore
Copy link
Author

Hi, thanks for the update. I have not been able to reproduce the error. Furthermore, we upgraded Prism Central since the initial post. I think we should close this thread.

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

5 participants