Skip to content

Commit

Permalink
Merge 005e724 into cbd7226
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkSymsCtx committed Nov 8, 2019
2 parents cbd7226 + 005e724 commit 8058f97
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 15 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ SM_LIBS += fcoelib
SM_LIBS += constants
SM_LIBS += cbtutil

UDEV_RULES = 40-multipath 55-xs-mpath-scsidev 57-usb 58-xapi
UDEV_RULES = 65-multipath 55-xs-mpath-scsidev 57-usb 58-xapi
MPATH_DAEMON = sm-multipath
MPATH_CONF = multipath.conf
SMLOG_CONF = SMlog
Expand Down
2 changes: 0 additions & 2 deletions drivers/mpath_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,8 @@ def reconfigure():

def is_working():
cmd="help"
util.SMlog("mpath cmd: %s" % cmd)
try:
(rc,stdout,stderr) = util.doexec(mpathcmd,cmd)
util.SMlog("mpath output: %s" % stdout)
m=regex3.search(stdout)
if m:
return True
Expand Down
2 changes: 1 addition & 1 deletion mk/sm.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ tests/run_python_unittests.sh
%{_unitdir}/usb-scan.socket
%{_unitdir}/mpathcount.service
%{_unitdir}/mpathcount.socket
%config /etc/udev/rules.d/40-multipath.rules
%config /etc/udev/rules.d/65-multipath.rules
%config /etc/udev/rules.d/55-xs-mpath-scsidev.rules
%config /etc/udev/rules.d/58-xapi.rules
%config /etc/multipath.xenserver/multipath.conf
Expand Down
11 changes: 0 additions & 11 deletions udev/40-multipath.rules

This file was deleted.

16 changes: 16 additions & 0 deletions udev/65-multipath.rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
SUBSYSTEM!="block", GOTO="end_mpath"
KERNEL=="nbd*", GOTO="end_mpath"
KERNEL=="td[a-z]*", GOTO="end_mpath"

IMPORT{db}="DM_MULTIPATH_DEVICE_PATH"
ACTION=="add", ENV{DM_MULTIPATH_DEVICE_PATH}=="1", GOTO="count_mpath"
ACTION=="remove", ENV{DM_MULTIPATH_DEVICE_PATH}=="1", GOTO="count_mpath"
IMPORT{db}="DM_ACTION"
ACTION=="change", ENV{DM_ACTION}=="PATH_REINSTATED", GOTO="count_mpath"
ACTION=="change", ENV{DM_ACTION}=="PATH_FAILED", GOTO="count_mpath"
GOTO="end_mpath"

LABEL="count_mpath"
ACTION=="add|change", PROGRAM=="/sbin/dmsetup info -c -o name --noheadings -j %M -m %m", RESULT=="?*", SYMLINK+="disk/by-scsid/%c/mapper"
ACTION=="*", RUN+="/opt/xensource/libexec/kickpipe mpathcount"
LABEL="end_mpath"

0 comments on commit 8058f97

Please sign in to comment.