diff --git a/glance/image_cache/__init__.py b/glance/image_cache/__init__.py index 9cd5a65fe7..5aacadfe85 100644 --- a/glance/image_cache/__init__.py +++ b/glance/image_cache/__init__.py @@ -204,8 +204,6 @@ class ImageCache(object): with open(tmp_path, mode) as cache_file: yield cache_file except Exception as e: - # NOTE(sirp): can't use 'except Exception as e' here since some - # exceptions (unfortunately) don't subclass Exception. rollback(e) raise else: diff --git a/glance/utils.py b/glance/utils.py index 0707d4342f..45f61700e3 100644 --- a/glance/utils.py +++ b/glance/utils.py @@ -219,12 +219,9 @@ def inc_xattr(path, key, n=1): BEWARE, this code *does* have a RACE CONDITION, since the read/update/write sequence is not atomic. - This function is therefore suitable for collecting stats (where - perfection isn't required), but NOT for code that makes critical - decisions. - - For this use case, the trade-off of simple, lock-free code was worth an - occasional, harmless race. + Since the use-case for this function is collecting stats--not critical-- + the benefits of simple, lock-free code out-weighs the possibility of an + occasional hit not being counted. """ try: count = int(get_xattr(path, key)) diff --git a/setup.py b/setup.py index d314f7dde4..8f0af490f6 100644 --- a/setup.py +++ b/setup.py @@ -89,5 +89,7 @@ setup( 'bin/glance-api', 'bin/glance-control', 'bin/glance-manage', + 'bin/glance-prefetcher', + 'bin/glance-pruner', 'bin/glance-registry', 'bin/glance-upload'])