diff options
author | Steven Dake <sdake@redhat.com> | 2013-10-05 17:24:46 -0700 |
---|---|---|
committer | Steven Dake <sdake@redhat.com> | 2013-10-05 17:24:46 -0700 |
commit | e8d2522397ea6b4384607017c9cafb6f3130f5a2 (patch) | |
tree | 33a54f0d5fcbcfe2d26e0723a81179283f9bbdbf | |
parent | 1f275c21115ee34a4862ca281a7384634df0c5b0 (diff) | |
download | heat-cfntools-e8d2522397ea6b4384607017c9cafb6f3130f5a2.tar.gz |
Use on-demand yum metadata caching in cfn-init1.2.6
Use on-demand yum metadata caching to avoid downloading
50MB (Fedora 19) of extra metadata that is not necessary
for correct cfn-init operation.
Reduces time to orchestration by about 23% and cpu
utilization by about 50%.
Full detailed analsys in the launchpad bug.
Change-Id: Id51d6d506d6051b5e83f550ef318f86d84f3c7a7
Closes-Bug: 1235824
-rw-r--r-- | heat_cfntools/cfntools/cfn_helper.py | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/heat_cfntools/cfntools/cfn_helper.py b/heat_cfntools/cfntools/cfn_helper.py index 1d76bf7..5b1bf02 100644 --- a/heat_cfntools/cfntools/cfn_helper.py +++ b/heat_cfntools/cfntools/cfn_helper.py @@ -213,11 +213,6 @@ class RpmHelper(object): _rpm_util = rpmupdates.Updates([], []) @classmethod - def prepcache(cls): - """Prepare the yum cache.""" - CommandRunner("yum -y makecache").run() - - @classmethod def compare_rpm_versions(cls, v1, v2): """Compare two RPM version strings. @@ -290,7 +285,7 @@ class RpmHelper(object): e.g., httpd-2.2.22 e.g., httpd-2.2.22-1.fc16 """ - cmd_str = "yum -C -y --showduplicates list available %s" % pkg + cmd_str = "yum -y --showduplicates list available %s" % pkg command = CommandRunner(cmd_str).run() return command.status == 0 @@ -417,8 +412,6 @@ class PackagesHandler(object): # collect pkgs for batch processing at end installs = [] downgrades = [] - # update yum cache - RpmHelper.prepcache() for pkg_name, versions in packages.iteritems(): ver = RpmHelper.newest_rpm_version(versions) pkg = "%s-%s" % (pkg_name, ver) if ver else pkg_name |