Is this a BUG REPORT or a FEATURE REQUEST ? (choose one):
FEATURE REQUEST
FEATURE REQUEST INFO
backup_master_node.sh script should support both firewalld and iptables. If the masters are running firewalld instead of iptables the backup script fails with:
cp: cannot stat ‘/etc/sysconfig/iptables’: No such file or directory
Problem Description
What problem is being solved by the proposed feature?
backup_master_node.sh fails on masters running firewalld
Proposed Change
Add a check in backup_master_node.sh if the master is running firewalld or iptables and backup the appropriate directory in /etc.
Implementation
Add a check in backup_master_node.sh if the master is running firewalld, for example:
otherfiles(){
if pgrep firewalld 2>&1 > /dev/null && [ $(firewall-cmd --state) == "running" ]; then
fw_dir="firewalld"
else
fw_dir="iptables"
fi
[..]
cp -aR /etc/sysconfig/{"$fw_dir",docker-*} \
${BACKUPLOCATION}/etc/sysconfig/
Acceptance criteria
backup_master_node.sh should exit without errors on masters running firewalld
Testing
Run backup_master_node.sh on a master running firewalld
Is this a BUG REPORT or a FEATURE REQUEST ? (choose one): FEATURE REQUEST
FEATURE REQUEST INFO
backup_master_node.sh script should support both firewalld and iptables. If the masters are running firewalld instead of iptables the backup script fails with:
cp: cannot stat ‘/etc/sysconfig/iptables’: No such file or directory
Problem Description
What problem is being solved by the proposed feature?
backup_master_node.sh
fails on masters running firewalldProposed Change
Add a check in
backup_master_node.sh
if the master is running firewalld or iptables and backup the appropriate directory in/etc
.Implementation
Add a check in
backup_master_node.sh
if the master is running firewalld, for example:Acceptance criteria
backup_master_node.sh
should exit without errors on masters running firewalldTesting
Run
backup_master_node.sh
on a master running firewalld