summaryrefslogtreecommitdiff
path: root/tests/test_set_config.py
AgeCommit message (Collapse)AuthorFilesLines
2020-09-14Fix kolla_set_configs --check with a directoryMark Goddard1-0/+41
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 (cherry picked from commit c5320eb22386c34d83435fa0b9aa03b178996b52)
2017-07-06Make set_configs.py work with symlinksMartin André1-9/+9
Closes-Bug: #1702305 Change-Id: I92a404b8d301937dc1847d42576e30db43951990
2017-07-02Fix argument to handle_permissionsChulmin Kang1-3/+4
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
2017-06-27Introduce merge and preserve_properties for config_filesMartin André1-9/+28
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
2017-06-21Allow setting copied files group more preciselyMartin André1-13/+5
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
2017-01-18Fix the set config errorJeffrey Zhang1-0/+211
* fix wrong handle for directory * refactor the code Closes-Bug: #1563741 Change-Id: I83869e074cb2924f1c5b49a67e57aefef623a8b0
2016-05-02Remove dependencies on kazoo and friendsSteven Dake1-58/+0
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
2016-02-27Reconfigure keystone serviceJeffrey Zhang1-2/+4
Partially-implements: bp kolla-reconfig Change-Id: Ied293e59bf4531e88a0e5e5bf9a5f5f495d2a0e7
2016-01-13Add py27 py34 pypy unittestJeffrey Zhang1-3/+3
Change-Id: Iaf58463bd156924839062b8284a2d7151a153db5
2015-12-02Add support for copying files from a "zk://" sourceAngus Salkeld1-0/+58
Co-Authored-By: Michal Rostecki <mrostecki@mirantis.com> Implements: blueprint zookeeper Change-Id: I176f063d3802716846b921e210c1569d28bd90d8
2015-11-17Add support for loading kolla config from ENVAngus Salkeld1-0/+17
Implements: blueprint zookeeper Change-Id: Ibabcb5d6d304be9290633338c513f16651d4479a
2015-11-10Add a test case for load_configAngus Salkeld1-0/+47
This is just a basic test to make sure loading from file works. Change-Id: I074f36023ac4198c436fcee1668d32f9d1f0e61b