From 060cfcbcb4878b36d08a6f7a95493505f71e62c2 Mon Sep 17 00:00:00 2001 From: Matt Wilson Date: Thu, 9 Aug 2001 21:24:11 +0000 Subject: handle exceptions caused by a bad mountpoint (#50319) fixed broken raid registration from the last commit --- partitioning.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'partitioning.py') diff --git a/partitioning.py b/partitioning.py index 730fd9805..c1a83e511 100644 --- a/partitioning.py +++ b/partitioning.py @@ -213,11 +213,15 @@ def get_raid_devices(requests): return raidRequests -def register_raid_device(mdname, devices, level, numActive): +def register_raid_device(mdname, newdevices, newlevel, newnumActive): for dev, devices, level, numActive in DiskSet.mdList: if mdname == dev: - raise ValueError, "%s is already in the mdList!" % (mdname,) - DiskSet.mdList.append((mdname, devices, level, numActive)) + if (devices != newdevices or level != newlevel or + numActive != newnumActive): + raise ValueError, "%s is already in the mdList!" % (mdname,) + else: + return + DiskSet.mdList.append((mdname, newdevices[:], newlevel, newnumActive)) def lookup_raid_device(mdname): for dev, devices, level, numActive in DiskSet.mdList: -- cgit