diff --git a/Makefile b/Makefile index a46926963..61b0b9072 100755 --- a/Makefile +++ b/Makefile @@ -216,7 +216,6 @@ SM_COMPAT_PY_FILES = $(foreach LIB, $(SM_COMPAT_LIBS), compat-libs/$(LIB).py) $( SM_XTRA_PY_FILES := SM_XTRA_PY_FILES += $(foreach LIB, $(SM_LIBEXEC_PY_CMDS), utils/$(LIB)) SM_XTRA_PY_FILES += $(foreach LIB, $(SM_LIBEXEC_PY_XTRAS), utils/$(LIB).py) -SM_XTRA_PY_FILES += utils/mpathutil.py SM_XTRA_PY_FILES += utils/blktap2 SM_XTRA_PY_FILES += utils/tapdisk-cache-stats SM_XTRA_PY_FILES += utils/keymanagerutil @@ -364,10 +363,6 @@ install: precheck for s in $(SM_UDEV_SCRIPTS); do \ install -m 755 scripts/$$s $(SM_STAGING)$(UDEV_SCRIPTS_DIR)/$$s; \ done - # Install mpathutil and compatibility symlinks - install -D -m 755 utils/mpathutil.py $(SM_STAGING)$(BIN_DEST)/mpathutil - ln -sf $(BIN_DEST)mpathutil $(SM_STAGING)$(OPT_SM_DEST)/mpathutil.py - ln -sf $(BIN_DEST)mpathutil $(SM_STAGING)/sbin/mpathutil # Install blktap2 and compatibility symlinks install -D -m 755 utils/blktap2 $(SM_STAGING)$(BIN_DEST)/blktap2 ln -sf $(BIN_DEST)blktap2 $(SM_STAGING)$(OPT_BIN_DEST)/blktap2 diff --git a/mk/sm.spec.in b/mk/sm.spec.in index 8be25a506..d51c37684 100755 --- a/mk/sm.spec.in +++ b/mk/sm.spec.in @@ -114,7 +114,6 @@ tests/run_python_unittests.sh %{_sysconfdir}/xapi.d/plugins/intellicache-clean %{_sysconfdir}/xapi.d/plugins/trim %{_sysconfdir}/xapi.d/xapi-pre-shutdown/* -%{_bindir}/mpathutil %{_bindir}/blktap2 %{_bindir}/tapdisk-cache-stats %{_unitdir}/make-dummy-sr.service @@ -199,7 +198,6 @@ callers which expect to find python files in /opt/xensource %files -n python%{python3_pkgversion}-sm-compat -/sbin/mpathutil /opt/xensource/sm /opt/xensource/bin/blktap2 /opt/xensource/bin/tapdisk-cache-stats diff --git a/utils/mpathutil.py b/utils/mpathutil.py deleted file mode 100644 index dfe6f4673..000000000 --- a/utils/mpathutil.py +++ /dev/null @@ -1,68 +0,0 @@ -#!/usr/bin/python3 -# -# Copyright (C) Citrix Systems Inc. -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as published -# by the Free Software Foundation; version 2.1 only. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -import sys -import mpath_cli -import time - - -def list(): - maps = mpath_cli.list_maps() - for m in maps: - print(m) - - -def wait_for_multipathd(): - for i in range(0, 120): - if mpath_cli.is_working(): - return - time.sleep(1) - print("Unable to contact Multipathd daemon") - sys.exit(-1) - - -def status(): - for line in (mpath_cli.get_all_topologies()): - print(line) - - -def usage(): - print("Usage:") - print("%s list" % sys.argv[0]) - print("%s status" % sys.argv[0]) - - -def main(): - if len(sys.argv) < 2: - usage() - sys.exit(-1) - - mode = sys.argv[1] - - # Check that multipathd is up and running first - wait_for_multipathd() - - if mode == "list": - list() - elif mode == "status": - status() - else: - usage() - sys.exit(-1) - -if __name__ == "__main__": - main()