Updated vhost2.usr (Mellanox setup).
authorZoltán Felleg <zoltan.felleg@userrendszerhaz.hu>
Wed, 28 Oct 2020 13:30:39 +0000 (14:30 +0100)
committerZoltán Felleg <zoltan.felleg@userrendszerhaz.hu>
Wed, 28 Oct 2020 13:30:39 +0000 (14:30 +0100)
sources/vhost2.usr/01_setupnetworking.sh
sources/vhost2.usr/99_setupsystem.sh
sources/vhost2.usr/etc/sysconfig/opensm [new file with mode: 0644]

index 360b5f9e9a95817a2820961ecd4db96977b2e465..641116c359271169f9428ba8f18914cd4aacccbc 100755 (executable)
@@ -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
index b959988440cee9ace7e7b3c12d00563c14f7346a..b8e4fa8e5b6b8f41ee57aca55f2d6f51a8bc1236 100755 (executable)
@@ -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 (file)
index 0000000..d361abc
--- /dev/null
@@ -0,0 +1,4 @@
+# (Port) GUIDS queried by ibstat
+GUIDS="0x5849560e62c30201 0x5849560e62c30202"
+GUIDS="0x5849560e62c30901 0x5849560e62c30902"
+PRIORITY=0