Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 18 additions & 18 deletions kolla/common/sources.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ etcd:
# NOTE(mnasiadka): lts_branch pins check_sources.py to the 3.6.x
# release series instead of jumping to the latest major.minor.
lts_branch: "3.6"
version: "3.6.14"
version: "3.6.15"
type: "url"
sha256:
amd64: "ffe840ff9295808e88cce2794a18a5ac87f12a5203c8314d0bf6aa119b41bac5"
arm64: "fa1b80565ee6fc2df1ae6f57a508b221f3ecc7d591c317c581cd8281b0842b3e"
amd64: "b51d86e6bff2168de5ba8cd631c0fe6c785c7a1b32b083079f5677d6b7e2772c"
arm64: "567d9b8fa9e75b349600d2b64ef9bf6bc6d512cea75a2ce1c39b1b3046131244"
location: "https://github.com/etcd-io/etcd/releases/download/v${version}/etcd-v${version}-linux-${debian_arch}.tar.gz"
glance-base:
type: "url"
Expand Down Expand Up @@ -205,11 +205,11 @@ placement-base:
type: "url"
location: "$tarballs_base/openstack/placement/placement-${openstack_branch}.tar.gz"
prometheus-alertmanager:
version: "0.34.0"
version: "0.34.1"
type: "url"
sha256:
amd64: "19c75a11d8c03dc4ade7abdbddfb3a8f28c9e7b000d0849cda0cd71dffd74a03"
arm64: "a96ef16598ddc58e84d28167b3352b30e3205698d76c56ef467e4504d7664da4"
amd64: "265b9d1e55ef0d5306a436018af6d2b686c2ce051f03d968f7464ecb1372a7e8"
arm64: "d98d6cbaf52151c7e76e24355fec88b11cebcb9875d4cdd8b76ddce7a7e5535c"
location: "https://github.com/prometheus/alertmanager/releases/download/v${version}/alertmanager-${version}.linux-${debian_arch}.tar.gz"
prometheus-blackbox-exporter:
version: "0.28.0"
Expand All @@ -219,11 +219,11 @@ prometheus-blackbox-exporter:
arm64: "63312be0983d85e5109710a7dc93df3051157ae581853fa3655d171cc1b2806e"
location: "https://github.com/prometheus/blackbox_exporter/releases/download/v${version}/blackbox_exporter-${version}.linux-${debian_arch}.tar.gz"
prometheus-cadvisor:
version: "0.60.5"
version: "0.60.6"
type: "url"
sha256:
amd64: "6f258bed28113218c88729634c47ead8d928b81b1504b75fd911b98d29003a87"
arm64: "6f93087c114bc64a7b8d5c4148190b4d9b95511b9bf023246ce4c76dc448a48a"
amd64: "c381c2c911bc43d465d1e0eaff60f96d58c031c409bddf06da0316fdde8a9296"
arm64: "d788162d9deea8aa024fd79a0a685df90a987362d8f0e580f822474c1fbef7f9"
location: "https://github.com/google/cadvisor/releases/download/v${version}/cadvisor-v${version}-linux-${debian_arch}"
prometheus-elasticsearch-exporter:
version: "1.11.0"
Expand All @@ -233,11 +233,11 @@ prometheus-elasticsearch-exporter:
arm64: "7020d10e29896d329cecc7bfe2e90dcc376d68fc0c75ac27014af3747870ce1f"
location: "https://github.com/prometheus-community/elasticsearch_exporter/releases/download/v${version}/elasticsearch_exporter-${version}.linux-${debian_arch}.tar.gz"
prometheus-libvirt-exporter:
version: "2.5.0"
version: "2.6.0"
type: "url"
sha256:
amd64: "07a49f3d0424259eba88cbc41310017fbbbd6d8ce0b2a0e4dfad3d973b55f558"
arm64: "4d13a4a930adabc9c2be8c83c7a8bb2b3e81d8743e9b645590f3d28311e1e8cb"
amd64: "1820ace3d38feebaf35ef2823ada1e95b538a080074c3f362caf39a7d3e39e91"
arm64: "b8d3bfbe590d1f2db4faac48984d5b2bcf2cfa525c39f9a8d307912220307550"
location: "https://github.com/inovex/prometheus-libvirt-exporter/releases/download/v${version}/prometheus-libvirt-exporter-${version}.linux-${debian_arch}.tar.gz"
prometheus-memcached-exporter:
version: "0.17.0"
Expand All @@ -247,11 +247,11 @@ prometheus-memcached-exporter:
arm64: "d1abf0ef1196ff5de5cf3462eb962b4a3d6733327951ae6d81c062902b5f2a60"
location: "https://github.com/prometheus/memcached_exporter/releases/download/v${version}/memcached_exporter-${version}.linux-${debian_arch}.tar.gz"
prometheus-mtail:
version: "3.4.12"
version: "3.4.13"
type: "url"
sha256:
amd64: "c5f1cca4891589ffa52a7c3a32e4802c1d4959e31626df953f3d388393720916"
arm64: "acfde7e7cdbf8ecb1865d0cc9bc9dfe7dd657822377bfd5f81405c93b5fedaab"
amd64: "0817296e9609ed881f12eab1d93bac84e8aac2a156b6658a4ef86fa2fedf7b75"
arm64: "d52b2c00691aaed07e71c0f7d11a602f5bbaa2816d41f4493c6f43ea77749964"
location: "https://github.com/jaqx0r/mtail/releases/download/v${version}/mtail_${version}_linux_${debian_arch}.tar.gz"
prometheus-mysqld-exporter:
version: "0.20.0"
Expand Down Expand Up @@ -292,11 +292,11 @@ prometheus-server:
arm64: "aa9be9c36608e7ab7cc089726195d0e4fa74f87b330538df9d30d3da1f2b0e18"
location: "https://github.com/prometheus/prometheus/releases/download/v${version}/prometheus-${version}.linux-${debian_arch}.tar.gz"
prometheus-valkey-exporter:
version: "1.91.1"
version: "1.92.0"
type: "url"
sha256:
amd64: "4552451000b6345011bfc50d77fd3be625aa0be47ac07e98a40384038ecffaab"
arm64: "7ee124bd17733cce535b87da17e79f0346d3edb4a20759cf3bfca8b4e0d6886f"
amd64: "028736b15004c1f5c25508235a361d80f1989c577a458cc0dc97279c5269f709"
arm64: "00ce9ba1fc0e6474e69d05e743e2b9b2ddeb89e35b23bf7c999a0667a737fd75"
location: "https://github.com/oliver006/redis_exporter/releases/download/v${version}/redis_exporter-v${version}.linux-${debian_arch}.tar.gz"
skyline-apiserver:
type: "url"
Expand Down
5 changes: 3 additions & 2 deletions kolla/image/kolla_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ def create_dockerfiles(self):
if pip_args:
lines = content.split('\n')
for i, line in enumerate(lines):
if line.startswith('FROM '):
if re.match(r'^FROM\s', line, re.IGNORECASE):
lines[i + 1:i + 1] = pip_args
break
content = '\n'.join(lines)
Expand Down Expand Up @@ -756,7 +756,8 @@ def process_source_installation(image, section):
image_name = os.path.basename(path)
canonical_name = (self.namespace + '/' + self.image_prefix +
image_name + ':' + self.tag)
parent_search_pattern = re.compile(r'^FROM.*$', re.MULTILINE)
parent_search_pattern = re.compile(r'^FROM.*$',
re.MULTILINE | re.IGNORECASE)
match = re.search(parent_search_pattern, content)
if match:
parent_name = match.group(0).split(' ')[1]
Expand Down
42 changes: 42 additions & 0 deletions kolla/tests/test_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -962,6 +962,48 @@ def test_create_dockerfiles_template_override_ssti_blocked(
self.assertRaises(jinja2.exceptions.SecurityError,
kolla.create_dockerfiles)

@mock.patch(engine_client)
def test_create_dockerfiles_pip_args_lowercase_from(self, mock_client):
tmpdir = self.useFixture(fixtures.TempDir()).path
base_dir = os.path.join(tmpdir, 'base')
os.makedirs(base_dir)
with open(os.path.join(base_dir, 'Dockerfile.j2'), 'w') as f:
f.write('from {{ base_distro }}:{{ base_distro_tag }}\n')
self.conf.set_override('pip_index_url', 'https://example.org/simple')
with mock.patch.object(build.KollaWorker, '_get_images_dir',
return_value=tmpdir):
kolla = build.KollaWorker(self.conf)
kolla.setup_working_dir()
kolla.find_dockerfiles()
kolla.create_dockerfiles()
dockerfile = os.path.join(kolla.working_dir, 'base', 'Dockerfile')
with open(dockerfile) as f:
content = f.read()
self.assertIn('ARG PIP_INDEX_URL', content)

@mock.patch(engine_client)
def test_build_image_list_parent_name_lowercase_from(self, mock_client):
tmpdir = self.useFixture(fixtures.TempDir()).path
base_dir = os.path.join(tmpdir, 'base')
os.makedirs(base_dir)
with open(os.path.join(base_dir, 'Dockerfile.j2'), 'w') as f:
f.write('FROM {{ base_distro }}:{{ base_distro_tag }}\n')
child_dir = os.path.join(tmpdir, 'child')
os.makedirs(child_dir)
with open(os.path.join(child_dir, 'Dockerfile.j2'), 'w') as f:
f.write('from {{ namespace }}/{{ image_prefix }}base:{{ tag }}\n')
with mock.patch.object(build.KollaWorker, '_get_images_dir',
return_value=tmpdir):
kolla = build.KollaWorker(self.conf)
kolla.setup_working_dir()
kolla.find_dockerfiles()
kolla.create_dockerfiles()
kolla.build_image_list()
expected_parent = '{}/{}base:{}'.format(
kolla.namespace, kolla.image_prefix, kolla.tag)
child = [i for i in kolla.images if i.name == 'child'][0]
self.assertEqual(expected_parent, child.parent_name)

def _get_matched_images(self, images):
return [image for image in images
if image.status == utils.Status.MATCHED]
Expand Down
2 changes: 1 addition & 1 deletion lint-requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ansible-lint===26.8.0 # MIT
ansible-lint===26.9.0 # MIT
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
upgrade:
- |
``etcd`` has been updated from ``3.6.14`` to ``3.6.15``.
- |
``prometheus-alertmanager`` has been updated from ``0.34.0`` to ``0.34.1``.
- |
``prometheus-cadvisor`` has been updated from ``0.60.5`` to ``0.60.6``.
- |
``prometheus-libvirt-exporter`` has been updated from ``2.5.0`` to
``2.6.0``.
- |
``prometheus-mtail`` has been updated from ``3.4.12`` to ``3.4.13``.
- |
``prometheus-valkey-exporter`` has been updated from ``1.91.1`` to
``1.92.0``.
Loading