summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2009-09-09 20:08:43 +0000
committerNarayan Desai <desai@mcs.anl.gov>2009-09-09 20:08:43 +0000
commitfce273a0e8fda3776d917f3f254b566a08c31ceb (patch)
treee2be84665f2638bdfef2164426f9627e2594d316 /src/lib
parent9f9edcc6ed88e81522e452ae4b83a6c841bdd3b6 (diff)
downloadbcfg2-fce273a0e8fda3776d917f3f254b566a08c31ceb.tar.gz
bcfg2-fce273a0e8fda3776d917f3f254b566a08c31ceb.tar.bz2
bcfg2-fce273a0e8fda3776d917f3f254b566a08c31ceb.zip
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
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/Server/Plugins/Packages.py3
1 files changed, 3 insertions, 0 deletions
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'