Commit fa5030ab authored by Daniele Venzano's avatar Daniele Venzano

Fix labels in ZApp manifests

parent be064a91
......@@ -96,8 +96,12 @@ class ZAppStartWeb(ZoeWebRequestHandler):
exec_name = self.get_argument('exec_name')
app_descr = self._set_parameters(zapp.zoe_description, zapp.parameters, self.current_user.role)
for service in app_descr['services']:
service.labels.append(zapp.labels)
if len(zapp.labels) > 0:
for service in app_descr['services']:
if 'labels' in service:
service['labels'].append(zapp.labels)
else:
service['labels'] = zapp.labels
try:
self.get_argument('download_json')
......
......@@ -39,14 +39,13 @@ def gen_environment(execution: Execution, service: Service, env_subst_dict: Dict
env_list.append(('EXECUTION_ID', str(execution.id)))
env_list.append(('DEPLOY_NAME', get_conf().deployment_name))
env_list.append(('UID', execution.owner.fs_uid))
env_list.append(('GID', get_conf().fs_group_id))
env_list.append(('USER', execution.owner.username))
env_list.append(('ZOE_UID', execution.owner.fs_uid))
env_list.append(('ZOE_GID', get_conf().fs_group_id))
env_list.append(('ZOE_USER', execution.owner.username))
env_list.append(('SERVICE_NAME', service.name))
wk_vol = ZoeFSWorkspace().get(execution.owner)
env_list.append(('ZOE_WORKSPACE', wk_vol.mount_point))
env_list.append(('HOME', wk_vol.mount_point))
return env_list
......
......@@ -106,7 +106,7 @@ class DockerStateSynchronizer(threading.Thread):
}
self.host_stats[host_config.name].service_stats = stats
self.host_stats[host_config.name].images = []
tmp_images = []
for dk_image in my_engine.list_images():
image = {
'id': dk_image.attrs['Id'],
......@@ -117,7 +117,8 @@ class DockerStateSynchronizer(threading.Thread):
if name[-7:] == ':latest': # add an image with the name without 'latest' to fake Docker image lookup algorithm
image['names'].append(name[:-7])
break
self.host_stats[host_config.name].images.append(image)
tmp_images.append(image)
self.host_stats[host_config.name].images = tmp_images
sleep_time = CHECK_INTERVAL - (time.time() - time_start)
if sleep_time <= 0:
......
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