Merge remote-tracking branch 'upstream/v2-phase4' into python-registry-v2

This commit is contained in:
Jake Moshenko 2015-10-22 16:59:28 -04:00
commit e7a6176594
105 changed files with 4439 additions and 2074 deletions

View file

@ -49,9 +49,7 @@ class StorageReplicationWorker(QueueWorker):
logger.debug('Copying image storage %s to location %s', partial_storage.uuid, location)
# Copy the various paths.
paths = [storage_paths.image_json_path,
storage_paths.image_ancestry_path,
storage_paths.image_layer_path]
paths = [storage_paths.v1_image_layer_path]
try:
for path_builder in paths:
@ -75,8 +73,21 @@ class StorageReplicationWorker(QueueWorker):
if __name__ == "__main__":
if not features.STORAGE_REPLICATION:
logger.debug('Full storage replication disabled; skipping')
logging.config.fileConfig('conf/logging.conf', disable_existing_loggers=False)
has_local_storage = False
if features.STORAGE_REPLICATION:
for storage_type, _ in app.config.get('DISTRIBUTED_STORAGE_CONFIG', {}).values():
if storage_type == 'LocalStorage':
has_local_storage = True
break
if not features.STORAGE_REPLICATION or has_local_storage:
if has_local_storage:
logger.error("Storage replication can't be used with local storage")
else:
logger.debug('Full storage replication disabled; skipping')
while True:
time.sleep(10000)