aws / amazon-ssm-agent

An agent to enable remote management of your EC2 instances, on-premises servers, or virtual machines (VMs).
https://aws.amazon.com/systems-manager/
Apache License 2.0
1.03k stars 323 forks source link

Add After and Wants dependancies on chronyd.service to systemd unit file #546

Open FireballDWF opened 7 months ago

FireballDWF commented 7 months ago

Please add "After" and "Wants" dependencies on the chronyd.service to the amazon-ssm-agent.service unit file to prevent errors like

2023-11-07 00:48:23 ERROR [CredentialRefresher] Retrieve credentials produced error: unexpected error getting instance profile role credentials or calling UpdateInstanceInformation. Skipping default host management fallback: retrieved credentials failed to report to ssm. RequestId: 87b14e5a-ef87-450e-a20d-fa375bef5127 Error: InvalidSignatureException: Signature expired: 20231106T134822Z is now earlier than 20231106T144933Z (20231106T145433Z - 5 min.)

which can happen to instances/VMs which are restarting after a period of powerloss.

sluggard76 commented 6 months ago

FireballDWF,

Can you please be more specific about "After" and "Wants" dependencies. What's the reason that led you think this will prevents the error in your post?