Skip to content

Commit

Permalink
Merge pull request #6 from anthonymq/fix/efs-volumes
Browse files Browse the repository at this point in the history
Fix EFS volumes if already exists
  • Loading branch information
mxab authored Feb 29, 2024
2 parents 8567f3e + 3965bac commit e91f521
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions jupyterhub_nomad_spawner/nomad/nomad_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,11 @@ async def create_volume(
json=create_volume_json,
)
if result.is_error:
raise NomadException(
"Error registering volume."
+ f" status code: {result.status_code}, content: {result.text}"
)
if 'ErrorCode: "AccessPointAlreadyExists"' not in result.text:
raise NomadException(
"Error registering volume."
+ f" status code: {result.status_code}, content: {result.text}"
)
self.log.info("Created volume (status code: %d)", result.status_code)

async def delete_volume(self, id: str):
Expand Down

0 comments on commit e91f521

Please sign in to comment.