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 Answer
1
Accepted Answer

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

answered 2 months ago
profile picture
EXPERT
Greg_B
reviewed 2 months ago
  • 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..."]}

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions