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

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

为队列配置存储配置文件

队列的配置包括一份区分大小写的共享文件系统位置名称列表,提交到队列的作业需要访问这些位置。例如,提交到队列的作业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 FSComm FS1 aws deadline update-queue --farm-id $FARM_ID --queue-id $QUEUE2_ID \ --required-file-system-location-names-to-add FSComm FS2

队列的配置还包括允许的存储配置文件列表,这些配置文件适用于提交给该队列的作业以及与该队列关联的队列。队列允许的存储配置文件列表中只允许为队列的所有必需文件系统位置定义文件系统位置的存储配置文件。

如果您提交任务时使用的存储配置文件不在队列允许的存储配置文件列表中,则作业将失败。您可以随时向队列提交没有存储配置文件的作业。标有标签WSAll的工作站配置WS1都有队列所需的文件系统位置(FSCommonFS1Q1。需要允许他们向队列提交作业。同样,工作站WSAll的配置也WS2符合队列的要求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