Plugin parsing in build breaks when adding plugins to base images

Bug #1638900 reported by Paul Bourke on 2016-11-03
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
kolla
High
Paul Bourke
Newton
Undecided
Paul Bourke

Bug Description

If I try to add a plugin to a base image, e.g.

[neutron-base-plugin-neutron-fwaas]
type = git
location = https://github.com/openstack/neutron-fwaas
reference = master

The build will fail as it parses the above as both "neutron-base-plugin-neutron-fwaas" and "base-plugin-neutron-fwaas".

[root@vm-template kolla]# tools/build.py neutron-base
INFO:kolla.image.build:Found the docker image folder at /root/kolla/docker
INFO:kolla.image.build:Added image base to queue
INFO:kolla.image.build:Attempting to run task BuildTask(base) for the first time
INFO:kolla.image.build.base:Building
ERROR:kolla.image.build:Unhandled error when running BuildTask(base)
Traceback (most recent call last):
  File "/root/kolla/kolla/image/build.py", line 482, in run
    task.run()
  File "/root/kolla/kolla/image/build.py", line 268, in run
    self.builder(self.image)
  File "/root/kolla/kolla/image/build.py", line 393, in builder
    archive_path = self.process_source(image, plugin)
  File "/root/kolla/kolla/image/build.py", line 289, in process_source
    dest_archive = os.path.join(image.path, source['name'] + '-archive')
KeyError: 'name'

Changed in kolla:
status: New → Confirmed
importance: Undecided → High
milestone: none → ocata-1
assignee: nobody → Paul Bourke (pauldbourke)

Fix proposed to branch: master
Review: https://review.openstack.org/393291

Changed in kolla:
status: Confirmed → In Progress

Reviewed: https://review.openstack.org/393291
Committed: https://git.openstack.org/cgit/openstack/kolla/commit/?id=5ddba7892df71d23fefbf7116e8cfec11a2f41da
Submitter: Jenkins
Branch: master

commit 5ddba7892df71d23fefbf7116e8cfec11a2f41da
Author: Paul Bourke <email address hidden>
Date: Thu Nov 3 12:31:07 2016 +0000

    Fix plugin parsing for base images

    If we try to add a plugin to a base image, e.g.

    [neutron-base-plugin-neutron-fwaas]
    type = git
    location = https://github.com/openstack/neutron-fwaas
    reference = master

    The build will fail as it parses the above as both
    "neutron-base-plugin-neutron-fwaas" and "base-plugin-neutron-fwaas".

    Update the regex to ensure the image name is anchored to the beginning of the
    conf section.

    Change-Id: I4099ebd0d25cd28a9bb3bdc4fcfbf311ce22a3fd
    Closes-Bug: #1638900

Changed in kolla:
status: In Progress → Fix Released

Reviewed: https://review.openstack.org/394267
Committed: https://git.openstack.org/cgit/openstack/kolla/commit/?id=18c3918f5c0692c928084f4b4a5ed60eda9b90ed
Submitter: Jenkins
Branch: stable/newton

commit 18c3918f5c0692c928084f4b4a5ed60eda9b90ed
Author: Paul Bourke <email address hidden>
Date: Thu Nov 3 12:31:07 2016 +0000

    Fix plugin parsing for base images

    If we try to add a plugin to a base image, e.g.

    [neutron-base-plugin-neutron-fwaas]
    type = git
    location = https://github.com/openstack/neutron-fwaas
    reference = master

    The build will fail as it parses the above as both
    "neutron-base-plugin-neutron-fwaas" and "base-plugin-neutron-fwaas".

    Update the regex to ensure the image name is anchored to the beginning of the
    conf section.

    Change-Id: I4099ebd0d25cd28a9bb3bdc4fcfbf311ce22a3fd
    Closes-Bug: #1638900
    (cherry picked from commit 5ddba7892df71d23fefbf7116e8cfec11a2f41da)

This issue was fixed in the openstack/kolla 4.0.0.0b1 development milestone.

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

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers