<feed xmlns='http://www.w3.org/2005/Atom'>
<title>openstack/kolla.git/tests/test_set_config.py, branch stable/2026.1</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<id>https://git.platform-os.org/openstack/kolla.git/atom?h=stable%2F2026.1</id>
<link rel='self' href='https://git.platform-os.org/openstack/kolla.git/atom?h=stable%2F2026.1'/>
<link rel='alternate' type='text/html' href='https://git.platform-os.org/openstack/kolla.git/'/>
<updated>2026-05-05T10:34:26+00:00</updated>
<entry>
<title>set_configs: Add support for creating directories and setting perms</title>
<updated>2026-05-05T10:34:26+00:00</updated>
<author>
<name>Michal Nasiadka</name>
<email>mnasiadka@gmail.com</email>
</author>
<published>2026-04-27T13:28:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.platform-os.org/openstack/kolla.git/commit/?id=33c0e26e8a0290f0b6d647bb67e18a4f500907fc'/>
<id>urn:sha1:33c0e26e8a0290f0b6d647bb67e18a4f500907fc</id>
<content type='text'>
Change-Id: Id63c035fafaa68a9004c65161c5a3a3ad5544f02
Signed-off-by: Michal Nasiadka &lt;mnasiadka@gmail.com&gt;
</content>
</entry>
<entry>
<title>Fix kolla-set-configs --check to detect state mismatch</title>
<updated>2025-06-19T12:23:35+00:00</updated>
<author>
<name>Michal Arbet</name>
<email>michal.arbet@ultimum.io</email>
</author>
<published>2025-06-12T11:29:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.platform-os.org/openstack/kolla.git/commit/?id=cf3c65fef7c51b8f54c32bfa58574f58ad4071c8'/>
<id>urn:sha1:cf3c65fef7c51b8f54c32bfa58574f58ad4071c8</id>
<content type='text'>
If a configuration file is tracked in the state file
but no longer appears in config.json, it should either be
restored or removed.

This patch introduces a new exception StateMismatch and
updates execute_config_check() to detect such cases. If
any destination path is present in the defaults state but
missing from config.json, we now raise StateMismatch.

A dedicated unit test has been added to verify
this behavior.

Closes-Bug: #2114173

Signed-off-by: Michal Arbet &lt;michal.arbet@ultimum.io&gt;
Change-Id: I6e0b4aaa5722990e3ac647578023f474db3d4381
</content>
</entry>
<entry>
<title>Fix mock_open() expectations for Python 3.13+</title>
<updated>2025-05-21T12:58:57+00:00</updated>
<author>
<name>Michal Nasiadka</name>
<email>mnasiadka@gmail.com</email>
</author>
<published>2025-05-20T10:17:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.platform-os.org/openstack/kolla.git/commit/?id=e13801b4a1e5f587ee0581168eea0d42fea6cb66'/>
<id>urn:sha1:e13801b4a1e5f587ee0581168eea0d42fea6cb66</id>
<content type='text'>
Python 3.13 introduces a behavior change in unittest.mock.mock_open(),
which now calls close() when exiting the context manager
as described in bpo-44185 [1]. This causes additional mock calls to appear,
breaking strict mock_calls assertions.

This patch fix tests and add compatibility for Python 3.13.

From mock documentation [2]:
  "bpo-44185: unittest.mock.mock_open() will call the close() method
   of the file handle mock when it is exiting from the context manager.
   Patch by Samet Yaslan."

[1] https://bugs.python.org/issue44185
[2] https://mock.readthedocs.io/en/latest/changelog.html

Change-Id: Ib8e2a8a20a828c4c69deedd307c9b726f51489f8
</content>
</entry>
<entry>
<title>Fix handling configs in base image</title>
<updated>2024-11-06T16:37:31+00:00</updated>
<author>
<name>Michal Arbet</name>
<email>michal.arbet@ultimum.io</email>
</author>
<published>2024-04-10T18:11:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.platform-os.org/openstack/kolla.git/commit/?id=36c12676ff185f524a7f4d2f2f4c70b5d60462b4'/>
<id>urn:sha1:36c12676ff185f524a7f4d2f2f4c70b5d60462b4</id>
<content type='text'>
This commit restructures the handling of configuration
files in set_configs.py, introducing functions for managing
default configuration files first.

