[rpm-packaging] logging override in openstack packages

Javier Pena jpena at redhat.com
Wed Jul 7 09:34:54 UTC 2021


Hello Piotr,

On Fri, Jul 2, 2021 at 6:53 PM Piotr Mossakowski
<piotr.mossakowski at tietoevry.com> wrote:
>
> Hello,
>
> There is a logging override in almost all openstack packages, for example in nova:
>
> https://opendev.org/openstack/rpm-packaging/src/branch/stable/victoria/openstack/nova/openstack-nova.defaultconf
>
> It lands in /etc/nova/nova.conf.d/010-nova.conf as stated in the spec:
>
> https://opendev.org/openstack/rpm-packaging/src/branch/stable/victoria/openstack/nova/nova.spec.j2#L407
>
> Let's assume following scenario: in kolla-ansible based deployment I want to disable logging globally using /etc/kolla/config/global.conf:
>
> [DEFAULT]
> log_dir =
> log_file =
>
> For kolla images built from RPMs, the file '/etc/nova/nova.conf.d/010-nova.conf' will override what I want to achieve by global.conf.
>
> We have a situation when kolla images log inside the container into '/var/log/nova' where there is no log rotation. There is no easy way to change that in kolla-ansible based deployments.
>
> Is there any specific reason why default logging has been hardcoded like that? Can we agree to change that situation to be able to override logging as expected?
>

In general, packages (both for rpm-packaging and RDO) try to set some
sensible minimum defaults for a few parameters, which are set
according to the base OS requirements. This is why we get those
defaults in the rpm-packaging Nova spec.

I think the easiest way to ensure the override in
/etc/kolla/config/global.conf is enforced would be to parse it last in
the nova-api command-line (with a --config-file directive). Would that
be possible in your environment?

Regards,
Javier

> --
>
> Pozdrawiam serdecznie / Best regards,
>
> Piotr Mossakowski
>
> Lead System Engineer, Product Development Services, Cloud Infra & Applications
>
> Email piotr.mossakowski at tietoevry.com, +48795515407
> Aleja Piastów 30, 71-064 Szczecin, Poland, www.tietoevry.com




More information about the openstack-discuss mailing list