Skip to content

(Nucleus (Provisioning)): Config for failing-fast when failing provisioning #1729

@ChilloManiac

Description

@ChilloManiac

Feature Description
Allow failing fast (Exiting GG completely) if provisioning fails for any reason.

Use Case
I'm building an OS image for use in physical devices. I use the fleetprovisioning plugin for this. We utlizise the provisioning hook to do some additional validation of the device (For example, it being registered with us). This means that the device may fail to provision, because it hasn't been properly imported in our platform.

In this case i would like to use SystemD to handle retrying etc. But currently Greengrass will just soldier on, without provisioning, and doing nothing unless the device is rebooted which triggers a systemd retry.

Proposed Solution
Add config option to Nucleus that signals the want for it to exit in this case. In the codebase change the return here:
https://github.com/aws-greengrass/aws-greengrass-nucleus/blob/main/src/main/java/com/aws/greengrass/lifecyclemanager/KernelLifecycle.java#L230-L232

To be a conditional on wether to rethrow or return, depending on the config.

Other
My current workaround is to monitor the contents of /greengrass/v2/config/effectiveConfig.yaml for the system.thingName as that is only updated if the provisioning doesn't fail/return as above

  • 👋 I may be able to implement this feature request
  • ⚠️ This feature might incur a breaking change

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions