| Age | Commit message (Collapse) | Author | Files | Lines |
|
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)
|
|
When asserting the validity of config files, we currently
use viewkeys(), which has been removed in Python3, so a kolla
container cannot set the config with Python3 only.
"Traceback (most recent call last):",
" File \"/usr/local/bin/kolla_set_configs\", line 406, in main",
" config = load_config()",
" File \"/usr/local/bin/kolla_set_configs\", line 297, in load_config",
" validate_config(config)",
" File \"/usr/local/bin/kolla_set_configs\", line 238, in validate_config",
" if not data.viewkeys() >= required_keys:",
"AttributeError: 'dict' object has no attribute 'viewkeys'"
Use keys() instead, which is compatible with both Python2 and
Python3, and has no visible performance disadvantage and wrap it in a
set() call so that we are guranteed to compare sets.
Change-Id: I5f53c8f5a390a9df3ebb60659ebdcef41e3a9cad
Co-Authored-By: Michele Baldessari <michele@acksyn.org>
|
|
On some distro, running kolla_start via su changes
the default UMASK, and consequently set_configs.py
generates a /run_command that is not world-readable,
and kolla cannot start the configured service.
Make sure /run_command always has 'go+r' permissions.
Change-Id: I6304f5937c512068ee1fb8aac5c88a2bd086e387
|
|
The kolla-kubernetes config files live in a ..data directory in the
config volume and are symlinked with relative path at the root of the
config volume. This naturally breaks with the link copy feature
introduce in I92a404b8d301937dc1847d42576e30db43951990.
This commit restores the original behavior to copy the target of the
link unless both 'merge' and 'preserve_properties' options are set, in
which case the link itself is copied.
Change-Id: I5d768687208205fb50ef5ab93675f47e98ea6351
|
|
Closes-Bug: #1702305
Change-Id: I92a404b8d301937dc1847d42576e30db43951990
|
|
|
|
Remove duplicate logging for file copying, and clarify some log
messages.
Change-Id: I4dfaffa62f79a32a7fd6060b92ccb119f657f854
|
|
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
|
|
Change-Id: If6b4a76cf36c639e80a749ec9c938d06435eda51
|
|
This allows to set permissions for configuration files.
TrivialFix
Change-Id: Ida2ed62eaba8908fb0bd50bb0be00fb5f9b1adc3
|
|
set_perms may fail in some case, but it is not critical. Just leave a
warning rather than exit.
Change-Id: I757c7b60611fb6c0547bd1b26ec8a8af03684e5f
Closes-Bug: 1689454
|
|
Keeping function code together can make the structure clear
Change-Id: Ia16b43b902543bc57869579acba2f6b3d5f2ca54
|
|
* fix wrong handle for directory
* refactor the code
Closes-Bug: #1563741
Change-Id: I83869e074cb2924f1c5b49a67e57aefef623a8b0
|
|
The missing parenthesys caused a string formatting error, which hides
the actual failure when running the container.
Change-Id: Ieebf4abd536ccfceeba645c52b109b00faf4ee57
|
|
Co-Authored-By: caoyuan <cao.yuan@99cloud.net>
TrivialFix
Change-Id: Ie576114a3f6f4579a4df3175232a5f6c63c7a795
|
|
This also makes it so that the config check
accumulates errors instead of bailing out
immediatly (using a sys.exit) which seems nicer
than blowing up on the first error.
Change-Id: I915ef5a018969eee87ac1ab3ddc88fc1b89a3448
|
|
Incases where it is useful to place many config.json files
under the same directory (ie one for config_glance_api.json or
one for config_glance_registry.json) we should be able to
specify which file under that directory do we actually want to
use (instead of assuming it is always config.json).
Change-Id: I42eeb093d29bac27d71ee08e55e115c2d8b5e9ae
|
|
when code exit by using sys.exit in try..catch block, it will skip catch
and run the code in finally. Because SystemExit does not inherit from
Exception.
This patch moves sys.exit out of finally block. Then it won't execute
when script exits by sys.exit
Change-Id: I6457b1b861d2f9fdadce788ac6b719f46c7f2af3
Partial-Bug: #1631503
|
|
During the upgrade from Mitaka to Newton, the uid/gid may change for the
same image. Especially on Ubuntu, we moved to Ubuntu Xenial in Newton
and it added systemd related user which break all the uid/gid during an
upgrade. It will the permissions in all docker named volumes.
This fix extends set_config.py to set the proper permission during
container start. This is super light then add commands in
extend_start.sh file or add ansible tasks.
This patch just fixes rabbitmq case. Other services will be fixed in
following patches.
Partial-Bug: #1631503
Change-Id: Ib17027b97abbc9bf4e3cd503601b8010325b5c5b
|
|
Most simple implementation of external ceph support.
We use INI merge to configure RBD backend for Glance and copy
ceph.conf and keyring provided by the user into the container.
Set_configs.py had to be extended to support globbing (wildcards) in
order to copy ceph keyring file which is named depending on the cephx
user name.
Partially-Implements Blueprint: external-ceph
Partially-Implements Blueprint: selectable-ceph
Change-Id: Iacadbd8ec9956e9f075206ea03b28f044cb6ffb8
|
|
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
|
|
These values are optional only when the services are not enabled.
If the file does not exist we should not warn, but rather inform.
Ceph-mon is an exception here since its bootstrap process means
the files may or may not exist initially.
TrivialFix
Change-Id: Ic02bece76d480e99deecf612036f37abb5604135
|
|
Change-Id: I8d207d1782acfebf5c07de39df3257fd9bdbbada
Partially-implements: bp kolla-reconfig
|
|
Partially-implements: bp kolla-reconfig
Change-Id: Ied293e59bf4531e88a0e5e5bf9a5f5f495d2a0e7
|
|
TrivialFix
Change-Id: I352ef1176407edf093667644ce6adbd48eb63865
|
|
TrivialFix
Change-Id: Ie723fb35f15be0a500b428b2b58e6b4c5321df0c
|
|
|
|
TrivialFix
Change-Id: I72c541c1846e503486b402e88d5b29364920fc83
|
|
Python 3 deprecated the logger.warn method, see:
https://docs.python.org/3/library/logging.html#logging.warning, so we
prefer to use warning to avoid DeprecationWarning.
Change-Id: Ic4e07276def17ef39764601c8a7e0991f9a4efbc
Closes-Bug: 1508442
|
|
|
|
|
|
TrivialFix
Change-Id: I7ddebc7b6f71e50254801324fa2bf093fdaa8ce0
|
|
|
|
TrivialFix
Change-Id: Ic1c9fc76f4a5725ee76460c727197a96fe5d5359
|
|
it is more safe and pythonic.
Change-Id: I728649af37cee8d1e255bb0a389cbc532e551c74
|
|
Base on the code logic, all the source, dest, owner and perm field
is required.
Change-Id: Iba5b4b2c2bd3ca0b97a3c29655e87c9701a84350
|
|
Change-Id: I348c69e5411135da8434e9278a48a5777ff2a72d
Partially-Implements: blueprint python3
|
|
Co-Authored-By: Michal Rostecki <mrostecki@mirantis.com>
Implements: blueprint zookeeper
Change-Id: I176f063d3802716846b921e210c1569d28bd90d8
|
|
Implements: blueprint zookeeper
Change-Id: Ibabcb5d6d304be9290633338c513f16651d4479a
|
|
This brings Kolla images inline with FHS and should make finding
locations of things more consistent and reliable with the linux world
at large.
Change-Id: Iece5b4da4bace0fb8b1f41a65ab2c852ec73e6f8
Closes-Bug: #1485742
|
|
Change-Id: I46dc2f02dda8219878eee3755b0891f4c3450682
Partially-Implements: blueprint replace-config-external
|
|
There are situations where we need to copy-if-exists mainly in cluster
setups. This is needed to replace config-external for ceph right now
Change-Id: I3c0898d8c584338a38e6ce4c4146e145910c5a52
Partially-Implements: blueprint replace-config-external
|
|
This refactor brings the logging in line with the rest of Kolla.
The fucntion names were updated to reflect thier new role.
Additionally, it fixes several issues with the permissions which
currently break all containers that use set_configs.py
It will also work with source being a directory or a file now.
Change-Id: I4a197a343e3baf3bd31532debdff5972adb8aefa
Partially-Implements: blueprint replace-config-external
|
|
Replace config-external with JSON file. The JSON file will
be placed in each of the services directories with expected
location and destination.
Set-configs.py will be responsible for interpreting the JSON file,
creating the necessary directories, moving config files, and
and providing a command line for start.sh to run the service
with the correct config files specified.
Partially-Implements: blueprint replace-config-external
Change-Id: I5e2e69dfe3ae7f938fcf51f1cd450aaa10e7f1e3
|