Accepting request 227008 from home:hreinecke:branches:network:fcoe
- Fixup fcoemon.socket definitions (bnc#869392) * Add patch 0025-systemctl-cannot-start-fcoemon.socket.patch - Remove mkinitrd support - Remove duplicate configuration file (bnc#869109) OBS-URL: https://build.opensuse.org/request/show/227008 OBS-URL: https://build.opensuse.org/package/show/network:fcoe/fcoe-utils?expand=0&rev=14
This commit is contained in:
parent
57ffee7555
commit
a1bafaf1fa
31
0025-systemctl-cannot-start-fcoemon.socket.patch
Normal file
31
0025-systemctl-cannot-start-fcoemon.socket.patch
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
From 913faf7761a8fb004d44b5515b14efb0f60e9fa9 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Hannes Reinecke <hare@suse.de>
|
||||||
|
Date: Fri, 21 Mar 2014 14:46:40 +0100
|
||||||
|
Subject: systemctl cannot start fcoemon.socket
|
||||||
|
|
||||||
|
systemctl start fcoemon.socket fails, as systemd cannot find
|
||||||
|
the referenced service.
|
||||||
|
|
||||||
|
References: bnc#869392
|
||||||
|
|
||||||
|
Signed-off-by: Hannes Reinecke <hare@suse.de>
|
||||||
|
---
|
||||||
|
etc/systemd/fcoemon.socket | 4 ++++
|
||||||
|
1 file changed, 4 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/etc/systemd/fcoemon.socket b/etc/systemd/fcoemon.socket
|
||||||
|
index 4de8715..fdf7141 100644
|
||||||
|
--- a/etc/systemd/fcoemon.socket
|
||||||
|
+++ b/etc/systemd/fcoemon.socket
|
||||||
|
@@ -1,4 +1,8 @@
|
||||||
|
+[Unit]
|
||||||
|
+Description=Open-FCoE daemon control socket
|
||||||
|
+
|
||||||
|
[Socket]
|
||||||
|
+Service=fcoe.service
|
||||||
|
ListenDatagram=@/com/intel/fcoemon
|
||||||
|
PassCredentials=true
|
||||||
|
|
||||||
|
--
|
||||||
|
1.8.1.4
|
||||||
|
|
@ -1,3 +1,11 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Mar 21 14:49:35 CET 2014 - hare@suse.de
|
||||||
|
|
||||||
|
- Fixup fcoemon.socket definitions (bnc#869392)
|
||||||
|
* Add patch 0025-systemctl-cannot-start-fcoemon.socket.patch
|
||||||
|
- Remove mkinitrd support
|
||||||
|
- Remove duplicate configuration file (bnc#869109)
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Mar 12 11:25:09 CET 2014 - hare@suse.de
|
Wed Mar 12 11:25:09 CET 2014 - hare@suse.de
|
||||||
|
|
||||||
|
@ -37,8 +37,6 @@ Group: System/Daemons
|
|||||||
# git://open-fcoe.org/fcoe/fcoe-utils.git
|
# git://open-fcoe.org/fcoe/fcoe-utils.git
|
||||||
Source0: %{name}-%{version}.tar.xz
|
Source0: %{name}-%{version}.tar.xz
|
||||||
Source2: fcoe.config
|
Source2: fcoe.config
|
||||||
Source20: mkinitrd-boot.sh
|
|
||||||
Source22: mkinitrd-setup.sh
|
|
||||||
# Patches from git repository
|
# Patches from git repository
|
||||||
Patch1: 0001-man-Fix-small-typo-regarding-fcf-option.patch
|
Patch1: 0001-man-Fix-small-typo-regarding-fcf-option.patch
|
||||||
Patch2: 0002-Don-t-call-AM_INIT_AUTOMAKE-twice.patch
|
Patch2: 0002-Don-t-call-AM_INIT_AUTOMAKE-twice.patch
|
||||||
@ -66,6 +64,7 @@ Patch21: 0021-fcnsq-Fixup-help-text.patch
|
|||||||
Patch22: 0022-fcnsq-Fixup-64bit-integer-handling.patch
|
Patch22: 0022-fcnsq-Fixup-64bit-integer-handling.patch
|
||||||
Patch23: 0023-fcoemon-add-systemd-service-file.patch
|
Patch23: 0023-fcoemon-add-systemd-service-file.patch
|
||||||
Patch24: 0024-fcoemon-systemd-socket-activation.patch
|
Patch24: 0024-fcoemon-systemd-socket-activation.patch
|
||||||
|
Patch25: 0025-systemctl-cannot-start-fcoemon.socket.patch
|
||||||
|
|
||||||
# Patches from Fedora
|
# Patches from Fedora
|
||||||
Patch101: fcoe-utils-1.0.29-make.patch
|
Patch101: fcoe-utils-1.0.29-make.patch
|
||||||
@ -102,6 +101,7 @@ connections.
|
|||||||
%patch22 -p1
|
%patch22 -p1
|
||||||
%patch23 -p1
|
%patch23 -p1
|
||||||
%patch24 -p1
|
%patch24 -p1
|
||||||
|
%patch25 -p1
|
||||||
%patch101 -p1
|
%patch101 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
@ -114,17 +114,11 @@ make %{?_smp_mflags}
|
|||||||
# old init script
|
# old init script
|
||||||
rm -rf %{buildroot}/etc/init.d
|
rm -rf %{buildroot}/etc/init.d
|
||||||
|
|
||||||
# mkinitrd script
|
|
||||||
install -d ${RPM_BUILD_ROOT}/lib/mkinitrd/scripts/
|
|
||||||
install -m 755 %{S:20} ${RPM_BUILD_ROOT}/lib/mkinitrd/scripts/boot-fcoe.sh
|
|
||||||
install -m 755 %{S:22} ${RPM_BUILD_ROOT}/lib/mkinitrd/scripts/setup-fcoe.sh
|
|
||||||
|
|
||||||
# unitfile
|
# unitfile
|
||||||
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rcfcoe
|
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rcfcoe
|
||||||
|
|
||||||
# config
|
# config
|
||||||
mkdir -p %{buildroot}/var/adm/fillup-templates
|
install -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/fcoe/config
|
||||||
install -m 644 %{SOURCE2} %{buildroot}/var/adm/fillup-templates/sysconfig.fcoe
|
|
||||||
|
|
||||||
# contrib files
|
# contrib files
|
||||||
mkdir -p %{buildroot}%{_libexecdir}/fcoe
|
mkdir -p %{buildroot}%{_libexecdir}/fcoe
|
||||||
@ -139,7 +133,6 @@ done
|
|||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
%post
|
%post
|
||||||
[ -x /sbin/mkinitrd_setup ] && mkinitrd_setup
|
|
||||||
%service_add_post fcoe.service
|
%service_add_post fcoe.service
|
||||||
%fillup_only -n fcoe
|
%fillup_only -n fcoe
|
||||||
exit 0
|
exit 0
|
||||||
@ -149,7 +142,6 @@ exit 0
|
|||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
[ -x /sbin/mkinitrd_setup ] && mkinitrd_setup
|
|
||||||
%service_del_preun fcoe.service
|
%service_del_preun fcoe.service
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
@ -164,8 +156,6 @@ exit 0
|
|||||||
%config(noreplace) %{_sysconfdir}/fcoe/config
|
%config(noreplace) %{_sysconfdir}/fcoe/config
|
||||||
%config(noreplace) %{_sysconfdir}/fcoe/cfg-ethx
|
%config(noreplace) %{_sysconfdir}/fcoe/cfg-ethx
|
||||||
%config %{_sysconfdir}/bash_completion.d/
|
%config %{_sysconfdir}/bash_completion.d/
|
||||||
/var/adm/fillup-templates/sysconfig.fcoe
|
|
||||||
%{_libexecdir}/fcoe/
|
%{_libexecdir}/fcoe/
|
||||||
/lib/mkinitrd
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
@ -1,57 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
#%stage: device
|
|
||||||
#%depends: network lldpad
|
|
||||||
#%programs: fcoeadm
|
|
||||||
#%programs: fipvlan
|
|
||||||
#%programs: ip
|
|
||||||
#%programs: sed
|
|
||||||
#%programs: sleep
|
|
||||||
#%programs: vconfig
|
|
||||||
#%modules: fcoe 8021q
|
|
||||||
#%if: "$root_fcoe"
|
|
||||||
#
|
|
||||||
##### FCoE initialization
|
|
||||||
##
|
|
||||||
## This script initializes FCoE (FC over Ethernet).
|
|
||||||
|
|
||||||
load_modules
|
|
||||||
|
|
||||||
create_fcoe_vlan()
|
|
||||||
{
|
|
||||||
local if=$1
|
|
||||||
local vlan=$2
|
|
||||||
local vif=$3
|
|
||||||
|
|
||||||
vconfig add $if $vlan
|
|
||||||
tmp_vif=$(sed -n "s/\([^ ]*\).*${vlan}.*${if}/\1/p" /proc/net/vlan/config)
|
|
||||||
if [ "$vif" ] && [ "$tmp_vif" != "$vif" ] ; then
|
|
||||||
ip link set dev $tmp_vif name $vif
|
|
||||||
fi
|
|
||||||
wait_for_events
|
|
||||||
ip link set $if up
|
|
||||||
ip link set $vif up
|
|
||||||
}
|
|
||||||
|
|
||||||
wait_for_fcoe_if()
|
|
||||||
{
|
|
||||||
local ifname=$1
|
|
||||||
local retry_count=$udev_timeout
|
|
||||||
|
|
||||||
echo -n "Wait for FCoE link on $ifname: "
|
|
||||||
while [ $retry_count -gt 0 ] ; do
|
|
||||||
status=$(fcoeadm -i $ifname 2> /dev/null | sed -n "s/.*State: *\(.*\)/\1/p")
|
|
||||||
if [ "$status" = "Online" ] ; then
|
|
||||||
echo "Ok"
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
echo -n "."
|
|
||||||
retry_count=$(($retry_count-1))
|
|
||||||
sleep 2
|
|
||||||
done
|
|
||||||
|
|
||||||
emergency "Failed!"
|
|
||||||
}
|
|
||||||
|
|
||||||
create_fcoe_vlan $fcoe_if $fcoe_vlan $fcoe_vif
|
|
||||||
fipvlan -s $fcoe_if
|
|
||||||
wait_for_fcoe_if $fcoe_vif
|
|
@ -1,69 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
#
|
|
||||||
#%stage: device
|
|
||||||
#
|
|
||||||
|
|
||||||
check_fcoe_root() {
|
|
||||||
local devname=${1##/dev/}
|
|
||||||
local sysfs_path
|
|
||||||
|
|
||||||
if [ -d /sys/block/$devname/device ] ; then
|
|
||||||
sysfs_path=$(cd -P /sys/block/$devname/device 2> /dev/null; echo $PWD)
|
|
||||||
fi
|
|
||||||
if [ -z "$sysfs_path" ] ; then
|
|
||||||
return;
|
|
||||||
fi
|
|
||||||
|
|
||||||
case "$sysfs_path" in
|
|
||||||
*rport-*)
|
|
||||||
shost_path=${sysfs_path%%/rport-*}
|
|
||||||
shost=${shost_path##*/}
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
if [ -n "$shost_path" ] && [ -d "${shost_path}/fc_host/$shost" ] ; then
|
|
||||||
if grep -q fcoe $shost_path/fc_host/$shost/symbolic_name ; then
|
|
||||||
ifpath=${shost_path%/host*}
|
|
||||||
ifname=${ifpath##*/}
|
|
||||||
echo "$ifname"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
for bd in $blockdev; do
|
|
||||||
update_blockdev $bd
|
|
||||||
ifname="$(check_fcoe_root $bd)"
|
|
||||||
if [ "$ifname" ]; then
|
|
||||||
if [ -f /proc/net/vlan/$ifname ] ; then
|
|
||||||
fcoe_vif=$ifname
|
|
||||||
fcoe_if=$(sed -n 's/Device: \(.*\)/\1/p' /proc/net/vlan/$ifname)
|
|
||||||
fcoe_vlan=$(sed -n 's/.*VID: \([0-9]*\).*/\1/p' /proc/net/vlan/$ifname)
|
|
||||||
else
|
|
||||||
fcoe_if=$ifname
|
|
||||||
fcoe_vif=$ifname
|
|
||||||
fi
|
|
||||||
root_fcoe=1
|
|
||||||
# This can break, but network does not support more interfaces for now
|
|
||||||
if [ -z "$interface" ] ; then
|
|
||||||
interface="$fcoe_if"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
save_var root_fcoe
|
|
||||||
save_var fcoe_if
|
|
||||||
save_var fcoe_vif
|
|
||||||
save_var fcoe_vlan
|
|
||||||
|
|
||||||
if [ "${root_fcoe}" ] ; then
|
|
||||||
cp /etc/hba.conf ${tmp_mnt}/etc
|
|
||||||
libhbalinux=$(sed -n 's/org.open-fcoe.libhbalinux *\(.*\)/\1/p' /etc/hba.conf)
|
|
||||||
if [ "$libhbalinux" ] ; then
|
|
||||||
cp $libhbalinux ${tmp_mnt}$libhbalinux
|
|
||||||
fi
|
|
||||||
if [ -f "/etc/fcoe/cfg-${fcoe_vif}" ] ; then
|
|
||||||
# copy the fcoe configuration
|
|
||||||
mkdir $tmp_mnt/etc/fcoe
|
|
||||||
cp /etc/fcoe/cfg-${fcoe_vif} ${tmp_mnt}/etc/fcoe
|
|
||||||
fi
|
|
||||||
fi
|
|
Loading…
Reference in New Issue
Block a user