Skip to content

Commit 0203073

Browse files
committed
Remove support for FCoE Storage Repositories
Support for FCoE has been removed from upstream distributions and user space tools so we can no longer support this storage type. Signed-off-by: Mark Syms <[email protected]>
1 parent 3a2ce72 commit 0203073

File tree

8 files changed

+8
-297
lines changed

8 files changed

+8
-297
lines changed

Makefile

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ SM_DRIVERS += LVHDoISCSI
1313
SM_DRIVERS += LVHDoHBA
1414
SM_DRIVERS += SHM
1515
SM_DRIVERS += SMB
16-
SM_DRIVERS += LVHDoFCoE
1716

1817
SM_LIBS := SR
1918
SM_LIBS += SRCommand
@@ -56,7 +55,6 @@ SM_LIBS += resetvdis
5655
SM_LIBS += wwid_conf
5756
SM_LIBS += trim_util
5857
SM_LIBS += pluginutil
59-
SM_LIBS += fcoelib
6058
SM_LIBS += constants
6159
SM_LIBS += cbtutil
6260
SM_LIBS += sr_health_check
@@ -183,7 +181,6 @@ install: precheck
183181
cd $(SM_STAGING)$(SM_DEST) && rm -f RawISCSISR && ln -sf RawISCSISR.py ISCSISR
184182
cd $(SM_STAGING)$(SM_DEST) && rm -f LVHDoISCSISR && ln -sf LVHDoISCSISR.py LVMoISCSISR
185183
cd $(SM_STAGING)$(SM_DEST) && rm -f LVHDoHBASR && ln -sf LVHDoHBASR.py LVMoHBASR
186-
cd $(SM_STAGING)$(SM_DEST) && rm -f LVHDoFCoESR && ln -sf LVHDoFCoESR.py LVMoFCoESR
187184
ln -sf $(SM_DEST)mpathutil.py $(SM_STAGING)/sbin/mpathutil
188185
install -m 755 drivers/02-vhdcleanup $(SM_STAGING)$(MASTER_SCRIPT_DEST)
189186
install -m 755 drivers/lvhd-thin $(SM_STAGING)$(PLUGIN_SCRIPT_DEST)
@@ -195,7 +192,6 @@ install: precheck
195192
install -m 755 drivers/intellicache-clean $(SM_STAGING)$(PLUGIN_SCRIPT_DEST)
196193
install -m 755 drivers/trim $(SM_STAGING)$(PLUGIN_SCRIPT_DEST)
197194
install -m 755 drivers/iscsilib.py $(SM_STAGING)$(SM_DEST)
198-
install -m 755 drivers/fcoelib.py $(SM_STAGING)$(SM_DEST)
199195
mkdir -p $(SM_STAGING)$(LIBEXEC)
200196
install -m 755 scripts/local-device-change $(SM_STAGING)$(LIBEXEC)
201197
install -m 755 scripts/check-device-sharing $(SM_STAGING)$(LIBEXEC)

drivers/LVHDoFCoESR.py

Lines changed: 0 additions & 99 deletions
This file was deleted.

drivers/cleanup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2984,7 +2984,7 @@ def daemonize():
29842984
def normalizeType(type):
29852985
if type in LVHDSR.SUBTYPES:
29862986
type = SR.TYPE_LVHD
2987-
if type in ["lvm", "lvmoiscsi", "lvmohba", "lvmofcoe"]:
2987+
if type in ["lvm", "lvmoiscsi", "lvmohba"]:
29882988
# temporary while LVHD is symlinked as LVM
29892989
type = SR.TYPE_LVHD
29902990
if type in ["ext", "nfs", "ocfsoiscsi", "ocfsohba", "smb"]:

drivers/devscan.py

Lines changed: 6 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
import xml.dom.minidom
2121
import xs_errors
2222
import glob
23-
import fcoelib
2423

2524
DEVPATH = '/dev/disk/by-id'
2625
DMDEVPATH = '/dev/mapper'
@@ -50,39 +49,17 @@ def adapters(filterstr="any"):
5049
dict = {}
5150
devs = {}
5251
adt = {}
53-
fcoe_eth_info = {}
54-
fcoe_port_info = []
55-
56-
fcoe_port_info = fcoelib.parse_fcoe_port_name_info()
57-
if filterstr == "fcoe":
58-
fcoe_eth_info = fcoelib.parse_fcoe_eth_info()
59-
6052
for a in os.listdir(SYSFS_PATH1):
6153
proc = match_hbadevs(a, filterstr)
6254
if not proc:
6355
continue
6456

65-
#Special casing for fcoe
6657
port_name_path = os.path.join(SYSFS_PATH1, a, 'device', \
6758
'fc_host', a, 'port_name')
6859
port_name_path_exists = os.path.exists(port_name_path)
6960
util.SMlog("Port name path exists %s" % port_name_path_exists)
70-
if filterstr == "fcoe" and not port_name_path_exists:
71-
continue
7261
if port_name_path_exists:
7362
port_name = _get_port_name(port_name_path)
74-
#If we are probing for fcoe luns/ adapters and if the port name
75-
#in /sys/class/scsi_host/a/device/fc_host/a/port_name does not match
76-
#one in the output of 'fcoeadm -i', then we shouldn't display that
77-
#lun/adapter.
78-
#On the other hand, if we are probing for hba luns, and if the
79-
#port name in /sys/class/scsi_host/a/device/fc_host/a/port_name
80-
#matches one in the output of 'fcoeadm -i', then we shouldn't
81-
#display that lun/adapter, because that would have been discovered
82-
#via the FCoE protocol.
83-
if (filterstr == "fcoe" and port_name not in fcoe_port_info) or \
84-
(filterstr != "fcoe" and port_name in fcoe_port_info):
85-
continue
8663

