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

proxmox_disk failing to recognize issues in operations #9254

Open
1 task done
castorsky opened this issue Dec 15, 2024 · 2 comments
Open
1 task done

proxmox_disk failing to recognize issues in operations #9254

castorsky opened this issue Dec 15, 2024 · 2 comments
Labels
bug This issue/PR relates to a bug module module plugins plugin (any type)

Comments

@castorsky
Copy link
Contributor

Summary

In reviewing PR #7969, I discovered the root cause of the behavior:

  • the proxmox_disk module currently uses the PUT method to call the resize function, assuming it operates synchronously;
  • starting with version 8, the Proxmox team changed the resize function to an asynchronous operation that returns a task ID:

I plan to submit a PR to update the resize functionality in the proxmox_disk module to handle the new asynchronous behavior. However, this change will break compatibility with older versions of Proxmox VE.

Considering the discussion in #9199, I hope the community will agree that overloading the code to support older, unsupported versions is not ideal. Feedback on this approach is welcome.

Issue Type

Bug Report

Component Name

proxmox_disk

Ansible Version

$ ansible --version
ansible [core 2.18.1]

Community.general Version

$ ansible-galaxy collection list community.general
Collection        Version
----------------- -------
community.general 10.1.0 

Configuration

$ ansible-config dump --only-changed

OS / Environment

openSUSE Tumbleweed

Steps to Reproduce

Try to shrink existing disk. Assume that disk sata4 is currently 20G.

- name: Shrink existing disk
  community.general.proxmox_disk:
    api_host: node1
    api_user: root@pam
    api_token_id: token1
    api_token_secret: some-token-data
    vmid: 101
    disk: sata4
    size: 15G
    state: resize

Expected Results

TASK [Modify disk] **********************************************************************************************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "msg": "Failed to resize disk scsi0 in VM 100 with exception: 500 Internal Server Error: shrinking disks is not supported"}

Actual Results

TASK [Modify disk] **********************************************************************************************************************************************
changed: [localhost]

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

@ansibullbot ansibullbot added bug This issue/PR relates to a bug module module plugins plugin (any type) labels Dec 15, 2024
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 module module plugins plugin (any type)
Projects
None yet
Development

No branches or pull requests

2 participants