Bug #34282
closedOffline backup fails on RHEL8 due to missing iptables command
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=2040650
Description of problem:
Offline backup fails on RHEL8 due to missing iptables command, please add some dependency (move the component to Packaging or Installer) or update the f-m to avoid it's usage.
Version-Release number of selected component (if applicable):
Satellite 7.0.0 snap 5
RHEL 8.5
How reproducible:
always
Steps to Reproduce:
1. Have a fresh Satellite on RHEL 8.5
2. Run offline backup.
- foreman-maintain backup offline /tmp
Starting backup: 2022-01-14 05:42:52 -0500
Running preparation steps required to run the next scenarios ================================================================================
Make sure Foreman DB is up:
/ Checking connection to the Foreman DB [OK]
--------------------------------------------------------------------------------
Running Backup
================================================================================
Confirm turning off services is allowed:
WARNING: This script will stop your services.
Do you want to proceed?, [y(yes), q(quit)] y
[OK]
--------------------------------------------------------------------------------
Prepare backup Directory:
Creating backup folder /tmp/satellite-backup-2022-01-14-05-42-52 [OK]
--------------------------------------------------------------------------------
Check if the directory exists and is writable: [OK]
--------------------------------------------------------------------------------
Generate metadata:
- Saving metadata to metadata.yml [OK]
--------------------------------------------------------------------------------
Detect features available in the local proxy: [OK]
--------------------------------------------------------------------------------
disable active sync plans:
/ Total 0 sync plans are now disabled. [OK]
--------------------------------------------------------------------------------
Add maintenance_mode chain to iptables: [FAIL]
Failed executing iptables N FOREMAN_MAINTAIN, exit status 127:
sh: iptables: command not found
-------------------------------------------------------------------------------
Scenario [Backup] failed.
The following steps ended up in failing state:
[iptables-add-maintenance-mode-chain]
Resolve the failed steps and rerun
the command. In case the failures are false positives,
use --whitelist="iptables-add-maintenance-mode-chain"
Running Failed backup cleanup
================================================================================
Start applicable services:
Starting the following service(s):
redis, postgresql, pulpcore-api, pulpcore-content, pulpcore-worker@1.service, pulpcore-worker@2.service, pulpcore-worker@3.service, pulpcore-worker@4.service, pulpcore-worker@5.service, pulpcore-worker@6.service, tomcat, dynflow-sidekiq@orchestrator, foreman, httpd, dynflow-sidekiq@worker-1, dynflow-sidekiq@worker-hosts-queue-1, foreman-proxy
/ All services started [OK]
--------------------------------------------------------------------------------
re-enable sync plans:
- Total 0 sync plans are now enabled. [OK]
--------------------------------------------------------------------------------
Remove maintenance_mode chain from iptables: [OK]
--------------------------------------------------------------------------------
Clean up backup directory: [OK]
--------------------------------------------------------------------------------
Done with backup: 2022-01-14 05:43:30 -0500
Backup didn't finish. Incomplete backup was removed.
Expected results:
Successful backup
Additional info:
`yum install iptables` fixes the issue
Updated by The Foreman Bot about 2 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman_maintain/pull/580 added
Updated by Amit Upadhye about 2 years ago
- Status changed from Ready For Testing to Closed
Applied in changeset foreman_maintain|60df306b3f7a288709de6dc6ef3353bb9d82429e.