[opensm] Update to latest upstream version Add support for running more than one instance via sysv init scrip
Doug Ledford
dledford at fedoraproject.org
Wed Jul 20 21:25:10 UTC 2011
commit a2783db729e9bc2915ca2da596165429f2ae004f
Author: Doug Ledford <dledford at redhat.com>
Date: Wed Jul 20 17:24:54 2011 -0400
Update to latest upstream version
Add support for running more than one instance via sysv init script
Signed-off-by: Doug Ledford <dledford at redhat.com>
.gitignore | 1 +
opensm.conf | 59 +++++++++++++++++++++++++++++++++++++++----
opensm.initd | 40 ++++++++++++++++++++++++++---
opensm.spec | 34 ++++++++++++++++---------
opensm.sysconfig | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
sources | 2 +-
6 files changed, 184 insertions(+), 24 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 26ffc26..65c6f14 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,4 @@ opensm-3.3.1.tar.gz
opensm-3.3.2.tar.gz
opensm-3.3.3.tar.gz
opensm-3.3.5.tar.gz
+opensm-3.3.9.tar.gz
diff --git a/opensm.conf b/opensm.conf
index 15cde45..8abfe6d 100644
--- a/opensm.conf
+++ b/opensm.conf
@@ -33,6 +33,9 @@ lmc 0
# ESP0. Otherwise, LMC value for ESP0s is 0.
lmc_esp0 FALSE
+# sm_sl determines SMSL used for SM/SA communication
+sm_sl 0
+
# The code of maximal time a packet can live in a switch
# The actual time is 4.096usec * 2^<packet_life_time>
# The value 0x14 disables this mechanism
@@ -88,7 +91,7 @@ overrun_errors_threshold 0x08
# PARTITIONING OPTIONS
#
# Partition configuration file to be used
-partition_config_file /etc/ofed/partitions.conf
+partition_config_file /etc/rdma/partitions.conf
# Disable partition enforcement by switches
no_partition_enforcement FALSE
@@ -118,6 +121,12 @@ port_profile_switch_nodes FALSE
# Name of file with port guids to be ignored by port profiling
port_prof_ignore_file (null)
+# The file holding routing weighting factors per output port
+hop_weights_file (null)
+
+# The file holding non-default port order per switch for DOR routing
+dimn_ports_file (null)
+
# Routing engine
# Multiple routing engines can be specified separated by
# commas so that specific ordering of routing algorithms will
@@ -145,6 +154,14 @@ root_guid_file (null)
# One guid in each line
cn_guid_file (null)
+# The file holding the fat-tree I/O node guids
+# One guid in each line
+io_guid_file (null)
+
+# Number of reverse hops allowed for I/O nodes
+# Used for connectivity between I/O nodes connected to Top Switches
+max_reverse_hops 0
+
# The file holding the node ids which will be used by Up/Down algorithm instead
# of GUIDs (one guid and id in each line)
ids_guid_file (null)
@@ -152,15 +169,25 @@ ids_guid_file (null)
# The file holding guid routing order guids (for MinHop and Up/Down)
guid_routing_order_file (null)
+# Do mesh topology analysis (for LASH algorithm)
+do_mesh_analysis FALSE
+
+# Starting VL for LASH algorithm
+lash_start_vl 0
+
# SA database file name
sa_db_file (null)
+# If TRUE causes OpenSM to dump SA database at the end of
+# every light sweep, regardless of the verbosity level
+sa_db_dump FALSE
+
#
# HANDOVER - MULTIPLE SMs OPTIONS
#
# SM priority used for deciding who is the master
# Range goes from 0 (lowest priority) to 15 (highest).
-sm_priority 15
+sm_priority 0
# If TRUE other SMs on the subnet should be ignored
ignore_other_sm FALSE
@@ -179,11 +206,21 @@ honor_guid2lid_file FALSE
# TIMING AND THREADING OPTIONS
#
# Maximum number of SMPs sent in parallel
-max_wire_smps 32
+max_wire_smps 4
+
+# Maximum number of timeout based SMPs allowed to be outstanding
+# A value less than or equal to max_wire_smps disables this mechanism
+max_wire_smps2 4
+
+# The timeout in [usec] used for sending SMPs above max_wire_smps limit and below max_wire_smps2 limit
+max_smps_timeout 600000
# The maximum time in [msec] allowed for a transaction to complete
transaction_timeout 200
+# The maximum number of retries allowed for a transaction to complete
+transaction_retries 3
+
# Maximal time in [msec] a message can stay in the incoming message queue.
# If there is more than one message in the queue and the last message
# stayed in the queue more than this value, any SA request will be
@@ -197,7 +234,7 @@ single_thread FALSE
# MISC OPTIONS
#
# Daemon mode
-daemon TRUE
+daemon FALSE
# SM Inactive
sm_inactive FALSE
@@ -205,11 +242,18 @@ sm_inactive FALSE
# Babbling Port Policy
babbling_port_policy FALSE
+# Use Optimized SLtoVLMapping programming if supported by device
+use_optimized_slvl FALSE
+
#
# Event Plugin Options
#
+# Event plugin name(s)
event_plugin_name (null)
+# Options string that would be passed to the plugin(s)
+event_plugin_options (null)
+
#
# Node name map for mapping node's to more descriptive node descriptions
# (man ibnetdiscover for more information)
@@ -263,7 +307,7 @@ console_port 10000
qos FALSE
# QoS policy file to be used
-qos_policy_file /etc/ofed/qos-policy.conf
+qos_policy_file /etc/rdma/qos-policy.conf
# QoS default options
qos_max_vls 0
@@ -301,10 +345,13 @@ qos_rtr_vlarb_low (null)
qos_rtr_sl2vl (null)
# Prefix routes file name
-prefix_routes_file /etc/ofed/prefix-routes.conf
+prefix_routes_file /etc/rdma/prefix-routes.conf
#
# IPv6 Solicited Node Multicast (SNM) Options
#
consolidate_ipv6_snm_req FALSE
+# Log prefix
+log_prefix (null)
+
diff --git a/opensm.initd b/opensm.initd
index 59d8c4d..3ae4b8b 100644
--- a/opensm.initd
+++ b/opensm.initd
@@ -18,15 +18,45 @@
prog=/usr/sbin/opensm
PID_FILE=/var/run/opensm.pid
+[ -f /etc/sysconfig/opensm ] && . /etc/sysconfig/opensm
+
+[ -n "$PRIORITY" ] && prio="-p $PRIORITY"
+
ACTION=$1
start()
{
local OSM_PID=
+ 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
[ -f /var/lock/subsys/opensm ] && return 0
# Start opensm
- echo -n "Starting IB Subnet Manager:"
- $prog -B > /dev/null 2>&1
+ echo -n "Starting IB Subnet Manager: "
+ [ -n "$PRIORITY" ] && echo -n "Priority=$PRIORITY "
+ [ -n "$GUIDS" ] && echo -n "$GUID_CNT guids "
+ [ -n "$CONFIGS" ] && echo -n "$CONFIG_CNT instances "
+ if [ -n "$GUIDS" ]; then
+ for guid in $GUIDS; do
+ $prog -B $prio -g $guid >/dev/null 2>&1
+ done
+ elif [ -n "$CONFIGS" ]; then
+ for config in $CONFIGS; do
+ $prog -B $prio -F $config >/dev/null 2>&1
+ done
+ else
+ $prog -B $prio >/dev/null 2>&1
+ fi
sleep 1
OSM_PID=`pidof $prog`
checkpid $OSM_PID
@@ -42,7 +72,7 @@ stop()
{
[ -f /var/lock/subsys/opensm ] || return 0
- echo -n "Stopping IB Subnet Manager."
+ echo -n "Stopping IB Subnet Manager(s)."
OSM_PID=`cat $PID_FILE`
@@ -55,7 +85,7 @@ stop()
return 0
fi
# Kill opensm
- kill -15 $OSM_PID > /dev/null 2>&1
+ kill -15 $OSM_PID >/dev/null 2>&1
cnt=0
while [ $cnt -lt 6 ]; do
checkpid $OSM_PID
@@ -64,7 +94,7 @@ stop()
fi
echo -n "."
sleep 1
- cnt=$(( $cnt + 1 ))
+ let cnt++
done
checkpid $OSM_PID
diff --git a/opensm.spec b/opensm.spec
index f97519d..92635f4 100644
--- a/opensm.spec
+++ b/opensm.spec
@@ -1,6 +1,6 @@
Name: opensm
-Version: 3.3.5
-Release: 2%{?dist}
+Version: 3.3.9
+Release: 1%{?dist}
Summary: OpenIB InfiniBand Subnet Manager and management utilities
Group: System Environment/Daemons
License: GPLv2 or BSD
@@ -9,8 +9,9 @@ Source0: http://www.openfabrics.org/downloads/management/%{name}-%{version}.tar.
Source1: opensm.conf
Source2: opensm.logrotate
Source3: opensm.initd
+Source4: opensm.sysconfig
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-BuildRequires: libibmad-devel = 1.3.4, libtool, bison, flex, byacc
+BuildRequires: libibmad-devel = 1.3.7, libtool, bison, flex, byacc
Requires: %{name}-libs = %{version}-%{release}, logrotate, rdma
ExcludeArch: s390 s390x
@@ -52,18 +53,19 @@ Static version of opensm libraries
make %{?_smp_mflags}
%install
-rm -rf $RPM_BUILD_ROOT
-make install DESTDIR=$RPM_BUILD_ROOT
+rm -rf %{buildroot}
+make install DESTDIR=%{buildroot}
# remove unpackaged files from the buildroot
-rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
-rm -fr $RPM_BUILD_ROOT%{_sysconfdir}/init.d
-install -D -m644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rdma/opensm.conf
-install -D -m644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/opensm
-install -D -m755 %{SOURCE3} $RPM_BUILD_ROOT%{_initddir}/opensm
+rm -f %{buildroot}%{_libdir}/*.la
+rm -fr %{buildroot}%{_sysconfdir}/init.d
+install -D -m644 %{SOURCE1} %{buildroot}%{_sysconfdir}/rdma/opensm.conf
+install -D -m644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/opensm
+install -D -m755 %{SOURCE3} %{buildroot}%{_initddir}/opensm
+install -D -m644 %{SOURCE4} %{buildroot}%{_sysconfdir}/sysconfig/opensm
mkdir -p ${RPM_BUILD_ROOT}/var/cache/opensm
%clean
-rm -rf $RPM_BUILD_ROOT
+rm -rf %{buildroot}
%post
if [ $1 = 1 ]; then
@@ -91,6 +93,7 @@ fi
%{_mandir}/man8/*
%config(noreplace) %{_sysconfdir}/logrotate.d/opensm
%config(noreplace) %{_sysconfdir}/rdma/opensm.conf
+%config(noreplace) %{_sysconfdir}/sysconfig/opensm
%doc AUTHORS COPYING ChangeLog INSTALL README NEWS
%files libs
@@ -107,6 +110,14 @@ fi
%{_libdir}/lib*.a
%changelog
+* Wed Jul 20 2011 Doug Ledford <dledford at redhat.com> - 3.3.9-1
+- Update to latest upstream version
+- Add /etc/sysconfig/opensm for use by opensm init script
+- Enable the ability to start more than one instance of opensm for multiple
+ fabric support
+- Enable the ability to start opensm with a priority other than default for
+ support of backup opensm instances
+
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 3.3.5-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
@@ -140,4 +151,3 @@ fi
* Sun Jun 08 2008 Doug Ledford <dledford at redhat.com> - 3.2.1-1
- Initial package for Fedora review process
-
diff --git a/opensm.sysconfig b/opensm.sysconfig
new file mode 100644
index 0000000..5f21efa
--- /dev/null
+++ b/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.<number>
+# (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
diff --git a/sources b/sources
index f290809..e5916d5 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-3bdd9f288b50c9031883d2d7c2f15937 opensm-3.3.5.tar.gz
+5e9b461073f7cfbafe0207e014796f9f opensm-3.3.9.tar.gz
More information about the scm-commits
mailing list