Closes-Bug: #2060855
Change-Id: If91e0330dc149143c82d2183b8ddf6fa9f68d80e
</content>
</entry>
<entry>
<title>Add comprehensive checks for container restarts</title>
<updated>2023-03-09T18:03:58+00:00</updated>
<author>
<name>Dawud M</name>
<email>dawud@stackhpc.com</email>
</author>
<published>2023-02-15T18:02:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.platform-os.org/openstack/kolla.git/commit/?id=d9a6c5f3901e078a30d341397ac57d867d8191cc'/>
<id>urn:sha1:d9a6c5f3901e078a30d341397ac57d867d8191cc</id>
<content type='text'>
When adding a dashboard to grafana the containers aren't restarted when
they should be. This is due to a bug in Kolla where the logic to
determine whether or the container needs to be restarted fails in the
case where the file does not exist in the container. This patch adds
more comprehensive checks for container restarts in the set_configs.py
file. This patch also adds a test to ensure that the functions work as
expected.

Closes-Bug: #1997984
Co-Authored-By: Will Szumski &lt;will@stackhpc.com&gt;
Change-Id: I67f5f12700d7b55f26bff81e9b54559303da6d83
</content>
</entry>
<entry>
<title>Fix CVE-2022-38060</title>
<updated>2022-08-29T10:05:05+00:00</updated>
<author>
<name>Radosław Piliszek</name>
<email>radoslaw.piliszek@gmail.com</email>
</author>
<published>2022-08-29T09:55:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.platform-os.org/openstack/kolla.git/commit/?id=5b1da017988c987fc68b55d1f45b5d2676474ce1'/>
<id>urn:sha1:5b1da017988c987fc68b55d1f45b5d2676474ce1</id>
<content type='text'>
Closes-Bug: #1985784
Change-Id: I66476a2b396e2cbe41e68ac51f57aae1806b2ed8
</content>
</entry>
<entry>
<title>Make kolla_set_configs open files in binary mode</title>
<updated>2021-02-10T14:57:58+00:00</updated>
<author>
<name>Radosław Piliszek</name>
<email>radoslaw.piliszek@gmail.com</email>
</author>
<published>2021-01-31T16:09:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.platform-os.org/openstack/kolla.git/commit/?id=8e3027c5427ecfb89fe48ad38eb8189b1608d0fc'/>
<id>urn:sha1:8e3027c5427ecfb89fe48ad38eb8189b1608d0fc</id>
<content type='text'>
This fixes comparisons when files are not Unicode-encoded.

A relevant unit test is included.
It can be used as a base for other _cmp_file method unit tests
if the need arises.

Change-Id: Ic638516eb92d24ad247a7866fd1b5e2ac0400388
Closes-Bug: #1913952
</content>
</entry>
<entry>
<title>Remove two missed unicode flags</title>
<updated>2021-01-25T14:58:59+00:00</updated>
<author>
<name>Radosław Piliszek</name>
<email>radoslaw.piliszek@gmail.com</email>
</author>
<published>2021-01-25T14:58:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.platform-os.org/openstack/kolla.git/commit/?id=335dff712488e23be8f0a280cba4c584c6c54066'/>
<id>urn:sha1:335dff712488e23be8f0a280cba4c584c6c54066</id>
<content type='text'>
Change-Id: I799bf8edfef6ff68382d651dca6de96fa80ed733
</content>
</entry>
<entry>
<title>Update imp module to importlib</title>
<updated>2020-08-30T14:11:52+00:00</updated>
<author>
<name>zhoulinhui</name>
<email>df.some@foxmail.com</email>
</author>
<published>2020-08-29T16:34:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.platform-os.org/openstack/kolla.git/commit/?id=33970fcc6b8f4cffe116d66cee8a94e19e743937'/>
<id>urn:sha1:33970fcc6b8f4cffe116d66cee8a94e19e743937</id>
<content type='text'>
The imp module is deprecated[1] since version 3.4, use importlib to
instead

1: https://docs.python.org/3/library/imp.html

Change-Id: I79dfd923531dd3e00d23e1682865f56f0cf437d2
</content>
</entry>
<entry>
<title>Fix kolla_set_configs --check with a directory</title>
<updated>2020-08-28T15:01:25+00:00</updated>
<author>
<name>Mark Goddard</name>
<email>mark@stackhpc.com</email>
</author>
<published>2020-08-06T09:50:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.platform-os.org/openstack/kolla.git/commit/?id=c5320eb22386c34d83435fa0b9aa03b178996b52'/>
<id>urn:sha1:c5320eb22386c34d83435fa0b9aa03b178996b52</id>
<content type='text'>
There are several issues with kolla_set_configs --check:

1. We calculate the destination path incorrectly when comparing a file
   in a directory, due to passing arguments to os.path.relpath in the
   wrong order
2. For directories that have not changed, we also attempt to compare
   them as files, which fails when they are open()ed.
3. If the config JSON does not have a config_files key, it fails with a
   KeyError.

The first two issues affect the fluentd container, which specifies
directories as the source, without using a glob. The third affects OVN
containers.

This patch fixes these issues.

Closes-Bug: #1890567

Change-Id: I8921befe51da4282121443849177a7ca5ebe8822
</content>
</entry>
</feed>
