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.04k stars 323 forks source link

amazon-ssm-agent auto downgraded in Ubuntu instances #399

Closed sunilkumar812 closed 2 years ago

sunilkumar812 commented 2 years ago

Hi Team, We faced an issue with ssm-agent upgrade on Ubuntu instances. We tried many times but its downgraded auto after some time. Older version was before start update/upgrade ssm-agent activity: 3.0.1124.0 We used Associations in State Manger with below options Document: AWS-UpdateSSMAgent Allow Downgrade: False Specify schedule: No Schedule Compliance Severity: Medium

Note: when we apply this associations ssm-agent upgraded with latest version see below logs Successfully downloaded manifest Successfully downloaded updater version 3.1.90.0 Updating amazon-ssm-agent from 3.0.1124.0 to 3.1.90.0 Successfully downloaded https://s3.us-east-1.amazonaws.com/amazon-ssm-us-east-1/amazon-ssm-agent/3.0.1124.0/amazon-ssm-agent-ubuntu-amd64.tar.gz Successfully downloaded https://s3.us-east-1.amazonaws.com/amazon-ssm-us-east-1/amazon-ssm-agent/3.1.90.0/amazon-ssm-agent-ubuntu-amd64.tar.gz Initiating amazon-ssm-agent update to 3.1.90.0 amazon-ssm-agent updated successfully to 3.1.90.0

But after some hours we check version on same instance is downgraded version: 3.0.1124.0

Here my questions are

  1. Why this auto downgraded and where we can check its logs when ssm-agent version is downgrad?
  2. Why we faced this issue with only Ubuntu Linux?
  3. Any way to track this downgrading process logs or stop to downgraded version?

Thanks & Regards Sunil Yadav

Thor-Bjorgvinsson commented 2 years ago

Hey Sunil, I expect the problem you are facing that snap is automatically downgrading the agent because the instance is configured to follow stable channel. I think you can look into the snap logs to confirm this.

If you want to be able to keep up with the latest version using the AWS-UpdateSSMAgent document you need to configure snap to listen to the candidate channel:

sudo snap switch --channel=candidate amazon-ssm-agent

Hope this helps!

sunilkumar812 commented 2 years ago

Thanks Thor for quick response, Its work for us.