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 v8 incompatibility #6974

Closed
1 task done
dusatvoj opened this issue Jul 19, 2023 · 19 comments
Closed
1 task done

Proxmox v8 incompatibility #6974

dusatvoj opened this issue Jul 19, 2023 · 19 comments
Labels
bug This issue/PR relates to a bug has_pr module module plugins plugin (any type)

Comments

@dusatvoj
Copy link

Summary

When I want to create a VM via proxmox_kvm module @ proxmox 8.0.3, I'm stuck with this message:

"msg": "Unable to retrieve Proxmox VE version: 'ProxmoxKvmAnsible' object has no attribute 'proxmox_api'

Issue Type

Bug Report

Component Name

community.general.proxmox_kvm

Ansible Version

$ ansible --version
ansible [core 2.15.2]
  config file = None
  configured module search path = ['/home/ansible/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/lib/python3.9/dist-packages/ansible
  ansible collection location = /home/ansible/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/local/bin/ansible
  python version = 3.9.2 (default, Feb 28 2021, 17:03:44) [GCC 10.2.1 20210110] (/usr/bin/python3)
  jinja version = 3.1.1
  libyaml = True

Community.general Version

$ ansible-galaxy collection list community.general

Configuration

$ ansible-config dump --only-changed
CONFIG_FILE() = None

(running via ansible-semaphore)

OS / Environment

Debian 11

Steps to Reproduce

There's a role I've copied and just used parametrized for me. It worked great before upgrade to PVE 8

https://github.com/pvelati/ansible-role-proxmox-kvm-mgmt/tree/master

Expected Results

It work's with PVE 8

Actual Results

... "msg": "Unable to retrieve Proxmox VE version: 'ProxmoxKvmAnsible' object has no attribute 'proxmox_api' ...

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

@UnderGreen
Copy link
Contributor

Fixed in #6980. Feel free to close the issue.

@Drugoy
Copy link

Drugoy commented Jul 21, 2023

I have Proxmox-VE 8.0.3 and I didn't experience the issue even before the yesterday's fix.
However, I am not using token auth, just plain simple API auth was used instead.

@UnderGreen
Copy link
Contributor

@Drugoy issue was related to token auth and was broken for all versions.

@Drugoy
Copy link

Drugoy commented Jul 21, 2023

@UnderGreen I got it from your PR, but this ticket's summary doesn't reflect that the bug was narrower than described.

@dusatvoj
Copy link
Author

I didn't have a problem before upgrading to PVE 8.
Yes, I'm using API token auth

@jsabater
Copy link

I can confirm that this issue also happens in the latest version of Proxmox 7, that is 7.4-16 at the time of writing. I have an Ansible playbook that is used to provision LXC and the first thing it does is to download the required template. This is the error I get:

"Unable to retrieve Proxmox VE version: 'ProxmoxTemplateAnsible' object has no attribute 'proxmox_api'"

I am using community.general version 7.2 at the time of writing, with proxmoxer version 2.0.1 and the error is raised by the community.general.proxmox_template module, which is being run as follows:

- name: Download the required template
  community.general.proxmox_template:
    state: present
    api_user: "{{ vault_proxmox_api_user }}"
    api_token_id: "{{ vault_proxmox_api_token_id }}"
    api_token_secret: "{{ vault_proxmox_api_token_secret }}"
    api_host: "{{ proxmox_api_host }}"
    node: "{{ proxmox_node }}"
    storage: "{{ proxmox_tmplstorage }}"
    content_type: vztmpl
    template: "{{ proxmox_ostemplate }}"
    timeout: 30
  delegate_to: localhost

@jsabater
Copy link

Moreover, could some please provide instructions on how to patch an existing installation until community.general version 7.3 is released with these fixes?

@UnderGreen
Copy link
Contributor

@jsabater you can clone this repository(and other repositories you need for playbook run). Then run your playbook with the special variable set ANSIBLE_COLLECTIONS_PATHS=~/src/ansible/collections/ ansible-playbook testmod.yml -v.

The structure of that path should be very specific, tho:

tree ~/src/ansible/collections -L 3
~/src/ansible/collections
└── ansible_collections
    └── community
        └── general

So, ansible_collections should be a parent dir for each xyz.subpath.

@UnderGreen
Copy link
Contributor

I didn't have a problem before upgrading to PVE 8.
Yes, I'm using API token auth

It was a coincidence. For the previous versions you were using the old collection where token authorization worked. And when you installed a new one you bumped the collection to the one with broken token auth.

@jsabater
Copy link

It was a coincidence. For the previous versions you were using the old collection where token authorization worked. And when you installed a new one you bumped the collection to the one with broken token auth.

So if I downgrade the community.general collection to version 7.1 it should work again? There is really nothing I need from 7.2 which I don't have already in 7.1. Or should it be a previous version?

I mean, it may be faster this way and it is just fine. :-)

@UnderGreen
Copy link
Contributor

From the changelog/PRs I would say you need to use 7.1.0 or less

@jsabater
Copy link

Just to confirm that installing community.general version 7.1.0 is a valid workaround until 7.3 is released. It's working fine again.

Thanks for your help, @UnderGreen

@cubehouse
Copy link

Confirming forcing fallback to 7.1.0 fixed auth with my proxmox 7 machine.

Will there be a 7.2.1 hotfix for this? Or do we need to wait for August 14th for 7.3.0? I'm currently blocked from using features in 7.2.x because I need to remain downgraded.

@felixfontein
Copy link
Collaborator

I haven't planned on making a bugfix release, but if there's enough interest I can take a look. I probably won't manage before the beginning of next week though.

@felixfontein
Copy link
Collaborator

community.general 7.2.1 is out with a bugfix for this.

@russoz russoz changed the title Proxmomx v8 incompatibility Proxmox v8 incompatibility Aug 11, 2023
@russoz
Copy link
Collaborator

russoz commented Aug 11, 2023

@felixfontein did you leave this issue open on purpose (given that the bugfix is already published)?

@felixfontein
Copy link
Collaborator

Nope. Closing now :)

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 has_pr module module plugins plugin (any type)
Projects
None yet
Development

No branches or pull requests

8 participants