[kolla-ansible] Building images from source
Hi, I am trying to build kolla's container images from source, especially octavia's images. I've read the kolla-build documentation, then I tried to follow along but I am having some problems. I am not a developper, my goal is to be able to push patches to kolla images if something goes wrong. For example now I am having a problem with octavia not being able to create an LB when using a self-signed certificate. I searched and I found a patch and I wanted to test-it. https://bugs.launchpad.net/kolla-ansible/+bug/2046382 https://launchpadlibrarian.net/706867161/octavia.patch Here are the steps I followed : - I am using podman - I've created a local registry - pyhton3.9 -m venv kollavnenv/2023.2 - source kollavnenv/2023.2/bin/activate - pip install kolla - pip install podman - I downloaded octavia source code from git 2023.2 version - https://github.com/openstack/octavia/tree/stable/2023.2 - I've prepared kolla_build.conf like this - [octavia] type = local location = /root/work/octavia - And I started the build like this - kolla-build --registry 192.168.2.35:4000 --push -b rocky --tag 2023.2-1 --engine podman --config-file ./kolla_build.conf octavia - Results - (2023.2) [root@r9localrepo work]# podman images REPOSITORY TAG IMAGE ID CREATED SIZE 192.168.2.35:4000/kolla/octavia-driver-agent 2023.2-1 1a6217ad71b4 22 minutes ago 1.31 GB 192.168.2.35:4000/kolla/octavia-api 2023.2-1 41ad8e1760a2 22 minutes ago 1.31 GB 192.168.2.35:4000/kolla/octavia-health-manager 2023.2-1 4922b7f0259f 22 minutes ago 1.28 GB 192.168.2.35:4000/kolla/octavia-housekeeping 2023.2-1 8b5a4785fc18 22 minutes ago 1.28 GB 192.168.2.35:4000/kolla/octavia-worker 2023.2-1 46107a14e78d 22 minutes ago 1.28 GB 192.168.2.35:4000/kolla/octavia-base 2023.2-1 23963c04eda7 22 minutes ago 1.28 GB 192.168.2.35:4000/kolla/openstack-base 2023.2-1 add627cfde2f 25 minutes ago 1.14 GB 192.168.2.35:4000/kolla/base 2023.2-1 a8299a02411a 29 minutes ago 580 MB <none> <none> 0421c38fd25c 8 hours ago 1.14 GB docker.io/library/registry 2 a8781fe3b7a2 6 weeks ago 26 MB quay.io/rockylinux/rockylinux 9 da830f5e2510 3 months ago 181 MB - The problem : - When exploring the octavia-api images for example (podman save),* and verifying the modified file I didn't find the patched-code* It seems that the build process is not using the local code? What am I missing? I think that my kolla_build.conf is wrong or not complete ... any ideas? Regards.
Hi, I modified my kolla_build.conf like this (2023.2) [root@r9localrepo work]# cat kolla_build.conf [DEFAULT] base = rocky namespace = kolla push = true registry = 192.168.2.35:4000 *[octavia-base] <------------- I modified this from octavia to octavia-basetype = local location = /root/work/octavia* Then I tried this cmd to build (2023.2) [root@r9localrepo work]# kolla-build --config-file ./kolla_build.conf --tag 2023.2-1 --engine podman -d --docker-healthchecks --logs-dir /root/work/logs --openstack-release 2023.2 octavia But it failed I got those errors ia && mkdir -p /etc/octavia && cp -r /octavia/etc/* /etc/octavia/ && touch /usr/local/bin/kolla_octavia_extend_start && chmod 644 /usr/local/bin/kolla_extend_start /usr/loca l/bin/kolla_octavia_extend_start ERROR:kolla.common.utils.octavia-base:Processing /octavia ERROR:kolla.common.utils.octavia-base:Preparing metadata (setup.py): started ERROR:kolla.common.utils.octavia-base:Preparing metadata (setup.py): finished with status 'error' ERROR:kolla.common.utils.octavia-base:error: subprocess-exited-with-error × python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [19 lines of output] [pbr] Generating ChangeLog /var/lib/kolla/venv/lib64/python3.9/site-packages/setuptools/command/easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and othe r standards-based tools. warnings.warn( /var/lib/kolla/venv/lib64/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards -based tools. warnings.warn( error: Multiple top-level packages discovered in a flat-layout: ['etc', 'httpd', 'specs', 'devstack', 'elements', 'playbooks', 'releasenotes']. To avoid accidental inclusion of unwanted files or directories, setuptools will not proceed with this build. If you are trying to create a single distribution with multiple packages on purpose, you should not rely on automatic discovery. Instead, consider the following options: 1. set up custom discovery (`find` directive with `include` or `exclude`) 2. use a `src-layout` 3. explicitly set `py_modules` or `packages` with a list of names To find more information, look for "package discovery" on setuptools docs. [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR:kolla.common.utils.octavia-base:error: metadata-generation-failed Regards. Le dim. 10 mars 2024 à 10:01, wodel youchi <wodel.youchi@gmail.com> a écrit :
Hi,
I am trying to build kolla's container images from source, especially octavia's images. I've read the kolla-build documentation, then I tried to follow along but I am having some problems.
I am not a developper, my goal is to be able to push patches to kolla images if something goes wrong. For example now I am having a problem with octavia not being able to create an LB when using a self-signed certificate.
I searched and I found a patch and I wanted to test-it. https://bugs.launchpad.net/kolla-ansible/+bug/2046382 https://launchpadlibrarian.net/706867161/octavia.patch
Here are the steps I followed :
- I am using podman - I've created a local registry - pyhton3.9 -m venv kollavnenv/2023.2 - source kollavnenv/2023.2/bin/activate - pip install kolla - pip install podman - I downloaded octavia source code from git 2023.2 version - https://github.com/openstack/octavia/tree/stable/2023.2 - I've prepared kolla_build.conf like this - [octavia] type = local location = /root/work/octavia - And I started the build like this - kolla-build --registry 192.168.2.35:4000 --push -b rocky --tag 2023.2-1 --engine podman --config-file ./kolla_build.conf octavia - Results - (2023.2) [root@r9localrepo work]# podman images REPOSITORY TAG IMAGE ID CREATED SIZE 192.168.2.35:4000/kolla/octavia-driver-agent 2023.2-1 1a6217ad71b4 22 minutes ago 1.31 GB 192.168.2.35:4000/kolla/octavia-api 2023.2-1 41ad8e1760a2 22 minutes ago 1.31 GB 192.168.2.35:4000/kolla/octavia-health-manager 2023.2-1 4922b7f0259f 22 minutes ago 1.28 GB 192.168.2.35:4000/kolla/octavia-housekeeping 2023.2-1 8b5a4785fc18 22 minutes ago 1.28 GB 192.168.2.35:4000/kolla/octavia-worker 2023.2-1 46107a14e78d 22 minutes ago 1.28 GB 192.168.2.35:4000/kolla/octavia-base 2023.2-1 23963c04eda7 22 minutes ago 1.28 GB 192.168.2.35:4000/kolla/openstack-base 2023.2-1 add627cfde2f 25 minutes ago 1.14 GB 192.168.2.35:4000/kolla/base 2023.2-1 a8299a02411a 29 minutes ago 580 MB <none> <none> 0421c38fd25c 8 hours ago 1.14 GB docker.io/library/registry 2 a8781fe3b7a2 6 weeks ago 26 MB quay.io/rockylinux/rockylinux 9 da830f5e2510 3 months ago 181 MB - The problem : - When exploring the octavia-api images for example (podman save),* and verifying the modified file I didn't find the patched-code*
It seems that the build process is not using the local code? What am I missing? I think that my kolla_build.conf is wrong or not complete ... any ideas?
Regards.
Any one??? Le dim. 10 mars 2024 à 12:50, wodel youchi <wodel.youchi@gmail.com> a écrit :
Hi,
I modified my kolla_build.conf like this (2023.2) [root@r9localrepo work]# cat kolla_build.conf [DEFAULT] base = rocky namespace = kolla push = true registry = 192.168.2.35:4000
*[octavia-base] <------------- I modified this from octavia to octavia-basetype = local location = /root/work/octavia*
Then I tried this cmd to build (2023.2) [root@r9localrepo work]# kolla-build --config-file ./kolla_build.conf --tag 2023.2-1 --engine podman -d --docker-healthchecks --logs-dir /root/work/logs --openstack-release 2023.2 octavia
But it failed I got those errors
ia && mkdir -p /etc/octavia && cp -r /octavia/etc/* /etc/octavia/ && touch /usr/local/bin/kolla_octavia_extend_start && chmod 644 /usr/local/bin/kolla_extend_start /usr/loca l/bin/kolla_octavia_extend_start
ERROR:kolla.common.utils.octavia-base:Processing /octavia
ERROR:kolla.common.utils.octavia-base:Preparing metadata (setup.py): started
ERROR:kolla.common.utils.octavia-base:Preparing metadata (setup.py): finished with status 'error'
ERROR:kolla.common.utils.octavia-base:error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [19 lines of output]
[pbr] Generating ChangeLog
/var/lib/kolla/venv/lib64/python3.9/site-packages/setuptools/command/easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and othe r standards-based tools.
warnings.warn(
/var/lib/kolla/venv/lib64/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards -based tools.
warnings.warn(
error: Multiple top-level packages discovered in a flat-layout: ['etc', 'httpd', 'specs', 'devstack', 'elements', 'playbooks', 'releasenotes'].
To avoid accidental inclusion of unwanted files or directories,
setuptools will not proceed with this build.
If you are trying to create a single distribution with multiple packages on purpose, you should not rely on automatic discovery. Instead, consider the following options:
1. set up custom discovery (`find` directive with `include` or `exclude`) 2. use a `src-layout` 3. explicitly set `py_modules` or `packages` with a list of names
To find more information, look for "package discovery" on setuptools docs. [end of output]
note: This error originates from a subprocess, and is likely not a problem with pip. ERROR:kolla.common.utils.octavia-base:error: metadata-generation-failed
Regards.
Le dim. 10 mars 2024 à 10:01, wodel youchi <wodel.youchi@gmail.com> a écrit :
Hi,
I am trying to build kolla's container images from source, especially octavia's images. I've read the kolla-build documentation, then I tried to follow along but I am having some problems.
I am not a developper, my goal is to be able to push patches to kolla images if something goes wrong. For example now I am having a problem with octavia not being able to create an LB when using a self-signed certificate.
I searched and I found a patch and I wanted to test-it. https://bugs.launchpad.net/kolla-ansible/+bug/2046382 https://launchpadlibrarian.net/706867161/octavia.patch
Here are the steps I followed :
- I am using podman - I've created a local registry - pyhton3.9 -m venv kollavnenv/2023.2 - source kollavnenv/2023.2/bin/activate - pip install kolla - pip install podman - I downloaded octavia source code from git 2023.2 version - https://github.com/openstack/octavia/tree/stable/2023.2 - I've prepared kolla_build.conf like this - [octavia] type = local location = /root/work/octavia - And I started the build like this - kolla-build --registry 192.168.2.35:4000 --push -b rocky --tag 2023.2-1 --engine podman --config-file ./kolla_build.conf octavia - Results - (2023.2) [root@r9localrepo work]# podman images REPOSITORY TAG IMAGE ID CREATED SIZE 192.168.2.35:4000/kolla/octavia-driver-agent 2023.2-1 1a6217ad71b4 22 minutes ago 1.31 GB 192.168.2.35:4000/kolla/octavia-api 2023.2-1 41ad8e1760a2 22 minutes ago 1.31 GB 192.168.2.35:4000/kolla/octavia-health-manager 2023.2-1 4922b7f0259f 22 minutes ago 1.28 GB 192.168.2.35:4000/kolla/octavia-housekeeping 2023.2-1 8b5a4785fc18 22 minutes ago 1.28 GB 192.168.2.35:4000/kolla/octavia-worker 2023.2-1 46107a14e78d 22 minutes ago 1.28 GB 192.168.2.35:4000/kolla/octavia-base 2023.2-1 23963c04eda7 22 minutes ago 1.28 GB 192.168.2.35:4000/kolla/openstack-base 2023.2-1 add627cfde2f 25 minutes ago 1.14 GB 192.168.2.35:4000/kolla/base 2023.2-1 a8299a02411a 29 minutes ago 580 MB <none> <none> 0421c38fd25c 8 hours ago 1.14 GB docker.io/library/registry 2 a8781fe3b7a2 6 weeks ago 26 MB quay.io/rockylinux/rockylinux 9 da830f5e2510 3 months ago 181 MB - The problem : - When exploring the octavia-api images for example (podman save),* and verifying the modified file I didn't find the patched-code*
It seems that the build process is not using the local code? What am I missing? I think that my kolla_build.conf is wrong or not complete ... any ideas?
Regards.
participants (1)
-
wodel youchi