All of lore.kernel.org
 help / color / mirror / Atom feed
From: rmccabe@sourceware.org <rmccabe@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] conga ./conga.spec.in.in ricci/modules/storage ...
Date: 14 Jul 2008 22:21:46 -0000	[thread overview]
Message-ID: <20080714222146.4763.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/cluster
Module name:	conga
Branch: 	RHEL5
Changes by:	rmccabe at sourceware.org	2008-07-14 22:21:46

Modified files:
	.              : conga.spec.in.in 
	ricci/modules/storage: LVM.cpp 

Log message:
	fix bz250439

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/conga.spec.in.in.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.45.2.95&r2=1.45.2.96
http://sourceware.org/cgi-bin/cvsweb.cgi/conga/ricci/modules/storage/LVM.cpp.diff?cvsroot=cluster&only_with_tag=RHEL5&r1=1.7.2.6&r2=1.7.2.7

--- conga/conga.spec.in.in	2008/07/14 21:59:09	1.45.2.95
+++ conga/conga.spec.in.in	2008/07/14 22:21:45	1.45.2.96
@@ -304,6 +304,7 @@
 - Fix bz433089 (when adding multiple nodes the order is reversed.)
 - Fix bz441581 (Don't allow both label and device for qdisk config if only one can be specified)
 - Fix bz223785 (Storage 'Display Devices by' option does not work)
+- Fix bz250439 (conga is unable to delete snapshot volumes)
 
 * Fri Apr 18 2008 Ryan McCabe <rmccabe@redhat.com> 0.12.0-8
 - Fix bz441580 (conga should install 'sg3_utils' and start service 'scsi_reserve' when scsi fencing is used)
--- conga/ricci/modules/storage/LVM.cpp	2008/01/17 17:38:39	1.7.2.6
+++ conga/ricci/modules/storage/LVM.cpp	2008/07/14 22:21:46	1.7.2.7
@@ -252,7 +252,7 @@
   String attrs = words[LVS_ATTR_IDX];
   props.set(Variable("attrs", attrs));
 
-  props.set(Variable("mirrored", attrs[0] == 'm'));
+  props.set(Variable("mirrored", attrs[0] == 'm' || attrs[0] == 'M'));
 
   // clustered
   String vg_attrs = words[LVS_VG_ATTR_IDX];
@@ -602,17 +602,37 @@
 void
 LVM::lvremove(const String& path)
 {
-  vector<String> args;
-  args.push_back("lvchange");
-  args.push_back("-an");
-  args.push_back(path);
-
-  String out, err;
-  int status;
-  if (utils::execute(LVM_BIN_PATH, args, out, err, status, false))
-    throw command_not_found_error_msg(LVM_BIN_PATH);
-  if (status != 0)
-    throw String("Unable to deactivate LV (might be in use by other cluster nodes)");
+	vector<String> args;
+	args.push_back("lvchange");
+	args.push_back("-an");
+	args.push_back(path);
+
+	String out, err;
+	int status;
+
+	if (utils::execute(LVM_BIN_PATH, args, out, err, status, false))
+		throw command_not_found_error_msg(LVM_BIN_PATH);
+
+	if (status != 0) {
+		bool ignore_err = false;
+
+		try {
+			Props props;
+			std::list<counting_auto_ptr<BD> > sources;
+			std::list<counting_auto_ptr<BD> > targets;
+			probe_vg(path, props, sources, targets);
+			if (props.get("snapshot").get_bool() ||
+				props.get("mirror").get_bool())
+			{
+				ignore_err = true;
+			}
+		} catch (...) {
+			ignore_err = false;
+		}
+
+		if (!ignore_err)
+			throw String("Unable to deactivate LV (might be in use by other cluster nodes)");
+	}
 
   try {
     args.clear();



                 reply	other threads:[~2008-07-14 22:21 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080714222146.4763.qmail@sourceware.org \
    --to=rmccabe@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.