Broken source builds after plugin introduction in openstack-base image

Bug #2069611 reported by Tadas Sutkaitis
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kolla
In Progress
Undecided
Unassigned

Bug Description

After CADF plugin introduction in 18.0.0 release:

"ADD plugins-archive /openstack-base-source"

Building from git sources is broken because source path under /openstack-base-source for openstack/requests is named differently

then /openstack/requests* and has name used with naming convention used for source builds -> /openstack/openstack-base-archive-XXXX

Next step in Dockerfile is broken because of this:

"RUN ln -s openstack-base-source/*requirements* /requirements" and upper-constrains.txt is not copied.

Revision history for this message
Tadas Sutkaitis (t42x) wrote :
Changed in kolla:
status: New → In Progress
Revision history for this message
Sven Kieske (s-kieske) wrote :

Hi and thanks for the patch!

Can you please report what the actual error is you are seeing? I'm currently trying to replicate this on master branch, but I get unrelated other errors about distutils module missing from pbr.

Revision history for this message
Tadas Sutkaitis (t42x) wrote :

ERROR:kolla.common.utils.openstack-base:Step 5/11 : ADD openstack-base-archive /openstack-base-source
ERROR:kolla.common.utils.openstack-base:
ERROR:kolla.common.utils.openstack-base:---> b1fe34250c70
ERROR:kolla.common.utils.openstack-base:Step 6/11 : ADD plugins-archive /openstack-base-source
ERROR:kolla.common.utils.openstack-base:
ERROR:kolla.common.utils.openstack-base:---> 9b25743f0493
ERROR:kolla.common.utils.openstack-base:Step 7/11 : RUN ln -s openstack-base-source/plugins/* /pycadf && mkdir -p /etc/pycadf && cp /pycadf/etc/pycadf/* /etc/pycadf/
ERROR:kolla.common.utils.openstack-base:
ERROR:kolla.common.utils.openstack-base:---> Running in 1795afb3e756
ERROR:kolla.common.utils.openstack-base:---> Removed intermediate container 1795afb3e756
ERROR:kolla.common.utils.openstack-base:---> fa38c0449106
ERROR:kolla.common.utils.openstack-base:Step 8/11 : RUN ln -s openstack-base-source/*requirements* /requirements && sed -e "/^ovs===/d" -i requirements/upper-constraints.txt && mkdir -p /var/lib/kolla && python3 -m venv --system-site-packages /var/lib/kolla/venv
ERROR:kolla.common.utils.openstack-base:
ERROR:kolla.common.utils.openstack-base:---> Running in 7968db7ce998
ERROR:kolla.common.utils.openstack-base:sed: can't read requirements/upper-constraints.txt: No such file or directory

ERROR:kolla.common.utils.openstack-base:---> Removed intermediate container 7968db7ce998
ERROR:kolla.common.utils.openstack-base:Unknown container engine error when building

And if I add extra step in Dockerfile to list content:

RUN ls -al /openstack-base-source

In output I see:

ERROR:kolla.common.utils.openstack-base:Step 7/12 : RUN ls -al /openstack-base-source
ERROR:kolla.common.utils.openstack-base:
ERROR:kolla.common.utils.openstack-base:---> Running in 7a03c5fc1618
ERROR:kolla.common.utils.openstack-base:total 16
drwxr-xr-x 1 root root 4096 Jul 16 10:28 .
drwxr-xr-x 1 root root 4096 Jul 16 10:28 ..
drwxr-xr-x 9 root root 4096 Jul 16 10:28 openstack-base-archive-d9e1ea888b9975dc0cfb7ebd1d5cf0ad65331b34
drwxr-xr-x 3 root root 4096 Jul 16 10:28 plugins

Revision history for this message
Sven Kieske (s-kieske) wrote :

I'm not sure the error you are seeing is related to this patch you mention:

https://review.opendev.org/c/openstack/kolla/+/904576

I can't reproduce this locally with kolla-build from current master branch building openstack-base, it builds fine.

Can you maybe share your kolla-build.conf and which distributions or with with container engine (versions) you are building?

Thank you!

Changed in kolla:
status: In Progress → Incomplete
Revision history for this message
Tadas Sutkaitis (t42x) wrote :

To reproduce this bug please set "openstack-base" source type to git like this:

[openstack-base]
location = https://github.com/openstack/requirements.git
reference = 94f3181ff91c6f7a5bb18a202d19afddd0565358 # (last commit from master or stable/2024.1)
type = git

In this case path for "requirements" under /openstack-base-source will be "/openstack-base-source/openstack-base-archive-d9e1ea888b9975dc0cfb7ebd1d5cf0ad65331b34" and not "/openstack-base-source/requirements-xxx". This is why step in Dockerfile "RUN ln -s openstack-base-source/*requirements* /requirements \" silently copies nothing.

Revision history for this message
Tadas Sutkaitis (t42x) wrote :

I searched the code and used same behavior like in every other Dockerfile in Kolla project. I mean we always do "ADD plugins-archive /" + additional logic, but never using same path for "plugin-archive" and "project-x-source"

Changed in kolla:
status: Incomplete → In Progress
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.