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 322 forks source link

Unable to upgrade or update amazon-ssm-agent on Oracle Linux Instances #400

Closed sunilkumar812 closed 2 years ago

sunilkumar812 commented 2 years ago

Hi Team, I hope you are doing well in this pandemic conditions! We are trying to update ssm-agent on Oracle Linux with help of state manager but it's failed every time. We used Associations in State Manger with below options Document: AWS-UpdateSSMAgent Allow Downgrade: False Specify schedule: No Schedule Compliance Severity: Medium OS: Oracle Linux 7

SSM Agent versions: Current version: 2.2.800.0 Latest version of ssm-agent: 3.1.127.0

See below logs which we get after run/apply Associations Output: Updating amazon-ssm-agent from 2.2.800.0 to latest Successfully downloaded https://s3.us-east-1.amazonaws.com/amazon-ssm-us-east-1/ssm-agent-manifest.json

Error: cannot find the amazon-ssm-agent-windows-amd64.tar.gz information in the Manifest file

What we required another way to update ssm-agent using state Manager. We tried manully using command line on one oracle instance and its upgraded successfully, see below command.

mkdir /tmp/ssm

#curl https://s3.cn-north-1.amazonaws.com.cn/amazon-ssm-cn-north-1/latest/linux_amd64/amazon-ssm-agent.rpm -o /tmp/ssm/amazon-ssm-agent.rpm
#sudo yum install -y /tmp/ssm/amazon-ssm-agent.rpm
#sudo systemctl status amazon-ssm-agent

Thanks & Regards Sunil Yadav

Thor-Bjorgvinsson commented 2 years ago

Hey Sunil, Support for Oracle linux was not added until agent version 2.3.786.0. You will need to manually update the agent on your instances.

You can update to the latest using this one-liner:

sudo rpm -U https://s3.cn-north-1.amazonaws.com.cn/amazon-ssm-cn-north-1/latest/linux_amd64/amazon-ssm-agent.rpm
sunilkumar812 commented 2 years ago

Thanks Thor, Now got it the point, So first we will install or update manually with latest version after that it will update auto.