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 ?
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
レビュー済み 1年前
  • 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..."]}

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