apt_sources_list option does not work

Bug #1706549 reported by Cheney Dong
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
kolla
Fix Released
Medium
Unassigned
Train
Fix Released
Medium
Unassigned

Bug Description

Description of problem:
Use "apt_sources_list" to specify a custom sources list when build images, but
it does not work, the sources list is not replaced by my sources list.

Steps to Reproduce:
1. prepare a sources list file "sources.list"
/root/workspace/build/sources.list

2. edit koll-build.conf file like this:
[DEFAULT]
apt_sources_list = /root/workspace/build/sources.list
...
3. build an image like openstack-base
# kolla-build --config-file kolla-build.conf -t source -b ubuntu openstack-base

Actual results:
As description

Expected results:
The sources list in image should be replaced by the custom file.

Additional info:
Check the docker directory under the kolla workdir, kolla copy the custom sources file
to base's docker directory named "sources.list", but in the dockerfile, it will only
"COPY" the sources file end with "distro".

Cheney Dong (cheneydc)
Changed in kolla:
assignee: nobody → Cheney Dong (cheneydc)
summary: - apt_sources_list parameter does not work
+ apt_sources_list option does not work
Cheney Dong (cheneydc)
Changed in kolla:
status: New → In Progress
Cheney Dong (cheneydc)
Changed in kolla:
assignee: Cheney Dong (cheneydc) → nobody
Revision history for this message
Eduardo Gonzalez (egonzalez90) wrote :

Hi, is this bug still present?. Will mark as incomplete, will expire in 60 days if no other info is provided

Changed in kolla:
status: In Progress → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for kolla because there has been no activity for 60 days.]

Changed in kolla:
status: Incomplete → Expired
Revision history for this message
Radosław Piliszek (yoctozepto) wrote :

Hey Eduardo, it turns out it was and is present. :-)

*Thanks to* this bug our kolla-ansible CI was passing. See: https://review.opendev.org/#/c/686133/5/tools/setup_gate.sh@106

The original bug analysis is correct.

If we want to backport the potential fix, we should fix k-a CI too or else we later run into weird issues.

Thanks Cheney for reporting. Hope you are still around to bask in glory. :-)

Changed in kolla:
status: Expired → Triaged
importance: Undecided → Medium
milestone: none → 9.0.0
Revision history for this message
Marcin Juszkiewicz (hrw) wrote :

commit 30c805596f34fe8652875afdce57c4db31c0e032
Author: Benedikt Trefzer <email address hidden>
Date: Sat Mar 5 21:24:27 2016 +0100

    Use debian repos for debian base docker image

    Change-Id: Ic5c1d20fa9f7f1cd9fd20e658b4bd1abb235f3b6
    Partially-implements: blueprint build-debian

 docker/base/Dockerfile.j2 | 64 +++++++++++++++++++++++++++++++++++++++++++++-------------------
 docker/base/apt_preferences.debian | 23 +++++++++++++++++++++++
 docker/base/{apt_preferences => apt_preferences.ubuntu} | 0
 docker/base/sources.list.debian | 26 ++++++++++++++++++++++++++
 docker/base/{sources.list => sources.list.ubuntu} | 0
 5 files changed, 94 insertions(+), 19 deletions(-)

This was THE FIRST commit since it was not possible to use apt_sources_list.

Reason is simple. If there is 'apt_sources_list' in kolla-build.conf file then it is copied to docker/base/sources.list file. Which is not used since 5th May 2016 when sources.list.debian and sources.list.ubuntu were created (later expanded with sources.list.ubuntu.{aarch64,ppc64le}).

Revision history for this message
Radosław Piliszek (yoctozepto) wrote :

Indeed, it has been broken for more than 3.5 years.

Revision history for this message
Marcin Juszkiewicz (hrw) wrote :

Using custom overrides for "base_ubuntu_package_sources_list" and "base_ubuntu_package_apt_preferences" would be better solution.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to kolla (master)

Fix proposed to branch: master
Review: https://review.opendev.org/689121

Changed in kolla:
assignee: nobody → Marcin Juszkiewicz (hrw)
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to kolla (master)

Reviewed: https://review.opendev.org/689121
Committed: https://git.openstack.org/cgit/openstack/kolla/commit/?id=bf20b41e7dea702b693fa98ea27822c8a33a5591
Submitter: Zuul
Branch: master

commit bf20b41e7dea702b693fa98ea27822c8a33a5591
Author: Marcin Juszkiewicz <email address hidden>
Date: Thu Oct 17 03:36:17 2019 -0700

    get 'apt_*' options of kolla-build.conf working again

    We broke 'apt_sources_list' and 'apt_preferences' options quite a while
    ago. Turned out that fix is quite simple.

    This change adds empty sources.list and apt-preferences files which are
    always added into images. If kolla-build.conf will use any of APT
    related options then those files will be replaced with provided ones.

    Change-Id: I7bbdcbd5c60f654a484a872209e0537e3950346c
    Closes-bug: #1706549

Changed in kolla:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to kolla (stable/stein)

Fix proposed to branch: stable/stein
Review: https://review.opendev.org/692993

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to kolla (stable/rocky)

Fix proposed to branch: stable/rocky
Review: https://review.opendev.org/692994

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/kolla 9.0.0.0rc1

This issue was fixed in the openstack/kolla 9.0.0.0rc1 release candidate.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to kolla (stable/stein)

Reviewed: https://review.opendev.org/692993
Committed: https://git.openstack.org/cgit/openstack/kolla/commit/?id=0f320e34ea3e5f1b8dcc188a082071be7a49c1d0
Submitter: Zuul
Branch: stable/stein

commit 0f320e34ea3e5f1b8dcc188a082071be7a49c1d0
Author: Marcin Juszkiewicz <email address hidden>
Date: Thu Oct 17 03:36:17 2019 -0700

    get 'apt_*' options of kolla-build.conf working again

    We broke 'apt_sources_list' and 'apt_preferences' options quite a while
    ago. Turned out that fix is quite simple.

    This change adds empty sources.list and apt-preferences files which are
    always added into images. If kolla-build.conf will use any of APT
    related options then those files will be replaced with provided ones.

    Change-Id: I7bbdcbd5c60f654a484a872209e0537e3950346c
    Closes-bug: #1706549
    (cherry picked from commit bf20b41e7dea702b693fa98ea27822c8a33a5591)

tags: added: in-stable-stein
tags: added: in-stable-rocky
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to kolla (stable/rocky)

Reviewed: https://review.opendev.org/692994
Committed: https://git.openstack.org/cgit/openstack/kolla/commit/?id=954c32f8b964a7f52f7f778efab2c02b8f1fe99d
Submitter: Zuul
Branch: stable/rocky

commit 954c32f8b964a7f52f7f778efab2c02b8f1fe99d
Author: Marcin Juszkiewicz <email address hidden>
Date: Thu Oct 17 03:36:17 2019 -0700

    get 'apt_*' options of kolla-build.conf working again

    We broke 'apt_sources_list' and 'apt_preferences' options quite a while
    ago. Turned out that fix is quite simple.

    This change adds empty sources.list and apt-preferences files which are
    always added into images. If kolla-build.conf will use any of APT
    related options then those files will be replaced with provided ones.

    Change-Id: I7bbdcbd5c60f654a484a872209e0537e3950346c
    Closes-bug: #1706549
    (cherry picked from commit bf20b41e7dea702b693fa98ea27822c8a33a5591)

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/kolla 7.1.0

This issue was fixed in the openstack/kolla 7.1.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/kolla 8.0.2

This issue was fixed in the openstack/kolla 8.0.2 release.

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.