Skip to content

Commit 9b9b7bf

Browse files
committed
Only in dev mode, duh
1 parent 84b38d6 commit 9b9b7bf

File tree

1 file changed

+20
-19
lines changed

1 file changed

+20
-19
lines changed

hpc_provisioner/src/hpc_provisioner/pcluster_manager.py

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -207,30 +207,31 @@ def pcluster_create(
207207
cluster_name, options["keyname"], vlab_id, project_id, create_users_args, benchmark
208208
)
209209

210-
projects_fs = get_fsx(
211-
fsx_client=fsx_client,
212-
shared=True,
213-
fs_name="projects",
214-
vlab_id=vlab_id,
215-
project_id=project_id,
216-
)
217-
if not projects_fs:
218-
projects_fs = create_fsx(
210+
if dev:
211+
projects_fs = get_fsx(
219212
fsx_client=fsx_client,
220-
fs_name="projects",
221-
bucket=get_sbonexusdata_bucket(),
222213
shared=True,
214+
fs_name="projects",
223215
vlab_id=vlab_id,
224216
project_id=project_id,
225217
)
226-
CONFIG_VALUES["projects_fsx"] = {
227-
"Name": next(
228-
tag["Value"] for tag in projects_fs["FileSystem"]["Tags"] if tag["Key"] == "Name"
229-
),
230-
"StorageType": "FsxLustre",
231-
"MountDir": "/sbo/data/scratch",
232-
"FsxLustreSettings": {"FileSystemId": projects_fs["FileSystem"]["FileSystemId"]},
233-
}
218+
if not projects_fs:
219+
projects_fs = create_fsx(
220+
fsx_client=fsx_client,
221+
fs_name="projects",
222+
bucket=get_sbonexusdata_bucket(),
223+
shared=True,
224+
vlab_id=vlab_id,
225+
project_id=project_id,
226+
)
227+
CONFIG_VALUES["projects_fsx"] = {
228+
"Name": next(
229+
tag["Value"] for tag in projects_fs["FileSystem"]["Tags"] if tag["Key"] == "Name"
230+
),
231+
"StorageType": "FsxLustre",
232+
"MountDir": "/sbo/data/scratch",
233+
"FsxLustreSettings": {"FileSystemId": projects_fs["FileSystem"]["FileSystemId"]},
234+
}
234235

235236
pcluster_config = load_pcluster_config(dev)
236237
pcluster_config["Tags"] = populate_tags(pcluster_config, vlab_id, project_id)

0 commit comments

Comments
 (0)