Restore default log path for image prepare
If logging paths weren't configured in handlers, use default /var/log for tripleo-container-image-prepare.log along with its *ansible counterpart used for logging the container image prepare bits. Closes-Bug: #1866676 Change-Id: I3edbb1b81d5b75519d2bb46f7af04dc833fce9b7 Signed-off-by: Bogdan Dobrelya <bdobreli@redhat.com>
This commit is contained in:
parent
8e082f45dd
commit
b5668d01d5
|
@ -589,8 +589,7 @@ class BaseImageUploader(object):
|
|||
else:
|
||||
raise OSError('Log output is not a file.')
|
||||
except (AttributeError, OSError):
|
||||
tmp_dir = tempfile.gettempdir()
|
||||
log_f = os.path.join(tmp_dir, log_name)
|
||||
log_f = os.path.join('/var/log', log_name)
|
||||
try:
|
||||
LOG.info('Ansible action starting')
|
||||
ansible.AnsiblePlaybookAction(
|
||||
|
|
|
@ -1316,8 +1316,8 @@ class TestSkopeoImageUploader(base.TestCase):
|
|||
override_ansible_cfg=(
|
||||
"[defaults]\n"
|
||||
"stdout_callback=tripleo_dense\n"
|
||||
"log_path=%s/tripleo-container-image-prepare-ansible.log\n"
|
||||
% os.path.dirname(logfile.name)
|
||||
"log_path="
|
||||
"/var/log/tripleo-container-image-prepare-ansible.log\n"
|
||||
)
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in New Issue