From: Zoltán Felleg Date: Wed, 28 Oct 2020 13:30:39 +0000 (+0100) Subject: Updated vhost2.usr (Mellanox setup). X-Git-Url: http://git.useribm.hu/?a=commitdiff_plain;h=7bdd73e1ae77fdd1d33ba7413dce4291e2efd437;p=user-lxc.git Updated vhost2.usr (Mellanox setup). --- diff --git a/sources/vhost2.usr/01_setupnetworking.sh b/sources/vhost2.usr/01_setupnetworking.sh index 360b5f9..641116c 100755 --- a/sources/vhost2.usr/01_setupnetworking.sh +++ b/sources/vhost2.usr/01_setupnetworking.sh @@ -11,6 +11,8 @@ set -x # ens2f2: port 2 of PCIe NetXtreme, unused # ens2f3: port 3 of PCIe NetXtreme, unused # enp0s29f0u2: IMM +# ibs4: port 1 of Mellanox ConnectX-2, used for mlx1 network +# ibs4d1: port 2 of Mellanox ConnectX-2, used for mlx2 network INTERNAL_BOND_NAME=bondi @@ -36,6 +38,11 @@ EXTERNAL_BOND_SLAVE_2_DEVICE=eno4 EXTERNAL_BRIDGE_NAME=bre EXTERNAL_BRIDGE_DEVICE=${EXTERNAL_BRIDGE_NAME}-dev +MLX1_CONNECTION_NAME=mlx1 +MLX1_CONNECTION_DEVICE=ibs4 +MLX2_CONNECTION_NAME=mlx2 +MLX2_CONNECTION_DEVICE=ibs4d1 + nmcli connection delete $INTERNAL_BRIDGE_NAME nmcli connection delete $INTERNAL_BOND_NAME @@ -50,6 +57,10 @@ nmcli connection delete $EXTERNAL_BOND_SLAVE_1_NAME nmcli connection delete $EXTERNAL_BOND_SLAVE_1_DEVICE nmcli connection delete $EXTERNAL_BOND_SLAVE_2_NAME nmcli connection delete $EXTERNAL_BOND_SLAVE_2_DEVICE +nmcli connection delete $MLX1_CONNECTION_NAME +nmcli connection delete $MLX1_CONNECTION_DEVICE +nmcli connection delete $MLX2_CONNECTION_NAME +nmcli connection delete $MLX2_CONNECTION_DEVICE nmcli connection add \ @@ -141,3 +152,23 @@ nmcli connection add \ connection.slave-type bond \ connection.type 802-3-ethernet \ save yes + +nmcli connection add \ + connection.autoconnect yes \ + connection.id $MLX1_CONNECTION_NAME \ + connection.interface-name $MLX1_CONNECTION_DEVICE \ + connection.type infiniband \ + ipv4.addresses "172.16.131.222/24" \ + ipv4.method "manual" \ + ipv6.method "auto" \ + save yes + +nmcli connection add \ + connection.autoconnect yes \ + connection.id $MLX2_CONNECTION_NAME \ + connection.interface-name $MLX2_CONNECTION_DEVICE \ + connection.type infiniband \ + ipv4.addresses "172.16.132.222/24" \ + ipv4.method "manual" \ + ipv6.method "auto" \ + save yes diff --git a/sources/vhost2.usr/99_setupsystem.sh b/sources/vhost2.usr/99_setupsystem.sh index b959988..b8e4fa8 100755 --- a/sources/vhost2.usr/99_setupsystem.sh +++ b/sources/vhost2.usr/99_setupsystem.sh @@ -4,16 +4,34 @@ hostnamectl set-hostname vhost2.usr.user.hu timedatectl set-timezone Europe/Budapest -dnf install chrony logrotate lxc lxc-templates mercurial rsyslog screen vim-enhanced wget +dnf install \ + chrony \ + cronie \ + infiniband-diags \ + ipmitool \ + logrotate \ + lxc \ + lxc-templates \ + mailx \ + mercurial-py3 \ + opensm \ + postfix \ + rdma-core \ + rsyslog \ + screen \ + vim-enhanced \ + wget systemctl disable firewalld.service systemctl enable logrotate.timer systemctl enable lxc.service +systemctl enable opensm.service systemctl enable rsyslog.service systemctl start logrotate.timer systemctl start lxc.service +systemctl start opensm.service systemctl start rsyslog.service systemctl stop firewalld.service diff --git a/sources/vhost2.usr/etc/sysconfig/opensm b/sources/vhost2.usr/etc/sysconfig/opensm new file mode 100644 index 0000000..d361abc --- /dev/null +++ b/sources/vhost2.usr/etc/sysconfig/opensm @@ -0,0 +1,4 @@ +# (Port) GUIDS queried by ibstat +GUIDS="0x5849560e62c30201 0x5849560e62c30202" +GUIDS="0x5849560e62c30901 0x5849560e62c30902" +PRIORITY=0