[rear-devel] [rear/rear] 15567e: New 310_network_devices.sh code handling 'bond', '...

Johannes Meixner jsmeix at suse.com
Wed Jan 17 09:07:19 CET 2018


  Branch: refs/heads/master
  Home:   https://github.com/rear/rear
  Commit: 15567ede425401b008e5b1680db36a2c62752b8f
      https://github.com/rear/rear/commit/15567ede425401b008e5b1680db36a2c62752b8f
  Author: Renaud Métrich <rmetrich at redhat.com>
  Date:   2018-01-09 (Tue, 09 Jan 2018)

  Changed paths:
    M usr/share/rear/rescue/GNU/Linux/310_network_devices.sh
    M usr/share/rear/rescue/GNU/Linux/350_routing.sh
    R usr/share/rear/rescue/GNU/Linux/360_teaming.sh

  Log Message:
  -----------
  New 310_network_devices.sh code handling 'bond', 'bridge', 'vlan', 'team' and 'physdev'
- Removed current teaming code
- Have routes use interface mapping
- Added explanations


  Commit: 3f31fae41a08f2ac3a6a9e4142f978ef94a64cae
      https://github.com/rear/rear/commit/3f31fae41a08f2ac3a6a9e4142f978ef94a64cae
  Author: Renaud Métrich <rmetrich at redhat.com>
  Date:   2018-01-09 (Tue, 09 Jan 2018)

  Changed paths:
    A tests/setup1/README
    A tests/setup1/etc/sysconfig/network-scripts/ifcfg-bond12
    A tests/setup1/etc/sysconfig/network-scripts/ifcfg-bond34
    A tests/setup1/etc/sysconfig/network-scripts/ifcfg-bridge78
    A tests/setup1/etc/sysconfig/network-scripts/ifcfg-eth1
    A tests/setup1/etc/sysconfig/network-scripts/ifcfg-eth2
    A tests/setup1/etc/sysconfig/network-scripts/ifcfg-eth3
    A tests/setup1/etc/sysconfig/network-scripts/ifcfg-eth4
    A tests/setup1/etc/sysconfig/network-scripts/ifcfg-eth5
    A tests/setup1/etc/sysconfig/network-scripts/ifcfg-eth6
    A tests/setup1/etc/sysconfig/network-scripts/ifcfg-eth7
    A tests/setup1/etc/sysconfig/network-scripts/ifcfg-eth8
    A tests/setup1/etc/sysconfig/network-scripts/ifcfg-eth9
    A tests/setup1/etc/sysconfig/network-scripts/ifcfg-net6
    A tests/setup1/etc/sysconfig/network-scripts/ifcfg-team56
    A tests/setup1/etc/sysconfig/network-scripts/ifcfg-vlan1eth9
    A tests/setup1/etc/sysconfig/network-scripts/route-bond34
    A tests/setup1/etc/sysconfig/network-scripts/route-bridge78
    A tests/setup1/etc/sysconfig/network-scripts/route-eth10
    A tests/setup1/etc/sysconfig/network-scripts/route-team56
    A tests/setup1/etc/sysconfig/network-scripts/route-vlan1eth9
    A tests/setup1/kvm.xml
    A tests/setup1/mappings/ip_addresses
    A tests/setup1/run.sh
    A tests/setup1/tcase1.sh
    A tests/setup1/tcase1_results/ip_a.expected
    A tests/setup1/tcase1_results/ip_r.expected
    A tests/setup1/tcase2.sh
    A tests/setup1/tcase2_results/ip_a.expected
    A tests/setup1/tcase2_results/ip_r.expected
    A tests/setup1/tcase3.sh
    A tests/setup1/tcase3_results/ip_a.expected
    A tests/setup1/tcase3_results/ip_r.expected
    A tests/setup1/tcase4.sh
    A tests/setup1/tcase4_results/ip_a.expected
    A tests/setup1/tcase4_results/ip_r.expected
    A tests/setup1/tcase5.sh
    A tests/setup1/tcase5_results/ip_a.expected
    A tests/setup1/tcase5_results/ip_r.expected
    A tests/setup1/tcase6.sh
    A tests/setup1/tcase6_results/ip_a.expected
    A tests/setup1/tcase6_results/ip_r.expected
    A tests/setup1/tcase7.sh
    A tests/setup1/tcase7_results/ip_a.expected
    A tests/setup1/tcase7_results/ip_r.expected
    A tests/setup1/tcase8.sh
    A tests/setup1/tcase8_results/ip_a.expected
    A tests/setup1/tcase8_results/ip_r.expected
    A tests/setup1/verify.sh

  Log Message:
  -----------
  Setup #1 Unit Tests


  Commit: 69ab391bbde88dbdde9dce149ccf4e5c90d334fd
      https://github.com/rear/rear/commit/69ab391bbde88dbdde9dce149ccf4e5c90d334fd
  Author: Renaud Métrich <rmetrich at redhat.com>
  Date:   2018-01-09 (Tue, 09 Jan 2018)

  Changed paths:
    A tests/setup2/README
    A tests/setup2/etc/sysconfig/network-scripts/ifcfg-bond12
    A tests/setup2/etc/sysconfig/network-scripts/ifcfg-bond34
    A tests/setup2/etc/sysconfig/network-scripts/ifcfg-bridge2
    A tests/setup2/etc/sysconfig/network-scripts/ifcfg-bridge3
    A tests/setup2/etc/sysconfig/network-scripts/ifcfg-eth1
    A tests/setup2/etc/sysconfig/network-scripts/ifcfg-eth10
    A tests/setup2/etc/sysconfig/network-scripts/ifcfg-eth2
    A tests/setup2/etc/sysconfig/network-scripts/ifcfg-eth3
    A tests/setup2/etc/sysconfig/network-scripts/ifcfg-eth4
    A tests/setup2/etc/sysconfig/network-scripts/ifcfg-eth5
    A tests/setup2/etc/sysconfig/network-scripts/ifcfg-eth6
    A tests/setup2/etc/sysconfig/network-scripts/ifcfg-eth7
    A tests/setup2/etc/sysconfig/network-scripts/ifcfg-eth8
    A tests/setup2/etc/sysconfig/network-scripts/ifcfg-eth9
    A tests/setup2/etc/sysconfig/network-scripts/ifcfg-team567
    A tests/setup2/etc/sysconfig/network-scripts/ifcfg-team89
    A tests/setup2/etc/sysconfig/network-scripts/ifcfg-vlan1bond12
    A tests/setup2/etc/sysconfig/network-scripts/ifcfg-vlan2bond34
    A tests/setup2/etc/sysconfig/network-scripts/ifcfg-vlan3eth10
    A tests/setup2/etc/sysconfig/network-scripts/ifcfg-vlan3team89
    A tests/setup2/etc/sysconfig/network-scripts/ifcfg-vlan5eth5
    A tests/setup2/etc/sysconfig/network-scripts/route-bridge2
    A tests/setup2/etc/sysconfig/network-scripts/route-bridge3
    A tests/setup2/etc/sysconfig/network-scripts/route-team567
    A tests/setup2/etc/sysconfig/network-scripts/route-vlan1bond12
    A tests/setup2/kvm.xml
    A tests/setup2/mappings/ip_addresses
    A tests/setup2/run.sh
    A tests/setup2/tcase1.sh
    A tests/setup2/tcase1_results/ip_a.expected
    A tests/setup2/tcase1_results/ip_r.expected
    A tests/setup2/tcase2.sh
    A tests/setup2/tcase2_results/ip_a.expected
    A tests/setup2/tcase2_results/ip_r.expected
    A tests/setup2/tcase3.sh
    A tests/setup2/tcase3_results/ip_a.expected
    A tests/setup2/tcase3_results/ip_r.expected
    A tests/setup2/tcase4.sh
    A tests/setup2/tcase4_results/ip_a.expected
    A tests/setup2/tcase4_results/ip_r.expected
    A tests/setup2/tcase5.sh
    A tests/setup2/tcase5_results/ip_a.expected
    A tests/setup2/tcase5_results/ip_r.expected
    A tests/setup2/tcase6.sh
    A tests/setup2/tcase6_results/ip_a.expected
    A tests/setup2/tcase6_results/ip_r.expected
    A tests/setup2/tcase7.sh
    A tests/setup2/tcase7_results/ip_a.expected
    A tests/setup2/tcase7_results/ip_r.expected
    A tests/setup2/tcase8.sh
    A tests/setup2/tcase8_results/ip_a.expected
    A tests/setup2/tcase8_results/ip_r.expected
    A tests/setup2/verify.sh

  Log Message:
  -----------
  Setup #2 Unit Tests


  Commit: a87227e5056b6907d7087826573e6bca8809a438
      https://github.com/rear/rear/commit/a87227e5056b6907d7087826573e6bca8809a438
  Author: Renaud Métrich <rmetrich at redhat.com>
  Date:   2018-01-09 (Tue, 09 Jan 2018)

  Changed paths:
    M usr/share/rear/rescue/GNU/Linux/310_network_devices.sh

  Log Message:
  -----------
  Reworked implementation to support ancient releases (e.g. RHEL6)
