From fce273a0e8fda3776d917f3f254b566a08c31ceb Mon Sep 17 00:00:00 2001 From: Narayan Desai Date: Wed, 9 Sep 2009 20:08:43 +0000 Subject: Packages: Add error message when clients do not match any Packages sources (Resolves Ticket #723) git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5424 ce84e21b-d406-0410-9b95-82705330c041 --- src/lib/Server/Plugins/Packages.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lib/Server/Plugins/Packages.py b/src/lib/Server/Plugins/Packages.py index f3d958510..c8579988c 100644 --- a/src/lib/Server/Plugins/Packages.py +++ b/src/lib/Server/Plugins/Packages.py @@ -466,6 +466,9 @@ class Packages(Bcfg2.Server.Plugin.Plugin, sources = self.get_matching_sources(meta) # reverse list so that priorities correspond to file order sources.reverse() + if len(sources) == 0: + self.logger.error("Packages: No matching sources for client %s; improper group memberships?" % (meta.hostname)) + return set(), set(), 'failed' ptype = set([s.ptype for s in sources]) if len(ptype) < 1: return set(), set(), 'failed' -- cgit v1.2.3-1-g7c22