diff options
| author | Marcin Juszkiewicz <marcin.juszkiewicz+kolla@linaro.org> | 2022-04-01 15:31:01 +0200 |
|---|---|---|
| committer | Marcin Juszkiewicz <marcin.juszkiewicz+kolla@linaro.org> | 2022-04-08 17:55:26 +0200 |
| commit | ad53e1fe22fb04623718635faced5d14a4d17abe (patch) | |
| tree | 1a202557a035c607bfcf0be28de7c07845ff19d1 | |
| parent | 46d7f1dc10bf67f6dde3beaca59d1ef8b07acef9 (diff) | |
| download | kolla-ad53e1fe22fb04623718635faced5d14a4d17abe.tar.gz kolla-ad53e1fe22fb04623718635faced5d14a4d17abe.zip | |
drop infra-rename support
With one type of install type there is no need for renaming infra
images.
Change-Id: I28b7563e5ce1efac0298a62fee96a9f946f3341b
| -rwxr-xr-x | kolla/common/config.py | 4 | ||||
| -rwxr-xr-x | kolla/image/build.py | 40 |
2 files changed, 2 insertions, 42 deletions
diff --git a/kolla/common/config.py b/kolla/common/config.py index 5bd8514d0..fa5ade8ea 100755 --- a/kolla/common/config.py +++ b/kolla/common/config.py @@ -248,9 +248,7 @@ _CLI_OPTS = [ cfg.BoolOpt('enable-unbuildable', default=False, help='Enable images marked as unbuildable'), cfg.BoolOpt('summary', default=True, - help='Show summary at the end of build'), - cfg.BoolOpt('infra-rename', default=False, - help='Rename infrastructure images to infra') + help='Show summary at the end of build') ] _BASE_OPTS = [ diff --git a/kolla/image/build.py b/kolla/image/build.py index bf5fbb191..208d763e5 100755 --- a/kolla/image/build.py +++ b/kolla/image/build.py @@ -121,13 +121,6 @@ UNBUILDABLE_IMAGES = { }, } -# NOTE(hrw): all non-infra images and their children -BINARY_SOURCE_IMAGES = [ - 'kolla-toolbox', - 'openstack-base', - 'monasca-thresh', -] - class ArchivingError(Exception): pass @@ -654,10 +647,7 @@ class KollaWorker(object): self.clean_package_cache = self.conf.clean_package_cache self.image_prefix = self.base + '-' + self.install_type + '-' - if self.conf.infra_rename: - self.infra_image_prefix = self.base + '-infra-' - else: - self.infra_image_prefix = self.image_prefix + self.infra_image_prefix = self.image_prefix self.regex = conf.regex self.image_statuses_bad = dict() @@ -912,15 +902,6 @@ class KollaWorker(object): if not self.conf.work_dir: shutil.rmtree(self.temp_dir) - def change_install_type(self, image, old_type, new_type): - # NOTE(hrw): /self.base to make sure that we do not break image name - image.canonical_name = image.canonical_name.replace( - f'/{self.base}-{old_type}-', - f'/{self.base}-{new_type}-') - if image.children: - for tmp_image in image.children: - tmp_image.parent_name = image.canonical_name - def filter_images(self): """Filter which images to build.""" filter_ = list() @@ -1002,25 +983,6 @@ class KollaWorker(object): if image.status != Status.UNBUILDABLE: image.status = Status.MATCHED - if self.conf.infra_rename: - for image in self.images: - is_infra = True - if image.name in BINARY_SOURCE_IMAGES: - # keep as is - is_infra = False - else: - # let's check ancestors if any of them is binary/source - ancestor_image = image - while (ancestor_image.parent is not None): - ancestor_image = ancestor_image.parent - if ancestor_image.name in BINARY_SOURCE_IMAGES: - is_infra = False - break - - if is_infra: - self.change_install_type(image, self.install_type, 'infra') - pass - # Next, mark any skipped images. for image in self.images: if image.status != Status.MATCHED: |