- Adapt search for lower interfaces when no 'lower_*' symlink exists (RHEL6)
- Always set device for bonding using 'echo "+dev" > .../bond/bonding/slaves'
- Detect support for 'master' in 'ip link' (no support in RHEL6)
- Replace 'readlink -f' by 'readlink -e'
- Use 'brctl' when 'ip link' doesn't support 'bridge' type (RHEL6)
- Use function 'resolve' to wrap 'readlink' when it doesn't support more than 1 filename (RHEL6)


  Commit: 801604a2adea7a3b748b41d2f3839a1cad2f5dc2
      https://github.com/rear/rear/commit/801604a2adea7a3b748b41d2f3839a1cad2f5dc2
  Author: Renaud Métrich <rmetrich at redhat.com>
  Date:   2018-01-09 (Tue, 09 Jan 2018)

  Changed paths:
    M tests/setup1/run.sh
    M tests/setup1/verify.sh

  Log Message:
  -----------
  Improved unit test runner & validator


  Commit: 4c7c548fd32efc9250c10a51349469d9d754e8b8
      https://github.com/rear/rear/commit/4c7c548fd32efc9250c10a51349469d9d754e8b8
  Author: Renaud Métrich <rmetrich at redhat.com>
  Date:   2018-01-09 (Tue, 09 Jan 2018)

  Changed paths:
    M tests/setup1/run.sh
    M usr/share/rear/rescue/GNU/Linux/310_network_devices.sh

  Log Message:
  -----------
  Replaced 'has_lower_links' and 'iplink_has_bridge' by boolean variables


  Commit: 95d17956f648464395e0310a947719e8bedbad1e
      https://github.com/rear/rear/commit/95d17956f648464395e0310a947719e8bedbad1e
  Author: Renaud Métrich <rmetrich at redhat.com>
  Date:   2018-01-09 (Tue, 09 Jan 2018)

  Changed paths:
    M tests/setup1/run.sh
    M usr/share/rear/rescue/GNU/Linux/310_network_devices.sh

  Log Message:
  -----------
  Coding style


  Commit: 1c42620d6a5ca3c62015884e51716c3eb6f31b88
      https://github.com/rear/rear/commit/1c42620d6a5ca3c62015884e51716c3eb6f31b88
  Author: Renaud Métrich <rmetrich at redhat.com>
  Date:   2018-01-09 (Tue, 09 Jan 2018)

  Changed paths:
    M usr/share/rear/conf/default.conf

  Log Message:
  -----------
  Added 'documentation' of SIMPLIFY_BRIDGE and SIMPLIFY_TEAM


  Commit: 02937854b6ea2060a978d69355581ba93adb9e7e
      https://github.com/rear/rear/commit/02937854b6ea2060a978d69355581ba93adb9e7e
  Author: Johannes Meixner <jsmeix at suse.com>
  Date:   2018-01-17 (Wed, 17 Jan 2018)

  Changed paths:
    A tests/setup1/README
    A tests/setup1/etc/sysconfig/network-scripts/ifcfg-bond12
    A tests/setup1/etc/sysconfig/network-scripts/ifcfg-bond34
    A tests/setup1/etc/sysconfig/network-scripts/ifcfg-bridge78
    A tests/setup1/etc/sysconfig/network-scripts/ifcfg-eth1
    A tests/setup1/etc/sysconfig/network-scripts/ifcfg-eth2
    A tests/setup1/etc/sysconfig/network-scripts/ifcfg-eth3
    A tests/setup1/etc/sysconfig/network-scripts/ifcfg-eth4
    A tests/setup1/etc/sysconfig/network-scripts/ifcfg-eth5
    A tests/setup1/etc/sysconfig/network-scripts/ifcfg-eth6
    A tests/setup1/etc/sysconfig/network-scripts/ifcfg-eth7
    A tests/setup1/etc/sysconfig/network-scripts/ifcfg-eth8
    A tests/setup1/etc/sysconfig/network-scripts/ifcfg-eth9
    A tests/setup1/etc/sysconfig/network-scripts/ifcfg-net6
    A tests/setup1/etc/sysconfig/network-scripts/ifcfg-team56
    A tests/setup1/etc/sysconfig/network-scripts/ifcfg-vlan1eth9
    A tests/setup1/etc/sysconfig/network-scripts/route-bond34
    A tests/setup1/etc/sysconfig/network-scripts/route-bridge78
    A tests/setup1/etc/sysconfig/network-scripts/route-eth10
    A tests/setup1/etc/sysconfig/network-scripts/route-team56
    A tests/setup1/etc/sysconfig/network-scripts/route-vlan1eth9
    A tests/setup1/kvm.xml
    A tests/setup1/mappings/ip_addresses
    A tests/setup1/run.sh
    A tests/setup1/tcase1.sh
    A tests/setup1/tcase1_results/ip_a.expected
    A tests/setup1/tcase1_results/ip_r.expected
    A tests/setup1/tcase2.sh
    A tests/setup1/tcase2_results/ip_a.expected
    A tests/setup1/tcase2_results/ip_r.expected
    A tests/setup1/tcase3.sh
    A tests/setup1/tcase3_results/ip_a.expected
    A tests/setup1/tcase3_results/ip_r.expected
    A tests/setup1/tcase4.sh
    A tests/setup1/tcase4_results/ip_a.expected
    A tests/setup1/tcase4_results/ip_r.expected
    A tests/setup1/tcase5.sh
    A tests/setup1/tcase5_results/ip_a.expected
    A tests/setup1/tcase5_results/ip_r.expected
    A tests/setup1/tcase6.sh
    A tests/setup1/tcase6_results/ip_a.expected
    A tests/setup1/tcase6_results/ip_r.expected
    A tests/setup1/tcase7.sh
    A tests/setup1/tcase7_results/ip_a.expected
    A tests/setup1/tcase7_results/ip_r.expected
    A tests/setup1/tcase8.sh
    A tests/setup1/tcase8_results/ip_a.expected
    A tests/setup1/tcase8_results/ip_r.expected
    A tests/setup1/verify.sh
    A tests/setup2/README
    A tests/setup2/etc/sysconfig/network-scripts/ifcfg-bond12
    A tests/setup2/etc/sysconfig/network-scripts/ifcfg-bond34
    A tests/setup2/etc/sysconfig/network-scripts/ifcfg-bridge2
    A tests/setup2/etc/sysconfig/network-scripts/ifcfg-bridge3
    A tests/setup2/etc/sysconfig/network-scripts/ifcfg-eth1
    A tests/setup2/etc/sysconfig/network-scripts/ifcfg-eth10
    A tests/setup2/etc/sysconfig/network-scripts/ifcfg-eth2
    A tests/setup2/etc/sysconfig/network-scripts/ifcfg-eth3
    A tests/setup2/etc/sysconfig/network-scripts/ifcfg-eth4
    A tests/setup2/etc/sysconfig/network-scripts/ifcfg-eth5
    A tests/setup2/etc/sysconfig/network-scripts/ifcfg-eth6
    A tests/setup2/etc/sysconfig/network-scripts/ifcfg-eth7
    A tests/setup2/etc/sysconfig/network-scripts/ifcfg-eth8
    A tests/setup2/etc/sysconfig/network-scripts/ifcfg-eth9
    A tests/setup2/etc/sysconfig/network-scripts/ifcfg-team567
    A tests/setup2/etc/sysconfig/network-scripts/ifcfg-team89
    A tests/setup2/etc/sysconfig/network-scripts/ifcfg-vlan1bond12
    A tests/setup2/etc/sysconfig/network-scripts/ifcfg-vlan2bond34
    A tests/setup2/etc/sysconfig/network-scripts/ifcfg-vlan3eth10
    A tests/setup2/etc/sysconfig/network-scripts/ifcfg-vlan3team89
    A tests/setup2/etc/sysconfig/network-scripts/ifcfg-vlan5eth5
    A tests/setup2/etc/sysconfig/network-scripts/route-bridge2
    A tests/setup2/etc/sysconfig/network-scripts/route-bridge3
    A tests/setup2/etc/sysconfig/network-scripts/route-team567
    A tests/setup2/etc/sysconfig/network-scripts/route-vlan1bond12
    A tests/setup2/kvm.xml
    A tests/setup2/mappings/ip_addresses
    A tests/setup2/run.sh
    A tests/setup2/tcase1.sh
    A tests/setup2/tcase1_results/ip_a.expected
    A tests/setup2/tcase1_results/ip_r.expected
    A tests/setup2/tcase2.sh
    A tests/setup2/tcase2_results/ip_a.expected
    A tests/setup2/tcase2_results/ip_r.expected
    A tests/setup2/tcase3.sh
    A tests/setup2/tcase3_results/ip_a.expected
    A tests/setup2/tcase3_results/ip_r.expected
    A tests/setup2/tcase4.sh
    A tests/setup2/tcase4_results/ip_a.expected
    A tests/setup2/tcase4_results/ip_r.expected
    A tests/setup2/tcase5.sh
    A tests/setup2/tcase5_results/ip_a.expected
    A tests/setup2/tcase5_results/ip_r.expected
    A tests/setup2/tcase6.sh
    A tests/setup2/tcase6_results/ip_a.expected
    A tests/setup2/tcase6_results/ip_r.expected
    A tests/setup2/tcase7.sh
    A tests/setup2/tcase7_results/ip_a.expected
    A tests/setup2/tcase7_results/ip_r.expected
    A tests/setup2/tcase8.sh
    A tests/setup2/tcase8_results/ip_a.expected
    A tests/setup2/tcase8_results/ip_r.expected
    A tests/setup2/verify.sh
    M usr/share/rear/conf/default.conf
    M usr/share/rear/rescue/GNU/Linux/310_network_devices.sh
    M usr/share/rear/rescue/GNU/Linux/350_routing.sh
    R usr/share/rear/rescue/GNU/Linux/360_teaming.sh

  Log Message:
  -----------
  Merge pull request #1574 from rmetrich/NewNetworking

New network script generator (60-network-devices.sh).
This work is a solution for the issue
https://github.com/rear/rear/issues/1561
"Teaming interface support is very limited".
This work is a full rewrite of the 310_network_devices.sh script
generating network interfaces for use during the ReaR recovery early boot.
It also handles corner cases/odd setups that can be found from time to time,
typically when the administrator uses bonding + bridges + vlans
as well as teaming.
With that new code, adding new configurations should be easy in the future.
Also interface mapping code is added to the corresponding
350_routing.sh script generating routes.
In the new tests/ directory there are setups
that were used to verify the network generation code.
It covers a lot of setups found.


Compare: https://github.com/rear/rear/compare/143ab2b95a6b...02937854b6ea


More information about the rear-devel mailing list