kolla_set_configs --check fails for source directories
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| kolla |
Medium
|
Radosław Piliszek | ||
| Train |
Medium
|
Unassigned | ||
| Ussuri |
Medium
|
Unassigned | ||
| Victoria |
Medium
|
Radosław Piliszek |
Bug Description
There are two 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.
This affects the fluentd container, which specifies directories as the
source, without using a glob:
{
"source": "/var/lib/
"dest": "/etc/td-
"owner": "td-agent",
"perm": "0600"
}
This results in an error like this:
INFO:__
INFO:__
ERROR:_
Traceback (most recent call last):
File "/usr/local/
execute_
File "/usr/local/
config_
File "/usr/local/
if os.path.
File "/usr/local/
if not self._cmp_
File "/usr/local/
with open(source) as f1, open(dest) as f2:
IsADirectoryError: [Errno 21] Is a directory: '/etc/td-
Changed in kolla: | |
assignee: | nobody → Mark Goddard (mgoddard) |
status: | New → In Progress |
Changed in kolla: | |
importance: | Undecided → Medium |
Changed in kolla: | |
assignee: | Mark Goddard (mgoddard) → Radosław Piliszek (yoctozepto) |
Reviewed: https:/
Committed: https:/
Submitter: Zuul
Branch: master
commit c5320eb22386c34
Author: Mark Goddard <email address hidden>
Date: Thu Aug 6 10:50:25 2020 +0100
Fix kolla_set_configs --check with a directory
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: I8921befe51da42
Changed in kolla: | |
status: | In Progress → Fix Released |
Fix proposed to branch: stable/ussuri
Review: https:/
Fix proposed to branch: stable/train
Review: https:/
Fix proposed to branch: stable/stein
Review: https:/
Reviewed: https:/
Committed: https:/
Submitter: Zuul
Branch: stable/stein
commit c6835b12a6f1e8f
Author: Mark Goddard <email address hidden>
Date: Thu Aug 6 10:50:25 2020 +0100
Fix kolla_set_configs --check with a directory
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: I8921befe51da42
(cherry picked from commit c5320eb22386c34
tags: | added: in-stable-stein |
Reviewed: https:/
Committed: https:/
Submitter: Zuul
Branch: stable/ussuri
commit c191e6fbd7ebf0e
Author: Mark Goddard <email address hidden>
Date: Thu Aug 6 10:50:25 2020 +0100
Fix kolla_set_configs --check with a directory
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: I8921befe51da42
(cherry picked from commit c5320eb22386c34
tags: | added: in-stable-ussuri |
Reviewed: https:/
Committed: https:/
Submitter: Zuul
Branch: stable/train
commit 797ecd6ddbadcc7
Author: Mark Goddard <email address hidden>
Date: Thu Aug 6 10:50:25 2020 +0100
Fix kolla_set_configs --check with a directory
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: I8921befe51da42
(cherry picked from commit c5320eb22386c34
tags: | added: in-stable-train |
This issue was fixed in the openstack/kolla 8.0.5 release.
This issue was fixed in the openstack/kolla 10.2.0 release.
This issue was fixed in the openstack/kolla 9.3.0 release.
Fix proposed to branch: master /review. opendev. org/745105
Review: https:/