Skip to content

Commit e6d239a

Browse files
authored
Merge pull request #1156 from zekemorton/planner_init_fix
Add planner reinitialization for elasticity
2 parents 561ec6f + 04835ad commit e6d239a

File tree

4 files changed

+156
-1
lines changed

4 files changed

+156
-1
lines changed

resource/traversers/dfu_impl.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1132,7 +1132,12 @@ int dfu_impl_t::prime_pruning_filter (const subsystem_t &s, vtx_t u,
11321132
}
11331133
}
11341134

1135-
if (!avail.empty () && !types.empty ()) {
1135+
if (avail.empty () || types.empty ()) {
1136+
rc = 0;
1137+
goto done;
1138+
}
1139+
1140+
if ( (*m_graph)[u].idata.subplans[s] == NULL) {
11361141
errno = 0;
11371142
planner_multi_t *p = NULL;
11381143
if (!(p = subtree_plan (u, avail, types)) ) {
@@ -1141,6 +1146,9 @@ int dfu_impl_t::prime_pruning_filter (const subsystem_t &s, vtx_t u,
11411146
goto done;
11421147
}
11431148
(*m_graph)[u].idata.subplans[s] = p;
1149+
} else {
1150+
planner_multi_update ((*m_graph)[u].idata.subplans[s], &avail[0],
1151+
&types[0], types.size ());
11441152
}
11451153
rc = 0;
11461154
done:
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
find sched-now=free
2+
match allocate @TEST_SRCDIR@/data/resource/jobspecs/elastic/test-ma-node.yaml
3+
match allocate_orelse_reserve @TEST_SRCDIR@/data/resource/jobspecs/elastic/test-ma-node.yaml
4+
find status=up
5+
find sched-now=allocated
6+
find sched-future=reserved
7+
match allocate @TEST_SRCDIR@/data/resource/jobspecs/elastic/test-ma-node.yaml
8+
attach @TEST_SRCDIR@/data/resource/jgfs/elastic/node-add-test.json
9+
find status=up
10+
find sched-now=allocated
11+
find sched-future=reserved
12+
find sched-now=free
13+
match allocate @TEST_SRCDIR@/data/resource/jobspecs/elastic/test-ma-node.yaml
14+
find status=up
15+
find sched-now=allocated
16+
find sched-future=reserved
17+
find sched-now=free
18+
cancel 1
19+
match allocate @TEST_SRCDIR@/data/resource/jobspecs/elastic/test-ma-node.yaml
20+
find status=up
21+
find sched-now=allocated
22+
find sched-future=reserved
23+
match allocate @TEST_SRCDIR@/data/resource/jobspecs/elastic/test-ma-node.yaml
24+
match allocate_orelse_reserve @TEST_SRCDIR@/data/resource/jobspecs/elastic/test-ma-node.yaml
25+
find status=up
26+
find sched-now=allocated
27+
find sched-future=reserved
28+
quit

0 commit comments

Comments
 (0)