Updated vhost1.usr (Mellanox setup).
authorZoltán Felleg <zoltan.felleg@userrendszerhaz.hu>
Thu, 22 Oct 2020 23:01:51 +0000 (01:01 +0200)
committerZoltán Felleg <zoltan.felleg@userrendszerhaz.hu>
Thu, 22 Oct 2020 23:01:51 +0000 (01:01 +0200)
sources/vhost1.usr/01_setupnetworking.sh
sources/vhost1.usr/99_setupsystem.sh
sources/vhost1.usr/etc/sysconfig/opensm [new file with mode: 0644]

index f89015e804e94175001cda7a6ee5b49166746f84..2ddf74151c94bd5ffa8d8d3a0e6240d9729ac18d 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.221/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.221/24" \
+    ipv4.method "manual" \
+    ipv6.method "auto" \
+    save yes
index 08c9b24bb570faf6699d38556711cfe9a78a5da3..e5d0facc8ce84acd7e2d7b8bd825141f7ec67b40 100755 (executable)
@@ -4,16 +4,30 @@
 hostnamectl set-hostname vhost1.usr.user.hu
 timedatectl set-timezone Europe/Budapest
 
-dnf install chrony logrotate lxc lxc-templates mercurial rsyslog screen vim-enhanced wget
+dnf install \
+    chrony \
+    infiniband-diags \
+    logrotate \
+    lxc \
+    lxc-templates \
+    mercurial-py3 \
+    opensm \
+    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/vhost1.usr/etc/sysconfig/opensm b/sources/vhost1.usr/etc/sysconfig/opensm
new file mode 100644 (file)
index 0000000..5feabe4
--- /dev/null
@@ -0,0 +1,3 @@
+# (Port) GUIDS queried by ibstat
+GUIDS="0x5849560e62c30201 0x5849560e62c30202"
+PRIORITY=15