Run chown for nova log files on every run to fix wrong permissions
If nova-manage command was triggered on a host for the first time as root (usually manual runs) the nova-manage.log gets created as root user. On overcloud deploy runs the nova-manage command is run as nova user. In such situation the overcloud deploy fails as the nova user can not write to the nova-manage.log. With this change we run the chown of the logs files on every overcloud deploy to fix the nova-manage.log file permissions. Closes-Bug: #1820590 Change-Id: Iaa8db09712da6c0d9553fab39d7d5b50fa7cf287
This commit is contained in:
parent
0bb76dc9fc
commit
c62247fa8b
@ -7,6 +7,12 @@ parameters:
|
||||
DockerNovaApiImage:
|
||||
description: image
|
||||
type: string
|
||||
DeployIdentifier:
|
||||
default: ''
|
||||
type: string
|
||||
description: >
|
||||
Setting this to a unique value will re-run any deployment tasks which
|
||||
perform configuration on a Heat stack-update.
|
||||
|
||||
outputs:
|
||||
config_settings:
|
||||
@ -29,6 +35,13 @@ outputs:
|
||||
user: root
|
||||
volumes: *nova_api_volumes
|
||||
command: ['/bin/bash', '-c', 'chown -R nova:nova /var/log/nova']
|
||||
environment:
|
||||
# NOTE: this should force this container to re-run on each
|
||||
# update (scale-out, etc.)
|
||||
- list_join:
|
||||
- ''
|
||||
- - 'TRIPLEO_DEPLOY_IDENTIFIER='
|
||||
- {get_param: DeployIdentifier}
|
||||
host_prep_tasks:
|
||||
description: Extra ansible tasks needed for logging to files in the host.
|
||||
value:
|
||||
|
@ -10,6 +10,12 @@ parameters:
|
||||
NovaServiceName:
|
||||
description: service name
|
||||
type: string
|
||||
DeployIdentifier:
|
||||
default: ''
|
||||
type: string
|
||||
description: >
|
||||
Setting this to a unique value will re-run any deployment tasks which
|
||||
perform configuration on a Heat stack-update.
|
||||
|
||||
resources:
|
||||
|
||||
@ -47,6 +53,13 @@ outputs:
|
||||
volumes:
|
||||
- /var/log/containers/nova:/var/log/nova:z
|
||||
command: ['/bin/bash', '-c', 'chown -R nova:nova /var/log/nova']
|
||||
environment:
|
||||
# NOTE: this should force this container to re-run on each
|
||||
# update (scale-out, etc.)
|
||||
- list_join:
|
||||
- ''
|
||||
- - 'TRIPLEO_DEPLOY_IDENTIFIER='
|
||||
- {get_param: DeployIdentifier}
|
||||
- keys:
|
||||
CONTAINERNAME: {get_attr: [InitLogContainerName, value]}
|
||||
host_prep_tasks:
|
||||
|
@ -0,0 +1,9 @@
|
||||
---
|
||||
fixes:
|
||||
- |
|
||||
If nova-manage command was triggered on a host for the first time as root
|
||||
(usually manual runs) the nova-manage.log gets created as root user. On
|
||||
overcloud deploy runs the nova-manage command is run as nova user. In such
|
||||
situation the overcloud deploy fails as the nova user can not write to the
|
||||
nova-manage.log. With this change we run the chown of the logs files on
|
||||
every overcloud deploy to fix the nova-manage.log file permissions.
|
Loading…
Reference in New Issue
Block a user