无法有效部署Greengrass V2组件

0

【以下的问题经过翻译处理】 环境:以Docker容器形式运行的Greengrass V2 Nucleus(2.9.1)。

我们开发了一个 aws.greengrass.generic 组件,并成功发布了 4 个版本(1.0.0、1.0.1、1.0.2 和 1.0.3)。所有版本均已发布,正确显示在 Greengrass V2 控制台中,并且组件在 S3 存储桶中正确可用。

然而,我们似乎只能成功部署版本1.0.0,其他版本部署都失败了。

2022-11-26T20:19:01.427Z [INFO] (pool-2-thread-47) com.aws.greengrass.componentmanager.ComponentManager: prepare-package-start. {packageIdentifier=<my-component>-v1.0.0}

当我们尝试部署任何较新的版本(例如1.0.3)时,总是会出现以下错误:

java.util.concurrent.ExecutionException: com.aws.greengrass.componentmanager.exceptions.NoAvailableComponentVersionException: No local or cloud component version satisfies the requirements Check whether the version constraints conflict and that the component exists in your AWS account with a version that matches the version constraints. If the version constraints conflict, revise deployments to resolve the conflict. Component <my-component> version constraints: thing/<thing-name> requires =1.0.3.

正如所述,该组件在Greengrass V2控制台中可用,并将组件发布在了S3中。

profile picture
专家
已提问 5 个月前21 查看次数
1 回答
0

【以下的回答经过翻译处理】 你好, 您的配置文档指定了一个特定的平台建构(比如:aarch64,amd64),新的组件是为该平台开发的。当在与配置文档不匹配的平台部署时,将会出现您所看到的错误。

具体而言,您将CPU架构设置为amd64、aarch64。这不是有效的架构。请参考以文档中的设置方式: https://docs.aws.amazon.com/greengrass/v2/developerguide/component-recipe-reference.html#recipe-format:~:text=For%20each%20key%2Dvalue%20pair%2C%20you%20can%20specify%20one%20of%20the%20following%20values%3A

由于你的目标是同时支持amd64和aarch64,建议只需省略architecture,那么该组件将可以在任何Linux系统上部署。 如果你真的想限制为amd64和aarch64,则正确的方法是使用正则表达式:architecture:/amd64 | aarch64/

profile picture
专家
已回答 5 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则