| Age | Commit message (Collapse) | Author | Files | Lines |
|
Change-Id: Id63c035fafaa68a9004c65161c5a3a3ad5544f02
Signed-off-by: Michal Nasiadka <mnasiadka@gmail.com>
|
|
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 <michal.arbet@ultimum.io>
Change-Id: I6e0b4aaa5722990e3ac647578023f474db3d4381
|
|
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
|
|
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
|
|
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 <will@stackhpc.com>
Change-Id: I67f5f12700d7b55f26bff81e9b54559303da6d83
|
|
Closes-Bug: #1985784
Change-Id: I66476a2b396e2cbe41e68ac51f57aae1806b2ed8
|
|
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
|
|
Change-Id: I799bf8edfef6ff68382d651dca6de96fa80ed733
|
|
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
|
|
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
|
|
|
|
Now that py2 is gone, oslotest dropped dependency on mock and will
soon affect Ussuri CI [1], let's use unittest.mock built in py3.
This also fixes py38 jobs and proactively prevents py36 and py37
failing due to [1]. This is because we never included mock in
test-requirements (but in lower-constraints where it does not
really belong at all) and instead relied on oslotest to bring
it in.
[1] https://review.opendev.org/716322
Change-Id: Iceedcc7ad0d087414f6f94dfc0235fda4754be63
|
|
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.
Fix problems found by updated hacking version.
Update local hacking checks for new flake8.
Remove hacking and friends from lower-constraints, they are not
needed in installations.
Change-Id: I67e5ca24c550163c218fb06692de0b7c528d8318
|
|
Closes-Bug: #1702305
Change-Id: I92a404b8d301937dc1847d42576e30db43951990
|
|
Fix the format of argument passed to handle_permissions function, so
that handle_permissions can handle permissions and ownerships of
config_files.
Change-Id: Ic07975a16973df22cdaa6685fc326620812f8f65
Closes-Bug: #1701876
|
|
The `merge` option will basically copy all the files recursively inside
the container without removing the existing files or directory, while
the `preserve_properties` option keeps the file attributes
(permissions, ownership, timestamps) in the container.
This is useful if you have extracted some config files from a container
and want to use them in another container based on the same image.
This makes TripleO usage of Kolla much more robust.
Change-Id: I78dcec741a941dc21adba33ba33a6dc6ff1d217c
|
|
Previously with the config_files structure of config.json, the group
name was automatically set to the one of the user name. It is now
possible to set the group name in the same fashion than the
'permissions' structure with:
owner: 'desired_owner:desired_group'
Closes-Bug: #1696095
Change-Id: Ibae9f74e2351c81a717294467aedc51ea773c41e
|
|
* fix wrong handle for directory
* refactor the code
Closes-Bug: #1563741
Change-Id: I83869e074cb2924f1c5b49a67e57aefef623a8b0
|
|
Since kolla-mesos has been retired, there is no need in the code
base to keep the zookeeper implementation. As a result, just remove
it. If we were to keep it we need virtualenvs for that part of the
code base which installs the python dependencies related to it
for from-binary installs.
This just simplifies the implementation tremendously and culls dead
code.
Change-Id: Ieda226e652d67f5b5667112f4f2556f3171366d3
Closes-Bug: #1577194
|
|
Partially-implements: bp kolla-reconfig
Change-Id: Ied293e59bf4531e88a0e5e5bf9a5f5f495d2a0e7
|
|
Change-Id: Iaf58463bd156924839062b8284a2d7151a153db5
|
|
Co-Authored-By: Michal Rostecki <mrostecki@mirantis.com>
Implements: blueprint zookeeper
Change-Id: I176f063d3802716846b921e210c1569d28bd90d8
|
|
Implements: blueprint zookeeper
Change-Id: Ibabcb5d6d304be9290633338c513f16651d4479a
|
|
This is just a basic test to make sure loading from file works.
Change-Id: I074f36023ac4198c436fcee1668d32f9d1f0e61b
|