Skip to content

Commit

Permalink
[batch] Turn off support for cloudfuse (#12949)
Browse files Browse the repository at this point in the history
This is a mitigation for turning off cloudfuse until we understand why
the unmount is not working properly.
  • Loading branch information
jigold authored Apr 28, 2023
1 parent e9b2ee6 commit e0dbb8b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions batch/batch/front_end/front_end.py
Original file line number Diff line number Diff line change
Expand Up @@ -832,6 +832,7 @@ async def _create_jobs(userdata: dict, job_specs: dict, batch_id: int, update_id
db: Database = app['db']
file_store: FileStore = app['file_store']
user = userdata['username']
is_developer = userdata['is_developer']

# restrict to what's necessary; in particular, drop the session
# which is sensitive
Expand Down Expand Up @@ -1063,6 +1064,10 @@ async def _create_jobs(userdata: dict, job_specs: dict, batch_id: int, update_id
if cloud == 'azure' and all(envvar['name'] != 'AZURE_APPLICATION_CREDENTIALS' for envvar in spec['env']):
spec['env'].append({'name': 'AZURE_APPLICATION_CREDENTIALS', 'value': '/gsa-key/key.json'})

cloudfuse = spec.get('gcsfuse') or spec.get('cloudfuse')
if not is_developer and user not in ('ci', 'test', 'test-dev') and cloudfuse is not None and len(cloudfuse) > 0:
raise web.HTTPBadRequest(reason='cloudfuse requests are temporarily not supported.')

if spec.get('mount_tokens', False):
secrets.append(
{
Expand Down

0 comments on commit e0dbb8b

Please sign in to comment.