Satellite 6 upgrade check through satellite-maintain failed on candlepin disk space usage
Environment
- Red Hat Satellite 6.x
Issue
-
Upgrading
Red Hat Satellite 6fails on disk space check forcandlepin. -
Scenario Checks before upgrading to Satellite 6.x.z failed.
The following steps ended up in failing state: [available-space-cp] Resolve the failed steps and rerun the command. In case the failures are false positives, use --whitelist="available-space-cp"
Resolution
- Increase the disk space used by
candlepini.e under/var/lib/candlepinand make sure the disk usage is free by more than 90%
For more KB articles/solutions related to Red Hat Satellite 6.x Candlepin Issues, please refer to the Consolidated Troubleshooting Article for Red Hat Satellite 6.x Candlepin Issues
Root Cause
-
candlepinor rather theArtemis-serviceused bycandlepinstarted blocking requests as soon as the disk-usage rose above 90% (even though this meant that 200GB were still free). -
Added below checks for
upgradeandhealth checkwithsatellite-maintain# cat /usr/share/gems/gems/foreman_maintain-0.7.8/definitions/checks/disk/available_space_candlepin.rb module Checks module Disk class AvailableSpaceCandlepin < ForemanMaintain::Check metadata do label :available_space_cp description 'Check to make sure /var/lib/candlepin has enough space' tags :pre_upgrade confine do feature(:candlepin) && check_min_version('candlepin', '3.1') end end MAX_USAGE_IN_PERCENT = 90 def run assert(enough_space?, "System has more than #{MAX_USAGE_IN_PERCENT}% space used"\ " on #{feature(:candlepin).work_dir}.\n"\ 'See https://bugzilla.redhat.com/show_bug.cgi?id=1898605') end def enough_space? io_obj = ForemanMaintain::Utils::Disk::IODevice.new(feature(:candlepin).work_dir) io_obj.space_used_in_percent < MAX_USAGE_IN_PERCENT end end end end
Diagnostic Steps
-
To check the disk space used by the
candlepinpartition.# df -T /var/lib/candlepin -
To check the
candlpinstatus throughcurl.# curl -s -k https://localhost:8443/candlepin/status | json_reformat -
To check specifically
candlepindisk space uses before upgrade, use below command.# satellite-maintain health check --label available-space-cp
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.