cancel
Showing results for 
Search instead for 
Did you mean: 
Login & Join the DevCentral Connects Group to watch the Recorded LiveStream (May 12) on Basic iControl Security - show notes included.

Installing RPM Packages from AWS EC2 User Data

Jim_Chapuran
Altostratus
Altostratus

I am trying to install an RPM package (amazon-ssm-agent) on a new F5 AMI in AWS using EC2 User Data. My UD script is working perfectly to do many other configuration tasks, but the rpm -ivh command is failing with the message: installing package amazon-ssm-agent-2.3.1319.0-1.x86_64 needs 126MB on the /usr filesystem

 

In the UD I can run df -h immediately prior to running the install and I can easily see that there's plenty of free space, and if I later SSH into the server as "admin" I can install just fine.

 

I ran the install with -vv to better see the difference and I have pinpointed the exact issue, but I have no idea why it's doing this. Here's a piece of the output of a successful install via SSH:

 

Preparing...             😧 computing file dispositions

😧 0x0000fd05   1024    231280    104882 /

😧 0x0000fd06   4096    174346    251236 /usr

😧 0x0000fd08   4096    618487    185679 /var

 

And here's an unsuccessful attempt via UD:

 

Preparing...             😧 computing file dispositions

😧 0x0000fd05   1024    231280    104882 /

😧 0x0000fd06   4096      0    251236 /usr

😧 0x0000fd08   4096    618487    185679 /var

 

If I'm reading this correctly it seems that when running through UD the system sees 0 free space in the /usr file system, which is not really true.

 

Has anyone had luck installing RPM packages from UserData before?

0 REPLIES 0