diff --git a/0004-Add-isula-support-for-kolla.patch b/0004-Add-isula-support-for-kolla.patch index da5ba970ca2d72802a1a3a4d9e4289011394f4a3..9191f0795990bfdc6bfe6ce1aa8b2a801fd5e088 100644 --- a/0004-Add-isula-support-for-kolla.patch +++ b/0004-Add-isula-support-for-kolla.patch @@ -5,8 +5,8 @@ Subject: [PATCH] Add isula support for kolla --- common/config.py | 3 + - image/build.py | 58 ++++++------ - image/runtime.py | 140 ++++++++++++++++++++++++++++ + image/build.py | 58 ++++++++++---------- + image/runtime.py | 140 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 172 insertions(+), 29 deletions(-) create mode 100644 image/runtime.py @@ -37,8 +37,8 @@ index f2a2eaf..c4d7dee 100644 from kolla.template import methods as jinja_methods # noqa from kolla import version # noqa @@ -184,19 +185,16 @@ def join_many(threads): - - + + class DockerTask(task.Task): - - docker_kwargs = docker.utils.kwargs_from_env() @@ -48,7 +48,7 @@ index f2a2eaf..c4d7dee 100644 super(DockerTask, self).__init__() self._dc = None + self.conf = conf - + @property def dc(self): if self._dc is not None: @@ -57,11 +57,11 @@ index f2a2eaf..c4d7dee 100644 - self._dc = docker.APIClient(version='auto', **docker_kwargs) + self._dc = runtime.RuntimeAdapter(self.conf.base_runtime) return self._dc - - + + @@ -269,7 +267,7 @@ class PushTask(DockerTask): """Task that pushes an image to a docker repository.""" - + def __init__(self, conf, image): - super(PushTask, self).__init__() + super(PushTask, self).__init__(conf) @@ -79,12 +79,12 @@ index f2a2eaf..c4d7dee 100644 + dc_running_ver = StrictVersion(docker.version) + if dc_running_ver < StrictVersion('3.0.0'): + kwargs['insecure_registry'] = True - + for response in self.dc.push(image.canonical_name, **kwargs): if 'stream' in response: @@ -325,7 +324,7 @@ class BuildTask(DockerTask): """Task that builds out an image.""" - + def __init__(self, conf, image, push_queue): - super(BuildTask, self).__init__() + super(BuildTask, self).__init__(conf) @@ -134,7 +134,7 @@ index f2a2eaf..c4d7dee 100644 @@ -724,16 +725,15 @@ class KollaWorker(object): self.maintainer = conf.maintainer self.distro_python_version = conf.distro_python_version - + - docker_kwargs = docker.utils.kwargs_from_env() try: - self.dc = docker.APIClient(version='auto', **docker_kwargs) @@ -150,10 +150,10 @@ index f2a2eaf..c4d7dee 100644 + LOG.error("Unable to connect to %s, exiting" % conf.base_runtime) LOG.info("Exception caught: {0}".format(e)) sys.exit(1) - + diff --git a/image/runtime.py b/image/runtime.py new file mode 100644 -index 0000000..a733ac3 +index 0000000..cb3aae3 --- /dev/null +++ b/image/runtime.py @@ -0,0 +1,140 @@ @@ -244,7 +244,7 @@ index 0000000..a733ac3 + output = 'isulad:' + tag + image_format = 'oci' + return self.builder_client.build_image(docker_file, output, -+ image_format, path, nocache=nocache) ++ image_format, path) + + def push(self, name, **kwargs): + return self.builder_client.push_image(name, "oci") @@ -297,7 +297,5 @@ index 0000000..a733ac3 +class InitException(Exception): + def __init__(self): + super(InitException, self).__init__() -\ No newline at end of file --- -2.17.1 - +-- +2.36.1 diff --git a/openstack-plugin.spec b/openstack-plugin.spec index b12a07cdcf11604a34391fd0770b704e05e940e2..2cc0617173c4b95c5f3564fd331a126af9591374 100644 --- a/openstack-plugin.spec +++ b/openstack-plugin.spec @@ -12,7 +12,7 @@ rm -rf %1/.git Name: openstack-plugin Version: 1.0.0 -Release: 3 +Release: 4 Summary: The plug-in package of openstack for openEuler License: Apache-2.0 URL: https://gitee.com/openeuler/openstack-plugin @@ -46,6 +46,9 @@ openstack-helm-openeuler-support provides openeuler support codes developed by o Summary: The plug-in package of kolla for openEuler isula Requires: openstack-plugin-kolla Requires: python3-isula +Requires: iSulad +Requires: isula-build +Requires: docker-runc %description kolla-isula-support kolla-isula-support provides openeuler support codes developed by openstack sig. @@ -151,6 +154,9 @@ install -D -p -m 644 %{SOURCE4} %{buildroot}%{python3_sitelib}/openstack-plugin/ %{python3_sitelib}/openstack-plugin/%{SOURCE4} %changelog +* Wed Sep 14 2022 wangxiyuan - 1.0.0-4 +- Fix kolla build and dependence error + * Tue Sep 13 2022 wangxiyuan - 1.0.0-3 - Fix kolla patch permission warning