Skip to content

The mini design of confignetwork support NetworkManager

Yuan Bai edited this page Mar 6, 2019 · 25 revisions

Summarize

In RH8, NetworkManager is default enabled and used, confignetwork use nmcli to configure network interfaces.

In RH7.x and below OS distribution, NetworkManager is disabled in xCAT managed node, confignetwork use network service to manage network interfaces. If the node is not xCAT managed node and NetworkManager is used, confignetwork use nmcli to configure network interfaces.

confignetwork framework refine

  1. Make hash for nicdevice, nictypes, nicips, nicnetwork, niccustomscripts
  2. Sort nics device pair based on nicdevice type
  3. If there is invalid nics pair, errorcode is 1
  4. Delete invalid nics device pair based on Error
  5. Check NetworkManager service status, use "networkmanager_active" as global variable,
    1. "networkmanager_active=0" means "using network.service"
    2. "networkmanager_active=1" means "using NetworkManager".
  6. Configure nics framework, the inputs are orderd nic and its device
    For each nic and its device pair:
    1. If install nic is configured, skip to reconfigure it
    2. If there is customscript, then processing custom scripts for nics
    3. For current nic, get its base nic and base nic type
    4. If current nic type is BMC, ignore bmc interfaces
    5. If current nic type is ethernet, configure standalone ethernet nic
    6. If current nic type is bridge:
      1. If brctl works well:
        1. If networkmanager_active=1: create_bridge_interface_nmcli ifname=$nic_dev _brtype=$nic_dev_type _port=$base_nic_dev _pretype=$base_nic_type
        2. If networkmanager_active=0: create_bridge_interface ifname=$nic_dev _brtype=$nic_dev_type _port=$base_nic_dev _pretype=$base_nic_type
    7. If current nic type is VLAN:
      1. Get vlanname and vlanid
      2. If networkmanager_active=1: create_vlan_interface_nmcli ifname=$vlanname vlanid=$vlanid
      3. If networkmanager_active=0: create_vlan_interface ifname=$vlanname vlanid=$vlanid
    8. If current nic type is BOND:
      1. If networkmanager_active=1: create_bond_interface ifname=$nic_dev slave_ports=$base_nic_for_bond slave_type=$base_nic_type
      2. If networkmanager_active=0: create_bond_interface ifname=$nic_dev slave_ports=$base_nic_for_bond slave_type=$base_nic_type
    9. If current nic type is infiniband Or Omnipath, use "configib" to configure IB nics

create BOND interface

  1. create_bond_interface is original interface

  2. create_bond_interface_nmcli is for NetworkManager
    1. Parser input arguments

    2. If no slave_ports, return 1

    3. Set bonding_opts based on slave_type, slave_type can be ethernet or infiniband

    4. Query "nicnetworks" entry about its target "xcatnet"

    5. Query mtu value from "networks"

    6. Calculate prefix based on mask and network

    7. Create target bond interface
      1. if target bond device connection was already exists, use another new connection name for bond master.

      2. stage 0: create raw bond connection, if not created yet
        1. load the bonding module if not loaded.
        2. create required bond device connection
      3. stage 1: setup bond options for the new connection
        1. disconnect old slaves
      4. stage 2: setup bond slaves, apply other options and bring interface up
        For each slaves:
        1. check if there is slaves connection existed or not
        2. add or modify new slaves connection, if the interface was not bonded as slave of master, do it now, if it is existed, modify it.
        3. bring up slave connection.
        4. apply other bond connection options
        1. bring new master bond connection up
      5. stage 3: wait for connetion state and check target interface up

create VLAN interface

  1. create_vlan_interface is original interface
  2. create_vlan_interface_nmcli is for NetworkManager
    1. Parser input arguments
    2. Check if there is no vlanid, return 1
    3. Query "networks" entry
    4. Query mtu value from "networks" hash
    5. Calculate prefix based on mask and network
    6. Load the 8021q module if not loaded
    7. Check if nic device is managed or not
      1. If unmanaged, set it managed
      2. If failed to set it managed, return 1
    8. Check If vlan connection existed or not
      1. If not, create vlan connection using nmcli
      2. If yes, modify vlan connection using nmcli
    9. Set vlan connection up
    10. Check vlan interface state
    11. Wait for connection state
    12. If there is customized parameter for this vlan
      1. customize vlan interface connection
      2. reload vlan interface
      3. check connection state

create Bridge interface

  1. create_bridge_interface is original interface
  2. create_bridge_interface_nmcli is for NetworkManager
    1. Parser input arguments
    2. Query "nicnetworks" entry about its target "xcatnet"
    3. Query mtu value from "networks"
    4. Calculate prefix based on mask and network
    5. If base type is ethernet
      1. check if this device is managed or not
      2. create enthernet type slave connetion using nmcli
    6. If base type is vlan
      1. check if this device is managed or not
      2. create vlan type slave connection using nmcli
    7. If base type is bond
      1. check if this device is managed or not
      2. create bond type slave connection using nmcli
    8. Check If master bridge connection existed or not
      1. If not, create master bridge connection using nmcli
      2. If yes, modify master bridge connection using nmcli
    9. Bring up slave connection
    10. Check slave connection state
    11. Wait for connection state
    12. Bring up master connection
    13. wait for connection state
    14. if there is customized parameter
      1. customize master bridge interface connection
      2. reload connection
      3. check connection state

News

History

  • Oct 22, 2010: xCAT 2.5 released.
  • Apr 30, 2010: xCAT 2.4 is released.
  • Oct 31, 2009: xCAT 2.3 released. xCAT's 10 year anniversary!
  • Apr 16, 2009: xCAT 2.2 released.
  • Oct 31, 2008: xCAT 2.1 released.
  • Sep 12, 2008: Support for xCAT 2 can now be purchased!
  • June 9, 2008: xCAT breaths life into (at the time) the fastest supercomputer on the planet
  • May 30, 2008: xCAT 2.0 for Linux officially released!
  • Oct 31, 2007: IBM open sources xCAT 2.0 to allow collaboration among all of the xCAT users.
  • Oct 31, 1999: xCAT 1.0 is born!
    xCAT started out as a project in IBM developed by Egan Ford. It was quickly adopted by customers and IBM manufacturing sites to rapidly deploy clusters.
Clone this wiki locally