Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cp 23888: Unit tests for on-slave #461

Merged
merged 3 commits into from
Oct 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ install: precheck
ln -sf $(SM_DEST)mpathutil.py $(SM_STAGING)/sbin/mpathutil
install -m 755 drivers/02-vhdcleanup $(SM_STAGING)$(MASTER_SCRIPT_DEST)
install -m 755 drivers/lvhd-thin $(SM_STAGING)$(PLUGIN_SCRIPT_DEST)
install -m 755 drivers/on-slave $(SM_STAGING)$(PLUGIN_SCRIPT_DEST)
install -m 755 drivers/on_slave.py $(SM_STAGING)$(PLUGIN_SCRIPT_DEST)/on-slave
install -m 755 drivers/testing-hooks $(SM_STAGING)$(PLUGIN_SCRIPT_DEST)
install -m 755 drivers/coalesce-leaf $(SM_STAGING)$(PLUGIN_SCRIPT_DEST)
install -m 755 drivers/nfs-on-slave $(SM_STAGING)$(PLUGIN_SCRIPT_DEST)
Expand Down
8 changes: 1 addition & 7 deletions drivers/on-slave → drivers/on_slave.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
# A plugin for synchronizing slaves when something changes on the Master

import sys
import XenAPIPlugin
sys.path.append("/opt/xensource/sm/")
import util
import lock
Expand Down Expand Up @@ -50,12 +49,6 @@ def multi(session, args):
except util.SMException:
util.SMlog("on-slave.deactivate failed")
raise
elif action == "activateNoRefcount":
try:
lvmCache.activateNoRefcount(args["lvName%d" % i])
except util.CommandException:
util.SMlog("on-slave.activateNoRefcount failed")
raise
elif action == "deactivateNoRefcount":
try:
lvmCache.deactivateNoRefcount(args["lvName%d" % i])
Expand Down Expand Up @@ -126,6 +119,7 @@ def refresh_lun_size_by_SCSIid(session, args):


if __name__ == "__main__":
import XenAPIPlugin
XenAPIPlugin.dispatch({
"multi": multi,
"is_open": is_open,
Expand Down
Loading