[lvm-devel] master - lvmetad: add error explaining duplicate VG names
David Teigland
teigland at fedoraproject.org
Mon Nov 16 22:27:34 UTC 2015
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=d42cedae5818a50edde3ddb1db4bec6a2591c920
Commit: d42cedae5818a50edde3ddb1db4bec6a2591c920
Parent: 7d1c9e1d5a11e7e06c52036c380dd51a2c761f66
Author: David Teigland <teigland at redhat.com>
AuthorDate: Mon Nov 16 16:23:28 2015 -0600
Committer: David Teigland <teigland at redhat.com>
CommitterDate: Mon Nov 16 16:25:49 2015 -0600
lvmetad: add error explaining duplicate VG names
When a VG name lookup fails because the name matches
multiple VGs, return an explanatory error.
---
daemons/lvmetad/lvmetad-core.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/daemons/lvmetad/lvmetad-core.c b/daemons/lvmetad/lvmetad-core.c
index 2ceaa02..8e5bc37 100644
--- a/daemons/lvmetad/lvmetad-core.c
+++ b/daemons/lvmetad/lvmetad-core.c
@@ -741,8 +741,11 @@ static response vg_lookup(lvmetad_state *s, request r)
name = dm_hash_lookup(s->vgid_to_vgname, uuid);
unlock_vgid_to_metadata(s);
- if (name && uuid && uuid2)
- return reply_unknown("Multiple VGs found with same name");
+ if (name && uuid && uuid2) {
+ DEBUGLOG(s, "vg_lookup name %s found multiple vgids %s %s",
+ name, uuid, uuid2);
+ return daemon_reply_simple("multiple", "reason = %s", "Multiple VGs found with same name", NULL);
+ }
if (!uuid || !name)
return reply_unknown("VG not found");
More information about the lvm-devel
mailing list