This commit is the result of the squash of the following main commits:
Author: Eric Bollengier <eric@baculasystems.com>
Date: Fri May 17 16:58:03 2019 +0200
Fix #5057 Block prune_volumes() with Director::Autoprune directive
Author: Eric Bollengier <eric@baculasystems.com>
Date: Fri Dec 21 10:11:06 2018 +0100
Add Director:Autoprune directive to control globally the autoprune feature
POOL *pool;
bool pruned;
+ if (!director->AutoPrune) {
+ Dmsg0(100, "AutoPrune globally switched off\n");
+ return;
+ }
+
if (!jcr->client) { /* temp -- remove me */
return;
}
POOL_DBR spr;
+ if (!director->AutoPrune) {
+ Dmsg0(100, "AutoPrune globally switched off\n");
+ return;
+ }
+
Dmsg1(100, "Prune volumes PoolId=%d\n", jcr->jr.PoolId);
if (!jcr->job->PruneVolumes && !jcr->pool->AutoPrune) {
- Dmsg0(100, "AutoPrune not set in Pool.\n");
+ Dmsg0(100, "AutoPrune not set in Pool or Job.\n");
return;
}