kolla_set_configs --check fails for source directories
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
kolla |
Fix Released
|
Medium
|
Radosław Piliszek | ||
Train |
Fix Released
|
Medium
|
Unassigned | ||
Ussuri |
Fix Released
|
Medium
|
Unassigned | ||
Victoria |
Fix Released
|
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: | |
importance: | Undecided → Medium |
Changed in kolla: | |
assignee: | Mark Goddard (mgoddard) → Radosław Piliszek (yoctozepto) |
Fix proposed to branch: master /review. opendev. org/745105
Review: https:/