Closed jdreffein closed 4 months ago
Thanks for your contribution! I really like the idea of ignoring complete pools and might extend this parameter to other checks where it makes sense. I took the liberty and pushed a fixup commit in order to simplify the lookup and follow the generel codying style. Feel free to squash with your commit and push the branch again. After that I can merge the PR.
yes, i will do that tomorrow, was a long day. sorry i didn't use black and ruff at first. maybe cause code is working here. just getting used to python.
No worries, especially if this was your first Python contribution. Have a nice evening!
Thank you for your appreciation and linting/enhancing the contributed code.
The next contribution would be a check for cluster memory. But it has be to generalized first because it is currently customized to our environment.
sorry, i got some things messed up with git. my latest commit should be the final working
You can use git commit --amend to edit the commit message and remove the fixups
@jdreffein I've squashed the commit into one and merged it into main branch. Thanks for your contribution!
P.S: Greetings to Niclas!
With this PR I introduce the possibility of ignoring VMs or containers assigned to one or many pools.
Sometimes you may have some vms for testing or commissioning, that don't have to be backed up.
With the new option --ignore-pools one or more pools can be specified. All VMIDs in those pools will be removed from the list of VMIDs not configured in any backup job that are reported by the checked node (cluster/backup-info/not-backed-up), so only VMIDs not ignored by this option will be reported by the check.
The name of the pools are separated with a comma. So both of these examples are valid --ignore-pools testpool --ignore-pools test,implement
This option also provides a solution to use the backup check when VMs are backed up via api/vzdump and not scheduled backup jobs of the cluster.