Projects
Eulaceura:Mainline:GA
fence-agents
_service:obs_scm:fence_scsi-preempt-clears-all-...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:obs_scm:fence_scsi-preempt-clears-all-devices-on-the-mpath-d.patch of Package fence-agents
From cb57f1c2ee734a40d01249305965ea4ecdf02039 Mon Sep 17 00:00:00 2001 From: Oyvind Albrigtsen <oalbrigt@redhat.com> Date: Thu, 5 Sep 2024 09:06:34 +0200 Subject: [PATCH 1/3] fence_scsi: preempt clears all devices on the mpath device, so only run it for the first device --- agents/scsi/fence_scsi.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/agents/scsi/fence_scsi.py b/agents/scsi/fence_scsi.py index a1598411..12f7fb49 100644 --- a/agents/scsi/fence_scsi.py +++ b/agents/scsi/fence_scsi.py @@ -131,11 +131,13 @@ def reset_dev(options, dev): return run_cmd(options, options["--sg_turs-path"] + " " + dev)["rc"] -def register_dev(options, dev, key): +def register_dev(options, dev, key, do_preempt=True): dev = os.path.realpath(dev) if re.search(r"^dm", dev[5:]): - for slave in get_mpath_slaves(dev): - register_dev(options, slave, key) + devices = get_mpath_slaves(dev) + register_dev(options, devices[0], key) + for device in devices[1:]: + register_dev(options, device, key, False) return True # Check if any registration exists for the key already. We track this in @@ -153,7 +155,7 @@ def register_dev(options, dev, key): # If key matches, make sure it matches with the connection that # exists right now. To do this, we can issue a preempt with same key # which should replace the old invalid entries from the target. - if not preempt(options, key, dev, key): + if do_preempt and not preempt(options, key, dev, key): return False # If there was no reservation, we need to issue another registration -- 2.33.1.windows.1
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2