System fullimage OTA upgrade and greengrass componennt dependencies

0

I have a system running greengrass with various components installed - including SystemManager. The upgrade is upgrading a complete system image using A/B upgrade scheme - however we preserve the greengrass install location between upgrades - so this remains untouched and available after the OTA upgrade, although the complete Kernel and root filesystem have been upgraded. I have noticed that SystemsManager does not always start cleanly after the upgrade, although when removed from the unit deployment, and then re-added it starts successfully. Basically my question is

  • are there/can there be dependencies on greeengrass components on the base system image, for example, packagages which may be installed as part of a component deployment for example ?
  • After initially being installed - how would components handle some dependencies disapearing - would they automatically re-install/deploy ?
  • How would this scenario be handled in a GG environmnet - where the system can be upgraded/replaced whilst preserving the GG deployment state ?
majh
已提问 2 年前272 查看次数
1 回答
1
已接受的回答

Hi @majh,

  1. Greengrass components depend on some system offerings, such as java. Components which you create may have more dependencies including packages installed from apt/yum for example.
  2. When Greengrass starts up (or restarts), all components go through the install phase again before running. If a component is written properly, then it will install all that it needs to work properly at this time.
  3. As long as the Greengrass root directory remains intact, Greengrass should be able to restart and operate normally.

If you're having a specific issue, please do comment with more details. But if you're just asking how things work in general, then I hope this helps.

Cheers,

Michael

AWS
专家
已回答 2 年前
profile pictureAWS
专家
Greg_B
已审核 2 年前
  • Thanks @MichaelDombrowski-AWS, Interesting to know that the components will go through the install step each restart. The particular problem I am having is with SystemManagerAgent in that it appears to be failing the install step - after the OTA upgrade. I also can't see very detailed logs on what exactly was attempted to run from the logs - but these are below. 2022-09-21T23:42:18.128Z [INFO] (Copier) aws.greengrass.SystemsManagerAgent: stdout. INFO Starting agent installation. {scriptName=services.aws.greengrass.SystemsManagerAgent.lifecycle.Install.Script, serviceName=aws.greengrass.SystemsManagerAgent, currentState=NEW} 2022-09-21T23:42:18.856Z [INFO] (Copier) aws.greengrass.SystemsManagerAgent: stdout. ERROR Failed to install agent: snap install: Failed to install snap with output '' and error: exit status 10. {scriptName=services.aws.greengrass.SystemsManagerAgent.lifecycle.Install.Sc ript, serviceName=aws.greengrass.SystemsManagerAgent, currentState=NEW} 2022-09-21T23:42:18.860Z [WARN] (pool-2-thread-20) aws.greengrass.SystemsManagerAgent: shell-runner-error. {scriptName=services.aws.greengrass.SystemsManagerAgent.lifecycle.Install.Script, serviceName=aws.greengrass.SystemsManagerAgent, currentState=NEW, command=["/data/ greengrass/v2/packages/artifacts-unarchived/aws.greengrass.SystemsManage..."]}

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

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

回答问题的准则