Corsinvest / cv4pve-autosnap

Automatic snapshot tool for Proxmox VE
https://www.corsinvest.it/cv4pve
GNU General Public License v3.0
413 stars 51 forks source link

incorrect msg: Storage over 95%, no snapshot taken #59

Closed lifeboy closed 2 years ago

lifeboy commented 2 years ago

What happened?

I created a user (snapshot@pve) with the rights needed: VM.Snapshot, Pool.Allocate, VM.Audit, Datastore.Audit

# /usr/local/bin/cv4pve-autosnap --host=192.168.131.1 --username="snapshot@pve" --password="cameraman" --vmid=104 snap --label="daily" --keep=6
ACTION Snap
VMs:              104
Label:            daily
Keep:             6
State:            False
Timeout:          30000
Timestamp format: yyMMddHHmmss
Max % Storage :   95%
----- POSSIBLE PROBLEM PERMISSION 'Datastore.Audit' -----
----- VM 104 Lxc -----
Skip VM problem storage space out of 95%
Total execution 00:00:00.2640291

Why is there a "POSSIBLE PROBLEM PERMISSION 'Datastore.Audit'" message?

more importantly, I have around 50% free storage in my ceph cluster of around 30TB.

Proxmox 6.4-13

Expected behavior

I expect the snapshots to be made.

Relevant log output

No response

Proxmox VE Version

6.4.13

Version (bug)

1.13.3

Version (working)

No response

On what operating system are you experiencing the issue?

Linux

Pull Request

franklupo commented 2 years ago

Hi, the message "POSSIBLE PROBLEM PERMISSION 'Datastore.Audit'" is show when the result of total space is zero. Your user have a 'Datastore.Audit' permission?

Best regards

lifeboy commented 2 years ago

Here is the role directly from the interface: image

The user has that role.

I'm going to remove it and add it again to see if it works.

lifeboy commented 2 years ago

I recreated it and it still didn't work. Then I changed the user permission to have access to / instead of /vms and that solved the problem.

matze0301 commented 10 months ago

I recreated it and it still didn't work. Then I changed the user permission to have access to / instead of /vms and that solved the problem.

I had the same problem and your solution worked for me too.

Thank You!