From 163d4b7239276f8a97b36d1d1e963111fa8faf0d Mon Sep 17 00:00:00 2001 From: Alex Schultz Date: Tue, 9 Nov 2021 11:04:55 -0700 Subject: [PATCH] Fix namespace-less containers in image-serve The build_catalog() function expects the manifests, tags and blobs be available before the catalog will recognized a container image. The previous spot where this function was called was after the manifests but before the tags are created. This causes the newly uploaded container not to be listed in the catalog. This change moves the build_catalog() to last so new images get correctly added to the catalog. Change-Id: I3f08fe0efef1e830b034fab06574a05dff89ccc0 Closes-Bug: #1950352 (cherry picked from commit f8eeb0dd834ecd0faae05161cef4a38211894a7a) --- tripleo_common/image/image_export.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tripleo_common/image/image_export.py b/tripleo_common/image/image_export.py index 809805712..dcc79cafd 100644 --- a/tripleo_common/image/image_export.py +++ b/tripleo_common/image/image_export.py @@ -267,7 +267,6 @@ def export_manifest_config(target_url, htaccess_path = os.path.join(manifest_dir_path, '.htaccess') make_dir(manifest_dir_path) - build_catalog() with open(manifests_htaccess_path, 'w+') as f: f.write('AddHandler type-map %s\n' % TYPE_MAP_EXTENSION) @@ -310,6 +309,7 @@ def export_manifest_config(target_url, if manifest_dict: write_type_map_file(image, tag, manifest_dict) build_tags_list(image) + build_catalog() def write_type_map_file(image, tag, manifest_dict):