Skip to content

Commit

Permalink
dird: Resource edits get lost depending on order
Browse files Browse the repository at this point in the history
When a user gives an explicit pool to use we should not apply any pool
overrides anymore.

Fixes #689:  Interactive job modification not working as expected,
             resource edits get lost depending on mod order
  • Loading branch information
Marco van Wieringen committed Aug 19, 2016
1 parent e3175dc commit 8063e75
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/dird/ua.h
Expand Up @@ -172,6 +172,7 @@ class RUN_CTX {
int Priority;
int files;
bool level_override;
bool pool_override;
bool spool_data;
bool accurate;
bool ignoreduplicatecheck;
Expand Down
3 changes: 2 additions & 1 deletion src/dird/ua_run.c
Expand Up @@ -600,7 +600,7 @@ int modify_job_parameters(UAContext *ua, JCR *jcr, RUN_CTX &rc)
select_job_level(ua, jcr);
switch (jcr->getJobType()) {
case JT_BACKUP:
if (!jcr->is_JobLevel(L_VIRTUAL_FULL)) {
if (!rc.pool_override && !jcr->is_JobLevel(L_VIRTUAL_FULL)) {
apply_pool_overrides(jcr, true);
rc.pool = jcr->res.pool;
rc.level_override = true;
Expand Down Expand Up @@ -691,6 +691,7 @@ int modify_job_parameters(UAContext *ua, JCR *jcr, RUN_CTX &rc)
if (rc.pool) {
jcr->res.pool = rc.pool;
rc.level_override = false;
rc.pool_override = true;
Dmsg1(100, "Set new pool=%s\n", jcr->res.pool->name());
goto try_again;
}
Expand Down

0 comments on commit 8063e75

Please sign in to comment.