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

Commit

Permalink
Merge branch 'master' into v7.x
Browse files Browse the repository at this point in the history
  • Loading branch information
Mario Manno committed Apr 22, 2021
2 parents 967bc08 + bf5b9b8 commit c89962e
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion pkg/bosh/bpmconverter/containers.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,17 @@ func (c *ContainerFactoryImpl) JobsToContainers(
}

// wait for that many drain stamps to appear
drainStampCount := strconv.Itoa(len(jobs))
n := 0
for _, job := range jobs {
bpmConfig, ok := c.bpmConfigs[job.Name]
if !ok {
return nil, errors.Errorf("failed to lookup bpm config for bosh job '%s' in bpm configs", job.Name)
}
if len(bpmConfig.Processes) > 0 {
n++
}
}
drainStampCount := strconv.Itoa(n)

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

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

Expand Down

0 comments on commit c89962e

Please sign in to comment.