From c4154ca4d2b7b2a7bcc266d3f473ff1d247cac9f Mon Sep 17 00:00:00 2001 From: "Chris St. Pierre" Date: Wed, 19 Oct 2011 10:14:43 -0400 Subject: Various Packages plugin fixes: * Added bcfg2-yum-helper to offload Yum API calls to a short-lived process. As absurd as this is, it appears to be the standard way to get around Yum's atrocious memory handling (cf. yum-updatesd). * Added SourceInitError for non-fatal errors instantiating new sources. * Fixed bug that caused all cached data to be removed on server startup (reported by mikemccllstr on IRC). * Fixed a number of overly aggressive caching issues. * Fixed the way sources are loaded at server startup. * Fixed handling of Yum package groups. --- src/lib/Server/Plugins/Packages/PackagesConfig.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/lib/Server/Plugins/Packages/PackagesConfig.py') diff --git a/src/lib/Server/Plugins/Packages/PackagesConfig.py b/src/lib/Server/Plugins/Packages/PackagesConfig.py index 1bb250007..d3732bf96 100644 --- a/src/lib/Server/Plugins/Packages/PackagesConfig.py +++ b/src/lib/Server/Plugins/Packages/PackagesConfig.py @@ -25,4 +25,9 @@ class PackagesConfig(Bcfg2.Server.Plugin.FileBacked, for section in self.sections(): self.remove_section(section) self.read(self.name) - self.pkg_obj.Reload() + if self.pkg_obj.sources.loaded: + # only reload Packages plugin if sources have been loaded. + # otherwise, this is getting called on server startup, and + # we have to wait until all sources have been indexed + # before we can call Packages.Reload() + self.pkg_obj.Reload() -- cgit v1.2.3-1-g7c22