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] Use proxmoxer_version instead of server API version #6980

Merged

Conversation

UnderGreen
Copy link
Contributor

SUMMARY

Fixes authorization via tokens. Check for the version is done against proxmoxer, not the API itself.
Fixes #6975, #6974.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

module_utils/proxmox

ADDITIONAL INFORMATION

@ansibullbot ansibullbot added bug This issue/PR relates to a bug module_utils module_utils plugins plugin (any type) labels Jul 20, 2023
@felixfontein felixfontein merged commit 796ad35 into ansible-collections:main Jul 20, 2023
@patchback
Copy link

patchback bot commented Jul 20, 2023

Backport to stable-6: 💔 cherry-picking failed — conflicts found

❌ Failed to cleanly apply 796ad35 on top of patchback/backports/stable-6/796ad3565eab36a0146c3f3d084306969a5e51ee/pr-6980

Backporting merged PR #6980 into main

  1. Ensure you have a local repo clone of your fork. Unless you cloned it
    from the upstream, this would be your origin remote.
  2. Make sure you have an upstream repo added as a remote too. In these
    instructions you'll refer to it by the name upstream. If you don't
    have it, here's how you can add it:
    $ git remote add upstream https://github.com/ansible-collections/community.general.git
  3. Ensure you have the latest copy of upstream and prepare a branch
    that will hold the backported code:
    $ git fetch upstream
    $ git checkout -b patchback/backports/stable-6/796ad3565eab36a0146c3f3d084306969a5e51ee/pr-6980 upstream/stable-6
  4. Now, cherry-pick PR [proxmox] Use proxmoxer_version instead of server API version #6980 contents into that branch:
    $ git cherry-pick -x 796ad3565eab36a0146c3f3d084306969a5e51ee
    If it'll yell at you with something like fatal: Commit 796ad3565eab36a0146c3f3d084306969a5e51ee is a merge but no -m option was given., add -m 1 as follows instead:
    $ git cherry-pick -m1 -x 796ad3565eab36a0146c3f3d084306969a5e51ee
  5. At this point, you'll probably encounter some merge conflicts. You must
    resolve them in to preserve the patch from PR [proxmox] Use proxmoxer_version instead of server API version #6980 as close to the
    original as possible.
  6. Push this branch to your fork on GitHub:
    $ git push origin patchback/backports/stable-6/796ad3565eab36a0146c3f3d084306969a5e51ee/pr-6980
  7. Create a PR, ensure that the CI is green. If it's not — update it so that
    the tests and any other checks pass. This is it!
    Now relax and wait for the maintainers to process your pull request
    when they have some cycles to do reviews. Don't worry — they'll tell you if
    any improvements are necessary when the time comes!

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

@felixfontein
Copy link
Collaborator

@UnderGreen thanks for fixing this!

@patchback
Copy link

patchback bot commented Jul 20, 2023

Backport to stable-7: 💚 backport PR created

✅ Backport PR branch: patchback/backports/stable-7/796ad3565eab36a0146c3f3d084306969a5e51ee/pr-6980

Backported as #6982

🤖 @patchback
I'm built with octomachinery and
my source is open — https://github.com/sanitizers/patchback-github-app.

patchback bot pushed a commit that referenced this pull request Jul 20, 2023
* Use proxmoxer_version instead of server API version

* Add changelog fragment

(cherry picked from commit 796ad35)
@felixfontein
Copy link
Collaborator

Fixing this in stable-6 would require some adjustments. (The original PR was backported there as well: #6845)

@UnderGreen
Copy link
Contributor Author

I will create PR to stable-6 today, no problem 👍

@UnderGreen UnderGreen mentioned this pull request Jul 20, 2023
1 task
UnderGreen added a commit to UnderGreen/community.general that referenced this pull request Jul 20, 2023
…e-collections#6980)

* Use proxmoxer_version instead of server API version

* Add changelog fragment

(cherry picked from commit 796ad35)
@UnderGreen UnderGreen deleted the proxmox_kvm/fix-token-auth branch July 20, 2023 14:51
felixfontein pushed a commit that referenced this pull request Jul 20, 2023
…n instead of server API version (#6984)

* [proxmox] Use proxmoxer_version instead of server API version (#6980)

* Use proxmoxer_version instead of server API version

* Add changelog fragment

(cherry picked from commit 796ad35)

* Update unit tests requirements file

* Add python 2.6 constraint for tests
felixfontein pushed a commit that referenced this pull request Jul 21, 2023
…n instead of server API version (#6982)

[proxmox] Use proxmoxer_version instead of server API version (#6980)

* Use proxmoxer_version instead of server API version

* Add changelog fragment

(cherry picked from commit 796ad35)

Co-authored-by: Sergei Antipov <greendayonfire@gmail.com>
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_utils module_utils plugins plugin (any type)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Proxmox token authentication broken
3 participants