Skip to content

Conversation

@LordSokaar
Copy link

- CIFS authentication bug because no username, password and domain are transmited to proxmoxer. Giving authentication informations resolve the bug.
- Subdir feature was not present
SUMMARY
  • Makes CIFS storage shares creation working.
  • Add subdir feature enable
  • Documentation modified

Fixes : #213

ISSUE TYPE
  • Bugfix Pull Request
  • Docs Pull Request
  • Feature Pull Request
COMPONENT NAME

modules.proxmox_storage

ADDITIONAL INFORMATION
  • username, password and domain were taken as parametter but never used. Share authentication were always down. Bug confirmed by using Burp as proxy. No mater username password given in yaml, they were not transmitted to the API. Now it is.
  • subdir is in API but not used. Feature present for other connexions type then i added (because i use it)
changed: [localhost] => (item=bootable-images) => {
    "ansible_facts": {
        "discovered_interpreter_python": "/mnt/d/repo_git/maison/ansible/playbooks/proxmox/.venv/bin/python3.12"
    },
    "ansible_loop_var": "item",
    "changed": true,
    "invocation": {
        "module_args": {
            "api_host": "192.168.1.206",
            "api_password": null,
            "api_port": 8006,
            "api_token_id": "florian",
            "api_token_secret": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
            "api_user": "florian@pve",
            "cephfs_options": null,
            "cifs_options": {
                "domain": null,
                "password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
                "server": "192.168.1.123",
                "share": "proxmox",
                "smb_version": "2.0",
                "subdir": "/bootable-images",
                "username": "proxmox"
            },
            "content": [
                "images"
            ],
            "dir_options": null,
            "iscsi_options": null,
            "name": "bootable-images",
            "nfs_options": null,
            "nodes": [
                "proxmox4"
            ],
            "pbs_options": null,
            "state": "present",
            "type": "cifs",
            "validate_certs": false,
            "zfspool_options": null
        }
    },
    "item": {
        "content": [
            "images"
        ],
        "name": "bootable-images",
        "server": "192.168.1.123",
        "share": "proxmox",
        "smb_version": "2.0",
        "subdir": "/bootable-images"
    },
    "msg": "Storage 'bootable-images' created successfully."
}

PLAY RECAP ********************************************************************************************************************************************************************************************************************************************************************
localhost                  : ok=1    changed=1    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0

    - CIFS authentication bug because no username, password and domain are transmited to proxmoxer. Giving authentication informations resolve the bug.
    - Subdir feature was not present
@LordSokaar LordSokaar force-pushed the fix-cifs-storage-issue branch from 9391de2 to 92a599c Compare November 13, 2025 00:18
@LordSokaar
Copy link
Author

Just added corrections for the linter to have spaces as multiple of 4. Everything seems ok.

@IamLunchbox
Copy link
Contributor

And you will need to add a changelog fragment :)

Otherwise CI will not include this change in the release changelog.

@LordSokaar
Copy link
Author

And you will need to add a changelog fragment :)

Otherwise CI will not include this change in the release changelog.

Added :-) !
I'm noob in contributions, thanks for your indication !
Is there something else to add to be perfectly clean?

Copy link
Collaborator

@Thulium-Drake Thulium-Drake left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but please check the samples for making changelogs 😇

@@ -0,0 +1,4 @@
bugfixes:
- proxmox_storage - fixed CIFS authentication by sending username and password parameters to proxmoxer.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for documenting your changes! Please see https://github.com/ansible-collections/community.proxmox/blob/main/CONTRIBUTING.md for some guidance with regards to formatting ;-)

Apart from that you're good to go!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(oh, and all the supported sections are also mentioned on that document)

@codecov
Copy link

codecov bot commented Nov 15, 2025

Codecov Report

❌ Patch coverage is 0% with 15 lines in your changes missing coverage. Please review.
✅ Project coverage is 66.30%. Comparing base (9a176e2) to head (4984c81).

Files with missing lines Patch % Lines
plugins/modules/proxmox_storage.py 0.00% 15 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #214      +/-   ##
==========================================
- Coverage   66.43%   66.30%   -0.14%     
==========================================
  Files          73       73              
  Lines        7437     7452      +15     
  Branches     1404     1409       +5     
==========================================
  Hits         4941     4941              
- Misses       2264     2279      +15     
  Partials      232      232              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

proxmox_storage does not authenticate

3 participants