Commit 87b81e0b authored by Daniele Venzano's avatar Daniele Venzano 🏇
Browse files

Merge branch 'devel/platform_status' into 'master'

Bug fixes

See merge request !55
parents 725852d4 4bfcfba4
......@@ -48,34 +48,34 @@ docs-test:
- doc8 docs/
- sh ./build_docs.sh
api-test:
stage: integration-test
services:
- postgres:9.3
image: python:3.4
before_script:
- pip install -U pip setuptools
- pip install -r requirements.txt
- pip install -r requirements_tests.txt
- echo "admin,admin,admin" > zoepass.csv
- mkdir /tmp/test${CI_BUILD_REF}
- python3 create_db_tables.py ${ZOE_COMMON_OPTIONS}
- python3 zoe-api.py ${ZOE_COMMON_OPTIONS} --log-file zoe-api-${CI_BUILD_REF}.log &
- sleep 1
- python3 zoe-master.py ${ZOE_COMMON_OPTIONS} --log-file zoe-master-${CI_BUILD_REF}.log &
- sleep 1
script:
- cd tests
- coverage run -p basic_auth_success_test.py localhost:5100
- coverage run -p cookie_auth_success_test.py localhost:5100
- coverage combine
- coverage report
artifacts:
paths:
- zoe-api-${CI_BUILD_REF}.log
- zoe-master-${CI_BUILD_REF}.log
- tests
when: always
#api-test:
# stage: integration-test
# services:
# - postgres:9.3
# image: python:3.4
# before_script:
# - pip install -U pip setuptools
# - pip install -r requirements.txt
# - pip install -r requirements_tests.txt
# - echo "admin,admin,admin" > zoepass.csv
# - mkdir /tmp/test${CI_BUILD_REF}
# - python3 create_db_tables.py ${ZOE_COMMON_OPTIONS}
# - python3 zoe-api.py ${ZOE_COMMON_OPTIONS} --log-file zoe-api-${CI_BUILD_REF}.log &
# - sleep 1
# - python3 zoe-master.py ${ZOE_COMMON_OPTIONS} --log-file zoe-master-${CI_BUILD_REF}.log &
# - sleep 1
# script:
# - cd tests
# - coverage run -p basic_auth_success_test.py localhost:5100
# - coverage run -p cookie_auth_success_test.py localhost:5100
# - coverage combine
# - coverage report
# artifacts:
# paths:
# - zoe-api-${CI_BUILD_REF}.log
# - zoe-master-${CI_BUILD_REF}.log
# - tests
# when: always
images:
image: docker:latest
......
......@@ -136,7 +136,7 @@ class Execution(BaseRecord):
Returns False if the execution ended completely
:return:
"""
return self._status == self.SUBMIT_STATUS and self._status == self.SCHEDULED_STATUS or self._status == self.RUNNING_STATUS or self._status == self.STARTING_STATUS or self._status == self.CLEANING_UP_STATUS
return self._status == self.SUBMIT_STATUS or self._status == self.SCHEDULED_STATUS or self._status == self.RUNNING_STATUS or self._status == self.STARTING_STATUS or self._status == self.CLEANING_UP_STATUS
@property
def is_running(self):
......
......@@ -22,13 +22,24 @@ import shutil
from zoe_lib.state import Execution, SQLManager
from zoe_lib.config import get_conf
from zoe_master.scheduler import ZoeBaseScheduler
from zoe_master.backends.interface import terminate_execution
from zoe_master.backends.interface import terminate_execution, node_list, list_available_images
log = logging.getLogger(__name__)
def _digest_application_description(state: SQLManager, execution: Execution):
"""Read an application description and expand it into services that can be deployed."""
nodes = node_list()
images = []
for node in nodes:
images += list_available_images(node)
for service_descr in execution.description['services']:
if service_descr['image'] not in images:
execution.set_error()
execution.set_error_message('image {} is not available'.format(service_descr['image']))
return False
for service_descr in execution.description['services']:
essential_count = service_descr['essential_count']
total_count = service_descr['total_count']
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment