Skip to content
This repository was archived by the owner on Oct 22, 2021. It is now read-only.

Commit c89962e

Browse files
committed
Merge branch 'master' into v7.x
2 parents 967bc08 + bf5b9b8 commit c89962e

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

pkg/bosh/bpmconverter/containers.go

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,17 @@ func (c *ContainerFactoryImpl) JobsToContainers(
2929
}
3030

3131
// wait for that many drain stamps to appear
32-
drainStampCount := strconv.Itoa(len(jobs))
32+
n := 0
33+
for _, job := range jobs {
34+
bpmConfig, ok := c.bpmConfigs[job.Name]
35+
if !ok {
36+
return nil, errors.Errorf("failed to lookup bpm config for bosh job '%s' in bpm configs", job.Name)
37+
}
38+
if len(bpmConfig.Processes) > 0 {
39+
n++
40+
}
41+
}
42+
drainStampCount := strconv.Itoa(n)
3343

3444
// each job can produce multiple BPM process containers
3545
for _, job := range jobs {
@@ -42,6 +52,10 @@ func (c *ContainerFactoryImpl) JobsToContainers(
4252
if !ok {
4353
return nil, errors.Errorf("failed to lookup bpm config for bosh job '%s' in bpm configs", job.Name)
4454
}
55+
if len(bpmConfig.Processes) < 1 {
56+
// we won't create any containers for this job
57+
continue
58+
}
4559

4660
jobDisks := bpmDisks.Filter("job_name", job.Name)
4761

0 commit comments

Comments
 (0)