awslabs / aws-greengrass-labs-certificate-rotator

Greengrass component and companion cloud backend for rotating the core device certificate and private key
Apache License 2.0
11 stars 2 forks source link

Rollback does not occur when using Nucleus versions 2.10 or later #21

Closed gregbreen closed 10 months ago

gregbreen commented 10 months ago

Nucleus 2.10 upgraded to MQTT5 amongst other things. Prior to 2.10, calls to subscribe_to_iot_core would throw a awsiot.greengrasscoreipc.model.ServiceError exception if Greengrass was not connected to IoT Core. This was used as a rollback trigger in the case of not being able to subscribe when the component starts up after swapping to the new certificate.

When Nucleus 2.10 or later is used, the subscribe_to_iot_core call blocks until Greengrass eventually connects. The component needs a different way (not an exception from that call) to determine that the subscribe is not working.