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

Duplicate vmid in proxmox_disk module #5492

Closed
1 task done
Doc-Tiebeau opened this issue Nov 7, 2022 · 3 comments · Fixed by #5493
Closed
1 task done

Duplicate vmid in proxmox_disk module #5492

Doc-Tiebeau opened this issue Nov 7, 2022 · 3 comments · Fixed by #5493
Labels
bug This issue/PR relates to a bug cloud has_pr module module plugins plugin (any type) traceback

Comments

@Doc-Tiebeau
Copy link
Contributor

Doc-Tiebeau commented Nov 7, 2022

Summary

When resizing disk got error:

fatal: [<node_name> -> localhost]: FAILED! => {"changed": false, "msg": "Failed to resize disk scsi0 in VM <vmid> with exception: 400 Bad Request: Parameter verification failed. - {'vmid': 'duplicate parameter (already defined in URI)'}"}

proxmox.proxmox_api.nodes(vm['node']).qemu(vmid).resize.set(vmid=vmid, disk=disk, size=size)

Issue Type

Bug Report

Component Name

plugins/modules/proxmox_disk.py

Ansible Version

ansible --version : core 2.13.4

Community.general Version

Collection Version
----------------- -------
community.general 5.7.0

Configuration

No response

OS / Environment

No response

Steps to Reproduce

- name: "Resize vHDD"
  delegate_to: localhost
  community.general.proxmox_disk:
    api_host: "{{ pmx_node }}"
    api_user: "{{ pmx_user }}"
    api_token_id: "{{ api_token_id }}"
    api_token_secret: "{{ api_token_secret }}"
    vmid: "{{ vmid }}" #FIXME - 'vmid': 'duplicate parameter (already defined in URI)'
    
    ### Config
    disk: "scsi0"
    size: "{{ hdd_size | default('4')  }}G"
    state: resized

Expected Results

vDisk resized

Actual Results

The full traceback is:
  File "/tmp/ansible_community.general.proxmox_disk_payload_1xpji5zq/ansible_community.general.proxmox_disk_payload.zip/ansible_collections/community/general/plugins/modules/cloud/misc/proxmox_disk.py", line 729, in main
  File "/home/<user>/.local/lib/python3.8/site-packages/proxmoxer/core.py", line 158, in set
    return self.put(*args, **data)
  File "/home/<user>/.local/lib/python3.8/site-packages/proxmoxer/core.py", line 149, in put
    return self(args)._request("PUT", data=data)
  File "/home/<user>/.local/lib/python3.8/site-packages/proxmoxer/core.py", line 123, in _request
    raise ResourceException(
fatal: [<node_name> -> localhost]: FAILED! => {
    "changed": false,
    "invocation": {
        "module_args": {
          ...
          ANONYMIZED
          ...
        }
    },
    "msg": "Failed to resize disk scsi0 in VM <vmid>> with exception: 400 Bad Request: Parameter verification failed. - {'vmid': 'duplicate parameter (already defined in URI)'}"
}

Code of Conduct

  • I agree to follow the Ansible Code of Conduct
@ansibullbot
Copy link
Collaborator

Files identified in the description:

If these files are incorrect, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibullbot
Copy link
Collaborator

@castorsky
Copy link
Contributor

castorsky commented Nov 8, 2022

Hello @Doc-Tiebeau! I cannot reproduce your bug. Can you provide which versions of software you are using: proxmoxer library, Proxmox PVE, OS on the Ansible-controller.

patchback bot pushed a commit that referenced this issue Nov 13, 2022
patchback bot pushed a commit that referenced this issue Nov 13, 2022
felixfontein added a commit that referenced this issue Nov 13, 2022
…_disk module #5492 (#5537)

* Fix:  Duplicate vmid in proxmox_disk module #5492 (#5493)

#5492
(cherry picked from commit 27a4ffc)

* Add changelog fragment.

(cherry picked from commit 6723853)

Co-authored-by: Doc_Tiebeau <elie.saintfelix@gmail.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
felixfontein added a commit that referenced this issue Nov 13, 2022
…_disk module #5492 (#5536)

* Fix:  Duplicate vmid in proxmox_disk module #5492 (#5493)

#5492
(cherry picked from commit 27a4ffc)

* Add changelog fragment.

(cherry picked from commit 6723853)

Co-authored-by: Doc_Tiebeau <elie.saintfelix@gmail.com>
Co-authored-by: Felix Fontein <felix@fontein.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug cloud has_pr module module plugins plugin (any type) traceback
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants