greengrass.service.template: add After=systemd-time-wait-sync.service#1677
greengrass.service.template: add After=systemd-time-wait-sync.service#1677thomas-roos wants to merge 1 commit intoaws-greengrass:mainfrom
Conversation
1a735b2 to
3dbff9f
Compare
|
Binary incompatibility detected for commit 3f37068. com.aws.greengrass.lifecyclemanager.KernelAlternatives is binary incompatible and is source incompatible because of METHOD_LESS_ACCESSIBLE Produced by binaryCompatability.py |
|
Unit Tests Coverage Report
Minimum allowed coverage is Generated by 🐒 cobertura-action against 3f37068 |
|
Integration Tests Coverage Report
Minimum allowed coverage is Generated by 🐒 cobertura-action against 3f37068 |
…ervice This will allow if systemd-time-wait-sync.service is enabled to wait for a synced clock. If this is not enabled it will not wait. Especially in systems without a RTC (like RPi) it will take some time after boot till NTP will sync clock and if Greengrass is already started this time jump will cause issues.
9120f92 to
3f37068
Compare
| [Unit] | ||
| Description=Greengrass Core | ||
| After=network.target | ||
| After=systemd-time-wait-sync.service |
There was a problem hiding this comment.
Should this be a weaker dependency type such as Wants for example? Doc link
There was a problem hiding this comment.
Right, this is NOT adding a dependency. Just a order if available - see here: https://serverfault.com/questions/812584/in-systemd-whats-the-difference-between-after-and-requires and as I understand the shared doc section you shared.
There was a problem hiding this comment.
To use different words - this will cause GG to start after the clock is synced if such a service is present, if not it don't care. If sync fails it will delayed max 90s and then start (hopefully still successfully without a accurate clock)
This will allow if systemd-time-wait-sync.service is enabled to wait for a synced clock. If this is not enabled it will not wait. Especially in systems without a RTC (like RPi) it will take some time after boot till NTP will sync clock and if Greengrass is already started this time jump will cause issues.
Issue #, if available:
Description of changes:
Why is this change necessary:
How was this change tested:
Any additional information or context required to review the change:
Documentation Checklist:
Compatibility Checklist:
any deprecated method or type.
Refer to Compatibility Guidelines for more information.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.