@@ -203,7 +203,7 @@ def fsx_precreate(cluster: Cluster, filesystems: list) -> bool:
203
203
return False
204
204
205
205
206
- def pcluster_create (cluster : Cluster , filesystems : list ):
206
+ def pcluster_create (cluster : Cluster ):
207
207
"""Create a pcluster for a given vlab
208
208
209
209
Args:
@@ -236,22 +236,22 @@ def pcluster_create(cluster: Cluster, filesystems: list):
236
236
237
237
populate_config (cluster = cluster , create_users_args = create_users_args )
238
238
fsx_client = boto3 .client ("fsx" )
239
- for filesystem in filesystems :
240
- if filesystem . get ( "expected" , True ):
241
- fs = get_fsx (
242
- fsx_client = fsx_client ,
243
- fs_name = cluster . name ,
244
- )
245
- if not fs :
246
- raise RuntimeError (f"Filesystem { filesystem } not created when it should have been" )
247
- CONFIG_VALUES ["fsx" ] = {
248
- "Name" : filesystem [ "name " ],
249
- "StorageType " : "FsxLustre " ,
250
- "MountDir " : filesystem [ "mountpoint" ] ,
251
- "FsxLustreSettings" : {"FileSystemId" : fs ["FileSystemId" ]},
252
- }
253
- else :
254
- CONFIG_VALUES ["fsx" ] = {}
239
+ if cluster . include_lustre :
240
+ fs = get_fsx (
241
+ fsx_client = fsx_client ,
242
+ fs_name = cluster . name ,
243
+ )
244
+
245
+ if not fs :
246
+ raise RuntimeError (f"Filesystem { cluster . name } not created when it should have been" )
247
+ CONFIG_VALUES ["fsx" ] = {
248
+ "Name" : next ( tag for tag in fs [ "Tags" ] if tag [ "Key" ] == "Name" )[ "Value " ],
249
+ "MountDir " : "/obi/data " ,
250
+ "StorageType " : "FsxLustre" ,
251
+ "FsxLustreSettings" : {"FileSystemId" : fs ["FileSystemId" ]},
252
+ }
253
+ else :
254
+ CONFIG_VALUES ["fsx" ] = {}
255
255
256
256
pcluster_config = load_pcluster_config (cluster .dev )
257
257
if not cluster .include_lustre :
0 commit comments