Skip to content
This repository has been archived by the owner on May 27, 2024. It is now read-only.

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
vktrrdk committed Apr 23, 2020
2 parents a87c93a + 0d2e2a2 commit 574c4ee
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
17 changes: 17 additions & 0 deletions VirtualMachineService/VirtualMachineHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -1018,6 +1018,19 @@ def start_server_with_custom_key(
volume_ids_path_new=volume_ids_path_new,
volume_ids_path_attach=volume_ids_path_attach,
)
volume_ids = []
volumes = []

if volume_ids_path_new:
volume_ids.extend([vol["openstack_id"] for vol in volume_ids_path_new])
if volume_ids_path_attach:
volume_ids.extend(
[vol["openstack_id"] for vol in volume_ids_path_attach]
)
for id in volume_ids:
volumes.append(self.conn.get_volume_by_id(id=id))
self.logger.info(volumes)


try:
private_key = key_creation["private_key"]
Expand All @@ -1031,6 +1044,7 @@ def start_server_with_custom_key(
network=[network.id],
key_name=servername,
userdata=init_script,
volumes=volumes,
meta=metadata,
availability_zone=self.AVAIALABILITY_ZONE,
security_groups=self.DEFAULT_SECURITY_GROUPS + custom_security_groups,
Expand Down Expand Up @@ -1763,10 +1777,13 @@ def get_cluster_status(self, cluster_id):


def bibigrid_available(self):
self.logger.info("Checking if Bibigrid is available")
if not self.BIBIGRID_URL:
self.logger.info("Bibigrid Url is not set")
return False
try:
self.get_clusters_info()
self.logger.info("Bibigrid is available")
return True
except Exception:
self.logger.exception("Bibigrid is offline")
Expand Down
8 changes: 4 additions & 4 deletions VirtualMachineService/config/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ openstack_connection:

bibigrid:
# Url for Bibigrid API
bibigrid_url: https://172.21.0.1:8443/bibigrid/
sub_network: portalexternalsubnetwork
bibigrid_modes:
- slurm
bibigrid_url: https://172.21.0.1:8443/bibigrid/
sub_network: portalexternalsubnetwork
bibigrid_modes:
- slurm

forc:
forc_url: https://proxy-dev.bi.denbi.de:5000/
Expand Down

0 comments on commit 574c4ee

Please sign in to comment.