From 6ea135118252a1ddd4726cbaf4b51ad379ecb9e3 Mon Sep 17 00:00:00 2001 From: Packit Service Date: Dec 10 2020 00:13:12 +0000 Subject: Add sources defined in the spec file --- diff --git a/SPECS/opensm-3.3.23.tar.gz b/SPECS/opensm-3.3.23.tar.gz new file mode 100644 index 0000000..53ff32d Binary files /dev/null and b/SPECS/opensm-3.3.23.tar.gz differ diff --git a/SPECS/opensm.launch b/SPECS/opensm.launch new file mode 100644 index 0000000..ba21a71 --- /dev/null +++ b/SPECS/opensm.launch @@ -0,0 +1,44 @@ +#!/bin/bash +# +# Launch the necessary OpenSM daemons for systemd +# +# sysconfig: /etc/sysconfig/opensm +# config: /etc/rdma/opensm.conf +# + +shopt -s nullglob + +prog=/usr/sbin/opensm +[ -f /etc/sysconfig/opensm ] && . /etc/sysconfig/opensm + +[ -n "$PRIORITY" ] && prio="-p $PRIORITY" + +if [ -z "$GUIDS" ]; then + CONFIGS="" + CONFIG_CNT=0 + for conf in /etc/rdma/opensm.conf.[0-9]*; do + CONFIGS="$CONFIGS $conf" + let CONFIG_CNT++ + done +else + GUID_CNT=0 + for guid in $GUIDS; do + let GUID_CNT++ + done +fi +# Start opensm +if [ -n "$GUIDS" ]; then + SUBNET_COUNT=0 + for guid in $GUIDS; do + SUBNET_PREFIX=`printf "0xfe800000000000%02d" $SUBNET_COUNT` + (while true; do $prog $prio -g $guid --subnet_prefix $SUBNET_PREFIX; sleep 30; done) & + let SUBNET_COUNT++ + done +elif [ -n "$CONFIGS" ]; then + for config in $CONFIGS; do + (while true; do $prog $prio -F $config; sleep 30; done) & + done +else + (while true; do $prog $prio; sleep 30; done) & +fi +exit 0 diff --git a/SPECS/opensm.logrotate b/SPECS/opensm.logrotate new file mode 100644 index 0000000..e16e227 --- /dev/null +++ b/SPECS/opensm.logrotate @@ -0,0 +1,7 @@ +/var/log/opensm.log { + missingok + notifempty + copytruncate + weekly + compress +} diff --git a/SPECS/opensm.partitions b/SPECS/opensm.partitions new file mode 100644 index 0000000..958afeb --- /dev/null +++ b/SPECS/opensm.partitions @@ -0,0 +1,74 @@ +# For reference: +# IPv4 IANA reserved multicast addresses: +# http://www.iana.org/assignments/multicast-addresses/multicast-addresses.txt +# IPv6 IANA reserved multicast addresses: +# http://www.iana.org/assignments/ipv6-multicast-addresses/ipv6-multicast-addresses.xml +# +# mtu = +# 1 = 256 +# 2 = 512 +# 3 = 1024 +# 4 = 2048 +# 5 = 4096 +# +# rate = +# 2 = 2.5 GBit/s (SDR 1x) +# 3 = 10 GBit/s (SDR 4x/QDR 1x) +# 4 = 30 GBit/s (SDR 12x) +# 5 = 5 GBit/s (DDR 1x) +# 6 = 20 GBit/s (DDR 4x) +# 7 = 40 GBit/s (QDR 4x) +# 8 = 60 GBit/s (DDR 12x) +# 9 = 80 GBit/s (QDR 8x) +# 10 = 120 GBit/s (QDR 12x) +# If ExtendedLinkSpeeds are supported, then these rate values are valid too +# 11 = 14 GBit/s (FDR 1x) +# 12 = 56 GBit/s (FDR 4x) +# 13 = 112 GBit/s (FDR 8x) +# 14 = 168 GBit/s (FDR 12x) +# 15 = 25 GBit/s (EDR 1x) +# 16 = 100 GBit/s (EDR 4x) +# 17 = 200 GBit/s (EDR 8x) +# 18 = 300 GBit/s (EDR 12x) + +Default=0x7fff, rate=3, mtu=4, scope=2, defmember=full: + ALL, ALL_SWITCHES=full; +Default=0x7fff, ipoib, rate=3, mtu=4, scope=2: + mgid=ff12:401b::ffff:ffff # IPv4 Broadcast address + mgid=ff12:401b::1 # IPv4 All Hosts group + mgid=ff12:401b::2 # IPv4 All Routers group + mgid=ff12:401b::16 # IPv4 IGMP group + mgid=ff12:401b::fb # IPv4 mDNS group + mgid=ff12:401b::fc # IPv4 Multicast Link Local Name Resolution group + mgid=ff12:401b::101 # IPv4 NTP group + mgid=ff12:401b::202 # IPv4 Sun RPC + mgid=ff12:601b::1 # IPv6 All Hosts group + mgid=ff12:601b::2 # IPv6 All Routers group + mgid=ff12:601b::16 # IPv6 MLDv2-capable Routers group + mgid=ff12:601b::fb # IPv6 mDNS group + mgid=ff12:601b::101 # IPv6 NTP group + mgid=ff12:601b::202 # IPv6 Sun RPC group + mgid=ff12:601b::1:3 # IPv6 Multicast Link Local Name Resolution group + ALL=full, ALL_SWITCHES=full; + +# 40GBit, 4K MTU IPoIB example +#ib0_2=0x0002, rate=7, mtu=5, scope=2, defmember=full: +# ALL, ALL_SWITCHES=full; +#ib0_2=0x0002, ipoib, rate=7, mtu=5, scope=2: +# mgid=ff12:401b::ffff:ffff # IPv4 Broadcast address +# mgid=ff12:401b::1 # IPv4 All Hosts group +# mgid=ff12:401b::2 # IPv4 All Routers group +# mgid=ff12:401b::16 # IPv4 IGMP group +# mgid=ff12:401b::fb # IPv4 mDNS group +# mgid=ff12:401b::fc # IPv4 Multicast Link Local Name Resolution group +# mgid=ff12:401b::101 # IPv4 NTP group +# mgid=ff12:401b::202 # IPv4 Sun RPC +# mgid=ff12:601b::1 # IPv6 All Hosts group +# mgid=ff12:601b::2 # IPv6 All Routers group +# mgid=ff12:601b::16 # IPv6 MLDv2-capable Routers group +# mgid=ff12:601b::fb # IPv6 mDNS group +# mgid=ff12:601b::101 # IPv6 NTP group +# mgid=ff12:601b::202 # IPv6 Sun RPC group +# mgid=ff12:601b::1:3 # IPv6 Multicast Link Local Name Resolution group +# ALL=full, ALL_SWITCHES=full; + diff --git a/SPECS/opensm.rwtab b/SPECS/opensm.rwtab new file mode 100644 index 0000000..c298bac --- /dev/null +++ b/SPECS/opensm.rwtab @@ -0,0 +1 @@ +empty /var/cache/opensm diff --git a/SPECS/opensm.service b/SPECS/opensm.service new file mode 100644 index 0000000..6264b4d --- /dev/null +++ b/SPECS/opensm.service @@ -0,0 +1,14 @@ +[Unit] +Description=Starts the OpenSM InfiniBand fabric Subnet Manager +Documentation=man:opensm +DefaultDependencies=false +Before=network.target remote-fs-pre.target +Requires=rdma.service +After=rdma.service + +[Service] +Type=forking +ExecStart=/usr/libexec/opensm-launch + +[Install] +WantedBy=network.target diff --git a/SPECS/opensm.sysconfig b/SPECS/opensm.sysconfig new file mode 100644 index 0000000..5f21efa --- /dev/null +++ b/SPECS/opensm.sysconfig @@ -0,0 +1,72 @@ +# Problem #1: Multiple IB fabrics needing a subnet manager +# +# In the event that a machine has more than one IB subnet attached, +# and that machine is an opensm server, by default, opensm will +# only attach to one port and will not manage the fabric on the +# other port. There are two ways to solve this problem: +# +# 1) Start opensm on multiple machines and configure it to manage +# different fabrics on each machine +# 2) Configure opensm to start multiple instances on a single +# machine +# +# Both solutions to this problem require non-standard configurations. +# In other words, you would normally have to modify /etc/rdma/opensm.conf +# and once you do that, the file will no longer be updated for new +# options when opensm is upgraded. In an effort to allow people to +# have more than one subnet managed by opensm without having to modify +# the system default opensm.conf file, we have enabled two methods +# for modifying the default opensm config items needed to enable +# multiple fabric management. +# +# Method #1: Create multiple opensm.conf files in non-standard locations +# Copy /etc/rdma/opensm.conf to /etc/rdma/opensm.conf. +# (do this once for each instance you want started) +# Edit each copy of the opensm.conf file to reflect the necessary changes +# for a multiple instance startup. If you need to manage more than +# one fabric, you will have to change the guid option in each file +# to specify the guid of the specific port you want opensm attached +# to. +# +# The advantage to method #1 is that, on the off chance you want to do +# really special custom things on different ports, like have different +# QoS settings depending on which port you are attached to, you have the +# freedom to edit any and all settings for each instance without those +# changes affecting other instances or being lost when opensm upgrades. +# +# Method #2: Specify multiple GUIDS variable entries in this file +# Uncomment the below GUIDS variable and enter each guid you need to attach +# to into the list. If using this method you need to enter each +# guid into the list as we won't attach to any default ports, only +# those specified in the list. +# +#GUIDS="0x0002c90300048ca1 0x0002c90300048ca2" +# +# The obvious advantage to method #2 is that it's simple and doesn't +# clutter up your file system, but it is far more limited in what you +# can do. If you enable method #2, then even if you create the files +# referenced in method #1, they will be ignored. +# +# Problem #2: Activating a backup subnet manager +# +# The default priority of opensm is set so that it wants to be the +# primary subnet manager. This is great when you are only running +# opensm on one server, but if you want to have a non-primary opensm +# instance for failover, then you have to manually edit the opensm.conf +# file like for problem #1. This carries with it all the problems +# listed above. If you wish to enable opensm as a non-primary manager, +# then you can uncomment the PRIORITY variable below and set it to +# some number between 0 and 15, where 15 is the highest priority and +# the primary manager, with 0 being the lowest backup server. This method +# will work with the GUIDS option above, and also with the multiple +# config files in method #1 above. However, only a single priority is +# supported here. If you wanted more than one priority (say this machine +# is the primary on the first fabric, and second on the second fabric, +# while the other opensm server is primary on the second fabric and +# second on the primary), then the only way to do that is to use method #1 +# above and individually edit the config files. If you edit the config +# files to set the priority and then also set the priority here, then +# this setting will override the config files and render that particular +# edit useless. +# +#PRIORITY=15