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
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.yamlfor thesystem.thingNameas that is only updated if the provisioning doesn't fail/return as above