View a markdown version of this page

为队列配置存储配置文件 - 截止日期云

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

为队列配置存储配置文件

队列的配置包括提交到队列的作业需要访问的共享文件系统位置的区分大小写的名称列表。例如,提交到队列的作业Q1需要文件系统位置FSCommon和。FS1提交到队列的作业Q2需要文件系统位置FSCommonFS2

要将队列的配置设置为需要这些文件系统位置,请使用以下脚本:

# Change the value of FARM_ID to your farm's identifier FARM_ID=farm-00112233445566778899aabbccddeeff # Change the value of QUEUE1_ID to queue Q1's identifier QUEUE1_ID=queue-00112233445566778899aabbccddeeff # Change the value of QUEUE2_ID to queue Q2's identifier QUEUE2_ID=queue-00112233445566778899aabbccddeeff aws deadline update-queue --farm-id $FARM_ID --queue-id $QUEUE1_ID \ --required-file-system-location-names-to-add FSCommon FS1 aws deadline update-queue --farm-id $FARM_ID --queue-id $QUEUE2_ID \ --required-file-system-location-names-to-add FSCommon FS2

队列的配置还包括允许的存储配置文件列表,这些配置文件适用于提交给该队列的任务以及与该队列相关的队列。只有为队列所需的所有文件系统位置定义文件系统位置的存储配置文件才允许出现在队列的允许存储配置文件列表中。

如果您使用不在队列允许的存储配置文件列表中的存储配置文件提交任务,则任务将失败。您可以随时将没有存储配置文件的任务提交到队列。工作站配置WSAllWS1均标有队列所需的文件系统位置(FSCommonFS1Q1。他们需要被允许向队列提交任务。同样,工作站配置WSAllWS2满足队列要求Q2。他们需要被允许向该队列提交任务。更新两个队列配置,以允许使用以下脚本使用这些存储配置文件提交作业:

# Change the value of WSALL_ID to the identifier of the WSAll storage profile WSALL_ID=sp-00112233445566778899aabbccddeeff # Change the value of WS1 to the identifier of the WS1 storage profile WS1_ID=sp-00112233445566778899aabbccddeeff # Change the value of WS2 to the identifier of the WS2 storage profile WS2_ID=sp-00112233445566778899aabbccddeeff aws deadline update-queue --farm-id $FARM_ID --queue-id $QUEUE1_ID \ --allowed-storage-profile-ids-to-add $WSALL_ID $WS1_ID aws deadline update-queue --farm-id $FARM_ID --queue-id $QUEUE2_ID \ --allowed-storage-profile-ids-to-add $WSALL_ID $WS2_ID

如果将WS2存储配置文件添加到允许的队列存储配置文件列表中,Q1则会失败:

$ aws deadline update-queue --farm-id $FARM_ID --queue-id $QUEUE1_ID \ --allowed-storage-profile-ids-to-add $WS2_ID An error occurred (ValidationException) when calling the UpdateQueue operation: Storage profile id: sp-00112233445566778899aabbccddeeff does not have required file system location: FS1

原因是WS2存储配置文件不包含该队列Q1所需的文件系统位置FS1的定义。

将配置为不在队列允许的存储配置文件列表中的存储配置文件关联队列也会失败。例如:

$ aws deadline create-queue-fleet-association --farm-id $FARM_ID \ --fleet-id $FLEET_ID \ --queue-id $QUEUE1_ID An error occurred (ValidationException) when calling the CreateQueueFleetAssociation operation: Mismatch between storage profile ids.

要修复错误,请将名为WorkerConfig的存储配置文件添加到队列Q1和队列允许的存储配置文件列表中Q2。然后,将队列与这些队列关联起来,这样队列中的工作人员就可以从两个队列中运行作业。

# Change the value of FLEET_ID to your fleet's identifier FLEET_ID=fleet-00112233445566778899aabbccddeeff # Change the value of WORKER_CFG_ID to your storage profile named WorkerCfg WORKER_CFG_ID=sp-00112233445566778899aabbccddeeff aws deadline update-queue --farm-id $FARM_ID --queue-id $QUEUE1_ID \ --allowed-storage-profile-ids-to-add $WORKER_CFG_ID aws deadline update-queue --farm-id $FARM_ID --queue-id $QUEUE2_ID \ --allowed-storage-profile-ids-to-add $WORKER_CFG_ID aws deadline create-queue-fleet-association --farm-id $FARM_ID \ --fleet-id $FLEET_ID \ --queue-id $QUEUE1_ID aws deadline create-queue-fleet-association --farm-id $FARM_ID \ --fleet-id $FLEET_ID \ --queue-id $QUEUE2_ID