8764
adt[a] = proc
8865
id = a.replace("host", "")
@@ -96,7 +73,6 @@ def adapters(filterstr="any"):
9673
for p in [os.path.join(SYSFS_PATH1, a, "device", "session*"), os.path.join(SYSFS_PATH1, a, "device"), \
9774
os.path.join(SYSFS_PATH2, "%s:*" % id)]:
9875
paths += glob.glob(p)
99-
10076
if not len(paths):
10177
continue
10278
for path in paths:
@@ -124,12 +100,8 @@ def adapters(filterstr="any"):
124100
for lun in os.listdir(sysfs):
125101
if not match_LUNs(lun, tgt):
126102
continue
127-
#Special casing for fcoe, populating eth information
128-
eth = ""
129-
if i in fcoe_eth_info.keys():
130-
eth = fcoe_eth_info[i]
131-
dir = os.path.join(sysfs, lun, "device")
132-
(dev, entry) = _extract_dev(dir, proc, id, lun, eth)
103+
dir = os.path.join(sysfs,lun,"device")
104+
(dev, entry) = _extract_dev(dir, proc, id, lun)
133105
update_devs_dict(devs, dev, entry)
134106

135107
# for new mptsas sysfs entries, check for phy* node
@@ -218,9 +190,8 @@ def _parseHostId(str):
218190
def match_hbadevs(s, filterstr):
219191
driver_name = _get_driver_name(s)
220192
if match_host(s) and not match_blacklist(driver_name) \
221-
and (filterstr == "any" or filterstr == "fcoe" or \
222-
match_filterstr(filterstr, driver_name)):
223-
return driver_name
193+
and ( filterstr == "any" or match_filterstr(filterstr, driver_name) ):
194+
return driver_name
224195
else:
225196
return ""
226197

@@ -275,15 +246,13 @@ def _get_block_device_name_with_kernel_3x(device_dir):
275246
else:
276247
return INVALID_DEVICE_NAME
277248

278-
279-
def _extract_dev(device_dir, procname, host, target, eths=""):
249+
def _extract_dev(device_dir, procname, host, target):
280250
"""Returns device name and creates dictionary entry for it"""
281251
dev = _extract_dev_name(device_dir)
282252
entry = {}
283253
entry['procname'] = procname
284254
entry['host'] = host
285255
entry['target'] = target
286-
entry['eth'] = eths
287256
return (dev, entry)
288257

289258

@@ -349,8 +318,6 @@ def scan(srobj):
349318
obj.id = ids[3]
350319
obj.lun = ids[4]
351320
obj.hba = hba['procname']
352-
if 'eth' in hba and hba['eth']:
353-
obj.eth = hba['eth']
354321
obj.numpaths = 1
355322
if obj.SCSIid in vdis:
356323
vdis[obj.SCSIid].numpaths += 1
@@ -363,12 +330,10 @@ def scan(srobj):
363330
d = dom.createElement("BlockDevice")
364331
e.appendChild(d)
365332

366-
for attr in ['path', 'numpaths', 'SCSIid', 'vendor', 'serial', 'size', 'adapter', 'channel', 'id', 'lun', 'hba', 'eth']:
333+
for attr in ['path', 'numpaths', 'SCSIid', 'vendor', 'serial', 'size', 'adapter', 'channel', 'id', 'lun', 'hba']:
367334
try:
368335
aval = getattr(obj, attr)
369336
except AttributeError:
370-
if attr in ['eth']:
371-
continue
372337
raise xs_errors.XenError('InvalidArg',
373338
opterr='Missing required field [%s]' % attr)
374339
entry = dom.createElement(attr)

drivers/fcoelib.py

Lines changed: 0 additions & 63 deletions
This file was deleted.

drivers/mpathcount.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
import mpath_cli
2424
import json
2525

26-
supported = ['iscsi', 'lvmoiscsi', 'rawhba', 'lvmohba', 'ocfsohba', 'ocfsoiscsi', 'netapp', 'lvmofcoe', 'gfs2']
26+
supported = ['iscsi', 'lvmoiscsi', 'rawhba', 'lvmohba', 'ocfsohba', 'ocfsoiscsi', 'netapp', 'gfs2']
2727

2828
LOCK_TYPE_HOST = "host"
2929
LOCK_NS1 = "mpathcount1"

mk/sm.spec.in

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,11 +147,9 @@ tests/run_python_unittests.sh
147147
/opt/xensource/sm/LVHDSR.py
148148
/opt/xensource/sm/LVHDoHBASR.py
149149
/opt/xensource/sm/LVHDoISCSISR.py
150-
/opt/xensource/sm/LVHDoFCoESR.py
151150
/opt/xensource/sm/LVMSR
152151
/opt/xensource/sm/LVMoHBASR
153152
/opt/xensource/sm/LVMoISCSISR
154-
/opt/xensource/sm/LVMoFCoESR
155153
/opt/xensource/sm/NFSSR
156154
/opt/xensource/sm/NFSSR.py
157155
/opt/xensource/sm/SMBSR
@@ -168,7 +166,6 @@ tests/run_python_unittests.sh
168166
/opt/xensource/sm/flock.py
169167
/opt/xensource/sm/ipc.py
170168
/opt/xensource/sm/iscsilib.py
171-
/opt/xensource/sm/fcoelib.py
172169
/opt/xensource/sm/journaler.py
173170
/opt/xensource/sm/lcache.py
174171
/opt/xensource/sm/lock.py

0 commit comments

Comments
 (0)