master - lvmetad: add error explaining duplicate VG names
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=d42cedae5818a50edde3ddb1db4bec6a2591c920 Commit: d42cedae5818a50edde3ddb1db4bec6a2591c920 Parent: 7d1c9e1d5a11e7e06c52036c380dd51a2c761f66 Author: David Teigland <[email protected]> AuthorDate: Mon Nov 16 16:23:28 2015 -0600 Committer: David Teigland <[email protected]> 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(-)
daemons/lvmetad/lvmetad-core.c +5 -2
@@ -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" );