Skip to content

Commit f773cde

Browse files
developerinlondoncarmstrong
authored andcommitted
fix(controller/scheduler): only announce 'web' and 'cmd' processes
Currently the nginx routers gets announced all types of processes. This causes problems as both non-web and web processes are mixed together by the router. The router should only be serving 'web' processes for buildpacks or 'cmd' processes for dockerfiles. This fix stops announcing any processes that does not have '.web' or '.cmd'. closes #1256
1 parent 546d2bb commit f773cde

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

controller/scheduler/coreos.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,12 @@ def create(self, name, image, command='', template=None):
5656
env = self.env.copy()
5757
self._create_container(name, image, command, template or CONTAINER_TEMPLATE, env)
5858
self._create_log(name, image, command, LOG_TEMPLATE, env)
59-
self._create_announcer(name, image, command, ANNOUNCE_TEMPLATE, env)
59+
60+
# only announce web and cmd processes
61+
if command.lower() in ['web', 'cmd']:
62+
self._create_announcer(name, image, command, ANNOUNCE_TEMPLATE, env)
63+
else:
64+
logger.info '-- skipping announcer for '+name+ '('+command+')'
6065

6166
def _create_container(self, name, image, command, template, env):
6267
l = locals().copy()

0 commit comments

Comments
 (0)