duedil-ltd/portainer

Bad exception handling in the scheduler

tarnfeld opened this issue · 0 comments

Sometimes if an exception is thrown too early in the scheduler thread, the framework doesn't exit properly and hangs (I think it's because it doesn't mark the build as failed correctly).

2015-09-11 10:50:06,286[portainer.scheduler] Uploading context (22181 bytes)
  0% |                                                                                             |
100% |#############################################################################################|
Exception in thread Thread-3:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 504, in run
    self.__target(*self.__args, **self.__kwargs)
  File "portainer/app/scheduler.py", line 179, in _handle_offers
    role=role
  File "portainer/app/scheduler.py", line 335, in _prepare_task
    raise ValueError("No REPOSITORY given for %s", path)
ValueError: ('No REPOSITORY given for %s', '/opt/dockerfiles/Dockerfile')