summaryrefslogtreecommitdiffstats
path: root/src/sbin
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2013-08-08 08:10:16 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2013-08-08 08:10:16 -0400
commite1e194a573b3803fa7f45a646bbb36b2f164a3e1 (patch)
treee9b689d1be39d38279e0a16f010e8d5e573612ef /src/sbin
parent35851347089db1a092ec715cb183aec19f19e983 (diff)
parenteef441c1acdf1d3d483647b153f721cbab4a8517 (diff)
downloadbcfg2-e1e194a573b3803fa7f45a646bbb36b2f164a3e1.tar.gz
bcfg2-e1e194a573b3803fa7f45a646bbb36b2f164a3e1.tar.bz2
bcfg2-e1e194a573b3803fa7f45a646bbb36b2f164a3e1.zip
Merge branch 'maint'
Conflicts: doc/appendix/files/mysql.txt doc/getting_started/index.txt doc/server/plugins/structures/bundler/kernel.txt src/lib/Bcfg2/Server/MultiprocessingCore.py src/lib/Bcfg2/Server/Plugin/interfaces.py src/lib/Bcfg2/Server/Plugins/Packages/Yum.py src/lib/Bcfg2/Server/Plugins/Probes.py src/lib/Bcfg2/Server/Plugins/SSHbase.py
Diffstat (limited to 'src/sbin')
-rwxr-xr-xsrc/sbin/bcfg2-crypt3
-rwxr-xr-xsrc/sbin/bcfg2-info5
-rwxr-xr-xsrc/sbin/bcfg2-yum-helper10
3 files changed, 13 insertions, 5 deletions
diff --git a/src/sbin/bcfg2-crypt b/src/sbin/bcfg2-crypt
index 6a92a0260..9190f1390 100755
--- a/src/sbin/bcfg2-crypt
+++ b/src/sbin/bcfg2-crypt
@@ -160,6 +160,7 @@ class CfgDecryptor(Decryptor):
except Bcfg2.Server.Encryption.EVPError:
self.logger.info("Could not decrypt %s with any passphrase" %
self.filename)
+ return False
def get_destination_filename(self, original_filename):
if original_filename.endswith(".crypt"):
@@ -419,7 +420,7 @@ def main(): # pylint: disable=R0912,R0915
if data is None:
data = getattr(tool, mode)()
- if data is False:
+ if not data:
logger.error("Failed to %s %s, skipping" % (mode, fname))
continue
if setup['crypt_stdout']:
diff --git a/src/sbin/bcfg2-info b/src/sbin/bcfg2-info
index 787ed1d49..9e3a671da 100755
--- a/src/sbin/bcfg2-info
+++ b/src/sbin/bcfg2-info
@@ -471,9 +471,10 @@ Bcfg2 client itself.""")
alist = args.split()
if len(alist):
for client in self._get_client_list(alist):
- self.metadata_cache.expire(client)
+ self.expire_caches_by_type(Bcfg2.Server.Plugin.Metadata,
+ key=client)
else:
- self.metadata_cache.expire()
+ self.expire_caches_by_type(Bcfg2.Server.Plugin.Metadata)
def do_probes(self, args):
"""probes [-p] <hostname>
diff --git a/src/sbin/bcfg2-yum-helper b/src/sbin/bcfg2-yum-helper
index 161aa3e50..49baeb9c3 100755
--- a/src/sbin/bcfg2-yum-helper
+++ b/src/sbin/bcfg2-yum-helper
@@ -255,9 +255,15 @@ class CacheManager(YumHelper):
for repo in self.yumbase.repos.listEnabled():
# this populates the cache as a side effect
repo.repoXML # pylint: disable=W0104
+ try:
+ repo.getGroups()
+ except yum.Errors.RepoMDError:
+ pass # this repo has no groups
self.yumbase.repos.populateSack(mdtype='metadata', cacheonly=1)
self.yumbase.repos.populateSack(mdtype='filelists', cacheonly=1)
self.yumbase.repos.populateSack(mdtype='otherdata', cacheonly=1)
+ # this does something with the groups cache as a side effect
+ self.yumbase.comps # pylint: disable=W0104
def main():
@@ -304,11 +310,11 @@ def main():
try:
# this code copied from yumcommands.py
cachemgr.populate_cache()
- print json.dumps(True)
+ print(json.dumps(True))
except yum.Errors.YumBaseError:
logger.error("Unexpected error creating cache: %s" %
sys.exc_info()[1], exc_info=1)
- print json.dumps(False)
+ print(json.dumps(False))
elif cmd == "complete":
depsolver = DepSolver(options.config, options.verbose)
try: