plus3it / amigen7

Set of tools to provide automation of tasks for creating STIG-partitioned EL7 AMIs
Apache License 2.0
34 stars 27 forks source link

[BUG] The `yum.conf` File's `installonly_limit` value too high #77

Closed ferricoxide closed 4 years ago

ferricoxide commented 4 years ago

Describe the bug AMIgen assumes that resultant instances are relatively short-lived, such that the kernel will either never be updated (absent a rebuild) or will only live long enough to be updated a couple times. Thus, no change is made to the value of installonly_limit in the /etc/yum.conf file's default value of 5. If a system-owner persists a system long enough to install more than 2-4 kernel updates, subsequent updates will fail due to lack of free space on the /boot partition.

Severity

To Reproduce Steps to reproduce the behavior:

  1. Build a instance with a kernel that's -5 of current
  2. Iteratively yum udate kernel-<VERSION> (where <VERSION> is some version between what's installed and whatever latest available is)
  3. Eventually, one of the iteration will fail due to an out-of-space error condition
  4. Run rpm -q kernel and find that there are 3+ kernels already installed and /boot has less free space than the size of the to-be-installed kernel RPM

Expected behavior The kernel update RPMs should never fail to install due to space-limitations.

Fix Suggestions

Update AMIgen's ChrootCfg.sh (or later) script to modify the installonly_limit value in the /etc/yum.conf file to 2