Forum Discussion

Jim_Chapuran's avatar
Jim_Chapuran
Icon for Altostratus rankAltostratus
Jun 03, 2020

Installing RPM Packages from AWS EC2 User Data

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...             D: computing file dispositions

D: 0x0000fd05   1024    231280    104882 /

D: 0x0000fd06   4096    174346    251236 /usr

D: 0x0000fd08   4096    618487    185679 /var

 

And here's an unsuccessful attempt via UD:

 

Preparing...             D: computing file dispositions

D: 0x0000fd05   1024    231280    104882 /

D: 0x0000fd06   4096      0    251236 /usr

D: 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?

No RepliesBe the first to reply