Bug 1463377 - rear won't backup network config
rear won't backup network config
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: rear (Show other bugs)
6.9
Unspecified Unspecified
unspecified Severity medium
: rc
: ---
Assigned To: Jakub Mazanek
Tereza Cerna
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-06-20 12:57 EDT by Blair Aitken
Modified: 2017-08-16 12:50 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1484051 (view as bug list)
Environment:
Last Closed: 2017-08-16 12:50:10 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
/bin/rear -d -v mkbackup (186.03 KB, text/plain)
2017-06-20 12:57 EDT, Blair Aitken
no flags Details
Patch proposal including basic bridged interface support (11.27 KB, patch)
2017-07-10 03:20 EDT, Renaud Métrich
no flags Details | Diff

  None (edit)
Description Blair Aitken 2017-06-20 12:57:44 EDT
Created attachment 1289743 [details]
/bin/rear -d -v mkbackup

Description of problem:
~~~~~~~~~~~~~~~~~~~~~~~
I have successfully created a ReaR backup (rear -d -v mkbackup )and restored it to new hard drive but it doesn't contain network configuration (/etc/sysconfig/network-scripts is empty) when I am in recover/rescue mode.  I created /etc/rear/site.conf and added this line prior to running the backup:  

   USE_STATIC_NETWORKING=y

but it didn't work.
During recovery (rear recover) I had to run :

 o   ip addr add 10.106.51.20/24 dev bond0.441
 o   ip route add 10.106.6.172 via 10.106.51.1

in order for the restore to work.
What am I doing wrong?


Version-Release number of selected component (if applicable):
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

rear-1.17.2-4.el6.x86_64             Thu Jun 30 09:16:41 2016
Comment 4 Renaud Métrich 2017-06-28 10:24:08 EDT
The issue comes from the way the bridge "br0" is set up in /etc/scripts/system-setup.d/60-network-devices.sh:

ip addr add 10.106.51.20/27 dev br0
ip link set dev br0 up
ip link set dev br0 mtu 1500

The "br0" device doesn't exist unless the corresponding "brctl" command is used.

They are 2 issues here:
1. "brctl" utility is not part of the rescue image
2. "brctl addbr br0" is missing in 60-network-devices.sh
Comment 6 Renaud Métrich 2017-07-10 03:20 EDT
Created attachment 1295709 [details]
Patch proposal including basic bridged interface support

This patch has been successfully tested with the following configuration:
1. eth0 + eth1 bonded as bond0 (no IP address)
2. bond0.441 configured as vlan441 on bond0 (no IP address)
3. br0 configured as a bridge on bond0.441 (with IP address)

For now, only STP is configured for the bridge interface. This should be sufficient.
The brctl utility is includes as REQUIRED_PROGS automatically upon need.

The resulting /rootfs/etc/scripts/system-setup.d/60-network-devices.sh file is as follows:

if [ ! -d /sys/class/net/br0/bridge ]; then
    brctl addbr br0
    brctl stp br0 no
fi
ip addr add xxx/xx dev br0
ip link set dev br0 up
ip link set dev br0 mtu 1500
ip link set dev eth0 up
ip link set dev eth0 mtu 1500
ip link set dev eth1 up
ip link set dev eth1 mtu 1500
modprobe bonding max_bonds=1 miimon=100 mode=1 use_carrier=0
ip link set dev bond0 up
ifenslave bond0 eth0 eth1
sleep 5
modprobe 8021q
sleep 5
ip link add link bond0 name bond0.441 type vlan id 441
if [ ! -d /sys/class/net/br0/bridge ]; then
    brctl addbr br0
    brctl stp br0 no
fi
brctl addif br0 bond0.441
ip link set dev bond0.441 up

Note You need to log in before you can comment on or make changes to this bug.